aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:25:39 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:26:06 +1300
commit0c4bf7de3604eeb00e2cf590867d43ceb2f0f85d (patch)
tree124ccc28400bfa078f0a701e6610cbba9564a710
parent6dff198ba1196a2b31274744365a940bb34898a2 (diff)
downloaddotfiles-0c4bf7de3604eeb00e2cf590867d43ceb2f0f85d.tar.gz
dotfiles-0c4bf7de3604eeb00e2cf590867d43ceb2f0f85d.zip
Remove unneeded semicolon from sh "for VAR ; do"
It turns out the semicolon belongs to the "in" syntax, and is optional without it.
-rw-r--r--bash/bashrc.d/keep.bash2
-rw-r--r--bash/bashrc.d/vared.bash2
-rw-r--r--bin/ap.sh2
-rw-r--r--bin/apf.sh2
-rw-r--r--bin/d2u.sh2
-rw-r--r--bin/eds.sh4
-rw-r--r--bin/fnp.sh2
-rw-r--r--bin/loc.sh2
-rw-r--r--bin/mex.sh2
-rw-r--r--bin/mkcp.sh2
-rw-r--r--bin/mked.sh2
-rw-r--r--bin/mkmv.sh2
-rw-r--r--bin/mkvi.sh2
-rw-r--r--bin/pp.sh2
-rw-r--r--bin/sqs.sh2
-rw-r--r--bin/stbl.sh2
-rw-r--r--bin/stex.sh2
-rw-r--r--bin/stws.sh2
-rw-r--r--bin/sue.sh2
-rw-r--r--bin/u2d.sh2
-rw-r--r--bin/xgo.sh2
-rw-r--r--check/bash.sh2
-rw-r--r--check/ksh.sh2
-rw-r--r--check/sh.sh2
-rw-r--r--check/xinit.sh2
-rw-r--r--check/zsh.sh2
-rw-r--r--ksh/kshrc.d/keep.ksh2
-rw-r--r--sh/profile.d/options.sh2
-rw-r--r--zsh/zshrc.d/keep.zsh2
29 files changed, 30 insertions, 30 deletions
diff --git a/bash/bashrc.d/keep.bash b/bash/bashrc.d/keep.bash
index 48196aeb..191dac4b 100644
--- a/bash/bashrc.d/keep.bash
+++ b/bash/bashrc.d/keep.bash
@@ -83,7 +83,7 @@ EOF
# Iterate through the NAMEs given
local name
- for name ; do
+ for name do
# Check NAMEs for validity
case $name in
diff --git a/bash/bashrc.d/vared.bash b/bash/bashrc.d/vared.bash
index e024f48a..491e5bff 100644
--- a/bash/bashrc.d/vared.bash
+++ b/bash/bashrc.d/vared.bash
@@ -24,7 +24,7 @@ vared() {
return 2
fi
local name
- for name ; do
+ for name do
IFS= read -e -i "${!name}" -p "${prompt:-"$name"=}" -r -- "${name?}"
done
}
diff --git a/bin/ap.sh b/bin/ap.sh
index 1d6376cc..2b13dfde 100644
--- a/bin/ap.sh
+++ b/bin/ap.sh
@@ -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)
diff --git a/bin/apf.sh b/bin/apf.sh
index 5e40e9b8..e11145ff 100644
--- a/bin/apf.sh
+++ b/bin/apf.sh
@@ -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
diff --git a/bin/d2u.sh b/bin/d2u.sh
index 892c446b..eceb11de 100644
--- a/bin/d2u.sh
+++ b/bin/d2u.sh
@@ -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
diff --git a/bin/eds.sh b/bin/eds.sh
index c85069c6..c692cb30 100644
--- a/bin/eds.sh
+++ b/bin/eds.sh
@@ -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
diff --git a/bin/fnp.sh b/bin/fnp.sh
index ec68e51f..bc0c7e21 100644
--- a/bin/fnp.sh
+++ b/bin/fnp.sh
@@ -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
diff --git a/bin/loc.sh b/bin/loc.sh
index 995c6932..214e87da 100644
--- a/bin/loc.sh
+++ b/bin/loc.sh
@@ -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)
diff --git a/bin/mex.sh b/bin/mex.sh
index cf4e07e7..e79f8f2f 100644
--- a/bin/mex.sh
+++ b/bin/mex.sh
@@ -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" "$@"
diff --git a/bin/pp.sh b/bin/pp.sh
index b472a012..e9c25571 100644
--- a/bin/pp.sh
+++ b/bin/pp.sh
@@ -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 ;;
diff --git a/bin/sqs.sh b/bin/sqs.sh
index 28435059..447a6563 100644
--- a/bin/sqs.sh
+++ b/bin/sqs.sh
@@ -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
diff --git a/bin/sue.sh b/bin/sue.sh
index 654c041f..34343e4a 100644
--- a/bin/sue.sh
+++ b/bin/sue.sh
@@ -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
diff --git a/bin/u2d.sh b/bin/u2d.sh
index 31030341..cdbe9a33 100644
--- a/bin/u2d.sh
+++ b/bin/u2d.sh
@@ -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
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 3fb11fde..e627f9c6 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -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
diff --git a/check/bash.sh b/check/bash.sh
index 1f9e1b38..510f2af0 100644
--- a/check/bash.sh
+++ b/check/bash.sh
@@ -5,7 +5,7 @@ set \
bash/bash_profile \
bash/bashrc \
bash/bashrc.d/*.bash
-for bash ; do
+for bash do
bash -n -- "$bash" || exit
done
printf 'GNU Bash dotfiles parsed successfully.\n'
diff --git a/check/ksh.sh b/check/ksh.sh
index f4bade82..cf83bc1f 100644
--- a/check/ksh.sh
+++ b/check/ksh.sh
@@ -1,7 +1,7 @@
set \
ksh/kshrc \
ksh/kshrc.d/*.ksh
-for ksh ; do
+for ksh do
ksh -n -- "$ksh" || exit
done
sh -n -- ksh/shrc.d/ksh.sh || exit
diff --git a/check/sh.sh b/check/sh.sh
index 92910c11..e0162f47 100644
--- a/check/sh.sh
+++ b/check/sh.sh
@@ -4,7 +4,7 @@ set \
sh/shinit \
sh/shrc \
sh/shrc.d/*.sh
-for sh ; do
+for sh do
sh -n -- "$sh" || exit
done
printf 'POSIX shell dotfiles parsed successfully.\n'
diff --git a/check/xinit.sh b/check/xinit.sh
index fa235c9d..ae03b8c2 100644
--- a/check/xinit.sh
+++ b/check/xinit.sh
@@ -1,7 +1,7 @@
set \
X/xinitrc \
X/xinitrc.d/*.sh
-for xinit ; do
+for xinit do
sh -n -- "$xinit" || exit
done
printf 'Xinit startup scripts parsed successfully.\n'
diff --git a/check/zsh.sh b/check/zsh.sh
index ce209584..0170e586 100644
--- a/check/zsh.sh
+++ b/check/zsh.sh
@@ -2,7 +2,7 @@ set \
zsh/zprofile \
zsh/zshrc.d/*.zsh \
zsh/zshrc
-for zsh ; do
+for zsh do
zsh -n -- "$zsh" || exit
done
sh -n zsh/profile.d/zsh.sh || exit
diff --git a/ksh/kshrc.d/keep.ksh b/ksh/kshrc.d/keep.ksh
index f6593c3d..629b2fe6 100644
--- a/ksh/kshrc.d/keep.ksh
+++ b/ksh/kshrc.d/keep.ksh
@@ -94,7 +94,7 @@ EOF
# Iterate through the NAMEs given
typeset name
- for name ; do
+ for name do
# Check NAMEs for validity
case $name in
diff --git a/sh/profile.d/options.sh b/sh/profile.d/options.sh
index 73f62243..f89967cb 100644
--- a/sh/profile.d/options.sh
+++ b/sh/profile.d/options.sh
@@ -22,7 +22,7 @@ options() {
# Iterate through remaining arguments (desired options), creating files to
# show they're available if found in the help output
- for opt ; do
+ for opt do
command -p grep -q -- '[^[:alnum:]]--'"$opt"'[^[:alnum:]]' help &&
touch -- "$opt"
done
diff --git a/zsh/zshrc.d/keep.zsh b/zsh/zshrc.d/keep.zsh
index 59696301..c47748cd 100644
--- a/zsh/zshrc.d/keep.zsh
+++ b/zsh/zshrc.d/keep.zsh
@@ -83,7 +83,7 @@ EOF
# Iterate through the NAMEs given
local name
- for name ; do
+ for name do
# Check NAMEs for validity
case $name in