Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Completion Script #19

Open
ax3l opened this issue Apr 19, 2017 · 5 comments
Open

Output Completion Script #19

ax3l opened this issue Apr 19, 2017 · 5 comments

Comments

@ax3l
Copy link

ax3l commented Apr 19, 2017

Hi,

can I use compleat to output a bash/zsh/fish/... completion script based on the tools usage signature (or --help) output instead of letting it auto-complete it interactively?

I know it's less fancy as the full compleat functionality but such a auto-generator would be super-handy for shipping completions and auto-generating them, e.g. before a software release. (It also just introduces a software dependency for the dev side but not for the user side.)

@mbrubeck
Copy link
Owner

Yes, this could be done if someone can write a generator that turns the Compleat grammar into sh code that does the same thing that compleat does internally. I don't have the time to work on this myself right now, but would be happy to help if someone else does.

@fvictorio
Copy link

Hi @mbrubeck, are you still interested in this? I might give it a chance, although my haskell knowledge is extremely basic.

@mbrubeck
Copy link
Owner

mbrubeck commented Nov 5, 2019

@fvictorio No, I'm not currently working in this. My own Haskell knowledge is quite rusty these days :)

@ax3l
Copy link
Author

ax3l commented Nov 5, 2019

I would be still interested in using this (but have zero haskell knowledge) :)

@fvictorio
Copy link

Just FYI, I ended up doing something different (here's the repo if you are interested). The tl;dr is to have a intermediate representation of a completion system (in JSON in this MVP) to decouple building the representation from generating the scripts.

But I kind of like the syntax of the .usage files, so one idea is to make a tool that converts them to this JSON representation.

Anyway, sorry for saying I would work on this and then not doing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants