Skip to content

Commit 8d2c976

Browse files
committed
ssh: fix suboption completion with combined -*o
1 parent 3e193ed commit 8d2c976

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

completions/ssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ _ssh_suboption_check()
168168
{
169169
# Get prev and cur words without splitting on =
170170
local cureq=`_get_cword :=` preveq=`_get_pword :=`
171-
if [[ $cureq == *=* && $preveq == -o ]]; then
171+
if [[ $cureq == *=* && $preveq == -*o ]]; then
172172
_ssh_suboption $cureq "$1"
173173
return $?
174174
fi

test/t/test_ssh.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ def test_3(self, completion):
1919
Assumes there's no "bash" known host.
2020
"""
2121
assert "bash" not in completion
22+
23+
@pytest.mark.complete("ssh -vo AddressFamily=")
24+
def test_4(self, completion):
25+
assert completion

0 commit comments

Comments
 (0)