allow changetheme to take a theme name

This commit is contained in:
Joel Holdbrooks 2011-06-06 23:36:14 -07:00
commit 8a577e77af

View file

@ -21,6 +21,9 @@ function usetheme() {
# Change themes through a menu style prompt
function changetheme() {
if [ $1 ]; then
usetheme "$1"
else
theme_files=($ZSH_THEMES_PATH/*)
theme_names=(${${theme_files[@]##*/}[@]%.zsh-theme})
@ -43,4 +46,5 @@ function changetheme() {
theme="${theme_names[$SELECTION]}"
usetheme $theme
fi
}