zsh-users
 help / color / mirror / code / Atom feed
* Re: Ignoring ~ when expanding scripts
@ 1997-05-22  4:37 Zoltan Hidvegi
  0 siblings, 0 replies; 4+ messages in thread
From: Zoltan Hidvegi @ 1997-05-22  4:37 UTC (permalink / raw)
  To: zsh-users

I wrote:
> Chris Laas wrote:
> > A hack like this:
> > 
> > compctl -C -g '*[^~](*)' + -c
> > 
> > when combined with the "hash -f ; unhash -m '*~'" hack, gives something
> > like the desired result, though it incorrectly completes for matching
> > executable files in the current directory, even if it is not (and it
> > should not be) in your PATH.  Anyone know how to fix that?
> 
> compctl -C -c -x 'C[0,*/*]' -g '*[^~](*)' + -g '*(*)'
> 
> The last *(*) is a fallback.  If the typed in prefix does not match
> anything without a tilde, then, like fignore, it'll try to complete
> allowing tilde.

The above is still not perfect since it does not complete directories after
one typed any slash.  A better solution is

compctl -C -c -x 'C[0,*/*]' -g '*[^~](*)' + -c

Zoltan


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

end of thread, other threads:[~1997-05-22  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199705211154.OAA10534@glait.Orbotech.Co.IL>
1997-05-21 19:38 ` Ignoring ~ when expanding scripts Zoltan T. Hidvegi
1997-05-21 22:45   ` Chris Laas
1997-05-22  2:59     ` Zoltan Hidvegi
1997-05-22  4:37 Zoltan Hidvegi

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).