joshmedeski / sesh

Smart session manager for the terminal
MIT License
410 stars 16 forks source link

`sesh -c` not showing defined sessions when combined with other flags #127

Closed mstarski closed 1 week ago

mstarski commented 1 week ago

What happened?

Description

I want to see the combination of tmux, zoxide and config results. To achieve this I've tried using sesh list -iztc but to my surprise config results were not there. I checked it and it turns out config results only show when -c flag is used alone without any other flag.

Steps to reproduce

$ sesh list -c
🛠️  Utils

$ sesh list -c -t
tmux-session-1
tmux-session-2
tmux-session-3

My ~/.config/sesh/sesh.toml

[[session]]
name = "🛠️ Utils"
path = "~/"

Expected behavior

$ sesh list -iztc
🛠️  Utils
tmux-session-1
tmux-session-2
tmux-session-3
zoxide-1

Version:

$ sesh --version
sesh version dev

Version

sesh version dev

Relevant log output

No response

Reviewed

joshmedeski commented 1 week ago

Sesh currently will hide config option if an active tmux session's directory is the same as the config path.

So I'm guessing one of your sample tmux session's path is ~/ which cases your custom 🛠️ Utils to be filtered out.

I understand this isn't intuitive or explained. I'm currently rewritting sesh and overhauling how this logic works, which will be more simple and predictable.

mstarski commented 1 week ago

Okay, thanks for the quick reply and explanation. Thanks for this project. It helps me perform my everyday tasks a lot quicker.

Have a great day!

joshmedeski commented 1 week ago

You're welcome, glad sesh helps you!