AutoYADM commit: 2025-05-21 14:57:18

This commit is contained in:
Daniel Fichtinger 2025-05-21 14:57:18 -04:00
parent 2fe337e881
commit b0590df0d9
3 changed files with 8 additions and 4 deletions

View file

@ -35,10 +35,13 @@ function kak-session -w kak --description "kakoune where sessions are derived fr
return 1
end
set kakroot (fdup .kakroot $files[1])
set kakroot (fdup '\.kakroot|\.kakrc.local|\.local.kakrc|kakrc' $files[1])
if test -n "$kakroot"
set session_id (echo -n "$(path basename "$kakroot")" | tr --complement '[:alpha:]_-' '-')
# special case; kakrc
if test "$kakroot" = ~/.config/kak
set session_id kakrc
end
# if there is no existing session
if not command kak -l | rg -xqF "$session_id"
set fifo_dir (mktemp -d --suffix=kak-init.XXXXXX)