davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

bash completion #128

Closed daveallen closed 5 years ago

daveallen commented 5 years ago

Not really an issue, but a question. How would you do bash completion with methadone?

davetron5000 commented 5 years ago

Of the CLI options? not sure…I hadn't thought about it. My other gem (GLI) has a command that can output the available subcommands in a way that favors bash completion. We could do something like that here, like your_app --bash-completion and it lists out the available options? Just guess here, as I haven't done this for cli options before

daveallen commented 5 years ago

I was actually looking at GLI. So with that I can get the commands to tab complete? I also want to get a listing of files from a specific directory to obtain another list and another list from objects I can get from a server. I just found this which does more than tab completion. but I don't need the other stuff.
https://github.com/saveriomiroddi/simple_scripting/#simplescriptingtabcompletion

davetron5000 commented 5 years ago

Yeah, not sure how methadone could be helpful—that sounds like a very specific use case. You could always write your methadone app to provide those completion targets I guess?

daveallen commented 5 years ago

Yeah, I think that is what I am going to do. Thanks!!