Nicholas Marriott <nicholas.marri...@gmail.com> writes: > On Thu, Jan 21, 2010 at 01:33:56AM -0800, Robin Lee Powell wrote: >> Why does "tmux new-session vim \; split-window \; attach" not >> work? Why does it need the -d, I mean? Seems like attaching a >> session shouldn't stop the split-window command from being >> proccessed. > > new-session without -d implies attach and that stops further command > processing, although I can't remember why and it probably shouldn't.
That clarified a lot for me and would make a great one-line addition to the man page para for new-session. I just switched to tmux and until I saw this thread was using the following to launch a new tmux session with a specific window/pane config (from a script): tmux new-session "tmux new-window \\; source $conf_file" (I want ~/.tmux.conf to be read in first, $conf_file is a more specific config and so tmux -f doesn't suffice here.) What was unintuitive was why, for e.g., "tmux new \; source ..." wouldn't run the "source" command. Makes sense in light of the above. Also, 'tmux new "tmux source ..."' didn't work either, iirc. The explicit neww was needed in the 2nd tmux invocation above -- I assumed that 'tmux new' doesn't create a new window if passed a shell command(?). This is all much cleaner with 'new -d' -- no subshells or subsequent tmux invocations: tmux new-session -d \; source $conf_file \; attach Letting 'tmux new' continue processing is intuitive and very readable, imo: tmux new \; source $conf_file Tmux's separation of concepts is very clean and I'm liking it very much so far, thanks for the great software! -Sudish ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users