zsh-users
 help / color / mirror / code / Atom feed
* completion with a PATH assignment
@ 2005-11-07  8:56 Helmut Jarausch
  2005-11-07  9:45 ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Helmut Jarausch @ 2005-11-07  8:56 UTC (permalink / raw)
  To: zsh-users

Hi,

I often use

export PATH=/usr/local/gcc-<TAB>

but unfortunately tab-expansion doesn't work here.
Is there a workaround?
I am using 4.3.0-dev-1

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


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

* Re: completion with a PATH assignment
  2005-11-07  8:56 completion with a PATH assignment Helmut Jarausch
@ 2005-11-07  9:45 ` Peter Stephenson
  2005-11-07 10:39   ` Sebastian Stein
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2005-11-07  9:45 UTC (permalink / raw)
  To: zsh-users

Helmut Jarausch wrote:
> Hi,
> 
> I often use
> 
> export PATH=/usr/local/gcc-<TAB>
> 
> but unfortunately tab-expansion doesn't work here.

It should do.  I can't think of a good reason why it wouldn't.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


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

* Re: completion with a PATH assignment
  2005-11-07  9:45 ` Peter Stephenson
@ 2005-11-07 10:39   ` Sebastian Stein
  2005-11-07 10:53     ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Stein @ 2005-11-07 10:39 UTC (permalink / raw)
  To: zsh-users

Peter Stephenson <pws@csr.com> [051107 11:36]:
> > I often use
> > 
> > export PATH=/usr/local/gcc-<TAB>
> > 
> > but unfortunately tab-expansion doesn't work here.
> 
> It should do.  I can't think of a good reason why it wouldn't.

I have a similar problem:

svn commit bla-<TAB> (and there is really a file which it can be expanded to)

TAB expansion did not worked in this case too. I'm using zsh 4.2.5.

Sebastian


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

* Re: completion with a PATH assignment
  2005-11-07 10:39   ` Sebastian Stein
@ 2005-11-07 10:53     ` Peter Stephenson
  2005-11-07 11:00       ` Sebastian Stein
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2005-11-07 10:53 UTC (permalink / raw)
  To: Zsh users list

Sebastian Stein wrote:
> I have a similar problem:
> 
> svn commit bla-<TAB> (and there is really a file which it can be expanded to)
> 
> TAB expansion did not worked in this case too. I'm using zsh 4.2.5.

That's actually a very different problem.  I think the _subversion
completer has been somewhat rewritten since then.  It might be worth
patching the latest version onto the 4.2 branch, if anyone is
sufficiently au fait with the status (I'm not a subversion user).

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


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

* Re: completion with a PATH assignment
  2005-11-07 10:53     ` Peter Stephenson
@ 2005-11-07 11:00       ` Sebastian Stein
  2005-11-07 11:15         ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Stein @ 2005-11-07 11:00 UTC (permalink / raw)
  To: zsh-users

Peter Stephenson <pws@csr.com> [051107 11:57]:
> That's actually a very different problem.  I think the _subversion
> completer has been somewhat rewritten since then.  It might be worth
> patching the latest version onto the 4.2 branch, if anyone is
> sufficiently au fait with the status (I'm not a subversion user).

So this means that even thus just the completion of a filename is needed,
this must especially coded for each supported command like svn? Shouldn't
there be some kind of fallback? I mean if zsh is not able to expand it,
maybe it should just try filenames in the current directory instead?


Sebastian


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

* Re: completion with a PATH assignment
  2005-11-07 11:00       ` Sebastian Stein
@ 2005-11-07 11:15         ` Peter Stephenson
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 2005-11-07 11:15 UTC (permalink / raw)
  To: zsh-users

Sebastian Stein wrote:
> So this means that even thus just the completion of a filename is needed,
> this must especially coded for each supported command like svn?

Yes, essentially:  the context has to invoke _files, which doesn't
involve much coding but must be done explicitly.

> Shouldn't there be some kind of fallback? I mean if zsh is not able to
> expand it,  maybe it should just try filenames in the current
> directory instead?

In principle it should be able to expand it; it's a bug that it can't.

It's easy to get plain old file completion bound to a separate key.
Given that the contextual completion is already complicated, this tends
to make more sense than yet more guessing.  For example, if you bind
_bash_completions to Esc / you get file name completion.  Or you can
create a widget:

  zstyle ':completion:plain-old-file-completion:*' completer _files
  zle -C plain-old-file-completion complete-word _generic
  bindkey '^xf' plain-old-file-completion

Or if you really always want file completion as a fallback, you can add
_files to the default completer list.  For example,

  zstyle ':completion:*' completer _oldlist _expand _complete _ignored \
  _approximate _files

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


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

end of thread, other threads:[~2005-11-07 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-07  8:56 completion with a PATH assignment Helmut Jarausch
2005-11-07  9:45 ` Peter Stephenson
2005-11-07 10:39   ` Sebastian Stein
2005-11-07 10:53     ` Peter Stephenson
2005-11-07 11:00       ` Sebastian Stein
2005-11-07 11:15         ` Peter Stephenson

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