Open ShatrovOA opened 4 years ago
Hi @ShatrovOA ,
sorry for the delay.
it should be different, global help should print commands (if any) or eventually default command flags whereas command help should print only command flags. Maybe there is a bug, I try to investigate soon;
the FLAP parser can check if clas/commands have been passed or not, but currently it is up to user to print them. I can try to add something to automatically print the passed (and the not passed) clas if you like.
Hi @szaghi !
What do you mean by automatically print the passed clas? Is there any way that they can be printed with the help of special method?
Best regards!
@ShatrovOA
What do you mean by automatically print the passed clas? Is there any way that they can be printed with the help of special method?
I was thinking to something like the is_passed
method, see https://github.com/szaghi/FLAP/wiki/CLI-Method-is_passed
I can write a method that prints the status of all CLAS, printing a list like:
-f passed
-g passed
...-h not passed
This method as is_passed
can be used only after the CLI has been parsed obiuvsly.
Do you think it is useful?
Personally, I am not interested in "not passed" clas. I was hoping for something this:
Used CLA:
-f 23.4
command -i 23
-t true
-s string
@ShatrovOA
Yes, it is possible to print also the value of the passed CLAS
I will try to implement it soon
@szaghi
Great!
Did you have an opportunity to check --help message?
@ShatrovOA
Did you have an opportunity to check --help message?
not yet
Dear @szaghi !
Is it possible to also print unknown CLAs? I understand that it might be ugly...
Best regards!
@ShatrovOA sorry for the dealy.
Is it possible to also print unknown CLAs?
yes
I hope to fix this soon.
The new patch of @ShatrovOA seems to brilliantly solve this issue.
Thank you @ShatrovOA your help is really appreciated.
Dear @szaghi !
I have couple of questions.
What behaviour is expected when launching program as ./a.out command --help ?? Right now it is equal to ./a.out --help
Is there any way to print all passed clas and commands to usage_lun?
Best regards!