dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 7aa395910175db87742d574eed1b4d454ae35864
parent 81e751f91cdd06b2a1b2fe60b12ffab12d159f30
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Wed, 26 Jan 2022 12:34:08 +0100

audiotag: fix quoting problem & adjust snippet

Diffstat:
Mscripts/audiotag | 5+++--
Mvim/ultisnips/sh.snippets | 5+++--
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/scripts/audiotag b/scripts/audiotag @@ -51,12 +51,13 @@ while [ $(($#)) -ne 0 ]; do exit 1 ;; *) # preserve positional arguments - PARAMS="$PARAMS $(printfq "$1")" + # if params is set, add space. + PARAMS="$PARAMS${PARAMS:+ }$1" shift ;; esac done -eval set -- "$PARAMS" +set -- "$PARAMS" [ $# -eq 0 ] && die 'Need a file to operate on.' [ $# -gt 1 ] && die 'Only single file argument supported right now.' diff --git a/vim/ultisnips/sh.snippets b/vim/ultisnips/sh.snippets @@ -31,12 +31,13 @@ while [ \$((\$#)) -ne 0 ]; do exit 1 ;; *) # preserve positional arguments - PARAMS="\$PARAMS \$(printfq "\$1")" + # if params is set, add space. + PARAMS="\$PARAMS\${PARAMS:+ }\$1" shift ;; esac done -eval set -- "\$PARAMS" +set -- "\$PARAMS" endsnippet snippet !bash "Bash shebang" b