add shlvl module
elig0n opened this issue · comments
Is your feature request related to a problem? Please describe.
$SHLVL can be added via -shell-var but it ends up in bright yellow color and I would like to substract from it or only show it
when it is larger than a number.
Describe the solution you'd like
Let pass an int value for -shlvl similar to -jobs, preferably with minimum argument i.e. -shlvl-min
and also allow setting the color for it or/and shell-var
I'm toying around with this.
https://github.com/buckley310/powerline-go/tree/shlvl
Is there anyone with a use-case other than "display shlvl if greater than 0" ?
I was just googling to see if it was possible to do this.. so +1 for your efforts. :)
FWIW, you can recreate this behavior today using an external plugin.
Adding the "shlvl" segment in powerline and then putting this bash script is in your PATH as powerline-go-shlvl
[ $SHLVL -lt 2 ] ||
echo '[{"Foreground":231,"Background":55,"Content":"'$SHLVL'"}]'