zolrath / wemux

Multi-User Tmux Made Easy
MIT License
3.63k stars 139 forks source link

'wemux users' not returning correct results #1

Closed sLLiK closed 12 years ago

sLLiK commented 12 years ago

When invoking the u flag or the users command, I get several lines consisting of the following:

stat:invalid option -- '%' Try 'stat --help' for more information.

Just in case, I've verified that this behavior exists across more than one installation and in different shell environments.

zolrath commented 12 years ago

It looks like in OS X stat is compiled to take "stat -f%Su" but, in all the Linux Distros I tested this morning the behavior I'm looking for is in "stat -c%U", sorry about that! I'll push a fix in a bit.

sLLiK commented 12 years ago

Sadly, I can't duplicate your success just yet. I'm running the latest tmux 1.5, so my guess is that the call you used to list users either isn't present in newer versions or exists in the form you used only on OSX. If I do a 'wemux reset' and then a 'wemux users' before connecting, I get:

No wemux session running on 'blah'. No session, no users!

In all other circumstances, I get:

sLLiK@stunix » wemux users tmux: unknown option -- F usage: list-clients [-t target-session] Users connected to 'blah':

  1. [m]
zolrath commented 12 years ago

Apparently tmux 1.5 doesn't have the format flag. I've tested this on tmux version 1.6 (currently the latest stable version) and it works.

I'll change it to work in a backwards compatible way.

zolrath commented 12 years ago

Did some research and the format flags definitely were added in tmux 1.6. In the interest of backwards compatibility, I've removed their usage and simply used cut to get the columns I need. I tested the new implementation on older versions and other systems and it's worked perfectly on everything I've tried. Does the new method work on your system?

sLLiK commented 12 years ago

Totally my bad. I assumed the reverse without double-checking - users and status_users now works.

zolrath commented 12 years ago

Don't worry about it! If most Linux package managers are distributing tmux 1.5 I definitely want to support it, I'm glad you let me know. Hope wemux is working out for you!