Add theme_change command helper
parent
2813930e04
commit
ff2cf6271f
|
|
@ -167,3 +167,15 @@ function scm_char {
|
|||
function prompt_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
|
||||
|
|
|
|||
Loading…
Reference in New Issue