Skip to content

Instantly share code, notes, and snippets.

@staticor
Created January 6, 2019 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staticor/a38ad2c54060dea0b14126fbf7979d46 to your computer and use it in GitHub Desktop.
Save staticor/a38ad2c54060dea0b14126fbf7979d46 to your computer and use it in GitHub Desktop.
quick jump and mark - shell tool
export MARKPATH=$HOME/.marks
function jump {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1"
echo "staticor is best "
}
function unmark {
rm -i "$MARKPATH/$1"
}
function marks {
ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/ - /g' && echo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment