Skip to content

Commit ceb4fdd

Browse files
committed
fix(avahi-browse): nounset mode error on unknown option
1 parent 091ad2d commit ceb4fdd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

completions/avahi-browse

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _comp_cmd_avahi_browse()
1818

1919
if [[ $cur == -* ]]; then
2020
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
21-
[[ $COMPREPLY != *= ]] || compopt -o nospace
21+
[[ ${COMPREPLY-} != *= ]] || compopt -o nospace
2222
return
2323
fi
2424

test/t/test_avahi_browse.py

+5
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ def test_service_types(self, completion):
2020
@pytest.mark.complete("avahi-browse -a _")
2121
def test_no_service_type_with_a(self, completion):
2222
assert not completion
23+
24+
@pytest.mark.complete("avahi-browse --dont-fail-in-unset-mode")
25+
def test_unknown_option(self, completion):
26+
# Just see that it does not error out
27+
pass

0 commit comments

Comments
 (0)