Created
July 12, 2021 09:01
-
-
Save skanev/1550b8d2a4957ed8740a038a12442c5b to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env zsh | |
typeset -gA jump_locations | |
jump_locations=( | |
zeitwerk ~/prj/zeitwerk | |
rails ~/prj/rails-dev-box/rails | |
tmp ~/tmp | |
) | |
j() { | |
if [[ -n $jump_locations[$1] ]]; then | |
cd ${~jump_locations[$1]} | |
else | |
echo "no location $1" | |
false | |
fi | |
} | |
_j() { | |
compadd ${(k)jump_locations} | |
} | |
compdef _j j |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment