Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Useless assignment in _rm



Hi!

As much as I understand, the assignment is not needed because in the
next line the whole array will be reassigned.

It caused issues with `rm -r<TAB> anything`:
  _rm:72: line: assignment to invalid subscript range
  _rm:72: line: assignment to invalid subscript range

-- 
zsugabubus

diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
index ea9190d..82b382b 100644
--- a/Completion/Unix/Command/_rm
+++ b/Completion/Unix/Command/_rm
@@ -69,7 +69,6 @@ _arguments -C -s -S $opts \

 case $state in
   (file)
-    line[CURRENT]=()
     line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} )
     _files -F line && ret=0
     ;;



Messages sorted by: Reverse Date, Date, Thread, Author