Skip to content

Conversation

@jessedhillon
Copy link
Contributor

This adds completion for session names. Commands which take a running session's name as an argument, for example attach-session, can now have those options completable. For example:

$ tmux list-sessions -F '#{session_name}'
bash-cmp
nix-config
$ tmux attach-session -t <tab>
bash-cmp    nix-config

I checked the tmux repo, and they do not maintain bash completions, so I'm submitting this here.

completions/tmux Outdated
file | *-file | path | *-path)
_comp_compgen_filedir
;;
target-session | src-session)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you see src-session in output from tmux? I only found it in the tmux source, but it doesn't seem to be used currently. If we do want to have it here anyway, we should probably also have dst-session

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, I asked an AI to look at tmux output and propose those options. I see that target-session is the only option that is used in the usage output, so we can trim this down to one option name.

@akinomyoga akinomyoga force-pushed the feat/tmux-session-completion branch from b5bc410 to 91c76c4 Compare December 31, 2025 07:16
@jessedhillon jessedhillon force-pushed the feat/tmux-session-completion branch from 91c76c4 to b5bc410 Compare January 7, 2026 02:12
@akinomyoga
Copy link
Collaborator

akinomyoga commented Jan 7, 2026

The main branch has conflicting changes, so I rebased the PR head (and squashed the second commit into the first) last week. As the second commit is a fix for the problem in the first one, it should anyway be squashed into the first commit before merging. Now, you seem to have simply reverted to the state before the conflict resolution, so we cannot merge this.

@jessedhillon jessedhillon force-pushed the feat/tmux-session-completion branch from b5bc410 to 18b6da4 Compare January 7, 2026 17:51
@jessedhillon
Copy link
Contributor Author

I've squashed the tree and rebased onto main HEAD

@jessedhillon jessedhillon changed the title feat(tmux): complete src/target session arguments feat(tmux): complete target-session arguments Jan 7, 2026
Copy link
Collaborator

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

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

Thank you.

@yedayak yedayak merged commit ced59c3 into scop:main Jan 8, 2026
8 checks passed
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