On 2014-03-27 13:47 -0500, Grant Welch wrote:
> If I do send-keys from either the ':' command-prompt or from the
> terminal, it will behave appropriately. I suspect that it is a timing
> issue, that the bad behavior only occurs when send-keys executes
> before the terminal's initial prompt appears.

Here's my understanding: This is happening because the Enter -> ^J
translation is on by default. When readline initializes itself it turns
off the translation and that's why it starts working after you get the
prompt. You can turn down the translation via "stty -icrnl" but I'm not
sure that's a good idea. More info in [1].

> tmux -vvvvvvv new-session -s $sn -d
> tmux new-window -t $sn:1
> tmux new-window -n qaup -t $sn:9
> tmux send-keys -t $sn:0 "cd $HOME/work/" ENTER "vim" C-m
> tmux send-keys -t $sn:9 "cd $HOME/work/ && ls -l" C-m

My question is rather the following: Why do you want to send keys
before your terminal is fully initialized? Would something like this
work instead?

        tmux -vvvvvvv new-session -s $sn -d -c "$HOME/work/" "vim; bash"
        tmux new-window -t $sn:1
        tmux new-window -n qaup -t $sn:9 -c "$HOME/proj" "ls -l; bash"


[1] 
http://stackoverflow.com/questions/14615717/how-can-vim-tell-the-difference-between-ctrl-j-and-lf

-- 
Balazs

------------------------------------------------------------------------------
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to