Fix session-name command in ide with zellij exiting with non-zero code

main
Julius Riegel 2 months ago
parent a0c8b4e968
commit 526b575309
No known key found for this signature in database
GPG Key ID: F26D704A1D3394EB

@ -95,10 +95,12 @@ def open-image [path: string] {
def session-name [] { def session-name [] {
let dirname = $env.PWD | path parse | get stem let dirname = $env.PWD | path parse | get stem
let suffix = ( zellij list-sessions -s let suffix = ( try {
zellij list-sessions -s
| default ""
| split row "\n" | split row "\n"
| where $it =~ $"ide-($dirname)" | where $it =~ $"ide-($dirname)"
| get 0? | get 0? }
| default "" | default ""
| hash md5 | hash md5
| str substring 0..4 | str substring 0..4

Loading…
Cancel
Save