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

enable tab completion for SSH hostnames #274

Closed
LucasLarson opened this issue Feb 13, 2021 · 1 comment
Closed

enable tab completion for SSH hostnames #274

LucasLarson opened this issue Feb 13, 2021 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@LucasLarson
Copy link
Owner

LucasLarson commented Feb 13, 2021

# add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
# https://github.com/mathiasbynens/dotfiles/commit/fecb8c6
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh
@LucasLarson LucasLarson added the enhancement New feature or request label Feb 13, 2021
@LucasLarson LucasLarson added the wontfix This will not be worked on label May 6, 2022
@LucasLarson
Copy link
Owner Author

this example is bash-specific unless zsh’s bashcompinit is run first1

Footnotes

  1. Zsh man zshcompsys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant