Skip to content

Commit

Permalink
nushell: cut name on zellij tab rename to last entry
Browse files Browse the repository at this point in the history
Signed-off-by: aserowy <serowy@hotmail.com>
  • Loading branch information
aserowy committed Nov 8, 2024
1 parent 8f3cabb commit 958320e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion home/modules/nushell/nushell-config.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down

0 comments on commit 958320e

Please sign in to comment.