Add theme_change command helper

pull/176/head
nickl- 2012-12-11 05:57:45 +02:00
parent 2813930e04
commit ff2cf6271f
1 changed files with 12 additions and 0 deletions

View File

@ -167,3 +167,15 @@ function scm_char {
function prompt_char { function prompt_char {
scm_char scm_char
} }
function theme_change () {
if [ "$1" == '--complete' ]; then
for d in $(find "${BASH_IT}/themes" -maxdepth 1 -type d -name "$3*" ! -iname "*themes"); do
echo ${d##*/};
done
exit
fi
sed -i '' 's/\(.*BASH_IT_THEME=\).*/\1"'$1'"/' ~/.bash_profile
source ~/.bash_profile
}
complete -o default -C 'theme_change --complete $@' theme_change