From 7e9f42526d56b88eb132658ec8b7bb468a197700 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 30 Sep 2008 08:59:11 +0000 Subject: 25777: argument to gdbmsetfn() unposted: recognise ~[ in completion after : and = --- Completion/Zsh/Context/_subscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript index cef0a46e5..899845036 100644 --- a/Completion/Zsh/Context/_subscript +++ b/Completion/Zsh/Context/_subscript @@ -14,10 +14,11 @@ compset -P '\(([^\(\)]|\(*\))##\)' # remove subscript flags # the stuff inside the square brackets; we need to find out what's # outside. We ought to check for quoting, really, but given we've # got to the subscript code " ~[" is pretty likely to be a dynamic -# name expansion. +# name expansion. Also expand in anything that looks like an assignment +# or colon list. integer pos=$((CURSOR+1)) while [[ pos > 1 && $BUFFER[pos-1] != '[' ]]; do (( pos-- )); done -if [[ $BUFFER[1,pos] = *[[:space:]]##\~\[ ]]; then +if [[ $BUFFER[1,pos] = *[[:space:]:=]##\~\[ ]]; then _dynamic_directory_name elif [[ "$PREFIX" = :* ]]; then _wanted characters expl 'character class' \ -- cgit 1.4.1