Skip to content

Instantly share code, notes, and snippets.

@ethanpil
Created March 12, 2023 18:10
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 ethanpil/13b4a515216a208b019cb5142cb81501 to your computer and use it in GitHub Desktop.
Save ethanpil/13b4a515216a208b019cb5142cb81501 to your computer and use it in GitHub Desktop.
Shell Bookmark Directories
# https://news.ycombinator.com/item?id=35122780#35123388
# http://karolis.koncevicius.lt/posts/fast_navigation_in_the_command_line/
<<USAGE
mark @name # add bookmark called @name for the current directory
cd @name # jump to the bookmarked location
cd @<tab> # list all available bookmarks
USAGE
export CDPATH=.:~/.marks/
function mark {
ln -sr "$(pwd)" ~/.marks/"$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment