Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Revisions: Issue #3249 All Revisions ] Back to Issue ]
Summary 0003249: Change Doomseeker to fail on invalid command line option
Revision 2017-10-25 00:56 by WubTheCaptain
Additional Information Behavior 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)

Revision 2017-09-01 18:06 by WubTheCaptain
Additional Information Behavior 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.






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker