diff --git a/alf b/alf index dab7549..f1aef3f 100755 --- a/alf +++ b/alf @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# This script was generated by bashly 1.1.7 (https://bashly.dannyb.co) +# This script was generated by bashly 1.2.6 (https://bashly.dannyb.co) # Modifying it manually is not recommended # :wrapper.bash3_bouncer @@ -17,15 +17,7 @@ version_command() { # :command.usage alf_usage() { - if [[ -n $long_usage ]]; then - printf "alf - Your Little Bash Alias Friend\n" - echo - - else - printf "alf - Your Little Bash Alias Friend\n" - echo - - fi + printf "alf - Your Little Bash Alias Friend\n\n" printf "%s\n" "$(bold "Usage:")" printf " alf COMMAND\n" @@ -46,7 +38,7 @@ alf_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -70,16 +62,7 @@ alf_usage() { # :command.usage alf_connect_usage() { - if [[ -n $long_usage ]]; then - printf "alf connect - Connect to a remote git repository.\n" - echo - - else - printf "alf connect - Connect to a remote git repository.\n" - echo - - fi - + printf "alf connect - Connect to a remote git repository.\n\n" printf "Alias: c\n" echo @@ -89,7 +72,7 @@ alf_connect_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_flags @@ -133,16 +116,7 @@ alf_connect_usage() { # :command.usage alf_download_usage() { - if [[ -n $long_usage ]]; then - printf "alf download - Perform git pull on the connected repo.\n" - echo - - else - printf "alf download - Perform git pull on the connected repo.\n" - echo - - fi - + printf "alf download - Perform git pull on the connected repo.\n\n" printf "Alias: d, pull\n" echo @@ -152,7 +126,7 @@ alf_download_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -165,16 +139,7 @@ alf_download_usage() { # :command.usage alf_upload_usage() { - if [[ -n $long_usage ]]; then - printf "alf upload - Perform git commit and push on the connected repo.\n" - echo - - else - printf "alf upload - Perform git commit and push on the connected repo.\n" - echo - - fi - + printf "alf upload - Perform git commit and push on the connected repo.\n\n" printf "Alias: u, push\n" echo @@ -184,7 +149,7 @@ alf_upload_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -197,16 +162,7 @@ alf_upload_usage() { # :command.usage alf_generate_usage() { - if [[ -n $long_usage ]]; then - printf "alf generate - Generate aliases to stdout.\n" - echo - - else - printf "alf generate - Generate aliases to stdout.\n" - echo - - fi - + printf "alf generate - Generate aliases to stdout.\n\n" printf "Alias: g\n" echo @@ -216,7 +172,7 @@ alf_generate_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -229,16 +185,7 @@ alf_generate_usage() { # :command.usage alf_save_usage() { - if [[ -n $long_usage ]]; then - printf "alf save - Generate aliases to \`~/.bash_aliases\`.\n" - echo - - else - printf "alf save - Generate aliases to \`~/.bash_aliases\`.\n" - echo - - fi - + printf "alf save - Generate aliases to \`~/.bash_aliases\`.\n\n" printf "Alias: s\n" echo @@ -248,7 +195,7 @@ alf_save_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -269,16 +216,7 @@ alf_save_usage() { # :command.usage alf_edit_usage() { - if [[ -n $long_usage ]]; then - printf "alf edit - Open your \`alf.conf\` for editing.\n" - echo - - else - printf "alf edit - Open your \`alf.conf\` for editing.\n" - echo - - fi - + printf "alf edit - Open your \`alf.conf\` for editing.\n\n" printf "Alias: e\n" echo @@ -288,7 +226,7 @@ alf_edit_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -301,16 +239,7 @@ alf_edit_usage() { # :command.usage alf_which_usage() { - if [[ -n $long_usage ]]; then - printf "alf which - Show the alias command.\n" - echo - - else - printf "alf which - Show the alias command.\n" - echo - - fi - + printf "alf which - Show the alias command.\n\n" printf "Alias: w\n" echo @@ -320,7 +249,7 @@ alf_which_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -346,15 +275,7 @@ alf_which_usage() { # :command.usage alf_upgrade_usage() { - if [[ -n $long_usage ]]; then - printf "alf upgrade - Upgrade alf to the latest version.\n" - echo - - else - printf "alf upgrade - Upgrade alf to the latest version.\n" - echo - - fi + printf "alf upgrade - Upgrade alf to the latest version.\n\n" printf "%s\n" "$(bold "Usage:")" printf " alf upgrade\n" @@ -362,7 +283,7 @@ alf_upgrade_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -375,15 +296,7 @@ alf_upgrade_usage() { # :command.usage alf_info_usage() { - if [[ -n $long_usage ]]; then - printf "alf info - Show all alf related system facts.\n" - echo - - else - printf "alf info - Show all alf related system facts.\n" - echo - - fi + printf "alf info - Show all alf related system facts.\n\n" printf "%s\n" "$(bold "Usage:")" printf " alf info\n" @@ -391,7 +304,7 @@ alf_info_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then printf "%s\n" "$(bold "Options:")" # :command.usage_fixed_flags @@ -403,12 +316,16 @@ alf_info_usage() { } # :command.normalize_input +# :command.normalize_input_function normalize_input() { - local arg flags + local arg passthru flags + passthru=false while [[ $# -gt 0 ]]; do arg="$1" - if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then + if [[ $passthru == true ]]; then + input+=("$arg") + elif [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then input+=("${BASH_REMATCH[1]}") input+=("${BASH_REMATCH[2]}") elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then @@ -419,6 +336,9 @@ normalize_input() { for ((i = 0; i < ${#flags}; i++)); do input+=("-${flags:i:1}") done + elif [[ "$arg" == "--" ]]; then + passthru=true + input+=("$arg") else input+=("$arg") fi @@ -426,45 +346,6 @@ normalize_input() { shift done } -# :command.inspect_args -inspect_args() { - if ((${#args[@]})); then - readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) - echo args: - for k in "${sorted_keys[@]}"; do - echo "- \${args[$k]} = ${args[$k]}" - done - else - echo args: none - fi - - if ((${#other_args[@]})); then - echo - echo other_args: - echo "- \${other_args[*]} = ${other_args[*]}" - for i in "${!other_args[@]}"; do - echo "- \${other_args[$i]} = ${other_args[$i]}" - done - fi - - if ((${#deps[@]})); then - readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) - echo - echo deps: - for k in "${sorted_keys[@]}"; do - echo "- \${deps[$k]} = ${deps[$k]}" - done - fi - - if ((${#env_var_names[@]})); then - readarray -t sorted_names < <(printf '%s\n' "${env_var_names[@]}" | sort) - echo - echo "environment variables:" - for k in "${sorted_names[@]}"; do - echo "- \$$k = ${!k:-}" - done - fi -} # :command.user_lib # src/lib/colors.sh @@ -674,7 +555,7 @@ save_config() { # :command.command_functions # :command.function alf_connect_command() { - # src/connect_command.sh + repo=${args[repo]} force=${args[--yes]} force_ssh=${args[--ssh]} @@ -764,7 +645,7 @@ alf_connect_command() { # :command.function alf_download_command() { - # src/download_command.sh + find_config if [[ ! -f $rc_file ]]; then @@ -783,7 +664,7 @@ alf_download_command() { # :command.function alf_upload_command() { - # src/upload_command.sh + find_config if [[ ! -f $rc_file ]]; then @@ -801,28 +682,28 @@ alf_upload_command() { # :command.function alf_generate_command() { - # src/generate_command.sh + generate_config } # :command.function alf_save_command() { - # src/save_command.sh + save_config } # :command.function alf_edit_command() { - # src/edit_command.sh + find_config ${EDITOR:-vi} "$config_file" } # :command.function alf_which_command() { - # src/which_command.sh + code=${args[code]} subcode=${args[subcode]} @@ -858,14 +739,14 @@ alf_which_command() { # :command.function alf_upgrade_command() { - # src/upgrade_command.sh + exec bash <(curl -s https://raw.githubusercontent.com/DannyBen/alf/master/setup) } # :command.function alf_info_command() { - # src/info_command.sh + find_config if [[ -d "$repo_path/.git" ]]; then @@ -919,7 +800,8 @@ alf_info_command() { parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --version | -v) version_command exit @@ -940,8 +822,6 @@ parse_requirements() { # :command.environment_variables_filter - env_var_names+=("ALF_RC_FILE") - # :command.command_filter action=${1:-} @@ -1051,7 +931,8 @@ parse_requirements() { alf_connect_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_connect_usage @@ -1066,9 +947,8 @@ alf_connect_parse_requirements() { done # :command.dependencies_filter - if command -v git >/dev/null 2>&1; then - deps['git']="$(command -v git | head -n1)" - else + # :dependency.filter + if ! command -v git >/dev/null 2>&1; then printf "missing dependency: git\n" >&2 exit 1 fi @@ -1112,6 +992,7 @@ alf_connect_parse_requirements() { *) # :command.parse_requirements_case # :command.parse_requirements_case_simple + # :argument.case if [[ -z ${args['repo']+x} ]]; then args['repo']=$1 shift @@ -1124,10 +1005,10 @@ alf_connect_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['repo']+x} ]]; then printf "missing required argument: REPO\nusage: alf connect REPO [OPTIONS]\n" >&2 + exit 1 fi @@ -1137,7 +1018,8 @@ alf_connect_parse_requirements() { alf_download_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_download_usage @@ -1152,9 +1034,8 @@ alf_download_parse_requirements() { done # :command.dependencies_filter - if command -v git >/dev/null 2>&1; then - deps['git']="$(command -v git | head -n1)" - else + # :dependency.filter + if ! command -v git >/dev/null 2>&1; then printf "missing dependency: git\n" >&2 exit 1 fi @@ -1189,7 +1070,8 @@ alf_download_parse_requirements() { alf_upload_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_upload_usage @@ -1204,9 +1086,8 @@ alf_upload_parse_requirements() { done # :command.dependencies_filter - if command -v git >/dev/null 2>&1; then - deps['git']="$(command -v git | head -n1)" - else + # :dependency.filter + if ! command -v git >/dev/null 2>&1; then printf "missing dependency: git\n" >&2 exit 1 fi @@ -1241,7 +1122,8 @@ alf_upload_parse_requirements() { alf_generate_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_generate_usage @@ -1285,7 +1167,8 @@ alf_generate_parse_requirements() { alf_save_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_save_usage @@ -1301,8 +1184,6 @@ alf_save_parse_requirements() { # :command.environment_variables_filter - env_var_names+=("ALF_ALIASES_FILE") - # :command.command_filter action="save" @@ -1333,7 +1214,8 @@ alf_save_parse_requirements() { alf_edit_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_edit_usage @@ -1377,7 +1259,8 @@ alf_edit_parse_requirements() { alf_which_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_which_usage @@ -1407,9 +1290,11 @@ alf_which_parse_requirements() { *) # :command.parse_requirements_case # :command.parse_requirements_case_simple + # :argument.case if [[ -z ${args['code']+x} ]]; then args['code']=$1 shift + # :argument.case elif [[ -z ${args['subcode']+x} ]]; then args['subcode']=$1 shift @@ -1422,10 +1307,10 @@ alf_which_parse_requirements() { esac done - # :command.required_args_filter if [[ -z ${args['code']+x} ]]; then printf "missing required argument: CODE\nusage: alf which CODE [SUBCODE]\n" >&2 + exit 1 fi @@ -1435,7 +1320,8 @@ alf_which_parse_requirements() { alf_upgrade_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_upgrade_usage @@ -1450,9 +1336,8 @@ alf_upgrade_parse_requirements() { done # :command.dependencies_filter - if command -v curl >/dev/null 2>&1; then - deps['curl']="$(command -v curl | head -n1)" - else + # :dependency.filter + if ! command -v curl >/dev/null 2>&1; then printf "missing dependency: curl\n" >&2 exit 1 fi @@ -1487,7 +1372,8 @@ alf_upgrade_parse_requirements() { alf_info_parse_requirements() { # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes alf_info_usage @@ -1502,9 +1388,8 @@ alf_info_parse_requirements() { done # :command.dependencies_filter - if command -v git >/dev/null 2>&1; then - deps['git']="$(command -v git | head -n1)" - else + # :dependency.filter + if ! command -v git >/dev/null 2>&1; then printf "missing dependency: git\n" >&2 exit 1 fi @@ -1541,7 +1426,6 @@ initialize() { long_usage='' set -e - # src/initialize.sh aliases_file=${ALF_ALIASES_FILE:-~/.bash_aliases} rc_file=${ALF_RC_FILE:-~/.alfrc} set -e @@ -1550,11 +1434,8 @@ initialize() { # :command.run run() { - declare -A args=() - declare -A deps=() - declare -a other_args=() - declare -a env_var_names=() - declare -a input=() + declare -g -A args=() + declare -g -a input=() normalize_input "$@" parse_requirements "${input[@]}" diff --git a/doc/alf-connect.1 b/doc/alf-connect.1 index c11d25c..ee86eae 100644 --- a/doc/alf-connect.1 +++ b/doc/alf-connect.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-connect" "1" "February 2024" "" "Connect to a remote git repository." +.TH "alf\-connect" "1" "December 2024" "" "Connect to a remote git repository." .SH NAME -\f[B]alf connect\f[R] - Connect to a remote git repository. +\f[B]alf connect\f[R] \- Connect to a remote git repository. .SH SYNOPSIS \f[B]alf connect\f[R] REPO OPTIONS .SH DESCRIPTION @@ -16,7 +16,8 @@ Remote GitHub repository to connect to. Can be one of: .IP \[bu] 2 Your username on GitHub. -In this case, the repository is expected to be named \f[B]alf-conf\f[R]. +In this case, the repository is expected to be named +\f[B]alf\-conf\f[R]. .IP \[bu] 2 Your username/repo on GitHub. .IP \[bu] 2 @@ -24,23 +25,24 @@ Any other full URL to a repository. .IP \[bu] 2 \f[I]Required\f[R] .SH OPTIONS -.SS --ssh -Connect to GitHub non-interactively using SSH (implies \f[B]--yes\f[R]). -.SS --https -Connect to GitHub non-interactively using HTTPS (implies -\f[B]--yes\f[R]). -.SS --yes, -y -Connect to any remote repository non-interactively. +.SS \-\-ssh +Connect to GitHub non\-interactively using SSH (implies +\f[B]\-\-yes\f[R]). +.SS \-\-https +Connect to GitHub non\-interactively using HTTPS (implies +\f[B]\-\-yes\f[R]). +.SS \-\-yes, \-y +Connect to any remote repository non\-interactively. .SH DEPENDENCIES .SS git .SH EXAMPLES .IP .EX -alf connect you --ssh +alf connect you \-\-ssh -alf connect you/alf-config +alf connect you/alf\-config -alf connect https://You\[at]bitbucket.org/YourUser/rush-repo.git --yes +alf connect https://You\[at]bitbucket.org/YourUser/rush\-repo.git \-\-yes .EE .SH SEE ALSO \f[B]alf\f[R](1) diff --git a/doc/alf-connect.md b/doc/alf-connect.md index d8f201f..23018c3 100644 --- a/doc/alf-connect.md +++ b/doc/alf-connect.md @@ -1,6 +1,6 @@ % alf-connect(1) | Connect to a remote git repository. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-download.1 b/doc/alf-download.1 index d984f15..bfc524f 100644 --- a/doc/alf-download.1 +++ b/doc/alf-download.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-download" "1" "February 2024" "" "Perform git pull on the connected repo." +.TH "alf\-download" "1" "December 2024" "" "Perform git pull on the connected repo." .SH NAME -\f[B]alf download\f[R] - Perform git pull on the connected repo. +\f[B]alf download\f[R] \- Perform git pull on the connected repo. .SH SYNOPSIS \f[B]alf download\f[R] .SH DESCRIPTION diff --git a/doc/alf-download.md b/doc/alf-download.md index b92f767..65d470a 100644 --- a/doc/alf-download.md +++ b/doc/alf-download.md @@ -1,6 +1,6 @@ % alf-download(1) | Perform git pull on the connected repo. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-edit.1 b/doc/alf-edit.1 index 801e989..5c4adf3 100644 --- a/doc/alf-edit.1 +++ b/doc/alf-edit.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-edit" "1" "February 2024" "" "Open your \f[CR]alf.conf\f[R] for editing." +.TH "alf\-edit" "1" "December 2024" "" "Open your \f[CR]alf.conf\f[R] for editing." .SH NAME -\f[B]alf edit\f[R] - Open your \f[CR]alf.conf\f[R] for editing. +\f[B]alf edit\f[R] \- Open your \f[CR]alf.conf\f[R] for editing. .SH SYNOPSIS \f[B]alf edit\f[R] .SH DESCRIPTION diff --git a/doc/alf-edit.md b/doc/alf-edit.md index 701ed4a..e97473f 100644 --- a/doc/alf-edit.md +++ b/doc/alf-edit.md @@ -1,6 +1,6 @@ % alf-edit(1) | Open your `alf.conf` for editing. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-generate.1 b/doc/alf-generate.1 index c74081e..cad9ca2 100644 --- a/doc/alf-generate.1 +++ b/doc/alf-generate.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-generate" "1" "February 2024" "" "Generate aliases to stdout." +.TH "alf\-generate" "1" "December 2024" "" "Generate aliases to stdout." .SH NAME -\f[B]alf generate\f[R] - Generate aliases to stdout. +\f[B]alf generate\f[R] \- Generate aliases to stdout. .SH SYNOPSIS \f[B]alf generate\f[R] .SH DESCRIPTION diff --git a/doc/alf-generate.md b/doc/alf-generate.md index 6c98d17..9d9ae61 100644 --- a/doc/alf-generate.md +++ b/doc/alf-generate.md @@ -1,6 +1,6 @@ % alf-generate(1) | Generate aliases to stdout. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-info.1 b/doc/alf-info.1 index 6c22080..2bdec8a 100644 --- a/doc/alf-info.1 +++ b/doc/alf-info.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-info" "1" "February 2024" "" "Show all alf related system facts." +.TH "alf\-info" "1" "December 2024" "" "Show all alf related system facts." .SH NAME -\f[B]alf info\f[R] - Show all alf related system facts. +\f[B]alf info\f[R] \- Show all alf related system facts. .SH SYNOPSIS \f[B]alf info\f[R] .SH DESCRIPTION diff --git a/doc/alf-info.md b/doc/alf-info.md index 846daf4..6d5839e 100644 --- a/doc/alf-info.md +++ b/doc/alf-info.md @@ -1,6 +1,6 @@ % alf-info(1) | Show all alf related system facts. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-save.1 b/doc/alf-save.1 index 602adc0..0bb0fcf 100644 --- a/doc/alf-save.1 +++ b/doc/alf-save.1 @@ -1,8 +1,9 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-save" "1" "February 2024" "" "Generate aliases to \f[CR]\[ti]/.bash_aliases\f[R]." +.TH "alf\-save" "1" "December 2024" "" "Generate aliases to \f[CR]\[ti]/.bash_aliases\f[R]." .SH NAME -\f[B]alf save\f[R] - Generate aliases to \f[CR]\[ti]/.bash_aliases\f[R]. +\f[B]alf save\f[R] \- Generate aliases to +\f[CR]\[ti]/.bash_aliases\f[R]. .SH SYNOPSIS \f[B]alf save\f[R] .SH DESCRIPTION diff --git a/doc/alf-save.md b/doc/alf-save.md index ac8c2d3..5b60097 100644 --- a/doc/alf-save.md +++ b/doc/alf-save.md @@ -1,6 +1,6 @@ % alf-save(1) | Generate aliases to `~/.bash_aliases`. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-upgrade.1 b/doc/alf-upgrade.1 index b826bd6..8e83015 100644 --- a/doc/alf-upgrade.1 +++ b/doc/alf-upgrade.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-upgrade" "1" "February 2024" "" "Upgrade alf to the latest version." +.TH "alf\-upgrade" "1" "December 2024" "" "Upgrade alf to the latest version." .SH NAME -\f[B]alf upgrade\f[R] - Upgrade alf to the latest version. +\f[B]alf upgrade\f[R] \- Upgrade alf to the latest version. .SH SYNOPSIS \f[B]alf upgrade\f[R] .SH DESCRIPTION diff --git a/doc/alf-upgrade.md b/doc/alf-upgrade.md index da870f3..14f9f63 100644 --- a/doc/alf-upgrade.md +++ b/doc/alf-upgrade.md @@ -1,6 +1,6 @@ % alf-upgrade(1) | Upgrade alf to the latest version. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-upload.1 b/doc/alf-upload.1 index 68776ca..add21bf 100644 --- a/doc/alf-upload.1 +++ b/doc/alf-upload.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-upload" "1" "February 2024" "" "Perform git commit and push on the connected repo." +.TH "alf\-upload" "1" "December 2024" "" "Perform git commit and push on the connected repo." .SH NAME -\f[B]alf upload\f[R] - Perform git commit and push on the connected +\f[B]alf upload\f[R] \- Perform git commit and push on the connected repo. .SH SYNOPSIS \f[B]alf upload\f[R] diff --git a/doc/alf-upload.md b/doc/alf-upload.md index a5a27da..8481b4f 100644 --- a/doc/alf-upload.md +++ b/doc/alf-upload.md @@ -1,6 +1,6 @@ % alf-upload(1) | Perform git commit and push on the connected repo. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf-which.1 b/doc/alf-which.1 index f6d4d39..7a85789 100644 --- a/doc/alf-which.1 +++ b/doc/alf-which.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf-which" "1" "February 2024" "" "Show the alias command." +.TH "alf\-which" "1" "December 2024" "" "Show the alias command." .SH NAME -\f[B]alf which\f[R] - Show the alias command. +\f[B]alf which\f[R] \- Show the alias command. .SH SYNOPSIS \f[B]alf which\f[R] CODE SUBCODE .SH DESCRIPTION @@ -15,6 +15,6 @@ Show the command for this alias code. .IP \[bu] 2 \f[I]Required\f[R] .SS SUBCODE -Show the command for this alias sub-code. +Show the command for this alias sub\-code. .SH SEE ALSO \f[B]alf\f[R](1) diff --git a/doc/alf-which.md b/doc/alf-which.md index 3b5e8f2..6432e01 100644 --- a/doc/alf-which.md +++ b/doc/alf-which.md @@ -1,6 +1,6 @@ % alf-which(1) | Show the alias command. % -% February 2024 +% December 2024 NAME ================================================== diff --git a/doc/alf.1 b/doc/alf.1 index fb6dfb7..e150cf1 100644 --- a/doc/alf.1 +++ b/doc/alf.1 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" -.TH "alf" "1" "February 2024" "Version 0.6.1" "Your Little Bash Alias Friend" +.TH "alf" "1" "December 2024" "Version 0.6.1" "Your Little Bash Alias Friend" .SH NAME -\f[B]alf\f[R] - Your Little Bash Alias Friend +\f[B]alf\f[R] \- Your Little Bash Alias Friend .SH SYNOPSIS \f[B]alf\f[R] COMMAND .SH DESCRIPTION @@ -30,14 +30,14 @@ Show all alf related system facts. .SS ALF_RC_FILE Path to alfrc file. .PP -This file holds the path to the alf-conf repository. +This file holds the path to the alf\-conf repository. .PP Default: \f[B]\[ti]/.alfrc\f[R] .SH SEE ALSO -\f[B]alf-connect\f[R](1), \f[B]alf-download\f[R](1), -\f[B]alf-upload\f[R](1), \f[B]alf-generate\f[R](1), -\f[B]alf-save\f[R](1), \f[B]alf-edit\f[R](1), \f[B]alf-which\f[R](1), -\f[B]alf-upgrade\f[R](1), \f[B]alf-info\f[R](1), \f[B]alf.conf\f[R](5) +\f[B]alf\-connect\f[R](1), \f[B]alf\-download\f[R](1), +\f[B]alf\-upload\f[R](1), \f[B]alf\-generate\f[R](1), +\f[B]alf\-save\f[R](1), \f[B]alf\-edit\f[R](1), \f[B]alf\-which\f[R](1), +\f[B]alf\-upgrade\f[R](1), \f[B]alf\-info\f[R](1), \f[B]alf.conf\f[R](5) .SH SOURCE CODE https://github.com/dannyben/alf .SH ISSUE TRACKER diff --git a/doc/alf.conf.5 b/doc/alf.conf.5 index f2f49ac..2345ce5 100644 --- a/doc/alf.conf.5 +++ b/doc/alf.conf.5 @@ -1,8 +1,8 @@ -.\" Automatically generated by Pandoc 3.1.9 +.\" Automatically generated by Pandoc 3.2 .\" .TH "alf.conf" "5" "September 2023" "alf.conf(5)" "File Formats Manual" .SH NAME -\f[B]alf.conf\f[R] - configuration file for alf +\f[B]alf.conf\f[R] \- configuration file for alf .SH DESCRIPTION The \f[B]alf.conf\f[R] file consists of aliases and the command associated with them. @@ -11,7 +11,7 @@ Any line that does not start with a whitespace is considered a base alias. .IP .EX -dir: ls -l +dir: ls \-l .EE .SS Sub Aliases Any line that starts with one or more whitespaces will be nested as a @@ -22,8 +22,8 @@ nested commands. .EX g: git s: status - c: add . --all && git commit -am - l: log --all --graph --date=relative + c: add . \-\-all && git commit \-am + l: log \-\-all \-\-graph \-\-date=relative p: push .EE .PP @@ -45,9 +45,9 @@ Sub commands that start with an exclamation mark will not be prefixed by their base command. .IP .EX -dc: docker-compose - deploy: !docker stack deploy -c docker-compose.yml - upd: up -d +dc: docker\-compose + deploy: !docker stack deploy \-c docker\-compose.yml + upd: up \-d .EE .SS Virtual Command When you do not need to prepend your sub aliases with the primary @@ -55,8 +55,8 @@ command, specify an exclamation mark in the primary command. .IP .EX dns: ! - check: host -t ns - flush: sudo systemd-resolve --flush-caches + check: host \-t ns + flush: sudo systemd\-resolve \-\-flush\-caches .EE .PP This example provides two completely different aliases: \f[B]dns @@ -71,8 +71,8 @@ You can even provide a default value to the argument using the standard bash syntax, and use any bash construct, like inline functions. .IP .EX -count: find ${1:-.} -type f | wc -l -binlink: sudo ln -fs \[dq]$(realpath $1)\[dq] \[dq]/usr/local/bin/$1\[dq] +count: find ${1:\-.} \-type f | wc \-l +binlink: sudo ln \-fs \[dq]$(realpath $1)\[dq] \[dq]/usr/local/bin/$1\[dq] .EE .SS Comments Any line starting with \f[B]#\f[R] will be considered a comment. @@ -80,9 +80,9 @@ Do not use inline comments. .IP .EX # good -dir: ls -l +dir: ls \-l -dir: ls -l # bad +dir: ls \-l # bad .EE .SH SEE ALSO \f[B]alf\f[R](1) diff --git a/doc/alf.md b/doc/alf.md index 8d980d2..22d06af 100644 --- a/doc/alf.md +++ b/doc/alf.md @@ -1,6 +1,6 @@ % alf(1) Version 0.6.1 | Your Little Bash Alias Friend % Danny Ben Shitrit \ -% February 2024 +% December 2024 NAME ================================================== diff --git a/op.conf b/op.conf index 864d156..a8ee50e 100644 --- a/op.conf +++ b/op.conf @@ -1,6 +1,6 @@ ## Script Generation -generate: bashly generate && op man +generate: bashly generate --env production && op man #? Generate the script and manpage watch: filewatcher --immediate "src/**/*.*" "bashly generate" diff --git a/settings.yml b/settings.yml index 204ebbc..1bf2f57 100644 --- a/settings.yml +++ b/settings.yml @@ -1,3 +1,7 @@ +enable_view_markers: always +enable_env_var_names_array: never +enable_deps_array: never + usage_colors: caption: bold command: green