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

Bash Completion Provider #156

Closed
ld-carapace opened this issue Apr 1, 2024 · 1 comment
Closed

Bash Completion Provider #156

ld-carapace opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request needs testing (on unstable) A feature that now exists, but is looking for people to test and use it

Comments

@ld-carapace
Copy link

Summary

Would be awesome for RSSH to have an official ™ bash/zsh/*sh completion provider.

The idea would be if you type ssh -J rssh then hit tab, and it would suggest IDs/names of clients to connect to.

Perhaps the completion should look for any ssh command where the string -J rssh is present? And then users would be encouraged to have SSH config entries for rssh.

If a user has multiple RSSH servers they could name them rssh-shell-catcher rssh-somethingelse, and the completion provider would automagically query the right one.

Motivation

It's a bit annoying that if you want to find which client to connect to, you have to typically do something like ssh rssh ls, to find the ID, copy it, then ssh -J rssh <id here>.

@NHAS NHAS self-assigned this Apr 9, 2024
@NHAS NHAS added the enhancement New feature or request label Apr 9, 2024
@NHAS NHAS added the needs testing (on unstable) A feature that now exists, but is looking for people to test and use it label Apr 9, 2024
@NHAS
Copy link
Owner

NHAS commented Apr 9, 2024

This is now on unstable.

To use it:

Generate your autocompletions and add it to your bashrc

ssh localhost -p 3232 autocomplete --shell-completion localhost:3232 >> ~/.bashrc

Then you can use it such as

ssh -J localhost:3232 <TAB>
# or
ssh localhost -p 3232 exec/kill/connect <TAB>

@NHAS NHAS closed this as completed in eeb03cf Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs testing (on unstable) A feature that now exists, but is looking for people to test and use it
Projects
None yet
Development

No branches or pull requests

2 participants