Skip to content

Commit 436b0cb

Browse files
authored
tshark: complete -r arg with all filenames (#422)
It accepts a lot of file types. https://www.wireshark.org/docs/wsug_html_chunked/ChIOOpenSection.html#ChIOInputFormatsSection Modified-by: Ville Skyttä <[email protected]>
1 parent b41b97c commit 436b0cb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

completions/tshark

+2-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,8 @@ _tshark()
5858
[[ ${COMPREPLY-} == *: ]] && compopt -o nospace
5959
return
6060
;;
61-
-*r)
62-
_filedir '@(pcap?(ng)|cap)?(.gz)'
63-
return
64-
;;
65-
-*H)
61+
-*[rH])
62+
# -r accepts a lot of different file types
6663
_filedir
6764
return
6865
;;

test/t/test_tshark.py

+4
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ def test_5(self, completion):
2828
def test_6(self, completion):
2929
"""Test there are no URLs in completions."""
3030
assert not any("://" in x for x in completion)
31+
32+
@pytest.mark.complete("tshark -r ")
33+
def test_input_files(self, completion):
34+
assert completion

0 commit comments

Comments
 (0)