https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=13984

--- Comment #5 from Gerald Combs <ger...@wireshark.org> ---
Given that ? is a globbing character in most shells, the output of `tshark -G
?` depends on having any single-character filenames in your directory.

For example, bash on macOS prints the usage summary when no single-character
file is present and an error message if one is:

----
$ ls ?
ls: ?: No such file or directory

$ tshark -G ? | head -5
TShark (Wireshark) 2.5.0 (v2.5.0rc0-648-gfe0e6e3)

Usage: tshark -G [report]

Glossary table reports:

$ touch a

$ ./cmbuild/run/tshark -G ? | head -5
tshark: Invalid "a" option for -G flag, enter -G ? for more help.
----

cmd.exe on Windows 7 prints the default glossary if no single-character file is
present and the usage summary if one is:

----
c:\test>dir ?
 Volume in drive C has no label.
 Volume Serial Number is 68EB-7490

 Directory of c:\test

08/16/2017  01:59 PM    <DIR>          .
08/16/2017  01:59 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)   3,862,257,664 bytes free

c:\test>tshark -G ? | head -5
P       Short Frame     _ws.short
P       Malformed Packet        _ws.malformed
P       Unreassembled Fragmented Packet _ws.unreassembled
F       Expert Info     _ws.malformed.dissector_bug     FT_NONE
_ws.malformed0x0
        Dissector bug
F       Expert Info     _ws.malformed.reassembly        FT_NONE
_ws.malformed0x0
        Reassembly error

c:\test>touch a

c:\test>tshark -G ? | head -5
TShark (Wireshark) 2.5.0 (v2.5.0rc0-705-ge7284adcdf)

Usage: tshark -G [report]

Glossary table reports:
----

Would it make sense to print a usage summary when the length of the argument
passed to "-G" is 1?

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to