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

Add --co alias for --config-override #1394

Closed
micahellison opened this issue Jan 8, 2022 · 0 comments · Fixed by #1397
Closed

Add --co alias for --config-override #1394

micahellison opened this issue Jan 8, 2022 · 0 comments · Fixed by #1397
Labels
enhancement New feature or request

Comments

@micahellison
Copy link
Member

Feature Request

It would be nice to use --config-override with a shorter alias.

Use Case/Motivation

When --config-override was implemented, I started using --co for it. Our CLI parser automatically matches up abbreviated arguments like this with their longer endings... unless it's ambiguous, which it is in the current beta release because of --config-file:

jrnl --co
usage: jrnl [--debug] [--help] [--version] [--list] [--encrypt] [--decrypt] [--import] [-on DATE] [-today-in-history] [-month DATE]
            [-day DATE] [-year DATE] [-from DATE] [-to DATE] [-contains TEXT] [-and] [-starred] [-n [NUMBER]] [-not [TAG]] [--edit]
            [--delete] [--format TYPE] [--tags] [--short] [--config-override CONFIG_KV_PAIR CONFIG_KV_PAIR]
            [--config-file CONFIG_FILE_PATH]
            [[...]]
jrnl: error: ambiguous option: --co could match --config-override, --config-file

It would be nice to specify this clearly. The new --config-file argument already has a --cf alias defined, so --co is very consistent. It also doesn't interfere with -contains since that argument has only one hyphen.

Example Usage

View latest 999 entries with a different timeformat than usual:

jrnl --co timeformat '%c' -999

Other information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant