Comments (3)
PS. I think I should be able to manage a PR if you agree.
from cli.
Hmmm, I get the idea, but I think it is hard to design cli output if the windows can have an infinite width. E.g. I want to show a list of packages, like in https://github.com/r-lib/cliapp/blob/master/inst/scripts/search.R which looks like this:
❯ ./search.R command line
ℹ Searching...
✔ Found 60 packages in 23ms
1. optparse 1.6.0 -- Command Line Option Parser
A command line parser inspired by Python's 'optparse' library to be used with
Rscript to write "#!" shebang scripts that accept short and long
flag/options.
3 months ago by Trevor L Davis <[email protected]>
2. colt 0.1.1 -- Command-Line Color Themes
A collection of command-line color styles based on the 'crayon' package.
'Colt' styles are defined in themes that can easily be switched, to ensure
command line output looks nice on dark as well as light consoles.
about a year ago by Stefan Fleck <[email protected]>
[...]
cliapp uses cli.width
to wrap the description here. It does not seem very nice to show the package description in one long line here, does it? In other words, I don't really see that rules are that special that they need an option. Quite often you want to cut/wrap everything at cli.width
, I think.
I see the use case for tibbles (and tables in general?), though, so maybe it is better to go the other way and have a tibble.width
option. Assuming there isn't one already.
from cli.
- Deleted Response *
Edit: So I just figured out I can set cli.width
and width
and get the best of both worlds. As you were. Really sorry for wasting your time.
from cli.
Related Issues (20)
- "Quiet" progress bars
- Add a new style that supports tooltips
- Fix Unicode 15.1 grapheme algorithm
- Issues with installing R package cli from source HOT 1
- Rstudio progress bar handlers don't work by default
- Handling `...` to create an ideal alert
- cli_vec: vec-trunc not working HOT 2
- Progress bar for `furrr::future_map` and `future.apply::future_lapply` functions HOT 1
- cli update from CRAN HOT 2
- cli::pb_current_name HOT 1
- FR: Add subtle style inline markup
- Add a "default" option to hyperlink detection
- Release cli 3.6.2
- Changing color for bullets
- Bad formatting when passing bare lubdridate dates HOT 4
- `cli_warning` and `cli_inform` don't expose individual bullet points in condition object. HOT 3
- Internal error with `ansi_strwrap`when string contains `\r\n\r` in `cli_abort()` message HOT 1
- Never seeing the first progress message from `cli_progress_along()`
- Suggestion: `cli_abort_if_not()` HOT 3
- More control over indentation for `cli_bullets()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.