mirror of
https://github.com/IlanCosman/tide.git
synced 2024-08-16 19:50:22 +03:00
use string matching in context item
This commit is contained in:
parent
d7f5041617
commit
96cecaafd9
@ -9,6 +9,6 @@ function _tide_item_context
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$tide_context_hostname_parts" = 0 && _tide_print_item context $USER ||
|
string match -qr "^(?<h>(\.?[^\.]*){0,$tide_context_hostname_parts})" @$hostname
|
||||||
h=(string split . $hostname) _tide_print_item context $USER@(string join . $h[..$tide_context_hostname_parts])
|
_tide_print_item context $USER$h
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user