bash-it
bash-it copied to clipboard
getopt completion
Description
Motivation and Context
How Has This Been Tested?
Completion tested manually inside interactive Bash session.
Screenshots (if appropriate):

Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [ ] My code follows the code style of this project.
- [ ] If my change requires a change to the documentation, I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] If I have added a new file, I also added it to
clean_files.txtand formatted it usinglint_clean_files.sh. - [ ] I have added tests to cover my changes, and all the new and existing tests pass.
Hi @EmilySeville7cfg !
So this looks interesting but I'm not quite sure its really useful?
getopt isn't a command that people usually enter on the command line, is it?
Isn't it mostly used within your script to parse your script's arguments?
Do you use this completion as a testing tool when configuring getopt in your scripts?
I'm not sure how completion against the getopt command line options themselves is useful?
I'm not rejecting this PR, but just wanting to have more conversation about how its used
Isn't it mostly used within your script to parse your script's arguments?
Yes, but sometimes it can be used from interactive session to test something. ;)
Do you use this completion as a testing tool when configuring getopt in your scripts?
Yes, because it's convenient to see available option values for getopt while typing. I don't want to run any other command to see available functions for instance, I can use just -n|--name option complete to explore them.
I don't know where better send such PRs: here or to bash-completion repo.
$0.02: I would like having this available. Should note that it requires modern Bash, not the old v3.2 on Mac (😞).
I don't know where better send such PRs: here or to bash-completion repo.
I think bash-completion would be a better parent for this, but IMHO I'm alsö happy to have it here until it goes there 😃