Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh : launch tmux in just one terminal



On Fri, Oct 1, 2021 at 10:19 AM Michael Klemm <michael@xxxxxxxxxxx> wrote:
>
> > if pgrep "tmux" > /dev/null ; then echo "Running" ; else echo "Stopped" ;
> > fi
>
> On multi-user machine with several tmux instances running for
> different users, pgrep tmux will also match those.

Just make it:  pgrep -u $USER tmux




Messages sorted by: Reverse Date, Date, Thread, Author