Perform shell word splitting in zsh bindings
This makes POWERLINE_COMMAND be consistent across various bindings.
This commit is contained in:
parent
dc76396912
commit
8e77262f2d
|
@ -122,11 +122,9 @@ powerline into different directory.
|
|||
.. note::
|
||||
|
||||
``$POWERLINE_COMMAND`` appears in shell scripts without quotes thus you can
|
||||
specify additional parameters in bash. In zsh you will have to make
|
||||
``$POWERLINE_COMMAND`` an array parameter to achieve the same result. In
|
||||
tmux it is passed to ``eval`` and depends on the shell used.
|
||||
POSIX-compatible shells, zsh, bash and fish will split this variable in this
|
||||
case.
|
||||
specify additional parameters in bash. In tmux it is passed to ``eval`` and
|
||||
depends on the shell used. POSIX-compatible shells, zsh, bash and fish will
|
||||
split this variable in this case.
|
||||
|
||||
If you want to disable prompt in shell, but still have tmux support or if you
|
||||
want to disable tmux support you can use variables
|
||||
|
|
|
@ -131,7 +131,7 @@ _powerline_setup_prompt() {
|
|||
}
|
||||
else
|
||||
if test -z "${POWERLINE_COMMAND}" ; then
|
||||
POWERLINE_COMMAND=( "$($POWERLINE_CONFIG shell command)" )
|
||||
POWERLINE_COMMAND="$($POWERLINE_CONFIG shell command)"
|
||||
fi
|
||||
|
||||
local add_args='-r .zsh'
|
||||
|
@ -145,11 +145,11 @@ _powerline_setup_prompt() {
|
|||
local add_args_2=$add_args$new_args_2
|
||||
add_args+=' --width=$(( ${COLUMNS:-$(_powerline_columns_fallback)} - 1 ))'
|
||||
local add_args_r2=$add_args$new_args_2
|
||||
PS1='$($POWERLINE_COMMAND shell aboveleft '$add_args')'
|
||||
RPS1='$($POWERLINE_COMMAND shell right '$add_args')'
|
||||
PS2='$($POWERLINE_COMMAND shell left '$add_args_2')'
|
||||
RPS2='$($POWERLINE_COMMAND shell right '$add_args_r2')'
|
||||
PS3='$($POWERLINE_COMMAND shell left '$add_args_3')'
|
||||
PS1='$($=POWERLINE_COMMAND shell aboveleft '$add_args')'
|
||||
RPS1='$($=POWERLINE_COMMAND shell right '$add_args')'
|
||||
PS2='$($=POWERLINE_COMMAND shell left '$add_args_2')'
|
||||
RPS2='$($=POWERLINE_COMMAND shell right '$add_args_r2')'
|
||||
PS3='$($=POWERLINE_COMMAND shell left '$add_args_3')'
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue