mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 18:22:11 +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
|
||||
*:*)
|
||||
local colon_word=${cur%${cur##*:}}
|
||||
local colon_word=${cur%"${cur##*:}"}
|
||||
local i=${#COMPREPLY[*]}
|
||||
while [ $((--i)) -ge 0 ]; do
|
||||
COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"}
|
||||
|
@ -47,7 +47,7 @@ __gio_location() {
|
||||
dir="$cur"
|
||||
elif [[ $cur =~ "/" ]]; then
|
||||
# Subtract basename because dirname cmd doesn't work well with schemes
|
||||
dir=${cur%$(basename "$cur")}
|
||||
dir=${cur%"$(basename "$cur")"}
|
||||
fi
|
||||
|
||||
# List volumes and mounts
|
||||
|
Loading…
x
Reference in New Issue
Block a user