That's really cool. I guess it will be available in 1.9
But I find description confusing and flag name is not completely
intuitive to remember.
I'd rewrite it as:

new --attach some_name

             Creates new named session or attaches to existing one if some_name
             session already exists.

This hides the internals from the reader and removes the requirement for the
reader to be aware of attach-session and -D behavior to understand the
meaning.


On Fri, Feb 7, 2014 at 4:10 PM, Thomas Adam <tho...@xteddy.org> wrote:
> On 5 February 2014 12:57, anatoly techtonik <techto...@gmail.com> wrote:
>> https://stackoverflow.com/questions/3432536/create-session-if-none-exists
>>
>> Is it possible to implement a simple create-or-attach command, which
>> will create a (named) session if it doesn't exists or attach to
>> existing?
>
> Using the git version of tmux:
>
> new -A some_name
>
>
>              The -A flag makes new-session behave like attach-session if
>              session-name already exists; in the case, -D behaves like -d to
>              attach-session.
>
> -- Thomas Adam



-- 
anatoly t.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to