]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Trivial style fixes
authorSergey Matveev <stargrave@stargrave.org>
Sun, 18 Feb 2024 19:33:35 +0000 (22:33 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 18 Feb 2024 19:38:57 +0000 (22:38 +0300)
bin/bin/music-indexer
bin/bin/my-ps2pdf
bin/bin/zsnap
img/bin/my-jxll
mkv/bin/my-mkvmerge
nnn/bin/_nnn-cd
nnn/bin/_nnn-cp
tmux/.tmux/bin/fzf.zsh
vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.zsh

index 02e38230c155363d18afe4dd2c6e6c2df58926bb..a1e837e876ab933139dde2112297f3f9dc7086e3 100755 (executable)
@@ -29,12 +29,12 @@ for name (*~cols) {
         album=(${ts[2,-1]})
     }
     lossless=""
-    [[ -d $name ]] && {
+    if [[ -d $name ]] ; then
         wvs=($name/**/*.wv(N))
         [[ ${#wvs} -gt 0 ]] && lossless=1
-    } || {
+    else
         [[ $name:e = wv ]] && lossless=1
-    }
+    fi
     cols=()
     for col ($COLS) [[ -e cols/$col/$name ]] && cols=($cols $col)
 
index ba5af647bedb0591e29cc003fadbc5ba000da2b2..5510c186e3354894c75f94ca3e1df2464cead614 100755 (executable)
@@ -5,7 +5,7 @@
 # removes all empty metainformation fields, removed fields
 # with uuid:s, removes Format (that is application/pdf).
 
-set -e
+setopt ERR_EXIT
 opts=(
     -dQUIET
     -dBATCH
index 90d08f641b3d4dd2d997b189cddc0bd0a51754a5..7bab829040cc9ebee6e6cea2a32ac62d5ec2171b 100755 (executable)
@@ -1,7 +1,6 @@
 #!/usr/bin/env zsh
 
-set -e
-setopt EXTENDED_GLOB
+setopt ERR_EXIT EXTENDED_GLOB
 
 usage() {
     cat <<EOF
index 3515f4c26011703a05dc509293c2ed2631b26235..cd6ee12b66baab2ada9b017665b7bc9f28b1ff8a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env zsh
 
-set -e
+setopt ERR_EXIT
 tmp=`mktemp`
 trap "rm -f $tmp.pnm $tmp.jxl" HUP PIPE INT QUIT TERM EXIT
 case $1:e in
index 471898df271abae3068569e8e94c2022192b28a4..5bf907f10f43541e8543a3e643eb3d5b56f6ec32 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env zsh
 
-set -e
+setopt ERR_EXIT
 zparseopts -D -A info url: descr: out:
 tags=`mktemp`
 trap "rm -f $tags" HUP PIPE INT QUIT TERM EXIT
index 042efe7070ae487bc5e411fb344c2dc84cbfbd28..5ee80756e7b998bd58a5a4a70d846da14b1ff068 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env zsh
 
-set -e
+setopt ERR_EXIT
 [[ -n "$NNN_PIPE" ]]
 autoload ~/.zsh/functions/cf
 cf $1
index 8a8a395cd33a21d402b3ad835a7d1e08c641a788..86f424c400d8bd7ff1c9aa7ae070e1050d27435c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env zsh
 
-set -e
+setopt ERR_EXIT
 sel=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
 [[ -s $sel ]]
 tgts=$(xargs -0 -L1 < $sel)
index 8872926cb576abd0ecd66b4a024add164f160178..06c91d5134b0c6e9b76388711df8d55ed43579dc 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env zsh
 
 cd $2
-set -e
+setopt ERR_EXIT
 fpath=(~/.tmux/functions.zsh $fpath)
 autoload tmux-fzf-$1
 tmp=`mktemp`
index 1afcb2a4b5eed359e0968d17a3f78ee1f65132a5..9222054adf47833ed4e48d013205f11846aa95a6 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env zsh
 
-set -e
+setopt ERR_EXIT
 zmodload zsh/zpty
 zpty zshfe zsh
 zpty -w zshfe "print ZSHFE $*"$'\t EFHSZ\nexit\n'