diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-22 10:13:10 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-22 10:13:10 +1200 |
commit | c83042d6701f275bd792fb15c889e780deddb14a (patch) | |
tree | cc6f6615267ce1ce8aae52e59477d8cea4dd8e73 | |
parent | Remove reference to GitHub dotfiles pages (diff) | |
download | dotfiles-c83042d6701f275bd792fb15c889e780deddb14a.tar.gz dotfiles-c83042d6701f275bd792fb15c889e780deddb14a.zip |
Rename binscripts more tersely
-rw-r--r-- | README.markdown | 18 | ||||
-rwxr-xr-x | bin/gms (renamed from bin/getmails) | 2 | ||||
-rwxr-xr-x | bin/hurl (renamed from bin/htmlurls) | 0 | ||||
-rwxr-xr-x | bin/murl (renamed from bin/mdurls) | 8 | ||||
-rwxr-xr-x | bin/plmu (renamed from bin/plenv-modules-update) | 0 | ||||
-rwxr-xr-x | bin/sls (renamed from bin/shoal) | 18 | ||||
-rwxr-xr-x | bin/sra (renamed from bin/scatter) | 10 | ||||
-rwxr-xr-x | bin/sta (renamed from bin/shock) | 10 | ||||
-rwxr-xr-x | bin/urlc (renamed from bin/urlcheck) | 2 | ||||
-rw-r--r-- | man/man1/scatter.1 | 15 | ||||
-rw-r--r-- | man/man1/shock.1 | 16 | ||||
-rw-r--r-- | man/man1/sls.1 (renamed from man/man1/shoal.1) | 12 | ||||
-rw-r--r-- | man/man1/sra.1 | 15 | ||||
-rw-r--r-- | man/man1/sta.1 | 16 | ||||
-rw-r--r-- | man/man1/try.1 | 2 | ||||
-rw-r--r-- | mutt/muttrc | 4 |
16 files changed, 74 insertions, 74 deletions
diff --git a/README.markdown b/README.markdown index c8cb2f12..87451826 100644 --- a/README.markdown +++ b/README.markdown @@ -285,15 +285,15 @@ Scripts ------- * Three SSH-related scripts: - * `shoal(1)` prints hostnames read from a `ssh_config(5)` file. - * `scatter(1)` runs a command on multiple hosts read from `shoal(1)` and + * `sls(1)` prints hostnames read from a `ssh_config(5)` file. + * `sra(1)` runs a command on multiple hosts read from `sls(1)` and prints output. - * `shock(1)` runs a command on multiple hosts read from `shoal(1)` and + * `sta(1)` runs a command on multiple hosts read from `sls(1)` and prints the hostname if the command returns zero. * `edda(1)` provides a means to run `ed(1)` over a set of files preserving any options, mostly useful for scripts. -* `getmails` runs a set of `getmailrc` files; does much the same - thing as the script of the same name in the `getmail` suite, but runs the +* `gms` runs a set of `getmailrc` files; does much the same + thing as the script `getmails` in the `getmail` suite, but runs the requests in parallel and does up to three silent retries using `try(1)` * `han(1)` provides a `keywordprg` for Vim's Bash script filetype that will look for `help` topics. You could use it from the shell too. @@ -301,7 +301,7 @@ Scripts that don’t actually worry you, exiting with 0 anyway. * `maybe(1)` is like `true(1)` or `false(1)`; given a probability of success, it exits with success or failure. Good for quick tests. -* `plenv-modules-update` retrieves a list of installed modules from +* `plmu` retrieves a list of installed modules from [`plenv`](https://github.com/tokuhirom/plenv), filters out any modules in `~/.plenv/non-cpan-modules`, and updates them all. * `stbl(1)` strips a trailing blank line from the files in its arguments. @@ -320,12 +320,12 @@ Scripts * `vis(1)` edits executable script files in `VISPATH`, defaulting to `~/.local/bin`, for personal scripting snippets. * Three URL-related shorcut scripts; no manuals for these yet: - * `htmlurls` extracts values of `href` attributes of `<a>` tags, sorts + * `hurl` extracts values of `href` attributes of `<a>` tags, sorts them uniquely, and writes them to `stdout`; requires [pup](https://github.com/ericchiang/pup) - * `mdurls` converts Markdown documents to HTML with `pandoc(1)` and + * `murl` converts Markdown documents to HTML with `pandoc(1)` and writes them to `stdout` - * `urlcheck` accepts a list of URLs on `stdin` and writes error messages + * `urlc` accepts a list of URLs on `stdin` and writes error messages to `stderr` if any of the URLs are broken, redirecting, or are insecure and have working secure versions; requires `curl(1)` @@ -7,7 +7,7 @@ # Author: Tom Ryder <tom@sanctum.geek.nz> # Copyright: 2016 # -self=getmails +self=gms # Check for existence of needed commands hash flock getmail try || exit @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# Format markdown and pass it to htmlurls to extract URLs from it. +# Format markdown and pass it to hurl to extract URLs from it. # # Author: Tom Ryder <tom@sanctum.geek.nz> # Copyright: 2016 @@ -9,10 +9,10 @@ # # Check we have the programs we need -hash pandoc htmlurls || exit +hash pandoc hurl || exit # Pipe the output of pandoc(1) on our args ... pandoc -f markdown -t html -- "${@:-/dev/stdin}" | -# ... into our own htmlurls -htmlurls +# ... into our own hurl +hurl diff --git a/bin/plenv-modules-update b/bin/plmu index 668c4667..668c4667 100755 --- a/bin/plenv-modules-update +++ b/bin/plmu @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# shoal(1) -- Print all the non-wildcard Host names (first one per line) from +# sls(1) -- Print all the non-wildcard Host names (first one per line) from # an ssh_config(5) file, defaulting to $HOME/.ssh/config. # # Author: Tom Ryder <tom@sanctum.geek.nz> @@ -10,26 +10,26 @@ # # Start by assuming we should parse all hosts -declare -i shoal -shoal=1 +declare -i sls +sls=1 # Iterate through the config while read -r option value _ ; do - # "### shoal" and "### noshoal" toggles parsing + # "### sls" and "### nosls" toggles parsing case $option in '###') case $value in - noshoal) - shoal=0 + nosls) + sls=0 ;; - shoal) - shoal=1 + sls) + sls=1 ;; esac ;; 'Host') - if ((shoal)) && [[ $value != *[^[:alnum:]_-]* ]] ; then + if ((sls)) && [[ $value != *[^[:alnum:]_-]* ]] ; then printf '%s\n' "$value" fi ;; @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# scatter(1) -- Run a command on every hostname returned by shoal(1) and print +# sra(1) -- Run a command on every hostname returned by sls(1) and print # both stdout and stderr, including allocating a pty with -t. # # Author: Tom Ryder <tom@sanctum.geek.nz> @@ -10,13 +10,13 @@ # # Name self -self=scatter +self=sra # Handle ^C interrupts trap 'trap - INT; kill -INT $$' INT -# Bail if we couldn't find shoal(1) -hash shoal || exit +# Bail if we couldn't find sls(1) +hash sls || exit # Exit with usage method if no arguments given if ! (($#)) ; then @@ -31,4 +31,4 @@ while read -r hostname <&3 ; do # shellcheck disable=SC2029 ssh -qt -- "$hostname" "$@" printf '\n' -done 3< <(shoal) +done 3< <(sls) @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# shock(1) -- Run a command on every hostname returned by shoal(1) and print +# sta(1) -- Run a command on every hostname returned by sls(1) and print # the hostname if the command's return value was zero. Discard stdout, but do # print stderr. # @@ -11,13 +11,13 @@ # # Name self -self=shock +self=sta # Handle ^C interrupts trap 'trap - INT; kill -INT $$' INT -# Bail if we couldn't find shoal(1) -hash shoal || exit +# Bail if we couldn't find sls(1) +hash sls || exit # Exit with usage method if no command given if ! (($#)) ; then @@ -31,4 +31,4 @@ while read -r hostname ; do if ssh -nq -- "$hostname" "$@" >/dev/null ; then printf '%s\n' "$hostname" fi -done < <(shoal) +done < <(sls) @@ -11,7 +11,7 @@ # # Name self -self=urlcheck +self=urlc # cURL request timeout tm=${URLCHECK_TIMEOUT:-8} diff --git a/man/man1/scatter.1 b/man/man1/scatter.1 deleted file mode 100644 index 9d0beefc..00000000 --- a/man/man1/scatter.1 +++ /dev/null @@ -1,15 +0,0 @@ -.TH SCATTER 1 "May 2014" "Manual page for scatter" -.SH NAME -.B scatter -\- run a command on shoal(1) hosts -.SH SYNOPSIS -.B scatter -.I COMMAND -.SH DESCRIPTION -.B scatter -runs a nominated command on all the hosts returned by shoal(1), and prints the -hostname, stdout, and stderr for each call. -.SH SEE ALSO -shock(1), shoal(1) -.SH AUTHOR -Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/shock.1 b/man/man1/shock.1 deleted file mode 100644 index 9864c451..00000000 --- a/man/man1/shock.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH SHOCK 1 "May 2014" "Manual page for shock" -.SH NAME -.B shock -\- run a command on shoal(1) hosts and print the hostname if successful -.SH SYNOPSIS -.B shock -.I COMMAND -.SH DESCRIPTION -.B shock -runs a nominated command on all the hosts returned by shoal(1), and prints the -hostname if the command has an exit value of 0. The stdout from the commands is -discarded. -.SH SEE ALSO -scatter(1), shoal(1) -.SH AUTHOR -Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/shoal.1 b/man/man1/sls.1 index 1ece346f..691c6abb 100644 --- a/man/man1/shoal.1 +++ b/man/man1/sls.1 @@ -1,17 +1,17 @@ -.TH SHOAL 1 "May 2014" "Manual page for shoal" +.TH SLS 1 "May 2014" "Manual page for sls" .SH NAME -.B shoal +.B sls \- list the first hostname on each line of an ssh_config(5) file .SH SYNOPSIS -.B shoal +.B sls .I [SSH_CONFIG] .SH DESCRIPTION -.B shoal +.B sls reads an ssh_config(5) file, defaulting to ~/.ssh/config, and returns a newline-delimited list of the first of the hostnames on each Host line in the file, ignoring all other lines. Suitable for use in batch scripts like -scatter(1). +sra(1). .SH SEE ALSO -scatter(1), shock(1), ssh(1), ssh_config(5) +sra(1), sta(1), ssh(1), ssh_config(5) .SH AUTHOR Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/sra.1 b/man/man1/sra.1 new file mode 100644 index 00000000..3ddc7ac7 --- /dev/null +++ b/man/man1/sra.1 @@ -0,0 +1,15 @@ +.TH SRA 1 "May 2014" "Manual page for sra" +.SH NAME +.B sra +\- run a command on sls(1) hosts +.SH SYNOPSIS +.B sra +.I COMMAND +.SH DESCRIPTION +.B sra +runs a nominated command on all the hosts returned by sls(1), and prints the +hostname, stdout, and stderr for each call. +.SH SEE ALSO +sta(1), sls(1) +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/sta.1 b/man/man1/sta.1 new file mode 100644 index 00000000..49d8bcbd --- /dev/null +++ b/man/man1/sta.1 @@ -0,0 +1,16 @@ +.TH STA 1 "May 2014" "Manual page for sta" +.SH NAME +.B sta +\- run a command on sls(1) hosts and print the hostname if successful +.SH SYNOPSIS +.B sta +.I COMMAND +.SH DESCRIPTION +.B sta +runs a nominated command on all the hosts returned by sls(1), and prints the +hostname if the command has an exit value of 0. The stdout from the commands is +discarded. +.SH SEE ALSO +sra(1), sls(1) +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/try.1 b/man/man1/try.1 index 6eb8bacc..d3dcd1de 100644 --- a/man/man1/try.1 +++ b/man/man1/try.1 @@ -13,7 +13,7 @@ optional number of seconds between attempts, and option -n specifies the number of attempts; defaults to 3. Options may be terminated with --. The remaining arguments are the command to run. .P - $ try getmails + $ try gms $ try -v -n3 maybe .SH SEE ALSO maybe(1) diff --git a/mutt/muttrc b/mutt/muttrc index f2b5265d..4f252477 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -120,8 +120,8 @@ macro generic,index,browser,pager gs '<change-folder>=sent<enter>' 'Change to se # Blindly save message to whatever box is suggested macro index,pager S 's<enter>' 'Save message blindly' -# Run getmails(1) to retrieve all mail -macro generic,index,browser,pager gm '!getmails --quiet &<enter>' 'Run getmails' +# Run gms to retrieve all mail +macro generic,index,browser,pager gm '!gms --quiet &<enter>' 'Run gms' # Shortcut to add addresses to abook macro index,pager A '<pipe-message>abook --add-email<enter>' 'Add sender address to abook' |