[PATCH 1/1] Allow conditional formats to expand formats

2013-04-25 Thread Thomas
From: Thomas Adam Currently, a conditional format only returns the string given based on whether the condition is true or false. This means the following does not work: #{?session_attached,#{session_name},no session} This change expands the item returned from the conditional if it's a recog

Re: [PATCH 1/1] Allow conditional formats to expand formats

2013-04-25 Thread Romain Francoise
Thomas writes: > @@ -182,6 +182,9 @@ format_replace(struct format_tree *ft, > goto fail; > value = ptr + 1; > } > + > + if ((value_found = format_expand(ft, value)) != NULL) > + value = value_found;

Re: [PATCH 1/1] Allow conditional formats to expand formats

2013-04-25 Thread Nicholas Marriott
Hi > @@ -232,7 +235,7 @@ format_expand(struct format_tree *ft, const char *fmt) > ch = (u_char) *fmt++; > switch (ch) { > case '{': > - ptr = strchr(fmt, '}'); > + ptr = strrchr(fmt, '}'); How does this not break mu

Re: [PATCH 1/1] Allow conditional formats to expand formats

2013-04-25 Thread Thomas Adam
On 25 April 2013 22:25, Nicholas Marriott wrote: > Hi > >> @@ -232,7 +235,7 @@ format_expand(struct format_tree *ft, const char *fmt) >> ch = (u_char) *fmt++; >> switch (ch) { >> case '{': >> - ptr = strchr(fmt, '}'); >> +

Re: [PATCH 1/1] Allow conditional formats to expand formats

2013-04-25 Thread Nicholas Marriott
Ok. I think you have the right idea about recursing through format_expand you are just going to need to pull out the affected format differently (ditch strchr and use a custom loop which counts {s and }s). On Thu, Apr 25, 2013 at 10:25:09PM +0100, Nicholas Marriott wrote: > Hi > > > @@ -232,7 +

Re: License file

2013-04-25 Thread Nicholas Marriott
Hi The relevant license/copyright is at the top of every source file, I don't think we need it in another place. Note that it differs for some files in compat/ and examples/. IIRC Debian have a full list of all the licenses in some file in their package. On Wed, Apr 24, 2013 at 01:46:56PM +0200

using tmux as collaborative tool

2013-04-25 Thread Edward Peschko
All, I was wondering if tmux could be used as a collaborative tool independently. Right now, each attached session gets the same view - which is great in the case where you want that behavior (sharing a screen etc) but which is not all that great if you want to have different users typing on indep

Re: using tmux as collaborative tool

2013-04-25 Thread Thomas Adam
Hi, On 25 April 2013 23:55, Edward Peschko wrote: > All, > > I was wondering if tmux could be used as a collaborative tool > independently. Right now, each attached session gets the same view - > which is great in the case where you want that behavior (sharing a > screen etc) but which is not all

Re: [PATCH 1/1] Allow conditional formats to expand formats

2013-04-25 Thread Jason Timrod
Hi I tried using this patch and the code is horrible. Can we not use this? This blows goats Jason From: Nicholas Marriott To: Thomas Cc: tmux-users@lists.sourceforge.net Sent: Thursday, April 25, 2013 10:55 PM Subject: Re: [PATCH 1/1] Allow conditional form