diff options
author | Oliver Kiddle <opk@zsh.org> | 2020-08-21 17:41:08 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2020-08-21 17:41:08 +0200 |
commit | edb5459d618257c44d33cd02901b46bbbfa100f4 (patch) | |
tree | d27a952bc688cbbdda6f8b8026d08e1bcac487de | |
parent | e14e899ab96c4171544a244ddc39991512ec41c8 (diff) | |
download | zsh-edb5459d618257c44d33cd02901b46bbbfa100f4.tar.gz zsh-edb5459d618257c44d33cd02901b46bbbfa100f4.tar.xz zsh-edb5459d618257c44d33cd02901b46bbbfa100f4.zip |
47322: allow prefix with ssh cipher completion and add matching control for options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Unix/Command/_ssh | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 147b4c9be..8c5b64920 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-08-21 Oliver Kiddle <opk@zsh.org> + + * 47322: Completion/Unix/Command/_ssh: allow prefix with ssh + cipher completion and add matching control for options + 2020-08-18 Daniel Shahaf <d.s@daniel.shahaf.name> * 47323: Completion/Redhat/Command/_rpm: _rpmbuild: Complete diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 0775590e6..642f11bcb 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -269,8 +269,8 @@ _ssh () { if compset -P 1 '*='; then case "${IPREFIX#-o}" in (#i)(ciphers|macs|kexalgorithms|hostkeyalgorithms|pubkeyacceptedkeytypes|hostbasedkeytypes)=) - if ! compset -P +; then - _wanted append expl 'append to default' compadd + && ret=0 + if ! compset -P '[+-]'; then + _wanted prefix expl 'relative to default' compadd - + - && ret=0 fi ;; esac @@ -475,7 +475,7 @@ _ssh () { else # old options are after the empty "\"-line _wanted values expl 'configure file option' \ - compadd -M 'm:{a-z}={A-Z}' -q -S '=' - \ + compadd -M 'm:{a-z}={A-Z} r:[^A-Z]||[A-Z]=* r:|=*' -q -S '=' - \ AddKeysToAgent \ AddressFamily \ BatchMode \ |