_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Fri Jul 12, 2013 3:49 pm Post subject: reverse fs tree completion? |
|
|
Hi,
Call me crazy on this one, but, could names on a filesystem be remembered backwards starting from their names?
Let's say I have /home/user/document.pdf that it can also be treated as:
/document.pdf/user/home.
I haven't figured out the details but I hope this gives a pretty good idea of what I meant.
The ending of a folder is / as well that can be completed backwards.
I don't see very difficult adding reverse completion at filesystem level since the only thing that needs to be added is an extra / to each file. Moreover it can be just a function.
Sometimes is tedious having to type a long path.
I know is sounds strange but for scripting it would be a godsent gift.
I recall zsh having a similar feature.
A step further would be to fuzzy completion, let's say you don't want to type the entire path just the folder containing then the shell completes the beginning of the path, then you proceed.
cd "user"
completes as:
cd /home/user/
or:
cd music
as
cd /home/user/music
if several folder with music then it simply provides a list:
cd
/home/userA/music
/home/userB/music
/home/userC/music
/var/cache/app/music
thanks |
|