summary refs log tree commit diff stats
path: root/zsh/completion/_tmux_pane_words
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/completion/_tmux_pane_words')
-rw-r--r--zsh/completion/_tmux_pane_words10
1 files changed, 10 insertions, 0 deletions
diff --git a/zsh/completion/_tmux_pane_words b/zsh/completion/_tmux_pane_words
new file mode 100644
index 00000000..6ff9ce18
--- /dev/null
+++ b/zsh/completion/_tmux_pane_words
@@ -0,0 +1,10 @@
+local expl
+local -a w
+
+if [[ -z "$TMUX_PANE" ]]; then
+	_message "not running inside tmux!"
+	return 1
+fi
+
+w=( ${(u)=$(tmux capture-pane \; show-buffer \; delete-buffer)} )
+_wanted values expl 'words from current tmux pane' compadd -a w