That looks like a solid suggestion, thank you. To answer the question, I remember reading blog post about tmux (circa 1.4) which convinced me to move from screen. I believe that I based this script on some examples from that post (otherwise from some other source), and I've just continued to use the script until I modified my input.rc.
On 04/05/2014 03:15 PM, Balazs Kezes wrote: > 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 > -- ------------- - grant welch - gwe...@riverbed.com ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees_APR _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users