GithubHelp home page GithubHelp logo

[feature] shell completions about fq HOT 3 OPEN

Freed-Wu avatar Freed-Wu commented on May 26, 2024
[feature] shell completions

from fq.

Comments (3)

wader avatar wader commented on May 26, 2024 1

No worries :) think i will try to do a quick stab at it. It will probably involve mostly writing jq code. Can let you know if/when i have something.

from fq.

wader avatar wader commented on May 26, 2024

Hey, yes that would be nice. Unfortunately fq does not use cobra or any common go argument parser package. This is because most of the CLI and glue code in fq is implemented with jq code, it makes many things smoother to implement but also some things harder :)

But i think it shouldn't be that much work to provide at least basic completion support via --completion argument etc. All arguments are defined here https://github.com/wader/fq/blob/master/pkg/interp/options.jq#L383-L523 and to support completing decode names etc i guess one could generate calls to fq with small snippets? maybe could extend _opt_cli_opts to include optional jq snippet to get possible values?

Let me know if it's something you would like to work on. Maybe i could spend some time adding support for one shell and then adding others would be easier?

from fq.

Freed-Wu avatar Freed-Wu commented on May 26, 2024

Sorry, I am not familiar with golang 😢

from fq.

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.