Skip to content

Commit 1cd1d67

Browse files
committed
refactor(completions/*): update uses of { => _comp_}quote
1 parent 6b2b97e commit 1cd1d67

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

completions/_umount.linux

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ _reply_compgen_array()
1515
# argument.
1616
local i wlist
1717
for i in ${!COMPREPLY[*]}; do
18-
local q=$(quote "$(printf %q "${COMPREPLY[i]}")")
19-
wlist+=$q$'\n'
18+
local ret
19+
printf -v ret %q "${COMPREPLY[i]}"
20+
_comp_quote "$ret"
21+
wlist+=$ret$'\n'
2022
done
2123

2224
# We also have to add another round of escaping to $cur.

completions/export

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ _export()
3131
case $cur in
3232
*=)
3333
local pname=${cur%=}
34-
local pval=$(quote "${!pname-}")
34+
local ret
35+
_comp_quote "${!pname-}"
36+
local pval=$ret
3537
# Complete previous value if it's not empty.
3638
if [[ $pval != \'\' ]]; then
3739
COMPREPLY=("$pval")

0 commit comments

Comments
 (0)