Skip to content
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

custom sessions with duplicate paths in sesh.toml not listed #124

Closed
2 tasks done
kristoferfannar opened this issue Jun 12, 2024 · 4 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@kristoferfannar
Copy link
Contributor

What happened?

To preface, I'm new here. Just found sesh a few days ago and started configuring today.
I have this custom session listed in my sesh.toml

[[session]]
name = "nvim config"
path = "~/.config/nvim"
startup_command = "nvim ."

[[session]]
name = "tmux config"
path = "~"
startup_command = "nvim .tmux.conf"

But running sesh list, I only get the nvim config:

❯ sesh list
sesh
...
nvim config

I've found that the reason for this is the path I'm specifying for the tmux config session, ~.
From a quick debugging session in the code, sesh decides not to add it as an option since I already have a session connected to this directory already. Specifically, listConfigSessions in session/list.go seems to handle this filtering.

I understand the reasoning for the implementation, especially to avoid including zoxide directories as possible session options if there already exists a session for that dir. However, I think that custom sessions in sesh.toml should always appear from calling sesh list, no matter their path.

I'll try my hand at a solution in a PR and will link this issue there.
Otherwise, I'll lookout for your comment on this.

Version

1.2.0

Relevant log output

No response

Reviewed

  • Reviewed existing issues and made sure this bug has not already been submitted.
  • I have read the documentation and understand how sesh works before submitting this bug
@kristoferfannar kristoferfannar added the bug Something isn't working label Jun 12, 2024
@kristoferfannar kristoferfannar changed the title custom sessions in sesh.toml not listed custom sessions with duplicate paths in sesh.toml not listed Jun 12, 2024
@joshmedeski
Copy link
Owner

I understand the issue, It is already fixed in my #99 work, but it is not yet merged.

@EvanEzell
Copy link

Any idea on when this will be merged? I am running into the same issue

@joshmedeski
Copy link
Owner

There is a PR by @kristoferfannar that fixes this specific issue. I'll work to get it merged in the next week!

@joshmedeski
Copy link
Owner

Sesh v2 doesn't do any sort of filtering of listed items like v1 used to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants