Move setup to powerline-setup.fish

This file is supposed to be placed in /usr/share/fish/functions.
This commit is contained in:
ZyX 2014-01-23 19:32:19 +04:00
parent 64e23d346e
commit e489e549a6
3 changed files with 5 additions and 4 deletions

View File

@ -158,7 +158,8 @@ is the absolute path to your Powerline installation directory:
.. code-block:: bash
. {repository_root}/powerline/bindings/fish/powerline.fish
set fish_function_path $fish_function_path "{repository_root}/powerline/bindings/fish"
powerline-setup
Tmux statusline
---------------

View File

@ -1,4 +1,4 @@
function powerline
function powerline-setup
if test -z "$POWERLINE_COMMAND"
if which powerline-client >/dev/null
set -g -x POWERLINE_COMMAND powerline-client
@ -33,4 +33,3 @@ function powerline
_powerline_tmux_set_columns
_powerline_tmux_set_pwd
end
powerline

View File

@ -2,7 +2,8 @@ set POWERLINE_COMMAND "$PWD/scripts/powerline -p $PWD/powerline/config_files"
set POWERLINE_COMMAND "$POWERLINE_COMMAND -t default_leftonly.segment_data.hostname.args.only_if_ssh=false"
set POWERLINE_COMMAND "$POWERLINE_COMMAND -c ext.shell.theme=default_leftonly"
set VIRTUAL_ENV
. powerline/bindings/fish/powerline.fish ; cd tests/shell/3rd
set fish_function_path $fish_function_path "$PWD/powerline/bindings/fish"
powerline-setup ; cd tests/shell/3rd
cd .git
cd ..
set VIRTUAL_ENV "$HOME/.virtenvs/some-virtual-environment"