diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-14 13:14:00 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-14 13:14:00 +1300 |
commit | e0ff7ac01d6439d826ff9ef6f134a7638ade714f (patch) | |
tree | 781004065fefcbfd8e543a61de3d168383e71bde /bin | |
parent | Merge branch 'release/v3.1.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-3.2.0.tar.gz (sig) dotfiles-3.2.0.zip |
Merge branch 'release/v3.2.0'v3.2.0
* release/v3.2.0:
Bump VERSION
Refactor some conditionals
Factor out zsh ENV hack into one file
Refactor "path list" not to require a subshell
Correct completion for deep pass(1) directories
Move filetype.vim helper funcs into autoload
Fix a local var name in openssl(1ssl) completion
Correct a variable ref in openssl(1ssl) completion
Disable shellcheck rules for missed definition
Add filenames treatment to mex(1df) completion
Remove unneeded declaration
Refactor some completions to avoid loops
Remove unneeded stdout redirect
Remove unneeded semicolon from sh "for VAR ; do"
Substitute bad `continue` for `return`
Add actual completion matching to git completion
Apply much simpler completion to Git
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ap.sh | 2 | ||||
-rw-r--r-- | bin/apf.sh | 2 | ||||
-rw-r--r-- | bin/d2u.sh | 2 | ||||
-rw-r--r-- | bin/eds.sh | 4 | ||||
-rw-r--r-- | bin/fnp.sh | 2 | ||||
-rw-r--r-- | bin/loc.sh | 2 | ||||
-rw-r--r-- | bin/mex.sh | 2 | ||||
-rw-r--r-- | bin/mkcp.sh | 2 | ||||
-rw-r--r-- | bin/mked.sh | 2 | ||||
-rw-r--r-- | bin/mkmv.sh | 2 | ||||
-rw-r--r-- | bin/mkvi.sh | 2 | ||||
-rw-r--r-- | bin/pp.sh | 2 | ||||
-rw-r--r-- | bin/sqs.sh | 2 | ||||
-rw-r--r-- | bin/stbl.sh | 2 | ||||
-rw-r--r-- | bin/stex.sh | 2 | ||||
-rw-r--r-- | bin/stws.sh | 2 | ||||
-rw-r--r-- | bin/sue.sh | 2 | ||||
-rw-r--r-- | bin/u2d.sh | 2 | ||||
-rw-r--r-- | bin/xgo.sh | 2 |
19 files changed, 20 insertions, 20 deletions
@@ -10,7 +10,7 @@ shift # Iterate through the remaining args; it's legal for there to be none, but in # that case the user may as well just have invoked the command directly -for arg ; do +for arg do # If this is the first iteration, clear the params away (we grabbed them in # the for statement) @@ -16,7 +16,7 @@ shift 2 if [ "$#" -gt 0 ] ; then # Iterate through any remaining arguments - for carg ; do + for carg do # If this is the first command argument, then before we add it, we'll # add all the ones from the file first if it exists @@ -10,7 +10,7 @@ fi r=$(printf '\r') # Iterate over arguments and apply the same ed(1) script to each of them -for fn ; do +for fn do # Note the heredoc WORD is intentionally unquoted because we want to expand # $r within it to get a literal carriage return; the escape characters @@ -21,7 +21,7 @@ case :$PATH: in esac # Prepend the path to each of the names given if they don't look like options -for arg ; do +for arg do [ -n "$reset" ] || set -- && reset=1 case $arg in --) @@ -44,7 +44,7 @@ done "${VISUAL:-"${EDITOR:-ed}"}" "$@" # Make any created scripts executable if they now appear to be files -for script ; do +for script do [ -f "$script" ] || continue chmod +x -- "$script" done @@ -4,7 +4,7 @@ [ "$#" -gt 0 ] || set -- - # Iterate through arguments -for arg ; do +for arg do # We'll print the filename "-stdin-" rather than - just to be slightly more # explicit @@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then fi # Iterate through each search term and run an appropriate find(1) command -for pat ; do +for pat do # Skip dotfiles, dotdirs, and symbolic links; print anything that matches # the term as a substring (and stop iterating through it) @@ -9,7 +9,7 @@ if [ "$#" -eq 0 ] ; then fi # Iterate through the given names -for name ; do +for name do # Clear the found variable found= diff --git a/bin/mkcp.sh b/bin/mkcp.sh index 10308263..3acf12f0 100644 --- a/bin/mkcp.sh +++ b/bin/mkcp.sh @@ -7,7 +7,7 @@ if [ "$#" -lt 2 ] ; then fi # Get the last argument (the directory to create) -for dir ; do : ; done +for dir do : ; done # Create it, or bail mkdir -p -- "$dir" || exit diff --git a/bin/mked.sh b/bin/mked.sh index 4e280205..93e21573 100644 --- a/bin/mked.sh +++ b/bin/mked.sh @@ -1,6 +1,6 @@ #!/bin/sh # Create paths to all files before invoking editor -for file ; do +for file do mkdir -p -- "${file%/*}" || exit done exec "$EDITOR" "$@" diff --git a/bin/mkmv.sh b/bin/mkmv.sh index 53b5aa8f..832c205e 100644 --- a/bin/mkmv.sh +++ b/bin/mkmv.sh @@ -7,7 +7,7 @@ if [ "$#" -lt 2 ] ; then fi # Get the last argument (the directory to create) -for dir ; do : ; done +for dir do : ; done # Create it, or bail mkdir -p -- "$dir" || exit diff --git a/bin/mkvi.sh b/bin/mkvi.sh index 244b89f8..c5974383 100644 --- a/bin/mkvi.sh +++ b/bin/mkvi.sh @@ -1,6 +1,6 @@ #!/bin/sh # Create paths to all files before invoking editor -for file ; do +for file do mkdir -p -- "${file%/*}" || exit done exec "$VISUAL" "$@" @@ -1,5 +1,5 @@ # Print the full path to each argument; path need not exist -for arg ; do +for arg do case $arg in /*) path=$arg ;; *) path=$PWD/$arg ;; @@ -8,7 +8,7 @@ if [ "$#" -eq 0 ] ; then fi # Iterate through the given files -for sn ; do +for sn do # Strip trailing slash if any and then query string sn=${sn%/} diff --git a/bin/stbl.sh b/bin/stbl.sh index 23d77703..2f6702b1 100644 --- a/bin/stbl.sh +++ b/bin/stbl.sh @@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then fi # Iterate over arguments and apply the same ed(1) script to each of them -for fn ; do +for fn do ed -s -- "$fn" <<'EOF' || ex=1 $g/^ *$/d w diff --git a/bin/stex.sh b/bin/stex.sh index 14d2cabf..b27d9cf8 100644 --- a/bin/stex.sh +++ b/bin/stex.sh @@ -13,7 +13,7 @@ ext=$1 shift # Iterate through the given files (remaining args) -for sn ; do +for sn do # Strip trailing slash if any and then extension sn=${sn%/} diff --git a/bin/stws.sh b/bin/stws.sh index ce2c14d0..59a8652a 100644 --- a/bin/stws.sh +++ b/bin/stws.sh @@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then fi # Iterate over arguments and apply the same ed(1) script to each of them -for fn ; do +for fn do ed -s -- "$fn" <<'EOF' || ex=1 g/ *$/ s/ *$// w @@ -4,7 +4,7 @@ user= # Iterate over the given files -for file ; do +for file do # Get the file's owner, or bail file_owner=$(stat -c %U -- "$file") || exit @@ -10,7 +10,7 @@ fi r=$(printf '\r') # Iterate over arguments and apply the same ed(1) script to each of them -for fn ; do +for fn do # Note the heredoc WORD is intentionally unquoted because we want to expand # $r within it to get a literal carriage return; the escape characters @@ -7,7 +7,7 @@ if [ "$#" -eq 0 ] ; then fi # Iterate over the URL arguments -for url ; do ( +for url do ( # Look for patterns in the URL that suggest transformations case $url in |