Skip to content

Instantly share code, notes, and snippets.

@dmukhg
Created October 19, 2010 14:05
Show Gist options
  • Save dmukhg/634244 to your computer and use it in GitHub Desktop.
Save dmukhg/634244 to your computer and use it in GitHub Desktop.
.*shrc
# ===================== Mark functions =======================
# calling mark, sets up a file ~/.mark_dir containing
# the value of the current directory
# hence forth, any terminal you open will be directed to this
# directory
function m(){
printf `pwd` > ~/.mark_dir
echo 'Directory Marked'
}
# to turn this off, call unmark or call mark on some other directory
# unmark resets mark_dir to the home directory and also places you at ~
function u(){
printf ~ > ~/.mark_dir
echo 'Directory Marked Reset to home'
cd ~
}
read MARKDIR < ~/.mark_dir
cd $MARKDIR
# ===================== End Mark functions ===================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment