Display toolbox name (#343)

* Display toolbox name 

Displays the toolbox name instead of the word toolbox.
$tide_toolbox_icon already indicates we're in a toolbox, displaying the toolbox name adds further context in multi-toolbox environments.

* Use string match and redirection

Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
This commit is contained in:
jazzsnobeatcake 2022-09-19 22:53:20 +02:00 committed by GitHub
parent af6da2d354
commit e8b2443cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
function _tide_item_toolbox
test -e /run/.toolboxenv && _tide_print_item toolbox $tide_toolbox_icon' ' $hostname
test -e /run/.toolboxenv &&
_tide_print_item toolbox $tide_toolbox_icon' ' (string match -rg 'name="(.*)"' </run/.containerenv)
end