mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
completion: Quote variable dereferences within variable dereferences
Otherwise they could get split. Spotted by shellcheck. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
d3d811f4e5
commit
b1ef6a125e
@ -21,7 +21,7 @@ __gdbus() {
|
|||||||
*:*)
|
*:*)
|
||||||
case "$COMP_WORDBREAKS" in
|
case "$COMP_WORDBREAKS" in
|
||||||
*:*)
|
*:*)
|
||||||
local colon_word=${cur%${cur##*:}}
|
local colon_word=${cur%"${cur##*:}"}
|
||||||
local i=${#COMPREPLY[*]}
|
local i=${#COMPREPLY[*]}
|
||||||
while [ $((--i)) -ge 0 ]; do
|
while [ $((--i)) -ge 0 ]; do
|
||||||
COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"}
|
COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"}
|
||||||
|
@ -47,7 +47,7 @@ __gio_location() {
|
|||||||
dir="$cur"
|
dir="$cur"
|
||||||
elif [[ $cur =~ "/" ]]; then
|
elif [[ $cur =~ "/" ]]; then
|
||||||
# Subtract basename because dirname cmd doesn't work well with schemes
|
# Subtract basename because dirname cmd doesn't work well with schemes
|
||||||
dir=${cur%$(basename "$cur")}
|
dir=${cur%"$(basename "$cur")"}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# List volumes and mounts
|
# List volumes and mounts
|
||||||
|
Loading…
Reference in New Issue
Block a user