Powerline can't start with fish

187 views
Skip to first unread message

Ricardo Estrada

unread,
Feb 5, 2017, 2:35:46 AM2/5/17
to powerline
Hi everybody, i'm using fish as default cli in the last version avaiable for arch linux (2.5.0-1) and powerline in its version 2.5-4 with python 3.6.
When i add to config.fish the following code line to use fish:

set fish_function_path $fish_function_path "/usr/lib/python3.6/site-packages/powerline/bindings/fish"

powerline-setup

as the official documentation page of fish says, but when i start my terminal emulator, fish gives me te following error:

function: Illegal function name '--on-variable'
/usr/lib/python3.6/site-packages/powerline/bindings/fish/powerline-setup.fish (line 35): function --on-variable fish_key_bindings _powerline_set_default_mode
if test x$fish_key_bindings != xfish_vi_key_bindings
^
in function 'powerline-setup'
called on line 22 of file /etc/fish/config.fish

from sourcing file /etc/fish/config.fish
called during startup

function: Illegal function name '--on-variable'
/usr/lib/python3.6/site-packages/powerline/bindings/fish/powerline-setup.fish (line 42): function --on-variable POWERLINE_COMMAND _powerline_update
set -l addargs "--last-exit-code=\$status"
^
in function 'powerline-setup'
called on line 22 of file /etc/fish/config.fish

from sourcing file /etc/fish/config.fish
called during startup

/usr/lib/python3.6/site-packages/powerline/bindings/fish/powerline-setup.fish (line 78): _powerline_set_default_mode
^
in function 'powerline-setup'
called on line 22 of file /etc/fish/config.fish

from sourcing file /etc/fish/config.fish
called during startup

/usr/lib/python3.6/site-packages/powerline/bindings/fish/powerline-setup.fish (line 79): _powerline_update
^
in function 'powerline-setup'
called on line 22 of file /etc/fish/config.fish

from sourcing file /etc/fish/config.fish
called during startup


How can i solve this issue?

Fabian Ritzmann

unread,
Feb 23, 2017, 7:49:11 AM2/23/17
to powerline
Fish expects options to come after the function name and this is now enforced with Fish 2.5. The powerline setup script was fixed in Powerline 2.5.1. In the meantime you can manually edit powerline-setup.fish until Arch picks up the next version of Powerline and apply these changes: https://github.com/powerline/powerline/commit/21ea62db56eaec619374e83e28458a86303d58de.
Reply all
Reply to author
Forward
0 new messages