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 --on-variable POWERLINE_COMMAND _powerline_update
		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
	function _powerline_tmux_setenv
		if test -n "$TMUX"
			tmux setenv -g TMUX_$argv[1]_(tmux display -p "#D" | tr -d "%") "$argv[2]"
			tmux refresh -S
		end
	end
	function --on-variable PWD _powerline_tmux_set_pwd
		_powerline_tmux_setenv PWD "$PWD"
	end
	function --on-signal WINCH _powerline_tmux_set_columns
		_powerline_tmux_setenv COLUMNS "$COLUMNS"
	end
	_powerline_tmux_set_columns
	_powerline_tmux_set_pwd
end
powerline

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 --on-variable POWERLINE_COMMAND _powerline_update
		set -l addargs "--last_exit_code=\$status --last_pipe_status=\$status --jobnum=(jobs -p | wc -l)"
		eval "
		function fish_prompt
			$POWERLINE_COMMAND shell left $addargs
		end
		function fish_right_prompt
			$POWERLINE_COMMAND shell right $addargs
		end
		"
	end
	_powerline_update
	function _powerline_tmux_setenv
		if test -n "$TMUX"
			tmux setenv -g TMUX_$argv[1]_(tmux display -p "#D" | tr -d "%") "$argv[2]"
			tmux refresh -S
		end
	end
	function --on-variable PWD _powerline_tmux_set_pwd
		_powerline_tmux_setenv PWD "$PWD"
	end
	function --on-signal WINCH _powerline_tmux_set_columns
		_powerline_tmux_setenv COLUMNS "$COLUMNS"
	end
	_powerline_tmux_set_columns
	_powerline_tmux_set_pwd
end
powerline

Add support for number of jobs to fish bindings
Add support for number of jobs to fish bindings

xxxhycl2010/powerline,bartvm/powerline,prvnkumar/powerline,wfscheper/powerline,prvnkumar/powerline,blindFS/powerline,lukw00/powerline,S0lll0s/powerline,QuLogic/powerline,kenrachynski/powerline,darac/powerline,s0undt3ch/powerline,Liangjianghao/powerline,areteix/powerline,wfscheper/powerline,darac/powerline,russellb/powerline,cyrixhero/powerline,areteix/powerline,EricSB/powerline,EricSB/powerline,junix/powerline,russellb/powerline,bezhermoso/powerline,junix/powerline,bezhermoso/powerline,xxxhycl2010/powerline,lukw00/powerline,magus424/powerline,magus424/powerline,S0lll0s/powerline,firebitsbr/powerline,Luffin/powerline,blindFS/powerline,s0undt3ch/powerline,DoctorJellyface/powerline,dragon788/powerline,cyrixhero/powerline,QuLogic/powerline,xfumihiro/powerline,magus424/powerline,IvanAli/powerline,russellb/powerline,keelerm84/powerline,lukw00/powerline,bartvm/powerline,kenrachynski/powerline,xfumihiro/powerline,S0lll0s/powerline,seanfisk/powerline,dragon788/powerline,seanfisk/powerline,keelerm84/powerline,Luffin/powerline,bezhermoso/powerline,areteix/powerline,EricSB/powerline,Luffin/powerline,firebitsbr/powerline,wfscheper/powerline,blindFS/powerline,DoctorJellyface/powerline,seanfisk/powerline,Liangjianghao/powerline,IvanAli/powerline,prvnkumar/powerline,bartvm/powerline,kenrachynski/powerline,xfumihiro/powerline,dragon788/powerline,Liangjianghao/powerline,darac/powerline,s0undt3ch/powerline,DoctorJellyface/powerline,QuLogic/powerline,cyrixhero/powerline,junix/powerline,xxxhycl2010/powerline,IvanAli/powerline,firebitsbr/powerline