smug icon indicating copy to clipboard operation
smug copied to clipboard

Request for `-L` option

Open juboba opened this issue 2 years ago • 5 comments

Tmux has the -L option to specify the socket name (and -S to specify the socket path). This is very useful to group sessions in different sockets (isolated tmux servers).

It would be nice to have this option in smug.

Other tmux managers allow users to set the socket name in the yaml files which I haven't used, but could also be useful.

I have the intention of creating a PR for this, but I would have to learn at least some basic Go to do this 😅

What do you think @ivaaaan? Do you see value in this? Should I create a PR or is it easy for you to do?

Thank you!

juboba avatar Mar 02 '22 11:03 juboba

Thanks for the suggestion. I don't have much time to work on it myself, but if you have a desire to work on this I will help you with anything. Feel free to reach out, my email is in the profile.

ivaaaan avatar Mar 06 '22 09:03 ivaaaan

@juboba have you started working on this? I got some free time and thinking about implementing this, or I can help you. Let me know if you have any progress

ivaaaan avatar Mar 17 '22 09:03 ivaaaan

@ivaaaan I was looking at the code, and I think this could be implemented in the Exec functions of commander.go where we would add the -L / -S socket details to cmd.Args before running a command: https://github.com/ivaaaan/smug/blob/d053a9d41a5926cc6ee6b66d33b97d0424c984b6/commander.go#L28-L57

The -L / -S options could be passed to the commander instance from main.go: https://github.com/ivaaaan/smug/blob/d053a9d41a5926cc6ee6b66d33b97d0424c984b6/main.go#L81

Does that seem right?

dufferzafar avatar May 30 '22 07:05 dufferzafar

@dufferzafar sounds good. Feel free to create a PR, I'll take a look at it :)

ivaaaan avatar May 30 '22 09:05 ivaaaan

Hi all, any progress on this feature?

Thanks, Aswad

aswadsun avatar Nov 02 '22 06:11 aswadsun