mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-04 20:21:11 +00:00
fix: don't break zellij when selecting the current dir
This commit is contained in:
parent
b78bc5b3bb
commit
b8337f1295
@ -24,7 +24,14 @@ in
|
|||||||
# description = "Open a session in Zellij";
|
# description = "Open a session in Zellij";
|
||||||
body = # fish
|
body = # fish
|
||||||
''
|
''
|
||||||
zoxide query --interactive | xargs -I {} sh -c 'zellij pipe --plugin file:$(which zellij-switch.wasm) -- "--cwd {} --layout default --session $(basename {})"' \\;
|
set TARGET_DIR $(zoxide query --interactive)
|
||||||
|
if test -z $TARGET_DIR
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
if test "$TARGET_DIR" = $(pwd)
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
zellij pipe --plugin file:$(which zellij-switch.wasm) -- "--cwd $TARGET_DIR --layout default --session $(basename $TARGET_DIR)"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user