Git Product home page Git Product logo

Comments (3)

MilesMcBain avatar MilesMcBain commented on May 30, 2024

PS. I think I should be able to manage a PR if you agree.

from cli.

gaborcsardi avatar gaborcsardi commented on May 30, 2024

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.

MilesMcBain avatar MilesMcBain commented on May 30, 2024
  • 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.