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

Re: tab completion sort by modification time



On Sat, Jan 10, 2015 at 11:40 PM, kamaraju kusumanchi
<raju.mailinglists@xxxxxxxxx> wrote:
> On Sat, Jan 10, 2015 at 2:52 PM, Eric Cook <llua@xxxxxxx> wrote:
>> You can also reverse the order:
>> zstyle ':completion:*' file-sort 'reverse modification'
>
> I confirm that this line is all I needed to get what I am after. But
> thanks to all other tidbits. They will all be useful as I get more
> experience with Z shell.
>
> raju

So I have been experimenting with zsh and I found one feature that I
really like. The shell cleans up the tab completions once it is
completed.

For example, say I have

rajulocal@hogwarts ~/x % ls file*
file10.txt  file11.txt  file12.txt  file13.txt  file1.txt  file2.txt
file3.csv  file4.csv  file5.tsv  file6.tsv  file7.txt  file9.txt

Now, I can bring up a list of possible completions by <tab>

rajulocal@hogwarts ~/x % ls file<tab>
Completing files
file2.txt    file4.csv    file6.tsv    file7.txt    file10.txt
file12.txt
file3.csv    file5.tsv    file1.txt    file9.txt    file11.txt
file13.txt*

and when I enter 12.txt, the list completely disappears.

rajulocal@hogwarts ~/x % ls file12.txt
file12.txt

That is pretty impressive and something I always wanted to do in bash.

raju
-- 
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/



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