aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zfunc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/.zfunc')
-rw-r--r--zsh/.zfunc/_kitty14
1 files changed, 14 insertions, 0 deletions
diff --git a/zsh/.zfunc/_kitty b/zsh/.zfunc/_kitty
new file mode 100644
index 0000000..15918b5
--- /dev/null
+++ b/zsh/.zfunc/_kitty
@@ -0,0 +1,14 @@
+autoload -Uz compinit
+compinit
+
+_kitty() {
+ local src
+ # Send all words up to the word the cursor is currently on
+ src=$(printf "%s
+" "${(@)words[1,$CURRENT]}" | kitty +complete zsh)
+ if [[ $? == 0 ]]; then
+ eval ${src}
+ fi
+}
+compdef _kitty kitty
+