Attention is currently required from: Felix Singer, Thomas Heijligen.
Alexander Goncharov has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68247 )
Change subject: util: add bash completion script ......................................................................
Patch Set 10:
(7 comments)
Patchset:
PS10: As part of rebasing, I replaced --image (this option is deprecated) with --include
File Makefile:
https://review.coreboot.org/c/flashrom/+/68247/comment/ce44ac9b_5eb3e208 PS9, Line 589: ACTIVE_PROGRAMMERS += internal
It took a little until I understood this programmer list is needed for the substitution. […]
Yes, it should be mentioned, thank you. Done.
https://review.coreboot.org/c/flashrom/+/68247/comment/c604bafa_2b814ac7 PS9, Line 1032: $(PROGRAM).8 $(PROGRAM).8.html $(PROGRAM).bash $(BUILD_DETAILS_FILE)
One tab too much
What do you mean? I just added `$(PROGRAM).bash`
https://review.coreboot.org/c/flashrom/+/68247/comment/2ed7f8fe_81105ed9 PS9, Line 1041: .bash
That's just the file in the source directory. […]
From [Bash Completion FAQ](https://github.com/scop/bash-completion/blob/master/README.md#faq):
``` The completion filename for command `foo` in this directory should be either `foo`, or `foo.bash`. ```
So, we only have two naming options available. I cannot use a name without the suffix due to a name conflict (As Felix mentioned above, the flashrom binary has the same name). Unfortunately, a custom prefix isn't supported, so we have no choice.
Felix, your idea is what I wanted to do initially. But there's a problem with meson, please have a look at another Thomas comment #646.
File meson.build:
https://review.coreboot.org/c/flashrom/+/68247/comment/e4d7faf8_5c6d71e0 PS9, Line 624: if get_option('classic_cli').disabled()
When `get_option('bash_completion').auto()` and `get_option('classic_cli'). […]
Thanks for catching it!
https://review.coreboot.org/c/flashrom/+/68247/comment/697a8222_540120ac PS9, Line 646: .bash
same here
No way. If the output file is `flashrom`, the bash-completion file will be overwritten by the executable.
`install` command (in the makefile) lets me choose DESTINATION, and meson only copies the file in one place - `install_dir`/`output`.
File util/flashrom.bash-completion.tmpl:
https://review.coreboot.org/c/flashrom/+/68247/comment/37b51484_679828be PS9, Line 43: OPTS="--help
Missing \ at the end of each line.
It makes no difference for this task. Also, those `` at the end of lines look ugly :(