Skip to content

Commit 2432551

Browse files
authored
Merge pull request scop#558 from scop/xmlwf-improvements
xmlwf improvements
2 parents 3e7d089 + 3e55711 commit 2432551

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

completions/xmlwf

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ _xmlwf()
1515
-- "$cur"))
1616
return
1717
;;
18-
-*v)
18+
-*[abv])
1919
return
2020
;;
2121
esac
2222

2323
if [[ $cur == -* ]]; then
24-
COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur"))
24+
COMPREPLY=($(
25+
compgen -W '$(_parse_help "$1" || _parse_usage "$1")' -- "$cur"
26+
))
2527
return
2628
fi
2729

test/t/test_xmlwf.py

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ def test_1(self, completion):
99
@pytest.mark.complete("xmlwf -", require_cmd=True)
1010
def test_2(self, completion):
1111
assert completion
12+
13+
@pytest.mark.complete("xmlwf -sa ")
14+
def test_no_arg_to_a(self, completion):
15+
assert not completion

0 commit comments

Comments
 (0)