[some help required] Add bash completions #542
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've sketched some bash completions. Nothing extra fancy just command-line options and some a couple of options with predefined values.
To test you may
export BASH_COMPLETION_USER_DIR=/path/to/po4a/share/bash-completion/
and then play withpo4a -<TAB><TAB>
etc.Note that the completions are using
<script> --help
, and since po4a has to process PODs to print it, the completions are lagging a bit (~200ms, not absolutely infuriating, but still noticeable and slightly annoying).But I need some help with installation scripting, I have very little idea how to do it with perl. The files in
share/bash-completion/completions
are supposed to be installed to directory pointed bypkg-config --variable=completionsdir bash-completion
. Usually it's/usr/share/bash-completion/completions
.PS: Also the commit contains several symlinks. I'm not sure if it's ok to store those in the sources. If not, those should be also created during build.
Closes: #417