Re: Support showenv output as shell code

2013-08-21 Thread Nicholas Marriott
Hi I'm happy to have unambiguous output but I think we should only have one style. So better to change the existing format to be unambiguous, if possible in a way that is fairly backwards compatible and can easily be changed into sh form using sed. On Sun, Aug 18, 2013 at 11:01:39AM -0400, Aaro

Re: Support showenv output as shell code

2013-08-18 Thread Aaron Schrab
At 14:49 +0100 18 Aug 2013, Nicholas Marriott wrote: >How do you show the difference between an empty value and one to be >unset then? An empty value would still have a pair of single quotes after the equal sign, an unset value would not. But, I'm now thinking that I should change it to emit

Re: Support showenv output as shell code

2013-08-18 Thread Nicholas Marriott
How do you show the difference between an empty value and one to be unset then? Original message From: Aaron Schrab Date: 18/08/2013 14:18 (GMT+00:00) To: Nicholas Marriott Cc: tmux-users@lists.sourceforge.net Subject: Re: Support showenv output as shell code At 07

Re: Support showenv output as shell code

2013-08-18 Thread Aaron Schrab
At 07:51 +0100 18 Aug 2013, Nicholas Marriott wrote: >All you are adding here is escaping quotes? For variables that are set, it adds single quotes around the value and replaces every single quote within the value with '\'' . So in that case you could say that it's only adding escaping quotes

Re: [PATCH] Support showenv output as shell code

2013-08-17 Thread Nicholas Marriott
All you are adding here is escaping quotes? Why not make that the default? Original message From: Aaron Schrab Date: 12/08/2013 21:01 (GMT+00:00) To: tmux-users@lists.sourceforge.net Subject: [PATCH] Support showenv output as shell code Add -s option to the shown

Re: Support showenv output as shell code

2013-08-12 Thread Aaron Schrab
At 16:59 +1200 13 Aug 2013, Jan Larres wrote: >I use this code in zsh to do the same thing without having to patch >tmux. The preexec variable is an array of functions that get called >before each interactive command execution. I don't think such a variable >exists in bash, but you could hack some

Re: Support showenv output as shell code

2013-08-12 Thread Jan Larres
On 13/08/13 11:56, Aaron Schrab wrote: > Commands running in tmux windows have the values for the variables that > were set when the command was started, but those values can change such > as when a new tmux client attaches. > > My main use case for this is that I run mutt inside of tmux to read my

Re: Support showenv output as shell code

2013-08-12 Thread Aaron Schrab
At 00:11 +0100 13 Aug 2013, Thomas Adam wrote: >On Mon, Aug 12, 2013 at 04:01:46PM -0400, Aaron Schrab wrote: >> Add -s option to the shown-environment command which will alter the >> output format to Bourne shell commands, allowing import of the >> environment into current shell with: > >What use

Re: [PATCH] Support showenv output as shell code

2013-08-12 Thread Thomas Adam
On Mon, Aug 12, 2013 at 04:01:46PM -0400, Aaron Schrab wrote: > Add -s option to the shown-environment command which will alter the > output format to Bourne shell commands, allowing import of the > environment into current shell with: What use-case is this for? Note that "current shell" is reall

[PATCH] Support showenv output as shell code

2013-08-12 Thread Aaron Schrab
Add -s option to the shown-environment command which will alter the output format to Bourne shell commands, allowing import of the environment into current shell with: eval `tmux showenv -s` --- cmd-show-environment.c | 59 ++-- tmux.1