Update SHLVL item for fish 3.3

This commit is contained in:
Ilan Cosman 2021-06-29 14:41:52 -07:00
parent 7d66b9ed1a
commit 159e99fec8

View File

@ -1,5 +1,4 @@
function _tide_item_shlvl
# Item functions run in a deeper level of shell
set -l real_shlvl (math $SHLVL - 1)
test $real_shlvl -gt $tide_shlvl_threshold && _tide_print_item shlvl $tide_shlvl_icon' ' $real_shlvl
# Non-interactive shells do not increment SHLVL, so we don't need to subtract 1
test $SHLVL -gt $tide_shlvl_threshold && _tide_print_item shlvl $tide_shlvl_icon' ' $SHLVL
end