Skip to content

Instantly share code, notes, and snippets.

@ravern
Created March 8, 2019 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravern/5361aeec70bb7adfd56bddaf3f61d6eb to your computer and use it in GitHub Desktop.
Save ravern/5361aeec70bb7adfd56bddaf3f61d6eb to your computer and use it in GitHub Desktop.
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