3 ms·
I also do something similar but slightly different: https://github.com/roobert/dotfiles/blob/master/.zsh/robs/functions/bookmarks.zsh https://github.com/roobert
by roob 13y ago
I also do something similar but slightly different: https://github.com/roobert/dotfiles/blob/master/.zsh/robs/functions/bookmarks.zsh https://github.com/roobert/dotfiles/blob/master/.zsh/robs/fu...
my method involves storing the bookmarks in a file but loading them into zshs directory hash. This means the directories are tab completable and if you have AUTO_CD set then you can change directory with simply: ~dir_name, otherwise: cd ~dir_name.
- belovedeagle 13y agoAnd with CDABLE_VARS set, you can simply do: dir_name In fact, you don't even have to use the directory hash for this, you just do, e.g.: MY_DIR=/path/to/dir; MY_DIR Frankly, this is far superior to the linked method.
- roob 13y agoExcept tab completion is annoying since zsh will include commands and environment variables in its guesses. The linked method simply provides a way to store the directory hash across sessions.