mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Use new fish variables in binding
This commit is contained in:
parent
8f0d3f8bd2
commit
0c2c7e2f86
@ -31,11 +31,19 @@ function powerline-setup
|
|||||||
end
|
end
|
||||||
function _powerline_update --on-variable POWERLINE_COMMAND
|
function _powerline_update --on-variable POWERLINE_COMMAND
|
||||||
set -l addargs "--last-exit-code=\$status"
|
set -l addargs "--last-exit-code=\$status"
|
||||||
set -l addargs "$addargs --last-pipe-status=\$status"
|
if test -z "$pipestatus"
|
||||||
|
set addargs "$addargs --last-pipe-status=\$status"
|
||||||
|
else
|
||||||
|
set addargs "$addargs --last-pipe-status=\"\$pipestatus\""
|
||||||
|
end
|
||||||
set -l addargs "$addargs --jobnum=(jobs -p | wc -l)"
|
set -l addargs "$addargs --jobnum=(jobs -p | wc -l)"
|
||||||
# One random value has an 1/32767 = 0.0031% probability of having
|
if test -z "$fish_pid"
|
||||||
# the same value in two shells
|
# One random value has an 1/32767 = 0.0031% probability of having
|
||||||
set -l addargs "$addargs --renderer-arg=client_id="(random)
|
# the same value in two shells
|
||||||
|
set addargs "$addargs --renderer-arg=client_id="(random)
|
||||||
|
else
|
||||||
|
set addargs "$addargs --renderer-arg=client_id=\$fish_pid"
|
||||||
|
end
|
||||||
set -l addargs "$addargs --width=\$_POWERLINE_COLUMNS"
|
set -l addargs "$addargs --width=\$_POWERLINE_COLUMNS"
|
||||||
set -l addargs "$addargs --renderer-arg=mode=\$fish_bind_mode"
|
set -l addargs "$addargs --renderer-arg=mode=\$fish_bind_mode"
|
||||||
set -l addargs "$addargs --renderer-arg=default_mode=\$_POWERLINE_DEFAULT_MODE"
|
set -l addargs "$addargs --renderer-arg=default_mode=\$_POWERLINE_DEFAULT_MODE"
|
||||||
@ -59,8 +67,8 @@ function powerline-setup
|
|||||||
env \$POWERLINE_COMMAND $POWERLINE_COMMAND_ARGS shell right $addargs
|
env \$POWERLINE_COMMAND $POWERLINE_COMMAND_ARGS shell right $addargs
|
||||||
$rpromptpast
|
$rpromptpast
|
||||||
end
|
end
|
||||||
function fish_mode_prompt
|
function fish_mode_prompt
|
||||||
end
|
end
|
||||||
function _powerline_set_columns --on-signal WINCH
|
function _powerline_set_columns --on-signal WINCH
|
||||||
set -g _POWERLINE_COLUMNS $columnsexpr
|
set -g _POWERLINE_COLUMNS $columnsexpr
|
||||||
end
|
end
|
||||||
@ -96,5 +104,7 @@ function powerline-setup
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
# vim: ft=fish
|
# vim: ft=fish
|
||||||
|
Loading…
x
Reference in New Issue
Block a user