On Wed, Jan 20, 2010 at 11:39:40PM +0100, Michel Le Cocq wrote: > With my old screen I had an alias : smail wich launch screen with > a special .screenrc like this : > > screen -t boiteA mutt -F $HOME/.mutt/config/.muttrc_A > screen -t boiteB mutt -F $HOME/.mutt/config/.muttrc_B > screen -t BoiteC mutt -F $HOME/.mutt/config/.muttrc_C > screen -t sync offlineimap > > How can I did this with tmux ? > > I tried something like this but it's not good : > tmux new-session 'emacs -nw' new-session 'man man'
That certainly isn't what you want, because you want those things in multiple windows in the same session. Try this: tmux new-session -d 'man man' \; new-window 'emacs -nw' \; attach Giant aside, leading to some extremely minor feature requests: There is, in general, a bit of a quoting problem with the [command] argument to tmux commands, and a definitional issue about what they can take (can they take shell commands? all of them? how does it tell?) It looks like new-session and new-window, at least, can take shell commands there, and a ; at the front lets them know it's *not* a shell command (which is odd, since that's a shell metacharacter), and you can't quote the whole thing on the command line because it relies on shell word breaking, but you *must* quote the shell commands if they're more than one word. A bit confusing. Seems to me like there should be exactly one tmux command, call it "run-shell", that takes a shell command, and if you want to run a shell command you have to use that. Have the documentation specify that on the command line, the shell command must all be one shell-word. Or just specify that it has to always be quoted, which seems easier. It would also be nice if the word breakup happened afterwards, but I can understand wanting the simplicity of relying on the shell for that, from a coding perspective. -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" See http://shrunklink.com/cdiz http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ ------------------------------------------------------------------------------ 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