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

Formatting: treat key as a shortcut for key:true #2084

Open
MaxVerevkin opened this issue Sep 7, 2024 · 2 comments · May be fixed by #2126
Open

Formatting: treat key as a shortcut for key:true #2084

MaxVerevkin opened this issue Sep 7, 2024 · 2 comments · May be fixed by #2126

Comments

@MaxVerevkin
Copy link
Collaborator

For example .dur(hms) instead of .dur(hms:true).

@bim9262
Copy link
Collaborator

bim9262 commented Sep 7, 2024

I like the idea, but I think we'd want to only do that, if the parameter is a boolean. Otherwise we'd get odd errors for args like arg_takes_number, arg_takes_string

@MaxVerevkin
Copy link
Collaborator Author

Funny thing is that the comments in parse.rs suggest this was the intention all along

// `.str(width:2)`
// `.eng(unit:bits,bin)`
fn parse_formatter(i: &str) -> IResult<&str, Formatter, PError> {

bim9262 added a commit to bim9262/i3status-rust that referenced this issue Jan 10, 2025
@bim9262 bim9262 linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants