summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorache <ache@ache.one>2024-08-09 04:27:04 +0200
committerache <ache@ache.one>2024-08-09 04:27:04 +0200
commitcde489c55eb6eeaf20bddfc3f9f250cc30426f4e (patch)
treefc61f8c1d1a553c5a199ddfba84e8fd2bd3a20b6 /functions
parentCreate edit command e (diff)
Use kitten katty ssh wrapper when possible
Diffstat (limited to 'functions')
-rw-r--r--functions/ssh.fish12
1 files changed, 12 insertions, 0 deletions
diff --git a/functions/ssh.fish b/functions/ssh.fish
new file mode 100644
index 0000000..4eb261a
--- /dev/null
+++ b/functions/ssh.fish
@@ -0,0 +1,12 @@
+# This is a test
+
+function ssh -d "SSH but with kitty integration"
+ # If fish is run inside a kitty terminal then use the kitten command integration.
+ if [ "$TERM" = "xterm-kitty" ]
+ kitten ssh $argv
+ else
+ # Otherwise, just use the default ssh command.
+ set -l sshBin $(type --no-functions --path ssh)
+ $sshBin $argv
+ end
+end