about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-06-01 14:29:11 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-06-01 14:29:11 +0000
commita594e4eb04aa6bfe43443d0cbb5e1ffefedfb7bb (patch)
tree3bf10a59e432c5130ca8aa1c45cdbadd88fed329
parent849b7800afa5f402f74da7699ed194d53993a0b5 (diff)
downloadzsh-a594e4eb04aa6bfe43443d0cbb5e1ffefedfb7bb.tar.gz
zsh-a594e4eb04aa6bfe43443d0cbb5e1ffefedfb7bb.tar.xz
zsh-a594e4eb04aa6bfe43443d0cbb5e1ffefedfb7bb.zip
work around ${(@P)1[3,-1]} not working as expected (14658)
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Utility/_arguments2
-rw-r--r--Completion/Base/Utility/_values2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 64b3a0f8d..ac85a3630 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-01  Oliver Kiddle  <opk@zsh.org>
+
+	* 14658: Base/Utility/_arguments, Base/Utility/_values: correctly
+	handle argument to -O option
+
 2001-06-01  Peter Stephenson  <pws@csr.com>
 
 	* 14651: Doc/Zsh/builtins.yo: add fix for 14597 in one other place.
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 209785f2d..7087dc6bb 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -178,7 +178,7 @@ while [[ "$1" = -(O*|[CRWsw]) ]]; do
   case "$1" in
   -C)  usecc=yes; shift ;;
   -O)  subopts=( "${(@P)2}" ); shift 2 ;;
-  -O*) subopts=( "${(@P)1[3,-1]}" ); shift ;;
+  -O*) subopts=( "${(@P)${1[3,-1]}}" ); shift ;;
   -R)  rawret=yes; shift;;
   -w)  optarg=yes; shift;;
   -s)  singopt=(-s); shift;;
diff --git a/Completion/Base/Utility/_values b/Completion/Base/Utility/_values
index bbf0b36ae..d065961a6 100644
--- a/Completion/Base/Utility/_values
+++ b/Completion/Base/Utility/_values
@@ -7,7 +7,7 @@ while [[ "$1" = -(O*|C) ]]; do
   case "$1" in
   -C) usecc=yes; shift ;;
   -O) subopts=( "${(@P)2}" ); shift 2 ;;
-  *)  subopts=( "${(@P)1[3,-1]}" ); shift ;;
+  *)  subopts=( "${(@P)${1[3,-1]}}" ); shift ;;
   esac
 done