You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, there's no way to define an option that won't be shown in the standard show_usage_with_options() output. This would be particularly useful to be able to do if you wanted to add options that were aliases for other options. For example:
USAGE("git chat import-key ((-f | --fingerprint) <id>) [--gpg-home <path>] ")
...
OPT_LONG_STRING("gpg-home", "path", "path to the gpg home directory", &gpg_home_dir),
OPT_STRING('f', "fingerprint", "id", "id of the public key to import", &fingerprint),
+ OPT_HIDDEN(0, "fpr", OPTION_STRING_T, &fingerprint),
OPT_STRING('k', "key", "path", "path to exported public key file", &key_path),
OPT_BOOL('h', "help", "show usage and exit", &show_help),
OPT_END()
This OPT_HIDDEN macro could have the following signature: #define OPT_HIDDEN(S,L,T,V) { (S), (L), NULL, NULL, OPTION_HIDDEN_T | (T), (V) }
Since str_name and desc won't be needed, null is fine.
The text was updated successfully, but these errors were encountered:
Right now, there's no way to define an option that won't be shown in the standard
show_usage_with_options()
output. This would be particularly useful to be able to do if you wanted to add options that were aliases for other options. For example:USAGE("git chat import-key ((-f | --fingerprint) <id>) [--gpg-home <path>] ") ... OPT_LONG_STRING("gpg-home", "path", "path to the gpg home directory", &gpg_home_dir), OPT_STRING('f', "fingerprint", "id", "id of the public key to import", &fingerprint), + OPT_HIDDEN(0, "fpr", OPTION_STRING_T, &fingerprint), OPT_STRING('k', "key", "path", "path to exported public key file", &key_path), OPT_BOOL('h', "help", "show usage and exit", &show_help), OPT_END()
This OPT_HIDDEN macro could have the following signature:
#define OPT_HIDDEN(S,L,T,V) { (S), (L), NULL, NULL, OPTION_HIDDEN_T | (T), (V) }
Since
str_name
anddesc
won't be needed, null is fine.The text was updated successfully, but these errors were encountered: