I have recently been trying out
bash-it (something like
oh-my-zsh for bash), and I stumbled upon
fasd (which bash-it has a plugin for). It is for accessing recent files and directories (based on Mozilla's
frecency algorithm). I've found it really useful, even with only a few commands. The four basic ones are:
f(iles),
a(ll),
s(elect),
d(irectories).
f, a, and d start search commands, and if you prefix with s then you can select from a list. There is also z, which jumps directly into a directory. So;
Code:
# pwd
/home/user
# z sferic
# pwd
~/media/music/Shackleton & Vengeance Tenfold/Sferic Ghost Transmits
fasd becomes particularly useful with aliases, for example;
Code:
alias e='f -i -e "emacs -nw"'
This will interactively open a recently accessed file with emacs. So, say I want to edit my awesomewm config file (which is ~/.config/awesome/rc.lua), from any directory I could just do;
and it opens up. If it was an ambiguous search, then the -i flag in the alias makes it present a selection list;
Code:
# e rc
5 2 /home/user/.mbsyncrc
4 4 /etc/rc.d/rc.firewall
3 6.48966 /home/user/.weechat/irc.conf
2 28.7322 /home/user/.bashrc
1 39.4607 /home/user/.config/awesome/rc.lua
>
and you choose the index number to open that file. There's a lot more than can be done, but I find just these little things very handy. There's more info on the
fasd page, and its also on SBo.