FLAP icon indicating copy to clipboard operation
FLAP copied to clipboard

Printing passed clas

Open ShatrovOA opened this issue 4 years ago • 10 comments

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!

ShatrovOA avatar Apr 14 '20 19:04 ShatrovOA

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.

szaghi avatar Apr 16 '20 08:04 szaghi

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 avatar Apr 17 '20 16:04 ShatrovOA

@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?

szaghi avatar Apr 17 '20 16:04 szaghi

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 avatar Apr 17 '20 16:04 ShatrovOA

@ShatrovOA

Yes, it is possible to print also the value of the passed CLAS

I will try to implement it soon

szaghi avatar Apr 17 '20 17:04 szaghi

@szaghi

Great!

Did you have an opportunity to check --help message?

ShatrovOA avatar Apr 17 '20 17:04 ShatrovOA

@ShatrovOA

Did you have an opportunity to check --help message?

not yet

szaghi avatar Apr 17 '20 17:04 szaghi

Dear @szaghi !

Is it possible to also print unknown CLAs? I understand that it might be ugly...

Best regards!

ShatrovOA avatar May 05 '20 12:05 ShatrovOA

@ShatrovOA sorry for the dealy.

Is it possible to also print unknown CLAs?

yes

I hope to fix this soon.

szaghi avatar May 19 '20 18:05 szaghi

The new patch of @ShatrovOA seems to brilliantly solve this issue.

Thank you @ShatrovOA your help is really appreciated.

szaghi avatar Nov 26 '20 17:11 szaghi