Nice commandline directory bookmarker. (Saves you typing and tabbing too much)
bookmark-tools.com
bookmark-tools.com
This particular tool was mostly written to replace all the ad-hoc aliases and symlinks with something that could be easily maintained and brought to other commands (eg. cdbm, lsbm, mvbm, cpbm, etc.). To speed things up some more there's also tab completion and prefix matching, which is pretty convenient IMO.
So not an adventerous PyPi visitor, just someone who was looking throught his bookmarks ;)
Oh and thanks a lot for creating and sharing it. It's a great tool which IMHO should become part of the 'default' cd, mv and cp.
cd `bm shortcutname`
Forking loads of common utilities is going to add lots of superfluous complexity. Of course, at that point you could replace the whole bm suite with shell aliases or a script that contains #!/bin/sh
# find relevant line by key, get the second field
grep "$1 " ~/.bms | cut -d " " -f 2
. Put that in your path, chmod u+x bm, and there you go. In this case, the bookmarks file is hardcoded to ~/.bms and you edit it by hand, but that's probably good enough. If you want to add from the shell, here's bm-add: #!/bin/sh
echo $1 $2 >> ~/.bms
Put it in your path, chmod u+x bm-add, good to go.If you'd rather have the bookmark file separated by tabs, just remove the -d " " from bm, change the grep to "$1\\t", and change bm-add to echo $1\\t$2 >> ~/.bms. Simple.
For an excellent intro on how to work with Unix's strengths, read _The Unix Programming Environment_ by Kernighan and Pike.
addpi() { echo "cd `pwd` $1" >> ~/.pi; echo }
pi() { `cat ~/.pi | grep $1`; }
Usage: when you are in a dir that you want to bookmark say addpi <name>
when you want to return to that dir from anywhere say pi <name>
Ofcourse you need some kind of resolution if you have 2 matches in the grep, but it works for me.
EDIT: By forking, I mean "having to maintain separate frontends to", not the process startup overhead. (That's obviously inconsequential.) E.g. if I want to use a shortcut for a default path to clone a git repository from, then I would need gitbm. Etc.
I'm being a bit nitpicky, though, so I'm going to let it go.
------------------
c:\foo\bar\bat>qcd 1
(creates file called c:\windows\1.bat containing "cd \foo\bar\bat")
c:\foo\bar\bat>cd \frotz\ozmoo
c:\frotz\ozmoo>1
c:\foo\bar\bat>