Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003249Doomseeker[All Projects] Suggestionpublic2017-09-01 18:062017-10-25 01:00
ReporterWubTheCaptain 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
StatusnewResolutionopen 
Platformx86_64OSDebian GNU/LinuxOS Versionbuster/sid
Product Version1.1 
Target VersionFixed in Version 
Summary0003249: Change Doomseeker to fail on invalid command line option
DescriptionSay I made a typo and instead of "--datadir /foo/bar/" option I omitted a character and had a typo "--datdir /foo/bar", Doomseeker would still start but with wrong (default) IP2C or plugin data I didn't intend to use. There's also a possibility of not understanding what went wrong in the case.
Steps To Reproduce
$ doomseeker --foo-bar --this-is-not-a-real-option
[20:48:56] Starting Doomseeker. Hello World! :)
...


(Doomseeker starts normally.)
Additional InformationBehavior with unrecognized options varies between programs. Few examples are listed below.

$ cat --foo-bar --this-is-not-a-real-option
cat: unrecognized option '--foo-bar'
Try 'cat --help' for more information.


$ slock --foo-bar --this-is-not-a-real-option                               
usage: slock [-v] [cmd [arg ...]]


$ gcc --foo-bar --this-is-not-a-real-option
gcc: error: unrecognized command line option ‘--foo-bar’
gcc: error: unrecognized command line option ‘--this-is-not-a-real-option’
gcc: fatal error: no input files
compilation terminated.


$ mpv --foo-bar --this-is-not-a-real-option
Error parsing option foo-bar (option not found)
Setting commandline option --foo-bar= failed.

Exiting... (Fatal error)


§ firefox --foo-bar --this-is-not-a-real-option
[Firefox starts normally.]


To improve user experience, I would suggest Doomseeker to fail with an informative message when a command line option for Doomseeker which doesn't exist is attempted.


  • http://man7.org/linux/man-pages/man3/getopt.3.html

  • http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html from POSIX.1-2008 (2016)

Attached Files

- Relationships

-  Notes
User avatar (0018624)
WubTheCaptain (developer)
2017-10-25 00:48

Changed from a bug into a suggestion.
User avatar (0018625)
WubTheCaptain (developer)
2017-10-25 01:00
edited on: 2017-10-25 01:00

Nevermind me linking additional information to getopt, getopt_long() are GNU extensions but I think the part about "?" (an error) is worth looking more into.


Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2017-09-01 18:06 WubTheCaptain New Issue
2017-10-25 00:48 WubTheCaptain Category Bug => Suggestion
2017-10-25 00:48 WubTheCaptain Summary Doomseeker doesn't fail on invalid command line option => Change Doomseeker to fail on invalid command line option
2017-10-25 00:48 WubTheCaptain Note Added: 0018624
2017-10-25 00:56 WubTheCaptain Additional Information Updated View Revisions
2017-10-25 01:00 WubTheCaptain Note Added: 0018625
2017-10-25 01:00 WubTheCaptain Note Edited: 0018625 View Revisions






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker