Skip to content

Instantly share code, notes, and snippets.

@mikea
Last active June 9, 2025 17:44
Show Gist options
  • Save mikea/748ecb1a66bcf3cc8d4180979fa909c5 to your computer and use it in GitHub Desktop.
Save mikea/748ecb1a66bcf3cc8d4180979fa909c5 to your computer and use it in GitHub Desktop.
kitty-tab - fish command to open a new kitty tab in the current folder
# ~/.config/fish/functions/kitty-tab.fish
function kitty-tab
set sock (ls /tmp/mykitty-* | head -n 1)
if test (count $argv) -gt 0
kitty @ --to unix:$sock launch --type=tab --cwd=(pwd) fish -c (string join ' ' $argv)
else
kitty @ --to unix:$sock launch --type=tab --cwd=(pwd)
end
end
# ~/.config/kitty/kitty.conf
listen_on unix:/tmp/mykitty
allow_remote_control socket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment