Last active
December 29, 2015 01:19
-
-
Save rpedde/7591961 to your computer and use it in GitHub Desktop.
ubernova
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
#!/bin/bash | |
_ubernova() { | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=( $(compgen -W "$(pushd ${HOME}/.ubernova > /dev/null 2>&1; ls *; popd > /dev/null 2>&1)" -- $cur) ) | |
} | |
ubernova() { | |
local env=${1} | |
if [ ! -e ${HOME}/.ubernova/${env} ]; then | |
return 1 | |
fi | |
source ${HOME}/.ubernova/${env} | |
} | |
complete -F _ubernova ubernova |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment