1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-29 05:21:00 +01:00

29438: complete dynamic directory names in command position

This commit is contained in:
Mikael Magnusson 2011-06-03 20:51:37 +00:00
parent 12e246495c
commit 0bff0b356c
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-06-03 Mikael Magnusson <mikachu@gmail.com>
* 29438: Completion/Zsh/Context/_subscript: adjust pattern so
we complete dynamic directory names in command position as well.
2011-06-03 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 29413: Doc/Zsh/builtins.yo, Src/builtin.c, Src/hist.c: print
@ -14931,5 +14936,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5356 $
* $Revision: 1.5357 $
*****************************************************

View file

@ -18,7 +18,7 @@ compset -P '\(([^\(\)]|\(*\))##\)' # remove subscript flags
# or colon list.
integer pos=$((CURSOR+1))
while [[ pos -gt 1 && $BUFFER[pos-1] != '[' ]]; do (( pos-- )); done
if [[ $BUFFER[1,pos-1] = *[[:space:]:=]##\~\[ ]]; then
if [[ $BUFFER[1,pos-1] = (|*[[:space:]:=]##)\~\[ ]]; then
_dynamic_directory_name
elif [[ "$PREFIX" = :* ]]; then
_wanted characters expl 'character class' \