Created
March 8, 2019 16:47
-
-
Save ravern/5361aeec70bb7adfd56bddaf3f61d6eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function cdx | |
if count $argv > /dev/null | |
set proj $argv[1] | |
else | |
echo "Error: destination not provided." | |
return 1 | |
end | |
set dest (jq -r ".[\"$proj\"]" ~/.config/cdx/config.json) | |
if [ $dest != "null" ] | |
echo "cd $dest" | source | |
else | |
echo "cd $proj" | source | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment