This is working correctly, tool is the leading prefix of tools so tmux will choose that session.
Use tmux ls|grep -q '^tool: ' if you want to match exact name. On Sat, Aug 27, 2011 at 11:15:54PM +0900, Vladimir Lomov wrote: > Hello, > > according to man page `has-session' command takes as argument (after -t) > a name of session. But in my example > > <code> > $ tmux -2 -u -L docs ls > editors: 4 windows (created...) [...] > tools: 3 windows (created...) [...] > vcs: 2 windows (created...) [...] > </code> > > both calls > > <code call="1"> > $ tmux -2 -u -L docs has-session tools > </code> > > and > > <code call="2"> > $ tmux -2 -u -L docs has-session tool > </code> > > gives 0 as exist status. > > Should I get in second example exist code 1 as man page states? > > --- > WBR, Vladimir Lomov > > -- > We totally deny the allegations, and we're trying to identify the allegators. > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users