Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: PATCH: Re: ~user completion in single quotes.
- X-seq: zsh-workers 11429
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: PATCH: Re: ~user completion in single quotes.
- Date: Wed, 17 May 2000 08:47:32 +0200 (MET DST)
- In-reply-to: Tanaka Akira's message of 17 May 2000 01:14:49 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira wrote:
> In article <200005161122.NAA27048@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
> Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
>
> > Hmhm, seems sensible, because there is `compset -q' for real in-quote
> > completion.
>
> User name completion is correctly disabled. Thanks.
>
> Z(4):akr@serein% Src/zsh -f
> serein% bindkey -e; autoload -U compinit; compinit -D
> serein% mkdir '~zzz'
> serein% echo '~z<TAB>
>
> But filenames beginning with tilde is not completed.
Ugh. Not only filenames, any kind of match. And for '=...', too.
Bye
Sven
Index: Completion/Core/_main_complete
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v
retrieving revision 1.19
diff -u -r1.19 _main_complete
--- Completion/Core/_main_complete 2000/05/16 11:44:57 1.19
+++ Completion/Core/_main_complete 2000/05/17 06:47:13
@@ -45,11 +45,13 @@
# Special completion contexts after `~' and `='.
-if compset -P 1 '='; then
- compstate[context]=equal
-elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
- compset -p 1
- compstate[context]=tilde
+if [[ -z "$compstate[quote]" ]]; then
+ if compset -P 1 '='; then
+ compstate[context]=equal
+ elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
+ compset -p 1
+ compstate[context]=tilde
+ fi
fi
# Initial setup.
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author