Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

Bash completion scripts for Idris command line

Open david-christiansen opened this issue 12 years ago • 7 comments

Bash supports programmable completions of options to commands. It would be nice if this was extended with Idris support.

david-christiansen avatar Feb 24 '14 22:02 david-christiansen

Being the worst possible lurker here, I wanted to chip in for this one.

If the command line argument parsing were to be done using cmdargs, some bash completion could be had for free.

http://stackoverflow.com/questions/16863284/cmdargs-bash-completion

ozgurakgun avatar Feb 24 '14 22:02 ozgurakgun

Wonderful! Thanks for the link! I'm sure this will interest @trillioneyes :)

david-christiansen avatar Feb 24 '14 22:02 david-christiansen

Don't forget zsh!

LeifW avatar Feb 25 '14 00:02 LeifW

I was actually using optparse-applicative, which also has some support for completion. I should take a look at cmdargs though; optparse-applicative requires a bit of fudging to fit idris's current command line syntax and I'd like to avoid changing that if I can. Thanks for the link! (Edit: hmmm, actually, optparse-applicative doesn't seem to have option completion like cmdargs does, only argument completion (including arguments to options, though). At least as far as I can tell from the documentation.)

trillioneyes avatar Feb 25 '14 01:02 trillioneyes

I'm a bit confused as to what the goal is here, but FIY Idris has basic bash completion already:

https://github.com/idris-lang/Idris-dev/blob/master/contribs/tool-support/completion/idris.bash

or is this not what you are talking about?

yfyf avatar Mar 05 '14 23:03 yfyf

Well I'll be a monkey's uncle! It's there! :-) Thanks!

david-christiansen avatar Mar 06 '14 08:03 david-christiansen

has shell completion instructions been moved somewhere ?

nrolland avatar Jan 13 '20 16:01 nrolland