Giter VIP home page Giter VIP logo

Comments (11)

murlakatamenka avatar murlakatamenka commented on May 16, 2024 2

Status update:

* [x]  Add completions to releases.

It's checked here but in releases there are only binaries, would be nice to see completions there, it's WIP as I understand.

from ouch.

figsoda avatar figsoda commented on May 16, 2024 1

I have a build.rs for clap_generate completions, imo help2man shouldn't be in build.rs since it requires the built binary, we could just put in ci and rely on the package maintainers. I can help packaging for nixpkgs

from ouch.

figsoda avatar figsoda commented on May 16, 2024 1

actually i take that back, i dont think help2man would need the built binary and clap should have some function to get the full help message

from ouch.

murlakatamenka avatar murlakatamenka commented on May 16, 2024 1

@marcospb19 don't worry about that, obviously you need permissions to copy stuff to /usr/share/, so sudo is required.

The user will be prompted for password once since default sudo timeout is 5 minutes

man sudoers:

Once a user has been authenticated, [...] the user may then use sudo without a password for a short period of time (5 minutes unless by the timestamp_timeout option).

from ouch.

figsoda avatar figsoda commented on May 16, 2024

It would be hard to implement completion generation for the current oof
Maybe we should just handwrite completions or rewrite oof?

from ouch.

marcospb19 avatar marcospb19 commented on May 16, 2024

I think that the best way it to migrate to clap, it will provide us with man pages as well as shell completions for various shells (maybe we should use a specific 3.0 beta version, while 3.0 stable is not released).

This will probably increase our binary size by 200kb, but there are various other advantages, saves us time worrying about argparsing and --help stuff (which is terrible to edit manually in ouch).

from ouch.

figsoda avatar figsoda commented on May 16, 2024

I didn't make the recommendation since it was previously removed
I am currently using clap{,_generate} beta and it works pretty well. I don't think clap_generate has man page support yet, but we can use help2man if we really want man pages

from ouch.

marcospb19 avatar marcospb19 commented on May 16, 2024

Oh yeah, I think the default template of clap is compatible with help2man, we could have a build.rs file to do it, I'm not sure how it works tho.

Removing clap was a bad decision :P , but I only realized it later.

from ouch.

marcospb19 avatar marcospb19 commented on May 16, 2024

It's a weird idea to install shell completions with an installation script just copying files with sudo mv, for NixOS and Arch (with AUR) we can properly install with package managers, but for ubuntu users I guess it's our only option (and other debian-based systems).

from ouch.

marcospb19 avatar marcospb19 commented on May 16, 2024

Oh yeah, I unchecked that one checkbox.

Taking a look again at this issue again, I'm questioning if installing shell completions with sudo in the users system is too aggressive or not, we already require sudo to move the binary to /usr/local/bin/ouch and I don't think there is another software with the same name.

from ouch.

marcospb19 avatar marcospb19 commented on May 16, 2024

We gave up on the installation scripts in favor of packages, after seeing that ouch is being packaged to a variety of systems.

The good part of packages is that they usually install completions correctly.

from ouch.

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.