forked from colonelpanic/dotfiles
handle powerline not existing
This commit is contained in:
parent
1315de4b37
commit
27f2baa4da
@ -78,5 +78,3 @@ esac
|
|||||||
function set_powerline_prompt {
|
function set_powerline_prompt {
|
||||||
source "$(python_module_path powerline)/bindings/bash/powerline.sh"
|
source "$(python_module_path powerline)/bindings/bash/powerline.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_powerline_prompt
|
|
||||||
|
@ -421,3 +421,11 @@ function jump_cd {
|
|||||||
function source_if_exists {
|
function source_if_exists {
|
||||||
test -r "$1" && source "$1"
|
test -r "$1" && source "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function python_module_exists {
|
||||||
|
python_module_path $@ 1>/dev/null 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
function set_default_prompt {
|
||||||
|
python_module_exists powerline && set_powerline_prompt || set_my_prompt
|
||||||
|
}
|
||||||
|
@ -10,9 +10,6 @@ unalias run-help 2> /dev/null 1>/dev/null
|
|||||||
autoload run-help
|
autoload run-help
|
||||||
HELPDIR=/usr/local/share/zsh/helpfiles
|
HELPDIR=/usr/local/share/zsh/helpfiles
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function if_emacs_zsh {
|
function if_emacs_zsh {
|
||||||
if [ -z $(echo "$INSIDE_EMACS" | grep comint) ]; then
|
if [ -z $(echo "$INSIDE_EMACS" | grep comint) ]; then
|
||||||
set_my_prompt
|
set_my_prompt
|
||||||
@ -21,4 +18,4 @@ function if_emacs_zsh {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
environment_variable_exists INSIDE_EMACS && if_emacs_zsh || set_powerline_prompt
|
environment_variable_exists INSIDE_EMACS && if_emacs_zsh || set_default_prompt
|
||||||
|
Loading…
Reference in New Issue
Block a user