Skip to content

Instantly share code, notes, and snippets.

@fstamour
Created July 31, 2014 17:46
Show Gist options
  • Save fstamour/5adc43c9ee896397fe4c to your computer and use it in GitHub Desktop.
Save fstamour/5adc43c9ee896397fe4c to your computer and use it in GitHub Desktop.
Shell snippet to cd to anything
# Note: havn't tested it yet.
follow () {
cd "$(dirname "$(readlink -f "$1")")"
}
# Example:
# follow $(which sbcl)
# follow a_symlink
# follow ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment