Skip to content
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

Printing passed clas #89

Open
ShatrovOA opened this issue Apr 14, 2020 · 10 comments
Open

Printing passed clas #89

ShatrovOA opened this issue Apr 14, 2020 · 10 comments
Assignees

Comments

@ShatrovOA
Copy link
Contributor

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!

@szaghi
Copy link
Owner

szaghi commented Apr 16, 2020

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 szaghi self-assigned this Apr 16, 2020
@ShatrovOA
Copy link
Contributor Author

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!

@szaghi
Copy link
Owner

szaghi commented Apr 17, 2020

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

@ShatrovOA
Copy link
Contributor Author

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

@szaghi
Copy link
Owner

szaghi commented Apr 17, 2020

@ShatrovOA

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

I will try to implement it soon

@ShatrovOA
Copy link
Contributor Author

@szaghi

Great!

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

@szaghi
Copy link
Owner

szaghi commented Apr 17, 2020

@ShatrovOA

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

not yet

@ShatrovOA
Copy link
Contributor Author

Dear @szaghi !

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

Best regards!

@szaghi
Copy link
Owner

szaghi commented May 19, 2020

@ShatrovOA sorry for the dealy.

Is it possible to also print unknown CLAs?

yes

I hope to fix this soon.

@szaghi
Copy link
Owner

szaghi commented Nov 26, 2020

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

Thank you @ShatrovOA your help is really appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants