mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 15:25:06 +02:00
fix fish resize squid
This commit is contained in:
parent
6569cc6cfd
commit
7d74254a9a
@ -1,5 +1,5 @@
|
|||||||
function powerline-setup
|
function powerline-setup
|
||||||
function _powerline_columns_fallback
|
function _powerline_columns
|
||||||
if which stty >/dev/null
|
if which stty >/dev/null
|
||||||
if stty size >/dev/null
|
if stty size >/dev/null
|
||||||
stty size | cut -d' ' -f2
|
stty size | cut -d' ' -f2
|
||||||
@ -10,17 +10,6 @@ function powerline-setup
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function _powerline_columns
|
|
||||||
# Hack: `test "" -eq 0` is true, as well as `test 0 -eq 0`
|
|
||||||
# Note: at fish startup `$COLUMNS` is equal to zero, meaning that it may
|
|
||||||
# not be used.
|
|
||||||
if test "$COLUMNS" -eq 0
|
|
||||||
_powerline_columns_fallback
|
|
||||||
else
|
|
||||||
echo "$COLUMNS"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if test -z "$POWERLINE_CONFIG_COMMAND"
|
if test -z "$POWERLINE_CONFIG_COMMAND"
|
||||||
if which powerline-config >/dev/null
|
if which powerline-config >/dev/null
|
||||||
set -g POWERLINE_CONFIG_COMMAND powerline-config
|
set -g POWERLINE_CONFIG_COMMAND powerline-config
|
||||||
@ -44,7 +33,7 @@ function powerline-setup
|
|||||||
set -l addargs "--last-exit-code=\$status"
|
set -l addargs "--last-exit-code=\$status"
|
||||||
set -l addargs "$addargs --last-pipe-status=\$status"
|
set -l addargs "$addargs --last-pipe-status=\$status"
|
||||||
set -l addargs "$addargs --jobnum=(jobs -p | wc -l)"
|
set -l addargs "$addargs --jobnum=(jobs -p | wc -l)"
|
||||||
# One random value has an 1/32767 = 0.0031% probability of having
|
# One random value has an 1/32767 = 0.0031% probability of having
|
||||||
# the same value in two shells
|
# the same value in two shells
|
||||||
set -l addargs "$addargs --renderer-arg=client_id="(random)
|
set -l addargs "$addargs --renderer-arg=client_id="(random)
|
||||||
set -l addargs "$addargs --width=\$_POWERLINE_COLUMNS"
|
set -l addargs "$addargs --width=\$_POWERLINE_COLUMNS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user