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

PATCH: Re: PATCH: Re: ~user completion in single quotes.



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