zsh : How to list directory content with tab?
Posted
by
Philippe CM
on Super User
See other posts from Super User
or by Philippe CM
Published on 2012-07-04T20:45:13Z
Indexed on
2012/07/04
21:18 UTC
Read the original article
Hit count: 177
I just switched from BASH to ZSH and thing are pretty good, but:
when I start typing cd /usr/share/s
and hit TAB
, this is what I get :
$ cd /usr/share/sane/
sane/ skype/ ssl-cert/
screen/ smplayer/ strigi/
seed-gtk3/ snmp/ synaptic/
sgml/ software-properties/ system-config-printer/
sgml-base/ soprano/ sysv-rc/
sgml-data/ sounds/
simple-scan/ splashy/
And this is ok. If I then hit TAB again, I get $ cd /usr/share/screen/
, the next candidate, witch is also OK. (BTW, how do I cycle back to the previous candidate? Sorry, on to my question)
Now what if I want to see the contents of /usr/share/screen/ now ? You now, BASH-style? The cursor is at the end of the line, will I have to ctrl-a
(or home
), then del del
(to erase cd
) then ls
then ENTER
? That seems like a lot of typing. (And it - possibly unnecessarily - enters the command in the history)
Would not there be a key (maybe modifier-TAB? but the obvious candidates are already taken by the desktop... I digress) that would tell zsh to stop cycling through /usr/share/
and instead, just list the content /usr/share/screen/
?
© Super User or respective owner