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

Completion of ~ to include dirstack?



I use the following options:

setopt auto_pushd pushd_ignore_dups

This allows me to do
% dirs -v
0       /opt
1       /export/home
2       /usr
3       ~
% cd ~1
% pwd
/usr

That's great.

I can also change to a dir with cd ~-2 (second from the end)

Now, I have other options set (like verbose menuselection) set, and
completion works on this:

% cd ~-<tab>
directory stack
0 -- /export/home/boyd
1 -- /export/home
2 -- /opt

But I get the list in *reverse* order. What I'd really like is this completion:

% cd ~<tab>
user
adm       boyd      fred      listen    noaccess  nobody4   root
student   uucp
bin       daemon    gdm       lp        nobody    nuucp     smmsp
sys       webservd

to include a section with the directory stack.

I have a feeling that this is a one-liner, but I've always found the
zstyle system a bit bewildering.

Can this be done? And if so, is there a general place to get this kind
of info (apart from this list :) )

Boyd



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