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

(RFC) ssh completion for host-dependent remote commands #839

Open
vt-alt opened this issue Oct 27, 2022 · 0 comments
Open

(RFC) ssh completion for host-dependent remote commands #839

vt-alt opened this issue Oct 27, 2022 · 0 comments

Comments

@vt-alt
Copy link

vt-alt commented Oct 27, 2022

Describe the feature/solution

Sometimes there are infrastructure servers where some ssh cli API provided (such as builders, storage). It will be good to have autocompletion for these remote commands. But It seems there is no support in bash-completion for that use case. It would be useful to have such support so completion for common (per organization) servers could be installed.

I see that _ssh completes with compgen -c -- "$cur" as for local commands, but such remote cli could be without command prefix (for example ssh girar (task|build|quota|...) <internal sub-command or options...>.)

Well I don't know how this could be implemented best way. But one ides is to have handler script like ssh_<hostname> which handles completions for <hostname>, and it could ne symlinked to a short or long hostname or other hostname variant.

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

No branches or pull requests

1 participant