Bash scripts to support tab complete / subdirectory search when changing direrectory. See ReadMe for instructions on how to set up.
Copy setup.sh
somewhere you'd like to keep it. I assume it's ~/.scd_setup
below.
Note, adjust the source statements to match where you checked out the code.
- add
source ~/.scd_setup
to your ~/.bashrc to add the scd command with full subdirectory pattern serach - add
source ~/.scdrc
to your ~/.bashrc to enable tab completion. (currently EXPERIMENTAL). have a look in .scdrc to see how to use it.
To change to the Documents directory in home,
scd ~ Documents
Not very interesting...
To change to the log directory, and the subdirectory in its tree that contains the word 'error'
scd ~/logs error
I use it like this. In '.bashrc' I put:
export $paperdir=~/Dropbox/docs/papers
function pcd(){ scd
$paperdir $ @; }
My and my labmates papers are organized with the following naming convention: <conf><year><subject>/<submission number>
. But there's often a lot of them.
So I can:
pcd tro two n1
to cd to ~/Dropbox/docs/papers/vhook/journal/tro2014/tworobot/submission1
As you can see that's pretty concise.