summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_chmod
diff options
context:
space:
mode:
authorPhilip Sequeira <qmega@sksm.net>2024-09-16 04:13:38 -0400
committerOliver Kiddle <opk@zsh.org>2024-09-18 11:08:08 +0200
commit91c56ed27a7e191a257778af831e3d491cdb995c (patch)
tree4886dfcc6beae3a58e5654ae153c9caf95f929f6 /Completion/Unix/Command/_chmod
parent62131ae0499da56ecad237e5f82007a73cfff4fd (diff)
downloadzsh-91c56ed27a7e191a257778af831e3d491cdb995c.tar.gz
zsh-91c56ed27a7e191a257778af831e3d491cdb995c.zip
53095: fix completion for chmod/chown --reference with escaped filename
Diffstat (limited to 'Completion/Unix/Command/_chmod')
-rw-r--r--Completion/Unix/Command/_chmod4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod
index 42e3fa63b..693f348dc 100644
--- a/Completion/Unix/Command/_chmod
+++ b/Completion/Unix/Command/_chmod
@@ -67,13 +67,13 @@ case "$variant" in
;;
esac
-_arguments -C -s -S $aopts "$args[@]" && ret=0
+_arguments -C -s -S -0 $aopts "$args[@]" && ret=0
case "$state" in
files)
if [[ -n $opt_args[--reference] ]]; then
zmodload -F zsh/stat b:zstat 2>/dev/null
- typeset -i8 ref=$(zstat +mode $opt_args[--reference])
+ typeset -i8 ref=$(zstat +mode $opt_args[--reference]:Q)
_wanted files expl file _files -g "*(-.^f${ref#??})" && ret=0
elif [[ $line[1] = [0-7]## ]]; then
_wanted files expl file _files -g "*(-.^f$line[1])" && ret=0