Add powerline/bindings/fish/powerline.fish

This commit is contained in:
ZyX 2013-06-22 19:18:34 +04:00
parent 5c700b8bbe
commit 38f24852eb
1 changed files with 20 additions and 0 deletions

View File

@ -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