tide/functions/_tide_item_shlvl.fish
Kid b8f832c09d
Add SHLVL item (#165)
* Add SHLVL item

* Run function in subshell

* Python bug?

* Revert "Python bug?"

This reverts commit 79fbadc29f.

* Change icon

* Fix macOS test

* Run on Linux only
2021-06-23 14:47:28 -07:00

6 lines
227 B
Fish

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
end