-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make FLAP CLI Posix compliant #13
Comments
+1 for posix compliance |
Thank you Izaak, I have just uploaded a new version (0.0.5) aimed to be more POSIX compliant; if you run the test-driver program with the default settings it looks like: default helpusage: Test_Driver [value] --string value [--integer value] [--real value] [--boolean] [--boolean_val value] [--integer_list value#1 value#2 value#3] [--help] [--version]
Required options:
--string value, -s value
String input; required
Optional options:
value
Positional real input; 1-th positional CLA; optional, default value 1.0
--integer value, -i value, value in: (1,3,5)
Integer input with fixed range; optional, default value 1
--real value, -r value
Real input; optional, default value 1.0
--boolean, -b
Boolean input; optional, default value .false.
--boolean_val value, -bv value
Valued boolean input; optional, default value .true.
--integer_list value#1 value#2 value#3, -il value#1 value#2 value#3
Integer list input; optional, default value 1 8 32
--help, -h
Print this help message; optional
--version, -v
Print version; optional
Examples:
-) Test_Driver -s 'Hello FLAP'
-) Test_Driver -s 'Hello FLAP' -i -2 # printing error...
-) Test_Driver -s 'Hello FLAP' -i 3 -r 33.d0
-) Test_Driver -s 'Hello FLAP' --integer_list 10 -3 87
-) Test_Driver 33.0 -s 'Hello FLAP' -i 5
-) Test_Driver --string 'Hello FLAP' --boolean wrong required arguments numbersTest_Driver: error: too few arguments (0) respect the required (1)
usage: Test_Driver [value] --string value [--integer value] [--real value] [--boolean] [--boolean_val value] [--integer_list value#1 value#2 value#3] [--help] [--version]
Required options:
--string value, -s value
String input; required
Optional options:
value
Positional real input; 1-th positional CLA; optional, default value 1.0
--integer value, -i value, value in: (1,3,5)
Integer input with fixed range; optional, default value 1
--real value, -r value
Real input; optional, default value 1.0
--boolean, -b
Boolean input; optional, default value .false.
--boolean_val value, -bv value
Valued boolean input; optional, default value .true.
--integer_list value#1 value#2 value#3, -il value#1 value#2 value#3
Integer list input; optional, default value 1 8 32
--help, -h
Print this help message; optional
--version, -v
Print version; optional
Examples:
-) Test_Driver -s 'Hello FLAP'
-) Test_Driver -s 'Hello FLAP' -i -2 # printing error...
-) Test_Driver -s 'Hello FLAP' -i 3 -r 33.d0
-) Test_Driver -s 'Hello FLAP' --integer_list 10 -3 87
-) Test_Driver 33.0 -s 'Hello FLAP' -i 5
-) Test_Driver --string 'Hello FLAP' --boolean Do you such an appearance? Do you have any suggestions? My best regards. |
I am going to close this issue. I have not found a clear "STANDARD", rather some guidelines. Now the appearance looks more like many other POSIX tools. I am satisfied. |
Looks good to me. IIRC I think posix long options are supposed to be separated from their arguments with |
Thank you Izaak, your opinion is always interesting for me! |
FLAP has (presently) a CLI output looking very "personal"... It is better to change the default "appearance" in order to make it more close to a compliant POSIX CLI.
References:
The text was updated successfully, but these errors were encountered: