-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Question] Simple version printing #34
Comments
It doesn't look like there is a way to have aliases for an 'alt=' function yet, sorry. I'll look into it. |
Maybe you make, that Thanks. |
I can't really do that, users might use |
@epsy, any ideas? If """Clize + Pylint."""
from clize import run
VERSION = "0.2"
def do_nothing():
"""Nothing."""
return "I did nothing, I swear!"
def version():
"""Show the version."""
print(VERSION)
def v():
"""Show the version."""
print(VERSION)
run(do_nothing, alt=[version, v]) pylint output:
Function name must contain more than one symbol. Thanks. |
It remains that |
1. Problem
In most programs, what I use, I can get version, use
--version
and-v
command line arguments without additional parameters.or
I don't understand, how I can to create the same behavior, if I write a program, use Clize.
2. Attempts
1. First
That get a version, I need input
version
, not--version
:2. Second
I need input
-v b
, not-v
:3. Third
It works for
--version
,but I don't find, how I can to create alias
-v
.4. Fourth
It works nice.
But in
--help
menu-v
is not--version
alias.Actual:
Expected:
Thanks.
The text was updated successfully, but these errors were encountered: