Skip to content

Instantly share code, notes, and snippets.

@eoinkelly
Created May 22, 2019 01:37
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 eoinkelly/6514e79c210216d7ab83310b9c27ce5a to your computer and use it in GitHub Desktop.
Save eoinkelly/6514e79c210216d7ab83310b9c27ce5a to your computer and use it in GitHub Desktop.
# Add this to your ~/.zshrc (it only works in zsh not bash AFAIK)
# #####################################
# A fast way of chdir to a code project
function work {
cd ~/Code/repos/$1
}
function _work() {
local state
_arguments '1: :->repos_dir'
case $state in
(repos_dir) _arguments '1:profiles:($(ls ~/Code/repos))' ;;
esac
}
compdef _work work
# #####################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment