Add powerline/bindings/fish/powerline.fish
This commit is contained in:
parent
5c700b8bbe
commit
38f24852eb
|
@ -0,0 +1,20 @@
|
||||||
|
function powerline
|
||||||
|
if test -z "$POWERLINE_COMMAND"
|
||||||
|
if which powerline-client >/dev/null
|
||||||
|
set -g -x POWERLINE_COMMAND powerline-client
|
||||||
|
else
|
||||||
|
set -g -x POWERLINE_COMMAND powerline
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function _powerline_update -v POWERLINE_COMMAND
|
||||||
|
eval "
|
||||||
|
function fish_prompt
|
||||||
|
$POWERLINE_COMMAND shell left --last_exit_code=\$status --last_pipe_status=\$status
|
||||||
|
end
|
||||||
|
function fish_right_prompt
|
||||||
|
$POWERLINE_COMMAND shell right --last_exit_code=\$status --last_pipe_status=\$status
|
||||||
|
end
|
||||||
|
"
|
||||||
|
end
|
||||||
|
_powerline_update
|
||||||
|
end
|
Loading…
Reference in New Issue