Control: tags -1 + patch Hi Guillem,
Here is the patch series you asked for back in July; sorry for the long delay. It is two patches on top of current main (7492eb3d9). Patch 1 fixes a bug I ran into while enumerating the options. The --help output has documented -ap's long form as --sign-pause since the long options were added in 1.18.8 (293bd243a), but the parser was written as --sign-pausa, so the documented spelling has never been accepted, and the accepted one has never been documented, neither in --help nor in the man page. I did not keep the misspelling as a deprecated alias: it was never part of the documented interface, and -ap has always worked, so there is nothing to deprecate; --sign-pausa now gets the usual unknown option error, which names the option. The patch also adds the man page entry, which has been missing all along, annotated as "Support for long option since dpkg 1.23.12", as that is when the long option starts to actually work; please adjust if this lands in a different release. A test asserts that the documented spelling is accepted. Patch 2 is the completion itself, following the dpkg-source file on main and the bash-completion 2.12 API, together with the packaging bits, in the shape of 9d6fa2c83. It completes option names and, where there is something sensible to offer, option values: build types, rules targets, architectures, build profiles, OpenPGP backends, compression parameters, command arguments for --root-command, --sign-command, --check-command and --hook-*, pathname arguments, and the positional .dsc file or source directory. The --buildinfo-id, -E and -W options are deliberately not completed, as they are accepted but have no effect. One packaging note: debian/dpkg-dev.install lists the files individually, and with debhelper compat 13 dh_missing --fail-missing is the default, so without that line dpkg's own package build fails. I tested the completion with an offline harness that drives the function directly (26 cases, covering option names and values) against bash-completion 2.16; make check passes in a configured tree; and a full "dpkg-buildpackage -b" of dpkg itself succeeds, with dh_missing quiet and lintian reporting nothing on dpkg-dev. Two unrelated things I noticed, both happy to turn into patches if you want them: - scripts/.gitignore uses unanchored script names, so the new completion file matches the "dpkg-buildpackage" entry and needs git add -f; the imported dpkg-source completion has the same property. Anchoring the entries with a leading "/" would avoid it. - Test::Dpkg::all_shell_files does not pick up scripts/completion/bash/, so t/shellcheck.t has never covered the completion files, dpkg-source included. I ran shellcheck by hand with the exclude list from t/shellcheck.t, which is how I noticed SC1010 on the "done" hook name; patch 2 quotes it. I can also push the series as a branch to my Salsa fork if that is easier to look at, and I am happy to rework anything. Best regards, Cheng Li Cheng Li (2): dpkg-buildpackage: Fix --sign-pause long option name completion: Add bash completion for dpkg-buildpackage debian/copyright | 1 + debian/dpkg-dev.install | 1 + man/dpkg-buildpackage.pod | 7 + scripts/Makefile.am | 1 + scripts/completion/bash/dpkg-buildpackage | 170 ++++++++++++++++++++++ scripts/dpkg-buildpackage.pl | 2 +- scripts/t/dpkg_buildpackage.t | 17 ++- 7 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 scripts/completion/bash/dpkg-buildpackage -- 2.47.3

