summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_rm2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ec66ace61..b2d94f38c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-28 zsugabubus <zsugabubus>
+
+ * 46097: Completion/Unix/Command/_rm: Fix "assignment to invalid
+ subscript range" error in _rm.
+
2020-06-28 Daniel Shahaf <d.s@daniel.shahaf.name>
* 46132: Doc/Zsh/expn.yo: docs: Use an itemized list in the
diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
index ea9190de2..e66b77fa4 100644
--- a/Completion/Unix/Command/_rm
+++ b/Completion/Unix/Command/_rm
@@ -69,7 +69,7 @@ _arguments -C -s -S $opts \
case $state in
(file)
- line[CURRENT]=()
+ (( CURRENT > 0 )) && line[CURRENT]=()
line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} )
_files -F line && ret=0
;;