Skip to content

Conversation

@szinn
Copy link
Contributor

@szinn szinn commented Jan 27, 2025

This PR addresses #156 and removes duplicates based on the Path entries.

Performance time is linear wrt number of entries.

This PR addresses joshmedeski#156 and removes duplicates based on the Path entries.

Performance time is linear wrt number of entries.
@szinn
Copy link
Contributor Author

szinn commented Jan 27, 2025

Also added a flag to list (--hide-duplicates / -d) to control the removal

Copy link
Owner

@joshmedeski joshmedeski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, right to the point. This is how I would have reimplemented it, thanks!

@szinn
Copy link
Contributor Author

szinn commented Jan 27, 2025

Hang on before merging - I'd like to see if there's a way to make it default on in sesh.toml rather than having to litter -d all over the place.

@joshmedeski
Copy link
Owner

I don't recommend that @szinn

I'd like people to opt-into it for now, in the future we could add something to the config file to allow users to opt-into it always.

@joshmedeski
Copy link
Owner

joshmedeski commented Jan 27, 2025

But I'm happy with the feature as-is today. We can add the config option as a future optimization.

@szinn
Copy link
Contributor Author

szinn commented Jan 27, 2025

No way to do it since doesn't appear to allow options yet - merge away!

Let me know if there's other tweaks elsewhere!

@joshmedeski joshmedeski merged commit a972607 into joshmedeski:main Jan 27, 2025
4 checks passed
@szinn szinn deleted the remove-duplicates branch January 28, 2025 00:42
@ooloth
Copy link

ooloth commented Feb 28, 2025

Also added a flag to list (--hide-duplicates / -d) to control the removal

Should this now be available? (I've installed via homebrew.) The flag doesn't appear to work and I don't see it mentioned in the notes for any of the releases since this was merged.


Edit 1: On closer inspection, it does work in the command line (sorry about not noticing that). The use case that doesn't appear to work is adding the flag to the sesh list --icons command shown in the tmux example in the README.

Is there a way to use this flag as part of the tmux keybinding? (Apologies if this is just user error.)


Edit 2: Apologies! This was totally user error. I'd added the flag to the second sesh list command but not the first. Adding it to the first led to the expected behavior.

@joshmedeski
Copy link
Owner

@ooloth glad you got it working. I intentionally left it out of the README examples and you have to manually opt-in to it yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants