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

Re: "_alternative:shift:14: shift count must be <= $#" with zsh-5.0.8



On Tue, 23 Jun 2015 09:16:13 +0200
Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx> wrote:
> Since the update to zsh-5.0.8 I observe the following issue:
> 
> _alternative:shift:14: shift count must be <= $#

shift OPTIND-1

Hmm...

POSIX_BUILTINS <K> <S>
       Furthermore, the getopts builtin behaves in  a  POSIX-compatible
       fashion in that the associated variable OPTIND is not made local
       to functions.

There ought to be a better way of doing this...

pws

diff --git a/Completion/compinit b/Completion/compinit
index 79f9d42..4b9a778 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -152,6 +152,7 @@ _comp_options=(
     NO_kshtypeset
     NO_markdirs
     NO_octalzeroes
+    NO_posixbuiltins
     NO_shwordsplit
     NO_shglob
     NO_warncreateglobal



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