5 ms·
Instead of doing the sym link think manually there is a great script that is stupid simple to use and only a few lines in your zshrc/bashrc file. It's called j
by weaksauce 12y ago
Instead of doing the sym link think manually there is a great script that is stupid simple to use and only a few lines in your zshrc/bashrc file.
It's called jump/mark. I aliased j to jump and added tab completion to zsh and it's made all the difference.
Usage
Mark .
Marks the current directory to be in the jump list.
Jump <dir name>
Jumps to that directory.
Zsh is a much nicer shell than bash too and there are no glaring incompatibility issues I have seen in daily usage.
- falcolas 12y agoSpecifically for jump, from my .bashrc: export MARKPATH=$HOME/.marks function jump { cd -P $MARKPATH/$1 2> /dev/null || (echo "No such mark: $1" && marks) } function mark { mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 } function unmark { rm -i $MARKPATH/$1 } function marks { ls -l $MARKPATH | sed 's/ / /g' | cut -d' ' -f9- && echo } _jump() { local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -W "$( ls $MARKPATH )" -- $cur) ) } complete -F _jump jump
- xemoka 12y agoMore information on jump and mark available at: http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-f... Basically there is a jump oh-my-zsh plugin, but be sure to add the auto-completion mentioned in this article too...