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

Support hiding attached session #50

Open
joshmedeski opened this issue Jan 24, 2024 · 3 comments · Fixed by #51
Open

Support hiding attached session #50

joshmedeski opened this issue Jan 24, 2024 · 3 comments · Fixed by #51
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@joshmedeski
Copy link
Owner

joshmedeski commented Jan 24, 2024

As a user, I want to optionally flag if the attached session should be shown.

  • The tmux processSessions function needs to always return the attached session to prevent Connecting twice to existing and opened session gives error #46
  • I don't think this should be a global config (just a CLI flag)
  • Make it something like --hide-attached for now (not sure if there's an alias that would be clear)
  • Hide the zoxide result that matches the attached session? (will cause a bug if someone chooses it)
@joshmedeski joshmedeski changed the title Support showing attached session Support hiding attached session Jan 24, 2024
@joshmedeski joshmedeski added enhancement New feature or request good first issue Good for newcomers labels Jan 24, 2024
@joshmedeski joshmedeski moved this to Next in OSS Development Jan 24, 2024
@markfeinstein
Copy link
Contributor

I can pick this up.

@GravityShark0
Copy link

GravityShark0 commented Sep 5, 2024

It appears that this flag (and --json but i dont really care) is unimplemented in sesh v2.

#currently in a session named 6
sesh list --hide-attached | head -n 1
# 6
sesh --version
# sesh version 2.0.2

I think I've found where it is printing, and I don't think it's filtering for --hide-attached

sesh/seshcli/list.go

Lines 62 to 68 in 9380ad3

for _, i := range sessions.OrderedIndex {
name := sessions.Directory[i].Name
if cCtx.Bool("icons") {
name = icon.AddIcon(sessions.Directory[i])
}
fmt.Println(name)
}

Even though connecting to the opened session no longer gives an error. I still think there is a benefit of removing some of the clutter during the selection of sessions.

@joshmedeski
Copy link
Owner Author

Something went wrong with the implementation, I need to revisit this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants