Fix ide script not working when no zellij window is open

main
trivernis 9 months ago
parent bcfceb416b
commit d4c1285810
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -67,3 +67,7 @@ $env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent.socket"
$env.GIT_PAGER = "most" $env.GIT_PAGER = "most"
{{/if-installed}} {{/if-installed}}
{{/if}} {{/if}}
{{# if flags.unix}}
$env.LC_ALL = en_GB.UTF-8
{{/if}}

@ -31,7 +31,8 @@ def session-name [] {
let suffix = ( zellij list-sessions -s let suffix = ( zellij list-sessions -s
| split row "\n" | split row "\n"
| where $it =~ $"ide-($dirname)" | where $it =~ $"ide-($dirname)"
| first | get 0?
| default ""
| hash md5 | hash md5
| str substring 0..4 | str substring 0..4
) )

Loading…
Cancel
Save