Started with new style completions

This commit is contained in:
Anthony Cicchetti 2019-10-16 08:21:11 -04:00
parent f9699f4499
commit 3c8c8c69ca
2 changed files with 11 additions and 5 deletions

11
zsh/completions/_dt Normal file
View file

@ -0,0 +1,11 @@
#compdef dt
function _dt {
local -a cmdlist
for line in $(tmux list-sessions -F '#S'); do
cmdlist=($cmdlist "${line}")
done
_describe 'Tmux Sessions' cmdlist
}
_dt "$@"

View file

@ -61,11 +61,6 @@ function dt() {
tmux -2 new-session -A -s $session_name
}
function _dt_completion {
reply=($(tmux list-sessions -F '#S'))
}
compctl -K _dt_completion dt
function send-to-pane() {
tmux pipe-pane -I -t $1 "$2"
}