Created
October 14, 2011 17:20
-
-
Save bmarini/1287720 to your computer and use it in GitHub Desktop.
A little time saver for cd'ing into my most common directory (current project I am working on)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onscreen() | |
{ | |
if [ -z $1 ]; then | |
if [ -f $HOME/.onscreen ]; then | |
cd `cat $HOME/.onscreen` | |
else | |
echo "You must set an onscreen destination" | |
echo "cd into a directory and run 'onscreen set'" | |
fi | |
fi | |
if [ "$1" = "set" ]; then | |
echo `pwd` > $HOME/.onscreen | |
echo "`pwd` set as onscreen destination." | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment