Created
March 12, 2023 18:10
-
-
Save ethanpil/13b4a515216a208b019cb5142cb81501 to your computer and use it in GitHub Desktop.
Shell Bookmark Directories
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
# 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