Created
April 12, 2016 18:08
-
-
Save subhaze/32c5c7f722738f5f07070da5ba801320 to your computer and use it in GitHub Desktop.
function to get completions for sublime projects available and open said project in sublime
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
# Sublime text project completions | |
function sublp(){ | |
subl --project ~/Sites/**/${1}.sublime-project | |
} | |
_sublp() | |
{ | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
local list=`ls -1 ~/Sites/**/*sublime-project | cut -d/ -f5` | |
COMPREPLY=( $(compgen -W "${list}" -- ${cur}) ) | |
} | |
complete -F _sublp sublp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment