On Fri, Feb 22, 2013 at 10:30 AM, Nicholas Marriott
<nicholas.marri...@gmail.com> wrote:
> For the first of these you can already use the tmux global environment
> or use user options which were added very recently you only need to
> worry about the second.
>
Nice to know about user options. Even so, I think it still misses the
atomic 'get if exists, if not set and return', adding a optional
[default] argument to the showenv/show-option would solve the problem


> I do not see compelling uses that can't be solved with existing shell or
> Unix features, can you give us some examples?
>
I have came across one use case: when you start a program in a new
tmux pane/window from a script, but need to wait until the program is
fully started before continuing execution. Here is a simple example:
https://github.com/tarruda/dot-files/blob/master/.zsh/tmux.d/vi.zsh#L35-L55
. In this case, I achieved the semaphore effect by using a named pipe
and having the newly spawned process send data through it when ready,
but having a simple tmux command for that would made the job easier
and the code cleaner.

It would not have been so simple if multiple processes needed to
wait(or one process waiting for many). Unlike a shell, tmux cannot
pipe its subprocesses stdio with each other.

Probably there are other use cases/workflow scripts that could benefit
from a simple synchronization mechanism(I've only started scripting
tmux for a month). I'm sure other people would find other uses for if
those features were available.



> tmux is not a programming language or a shell so features need to fit
> with it's purpose :-).
>
Tmux already has some features not directly related to managing
terminal windows, that enabled the development of nice tools(one
example is the vim slimux plugin).

I'm sure there are shell script hacks for almost any use case, but
since one of tmux goals is to be automated by shell scripts, why not
provide tools to make the job easier?

The main UNIX philosophy is 'do one thing, and do it well', and since
tmux job is to integrate applications(thats my opinion on what tmux
role is), synchronization/shared memory mechanisms are well within its
realm.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to