Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose SSH config aliases and known hosts as separate native completion groups for fzf-tab. When the current completion context has a non-empty
descriptionsformat, both sources are offered automatically. Without that format, or with an explicit empty format, known hosts are included only whenZSH_SSH_INCLUDE_KNOWN_HOSTS=1. The standalone fzf interface also retains its opt-in for its combined list.ssh -p 2222 root@prod<Tab>andssh -vp2222 root@prod<Tab>complete only the destination. Option values and remote command arguments use native SSH completion.-Fselects an alternate config and-F noneskips config aliases.p.wcompletes toprod.web.tag:always filters config records only and is replaced by the selected alias, including withuser@or a cursor inside the query.ssh -T -Gpreview with User, HostName, Port, ControlMaster, ForwardAgent, LocalForward, IdentityFile, RemoteForward, ProxyCommand and ProxyJump. Preserve the selected login prefix, preceding SSH options, and config path. Preview arguments are quoted, including paths with spaces.compdefand defer the standalone Tab binding until the first prompt. Either plugin order works when both load before that prompt. Disabling fzf-tab leaves ordinary native completion, and re-enabling it restores its interface.menu nois recommended, and changing group-switching keys is optional (defaults: F1/F2). The plugin does not modify those global styles.Validation
FZF_TAB_DIR=/path/to/fzf-tab zsh -f tests/completion.zsh native fzf-first plugin-first: 148 checks passed on Zsh 5.9 / Windows MSYS2 with fzf-tab24105b15714bfec37989ed5c5b6e60f572253019.zsh -f tests/preview.zsh: 28 preview checks passed, using a fake SSH executable. Covers all preview fields, option/config propagation, paths with spaces, literal selected words, preservation of custom styles, and suppression outside SSH destination completion.git diff --cached --checkpassed. Standalone host-list formatting is unchanged by the display restoration.The suite also includes compinit-after-loading and disable/re-enable modes. Group-switching keys and Linux/macOS were not exercised in this run; preview execution tests used a fake SSH executable and made no SSH connections.