Coder Social home page Coder Social logo

[Discussion] About the CLI interface about sw HOT 10 OPEN

Telokis avatar Telokis commented on July 19, 2024
[Discussion] About the CLI interface

from sw.

Comments (10)

egorpugin avatar egorpugin commented on July 19, 2024

first part

CLI is an issue. I did not find anything suitable for my needs yet.
I even tried to investigate it myself. See https://github.com/egorpugin/primitives/tree/master/src/experimental/cl

Current implementation is from clang. It allows -single-dash long options.
It may be reconsidered later.

Windows convention

It is /option1 /option2 :)
Currently we have a mix of unix/clang cli interface.


second part

about your points

Because I did not accept final CLI options implementation or library, there will be such mess like now.

I'd argue it is better to promote it to a command: sw list-programs.

I'm against it. Command list MUST be populated rarely and not for small commands like this.
Better to leave it -like-single-option for now.

from sw.

Telokis avatar Telokis commented on July 19, 2024

I'm against it. Command list MUST be populated rarely and not for small commands like this.
Better to leave it -like-single-option for now.

I disagree from an user experience point of view, it seems odd to use an option without a command while others will print No command was issued.
Perhaps there could be a compromise like sw list compilers adding only one list command capable of listing different things depending on its subcommand.

PS: I just noticed that it is list-programs instead of list-compilers which would be clearer since the option is -compiler

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

list-compilers is too specific. I've left 'list-programs' for some space.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

sw list ... is in use for packages.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

I disagree from an user experience point of view, it seems odd to use an option without a command while others will print No command was issued.

it's like sw -help. :)

from sw.

Telokis avatar Telokis commented on July 19, 2024

list-compilers is too specific. I've left 'list-programs' for some space.

It's because the option is then called -compiler. There doesn't seem to be an obvious link between -list-programs and -compiler even though they are closely related.

sw list ... is in use for packages.

My bad but it was just an example.

I disagree from an user experience point of view, it seems odd to use an option without a command while others will print No command was issued.

it's like sw -help. :)

I guess you've got a point, there. (Even though I find this convention a bit strange but who am I to judge?)

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

One more note here.
From very end sw user POV it may be more convenient to use future sw-gui application.
https://github.com/SoftwareNetwork/sw/tree/master/src/sw/client/gui

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

There's a simple stub there currently. Gui is definitely is not on my plate at the moment.

from sw.

egorpugin avatar egorpugin commented on July 19, 2024

https://github.com/CLIUtils/CLI11

Could be a decent option. Unix-style, no short-long options (like -help).
I admit --help is more friendly to me also.

from sw.

Telokis avatar Telokis commented on July 19, 2024

Seems like a very nice interface!
I think it's a good fit, I'm already thinking about throwing Boost.program_options in favor of this!

from sw.

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.