fix comma quoting in tup/tupx by quoting all commas

This commit is contained in:
tpoindex 2019-09-11 20:17:45 -06:00
parent 68125ee7d8
commit cba3556da8
2 changed files with 6 additions and 3 deletions

View file

@ -262,7 +262,7 @@ tup() {
read arg
tup $arg
else
list "$@" | map lambda x . 'echo ${x/,/u002c}' | join , '(' ')'
list "$@" | map lambda x . 'echo ${x//,/u002c}' | join , '(' ')'
fi
}
@ -274,7 +274,7 @@ tupx() {
else
local n=$1
shift
echo "$@" | stripl '(' | stripr ')' | cut -d',' -f${n} | tr ',' '\n' | map lambda x . 'echo ${x/u002c/,}'
echo "$@" | stripl '(' | stripr ')' | cut -d',' -f${n} | tr ',' '\n' | map lambda x . 'echo ${x//u002c/,}'
fi
}