ls -F does not wait for commands to finish so this will not work
reliably, you will need to do it in a script so the shell can do the
work. Something like:
tmux ls -F '#{session_name} #{pane_pid}'|while read i; do
set -- $i
echo $1 $(/home/user/tmux-utils/process-display $2)
done
On Thu, Mar 22, 2018 at 04:01:52PM -0500, Matt Zagrabelny wrote:
> Greetings,
> I attempting to format the output of tmux ls -F:
> $ tmux ls -F "#{session_name}: #(/home/user/tmux-utils/process-display
> #{pane_pid})" | head -1
> 189: <'/home/user/tmux-utils/process-display 8726' not ready>
> I rerun the above command a few times and each time the "not ready" is
> displayed.
> If I run the command manually, I get what I expect:
> $ /home/user/tmux-utils/process-display 8726
> (/home/user) -zsh
> I was under the impression that the "ls formatting" for tmux needed to
> cache the values to display, but that doesn't seem to be happening. Any
> ideas as how to proceed?
> Thanks!
> -m
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.