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

Re: Turn off completion of users



On 2006-08-03 19:06:56 +0200, Ulrich Spoerlein wrote:
> Peter Stephenson wrote:
> > This is because of the option "cdablevars".  This makes it possible for
> > "cd user" to behave the same as "cd ~user"; it works for user
> > directories and named directories (i.e. where ~var behaves like $var)
> > alike, since those deliberately have the same behaviour.  If you're not
> > using that, you can "unsetopt cdablevars".
> 
> Splendid!
> 
> Thanks to you and Bart for pointing me to the right direction.

Alternatively, if you still want cdablevars, but disable users and
named directories in the first completion choices, you can use that:

# Suggestion from
#   From: Peter Stephenson <pws@xxxxxxx>
#   Date: Thu, 11 Mar 2004 12:28:17 +0000
#   Subject: Re: cd completion and CDABLE_VARS
#   To: zsh-users@xxxxxxxxxx
#   Message-ID: <14646.1079008097@xxxxxxx>
# to disable named directories in the first completion choices.
zstyle ':completion:*:complete:(cd|pushd):*' tag-order \
  'local-directories path-directories directory-stack' '*'

Works very well for me.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Messages sorted by: Reverse Date, Date, Thread, Author