0

tmuxOS XでOh My Zshを使用しています。結合されたtmuxinatorセッションを出力するオートコンプリート関数を作成しようとしています。

私のオートコンプリート機能は次のようになります。

tmux-and-tmuxinator-sessions-autofill() {
  reply=$( tmux-and-tmuxinator-sessions )
}

compctl -K tmux-and-tmuxinator-sessions-autofill ta

tmux-and-tmuxinator-sessions以下を出力します。

dotfiles
landonschropp.com
something
something_else

ただし、入力taしてタブを押すと、次のようになります。

ta dotfiles$'\n'landonschropp.com$'\n'something$'\n'something_else

私はZshにかなり慣れていないので、助けていただければ幸いです。

4

1 に答える 1

2

reply単一の文字列ではなく、配列にする必要があります。

tmux-and-tmuxinator-sessions-autofill() {
  reply=( $(tmux-and-tmuxinator-sessions) )
}
于 2014-05-29T12:31:40.330 に答える