mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 23:35:04 +02:00
Use powerline/powerline-render pair in place of powerline-client/powerline
This commit is contained in:
parent
c1d290b570
commit
75536825ba
@ -54,13 +54,14 @@ _powerline_set_prompt() {
|
|||||||
_powerline_setup_prompt() {
|
_powerline_setup_prompt() {
|
||||||
VIRTUAL_ENV_DISABLE_PROMPT=1
|
VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
if test -z "${POWERLINE_COMMAND}" ; then
|
if test -z "${POWERLINE_COMMAND}" ; then
|
||||||
if which powerline-client &>/dev/null ; then
|
if which powerline &>/dev/null ; then
|
||||||
export POWERLINE_COMMAND=powerline-client
|
|
||||||
elif which powerline &>/dev/null ; then
|
|
||||||
export POWERLINE_COMMAND=powerline
|
export POWERLINE_COMMAND=powerline
|
||||||
|
elif which powerline-render &>/dev/null ; then
|
||||||
|
export POWERLINE_COMMAND=powerline-render
|
||||||
else
|
else
|
||||||
# `$0` is set to `-bash` when using SSH so that won't work
|
# `$0` is set to `-bash` when using SSH so that won't work
|
||||||
export POWERLINE_COMMAND="$(dirname "$BASH_SOURCE")/../../../scripts/powerline"
|
local powerline_dir="$(dirname "$BASH_SOURCE")/../../.."
|
||||||
|
export POWERLINE_COMMAND="$powerline_dir/scripts/powerline"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
test "x$PROMPT_COMMAND" != "x${PROMPT_COMMAND%_powerline_set_prompt*}" ||
|
test "x$PROMPT_COMMAND" != "x${PROMPT_COMMAND%_powerline_set_prompt*}" ||
|
||||||
|
@ -20,10 +20,10 @@ function powerline-setup
|
|||||||
|
|
||||||
if test -z "$POWERLINE_NO_FISH_PROMPT$POWERLINE_NO_SHELL_PROMPT"
|
if test -z "$POWERLINE_NO_FISH_PROMPT$POWERLINE_NO_SHELL_PROMPT"
|
||||||
if test -z "$POWERLINE_COMMAND"
|
if test -z "$POWERLINE_COMMAND"
|
||||||
if which powerline-client >/dev/null
|
if which powerline >/dev/null
|
||||||
set -g -x POWERLINE_COMMAND powerline-client
|
|
||||||
else if which powerline >/dev/null
|
|
||||||
set -g -x POWERLINE_COMMAND powerline
|
set -g -x POWERLINE_COMMAND powerline
|
||||||
|
else if which powerline-render >/dev/null
|
||||||
|
set -g -x POWERLINE_COMMAND powerline-render
|
||||||
else
|
else
|
||||||
set -g -x POWERLINE_COMMAND (dirname (status -f))/../../../scripts/powerline
|
set -g -x POWERLINE_COMMAND (dirname (status -f))/../../../scripts/powerline
|
||||||
end
|
end
|
||||||
|
@ -11,10 +11,10 @@ if ! ( $?POWERLINE_NO_TCSH_TMUX_SUPPORT || $?POWERLINE_NO_SHELL_TMUX_SUPPORT ) t
|
|||||||
endif
|
endif
|
||||||
if ! ( $?POWERLINE_NO_TCSH_PROMPT || $?POWERLINE_NO_SHELL_PROMPT ) then
|
if ! ( $?POWERLINE_NO_TCSH_PROMPT || $?POWERLINE_NO_SHELL_PROMPT ) then
|
||||||
if ! $?POWERLINE_COMMAND then
|
if ! $?POWERLINE_COMMAND then
|
||||||
if ( { which powerline-client > /dev/null } ) then
|
if ( { which powerline > /dev/null } ) then
|
||||||
setenv POWERLINE_COMMAND powerline-client
|
|
||||||
else if ( { which powerline > /dev/null } ) then
|
|
||||||
setenv POWERLINE_COMMAND powerline
|
setenv POWERLINE_COMMAND powerline
|
||||||
|
else if ( { which powerline-render > /dev/null } ) then
|
||||||
|
setenv POWERLINE_COMMAND powerline-render
|
||||||
else
|
else
|
||||||
setenv POWERLINE_COMMAND $POWERLINE_SOURCED:h:h:h:h:q/scripts/powerline
|
setenv POWERLINE_COMMAND $POWERLINE_SOURCED:h:h:h:h:q/scripts/powerline
|
||||||
endif
|
endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if-shell 'test -z "$POWERLINE_COMMAND"' 'if-shell "which powerline-client" "set-environment -g POWERLINE_COMMAND powerline-client" "set-environment -g POWERLINE_COMMAND powerline"'
|
if-shell 'test -z "$POWERLINE_COMMAND"' 'if-shell "which powerline" "set-environment -g POWERLINE_COMMAND powerline" "set-environment -g POWERLINE_COMMAND powerline-render"'
|
||||||
if-shell 'test -z "$POWERLINE_CONFIG_COMMAND"' 'set-environment -g POWERLINE_CONFIG_COMMAND powerline-config'
|
if-shell 'test -z "$POWERLINE_CONFIG_COMMAND"' 'set-environment -g POWERLINE_CONFIG_COMMAND powerline-config'
|
||||||
|
|
||||||
# Don't version-check for this core functionality -- anything too old to
|
# Don't version-check for this core functionality -- anything too old to
|
||||||
|
@ -124,10 +124,10 @@ _powerline_setup_prompt() {
|
|||||||
zpython 'del _powerline_setup'
|
zpython 'del _powerline_setup'
|
||||||
else
|
else
|
||||||
if test -z "${POWERLINE_COMMAND}" ; then
|
if test -z "${POWERLINE_COMMAND}" ; then
|
||||||
if which powerline-client &>/dev/null ; then
|
if which powerline &>/dev/null ; then
|
||||||
export POWERLINE_COMMAND=powerline-client
|
|
||||||
elif which powerline &>/dev/null ; then
|
|
||||||
export POWERLINE_COMMAND=powerline
|
export POWERLINE_COMMAND=powerline
|
||||||
|
elif which powerline-render &>/dev/null ; then
|
||||||
|
export POWERLINE_COMMAND=powerline-render
|
||||||
else
|
else
|
||||||
export POWERLINE_COMMAND="$0:A:h:h:h:h/scripts/powerline"
|
export POWERLINE_COMMAND="$0:A:h:h:h:h/scripts/powerline"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user