about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2009-11-12 04:19:42 +0000
committerBart Schaefer <barts@users.sourceforge.net>2009-11-12 04:19:42 +0000
commit31012c47d5dca7862f7962a583aaaa4deb98a50c (patch)
tree27f271fe236a78cbe032894494bc3fb261e19efa /Completion
parent96feec40a58d0cd1a72cad4c5ce3e5475ca3d82d (diff)
downloadzsh-31012c47d5dca7862f7962a583aaaa4deb98a50c.tar.gz
zsh-31012c47d5dca7862f7962a583aaaa4deb98a50c.tar.xz
zsh-31012c47d5dca7862f7962a583aaaa4deb98a50c.zip
Greg K: Replace 27377 with 27391.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_rm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
index 21b10d3f6..20f44afc5 100644
--- a/Completion/Unix/Command/_rm
+++ b/Completion/Unix/Command/_rm
@@ -33,10 +33,11 @@ _arguments -C $opts \
 case $state in
   (file)
     declare -a ignored
-    if ((CURRENT > 1)); then
-      ignored=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
+    ignored=()
+    ((CURRENT > 1)) &&
+      ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
+    ((CURRENT < $#line)) &&
       ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
-    fi
     _files -F ignored && ret=0
     ;;
 esac