Giter VIP home page Giter VIP logo

Comments (2)

chu11 avatar chu11 commented on September 9, 2024

i was admittedly surprised this didn't work. Some minor googling does suggest optional short options is a GNU only extension, thus something we maybe don't want to support in general.

I believe we copied this option from ls and ls only supports the long option. Perhaps we should just only support the long option. The long option is only documented/supported for a few commands already, so removing L short option would support command consistency.

man1/flux-dmesg.rst:.. option:: -L, --color[=WHEN]
man1/flux-jobs.rst:.. option:: --color[=WHEN]
man1/flux-kvs.rst:.. option:: -L, --color[=WHEN]
man1/flux-kvs.rst:.. option:: -L, --color[=WHEN]
man1/flux-overlay.rst:.. option:: -L, --color=WHEN
man1/flux-top.rst:.. option:: --color[=WHEN]

perhaps need a NO_SHORT_OPTION macro of sorts of liboptparse. (Edit ..oh if we don't list a short option key, it appears only long option works).

Edit:

some auditing notes for myself
dmesg - liboptparse
jobs - argparse
kvs - liboptparse
overlay - liboptparse
flux-top - liboptparse

from flux-core.

grondo avatar grondo commented on September 9, 2024

I believe we copied this option from ls and ls only supports the long option.

We also copied dmesg(8) which supports the short option:

Usage:
 dmesg [options]

Display or control the kernel ring buffer.
[snip]
 -H, --human                 human readable output
 -k, --kernel                display kernel messages
 -L, --color[=<when>]        colorize messages (auto, always or never)
                               colors are enabled by default
 -l, --level <list>          restrict output to defined levels
...

Let's keep the short option at least in utilities that are likely to be piped to less -R, e.g. flux dmesg, flux *eventlog, etc.

from flux-core.

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.