zsh-users
 help / color / mirror / code / Atom feed
* Completion of autocd Doesn't Show all the Possible Matches
@ 2011-10-14  9:50 Bastien Dejean
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien Dejean @ 2011-10-14  9:50 UTC (permalink / raw)
  To: ZSH Users Mailing List

Hi,

I've added

    setopt autocd

in my .zshrc and while testing this feature I found that hitting Tab
wouldn't give me all the possible matches.

For example, if I type:

    c/<Tab>

I only get four of the six possible directories starting with c in the
current directory.

Greetings,
-- 
Bastien


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

* Re: Completion of autocd Doesn't Show all the Possible Matches
  2011-10-18 10:50   ` Bastien Dejean
@ 2011-10-18 11:16     ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2011-10-18 11:16 UTC (permalink / raw)
  To: ZSH Users Mailing List

On Tue, 18 Oct 2011 12:50:38 +0200
Bastien Dejean <nihilhill@gmail.com> wrote:
> How could I define a custom completion mechanism which complete only
> from the set of all the directories (being direct children of the
> current directory) starting with the characters typed so far?

If you type ^Xh after cd you'll see something like

tags in context :completion::complete:cd::
    local-directories path-directories  (_alternative _cd (eval))

That's telling you there are two tags valid; one for local directories,
the other directions found via cdpath.  So to restrict completion after
cd in this way you can specify you only want local directories:

zstyle ':completion:*:complete:cd:*' tag-order local-directories

You can restrict other forms of completion similarly.

If you want to do this for autocd I think you need to turn off
path-directories in that context:

zstyle ':completion:*:complete:-command-:*' tag-order '!path-directories'

You still get local directories if "." is in the path because they're
completed by command completion.  If "." isn't in the path you may need
to type "./" first.  This case seems to have fallen down the holes.

pws


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


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

* Re: Completion of autocd Doesn't Show all the Possible Matches
  2011-10-14 16:32 ` Bart Schaefer
@ 2011-10-18 10:50   ` Bastien Dejean
  2011-10-18 11:16     ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Dejean @ 2011-10-18 10:50 UTC (permalink / raw)
  To: ZSH Users Mailing List; +Cc: Bart Schaefer

Bart Schaefer a écrit :

> If you type the trailing slash, then zsh assumes that what you really
> want to complete is what comes after the slash, that is, directories
> INSIDE a directory whose name starts with "c"; so I would expect that
> it's only showing you those directories that contain subdirectories.

How could I define a custom completion mechanism which complete only
from the set of all the directories (being direct children of the
current directory) starting with the characters typed so far?

Greetings,
-- 
Bastien


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

* Re: Completion of autocd Doesn't Show all the Possible Matches
  2011-10-14 13:15 Bastien Dejean
@ 2011-10-14 16:32 ` Bart Schaefer
  2011-10-18 10:50   ` Bastien Dejean
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2011-10-14 16:32 UTC (permalink / raw)
  To: ZSH Users Mailing List

On Oct 14,  3:15pm, Bastien Dejean wrote:
}
}     setopt autocd
} 
} For example, if I type:
} 
}     c/<Tab>
} 
} I only get four of the six possible directories starting with c in the
} current directory.

If you type the trailing slash, then zsh assumes that what you really
want to complete is what comes after the slash, that is, directories
INSIDE a directory whose name starts with "c"; so I would expect that
it's only showing you those directories that contain subdirectories.

(Trailing slashes that you type yourself are treated differently from
trailing slashes that are automatically added and thus auto-removable.)


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

* Completion of autocd Doesn't Show all the Possible Matches
@ 2011-10-14 13:15 Bastien Dejean
  2011-10-14 16:32 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Dejean @ 2011-10-14 13:15 UTC (permalink / raw)
  To: ZSH Users Mailing List

Hi,

I've added

    setopt autocd

in my .zshrc and while testing this feature I found that hitting Tab
wouldn't give me all the possible matches.

For example, if I type:

    c/<Tab>

I only get four of the six possible directories starting with c in the
current directory.

Greetings,
-- 
Bastien


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

end of thread, other threads:[~2011-10-18 11:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-14  9:50 Completion of autocd Doesn't Show all the Possible Matches Bastien Dejean
2011-10-14 13:15 Bastien Dejean
2011-10-14 16:32 ` Bart Schaefer
2011-10-18 10:50   ` Bastien Dejean
2011-10-18 11:16     ` 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).