zsh-workers
 help / color / mirror / code / Atom feed
* Re:  Bug in completing named dirs (pws-3)?
@ 1998-12-17  9:16 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1998-12-17  9:16 UTC (permalink / raw)
  To: zsh-workers


Phil Pennock wrote:

> 
> Using 3.1.5-pws-3, there seems to be something curious with named dirs
> completion.  Tab completion removes the tilde.

And the same for completion after `='. Below is the fix (I forgot to
put ic in ipre ;-).

Bye
 Sven

P.S.: ic is the `ignored character' known from older versions, ipre is 
      the `ignored prefix' added for the or'ing stuff.

diff -c os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
*** os/Zle/zle_tricky.c	Wed Dec 16 11:48:23 1998
--- Src/Zle/zle_tricky.c	Thu Dec 17 10:12:05 1998
***************
*** 3801,3815 ****
  
  	/* Completion after `~', maketildelist adds the usernames *
  	 * and named directories.                                 */
! 	if (ic == Tilde)
  	    maketildelist();
! 	else if (ic == Equals) {
  	    /* Completion after `=', get the command names from *
  	     * the cmdnamtab and aliases from aliastab.         */
  	    if (isset(HASHLISTALL))
  		cmdnamtab->filltable(cmdnamtab);
  	    dumphashtable(cmdnamtab, -7);
  	    dumphashtable(aliastab, -2);
  	} else {
  	    /* Normal file completion... */
  	    if (ispattern & 1) {
--- 3801,3823 ----
  
  	/* Completion after `~', maketildelist adds the usernames *
  	 * and named directories.                                 */
! 	if (ic == Tilde) {
! 	    char *oi = ipre;
! 
! 	    ipre = (ipre ? dyncat("~", ipre) : "~");
  	    maketildelist();
! 	    ipre = oi;
! 	} else if (ic == Equals) {
  	    /* Completion after `=', get the command names from *
  	     * the cmdnamtab and aliases from aliastab.         */
+ 	    char *oi = ipre;
+ 
+ 	    ipre = (ipre ? dyncat("=", ipre) : "=");
  	    if (isset(HASHLISTALL))
  		cmdnamtab->filltable(cmdnamtab);
  	    dumphashtable(cmdnamtab, -7);
  	    dumphashtable(aliastab, -2);
+ 	    ipre = oi;
  	} else {
  	    /* Normal file completion... */
  	    if (ispattern & 1) {

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in completing named dirs (pws-3)?
  1998-12-31  7:06 ` Phil Pennock
@ 1999-01-03 21:12   ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1999-01-03 21:12 UTC (permalink / raw)
  To: Phil Pennock, Zsh Development Workers

On Dec 31,  7:06am, Phil Pennock wrote:
} Subject: Re: Bug in completing named dirs (pws-3)?
}
} Typing away merrily, I produced the immortal words:
} > Using 3.1.5-pws-3, there seems to be something curious with named dirs
} > completion.  Tab completion removes the tilde.
} 
} Still the case.

Eh?  Should be fixed in pws-4 ... Sven's patch for it was zsh-workers 4810.

Works for me in pws-4.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in completing named dirs (pws-3)?
  1998-12-15 15:04 Phil Pennock
@ 1998-12-31  7:06 ` Phil Pennock
  1999-01-03 21:12   ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Pennock @ 1998-12-31  7:06 UTC (permalink / raw)
  To: Zsh Development Workers

Typing away merrily, I produced the immortal words:
> Using 3.1.5-pws-3, there seems to be something curious with named dirs
> completion.  Tab completion removes the tilde.

Still the case.  Extra information: the same also happens after '=':
...% zsh-3.1.5-pws-3 -f
athenaeum% ls -l =pe<TAB>
  becomes:
athenaeum% ls -l perl

> HTH the ZLE-hackers.

Ditto.  Erm, sitto?  I dunno, whatever.
-- 
--> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Bug in completing named dirs (pws-3)?
@ 1998-12-15 15:04 Phil Pennock
  1998-12-31  7:06 ` Phil Pennock
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Pennock @ 1998-12-15 15:04 UTC (permalink / raw)
  To: Zsh Development Workers

Using 3.1.5-pws-3, there seems to be something curious with named dirs
completion.  Tab completion removes the tilde.

This holds for 'zsh -f' defaults, and for any of:
 (1) compctl -D -f
 (2) compctl -g '*(D-/)' cd
 (3) compctl -K cdmatch -S '' + -g '*(D-/)' cd
      (where cdmatch is that distributed in 3.1.5-pws-3)

For these examples, cursor is at end of 'Result' string, state is
'zsh -f' with PS1 changed:

% cd ~<TAB>
Result "% cd "
% cd ~p<TAB>
Result "% cd p"
% cd ~ph<TAB>
Result "% cd phil/"

When there are multiple possible completions, extra tabs will cycle
through the names of the dirs, even though there is no longer a leading
tilde.  The above were in vi-mode, although it seems to be the case in
emacs mode too.

HTH the ZLE-hackers.
-- 
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-01-03 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-17  9:16 Bug in completing named dirs (pws-3)? Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1998-12-15 15:04 Phil Pennock
1998-12-31  7:06 ` Phil Pennock
1999-01-03 21:12   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).