I am trying to make Alt-M in zsh attach to a tmux session.
Content of .zshrc:
tmux-open() {
tmux attach
}
zle -N tmux-open
bindkey '^[m' tmux-open
When I press Alt-M, instead of attaching to the tmux session, I get:
open terminal failed: not a terminal
Calling tmux-open
from the zsh prompt attaches to the tmux session. What is the problem with the key binding?