-
Notifications
You must be signed in to change notification settings - Fork 71
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
Inconsistent behaviour in cli::cli_inform() #682
Comments
I don't know if this is a bug, The root of the issue is that ❯ cli::cli_bullets(c("!" = cli::rule(left = "left")))
❯ cli::cli_bullets(c("!" = cli::rule(left = "left", width = cli::console_width() - 2)))
|
I see your point - however, a fair expectation is that the wrapper And considering that there is an interest in using
Also, I love this library - and its just an awesome feature that I think should be implemented, honestly! 💯 |
Neither functions are wrappers of the other, they are actually quite different. E.g. options(cli.width = 30, width = 30)
txt <- cli:::lorem_ipsum(1, 4) cli::cli_inform(txt)
rlang::inform(txt)
Also perhaps most importantly: cli::cli_inform("letters: {letters[1:5]}")
rlang::inform("letter{?s}: {letters[1:5]}")
|
This is an interesting comparison, thank you for clarifying the different behaviour. I was referring to your code below, Lines 67 to 72 in bcb5c78
and labelled it as a But I take from your examples and comments that I am wrong about this, yes? |
|
Yeah, I made a Amazing work, honestly! |
In the next major version of cli you'll be able to embed |
So I can essentially use |
The
rlang::inform()
-wrapper in thecli
-package have a different behavior than using it directly, see the two examples below,Using
rlang::inform()
Using
cli::cli_inform()
If I only specify
left
, the following happens,This behavior is, as far as my tests go, independent of
console_width()
. Am I usingcli::cli_inform
incorrectly, or is this a bug?The text was updated successfully, but these errors were encountered: