mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
29644: work around _describe bug, plus cosmetic tweaks
This commit is contained in:
parent
d48faef8cd
commit
4a3ce8ab89
4 changed files with 20 additions and 4 deletions
|
@ -1,5 +1,9 @@
|
|||
2011-08-03 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 29644: Functions/Chpwd/zsh_directory_name_cdr,
|
||||
Src/Zle/compcore.c, Src/Zle/zle_tricky.c: Work round a bug in
|
||||
_describe, plus a new comment and some more braces.
|
||||
|
||||
* 29633: Doc/Zsh/func.yo, Src/parse.c, Test/C04funcdef.ztst: be
|
||||
more careful that anonymous function syntax doesn't mess up
|
||||
working syntax with other functions.
|
||||
|
@ -15195,5 +15199,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5414 $
|
||||
* $Revision: 1.5415 $
|
||||
*****************************************************
|
||||
|
|
|
@ -18,7 +18,7 @@ elif [[ $1 = c ]]; then
|
|||
values=(${${(f)"$(cdr -l)"}/ ##/:})
|
||||
keys=(${values%%:*})
|
||||
_describe -t dir-index 'recent directory index' \
|
||||
values keys -V unsorted -S']'
|
||||
values -V unsorted -S']'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -607,7 +607,7 @@ callcompfunc(char *s, char *fn)
|
|||
if (rdstr)
|
||||
compredirect = rdstr;
|
||||
kset |= CP_REDIRECT;
|
||||
} else
|
||||
} else {
|
||||
switch (linwhat) {
|
||||
case IN_ENV:
|
||||
compcontext = (linarr ? "array_value" : "value");
|
||||
|
@ -637,6 +637,7 @@ callcompfunc(char *s, char *fn)
|
|||
aadd = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
compcontext = ztrdup(compcontext);
|
||||
if (compwords)
|
||||
freearray(compwords);
|
||||
|
|
|
@ -398,7 +398,18 @@ mod_export char *cmdstr;
|
|||
/**/
|
||||
mod_export char *varname;
|
||||
|
||||
/* != 0 if we are in a subscript */
|
||||
/*
|
||||
* != 0 if we are in a subscript.
|
||||
* Of course, this being the completion code, you're expected to guess
|
||||
* what the different numbers actually mean, but here's a cheat:
|
||||
* 1: Key of an ordinary array
|
||||
* 2: Key of a hash
|
||||
* 3: Ummm.... this appears to be a special case of 2. After a lot
|
||||
* of uncommented code looking for groups of brackets, we suddenly
|
||||
* decide to set it to 2. The only upshot seems to be that compctl
|
||||
* then doesn't add a matching ']' at the end, so I think it means
|
||||
* there's one there already.
|
||||
*/
|
||||
|
||||
/**/
|
||||
mod_export int insubscr;
|
||||
|
|
Loading…
Reference in a new issue