10 ms·
I have these functions in my .bashrc addpi() { echo "cd `pwd` $1" >> ~/.pi; echo } pi() { `cat ~/.pi | grep $1`; } Usage: when you are in a dir
by bluishgreen 17y ago
I have these functions in my .bashrc
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.
- akkartik 17y agoI took the next step in disambiguation: http://akkartik.name/bash.html#cd http://akkartik.name/bash.html#cd