Created
July 20, 2016 08:55
-
-
Save localhots/bac081f3e9a5e93cffacd7f73ab530b1 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
PROJECTS=$HOME/Code | |
function c { cd $(realpath $PROJECTS/$1); } | |
function _c { __bash_directory_complete $PROJECTS; } | |
complete -F _c c | |
function __bash_directory_complete { | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=($(compgen -o nospace -W "$(ls $1)" -- $cur)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment