From 958320ec8444a81ecf165786406ecb2e9d8d6c41 Mon Sep 17 00:00:00 2001 From: aserowy Date: Fri, 8 Nov 2024 10:47:00 +0100 Subject: [PATCH] nushell: cut name on zellij tab rename to last entry Signed-off-by: aserowy --- home/modules/nushell/nushell-config.nu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/modules/nushell/nushell-config.nu b/home/modules/nushell/nushell-config.nu index 96e50893..4db0024d 100644 --- a/home/modules/nushell/nushell-config.nu +++ b/home/modules/nushell/nushell-config.nu @@ -70,7 +70,8 @@ $env.config = { return } - (zellij action rename-tab $after) + let new_tab_name = ($after | split row "/" | last | default '') + (zellij action rename-tab $"($new_tab_name)/") } catch { (zellij action rename-tab 'unnamed') }