-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opt-Out of Duplicate Sessions #156
Comments
I made an attempt of removing the duplicates from the combined list in a draft PR #205. @joshmedeski What do you think? I first created it as a draft PR, because the refactorings I made could drive some discussions. A question I have: Why would a user want to see entries for preconfigured session or zoxide pathes in the combined result, when a session is already open? Without the In my PR I omitted any CLI flags completely, but my feeling is, if there is actually a use case for showing the duplicates, it is more of an edge case and I would rather add a switch for opting out of deduplication then showing the duplicates by default. |
The reason it was removed in the rewrite to GoLang was simplicity. Having to loop through each list and determine what duplicates might exist and skip them or remove them was a lot of conditional logic and additional lookups. I'm down for reintroducing this but I'd prefer we find a responsible way of separating that logic from the core packages (tmux, zoxide, configs, etc...) |
To make this easier, I introduced the lo package in my PR.
It only makes sense in the list which combines all sources. From a users perspective it's actually pretty simple: The source of already running tmux sessions has the highest preference. Every other source should be filtered for entries, which would produce a new session with the same name as one of the already running tmux sessions. Those entries should be removed from the combined list. And that's exactly what I implemented in PR #205. |
What would you like sesh to do?
As a user, I want to be able to hide duplicate session names, so I can reduce the amount of sessions listed and more accurately get to the item that I want.
Config
Possibly could be configured, names are just a placeholder.
And/or it could be flags on the list command:
Conversely, the opposite flags could be used to overwrite the config:
The text was updated successfully, but these errors were encountered: