aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zfunc/_kitty
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
committerPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
commit1297a2e0ec774a13c9900b63c2b4afbb6582a5d3 (patch)
tree1f633f33a5569f1924183ff801897d6e6fea4d37 /zsh/.zfunc/_kitty
parentc0cb935f9aaa33638344415aaede751ca3d29bb1 (diff)
downloaddotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.gz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.bz2
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.lz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.xz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.zst
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.zip
multiple changes mostly to zsh and polybar
Diffstat (limited to 'zsh/.zfunc/_kitty')
-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
+