-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add completion script for dgit #615
base: main
Are you sure you want to change the base?
Conversation
This script autocompletes the most common subcommands, but only provides arguments autocompletion for only two of them, import-dsc and rpush, for practical reasons. For dgit options, it provides two-level completion for the most popular options, excluding rarely used or dangerous ("use when you know what you’re doing") options. The two-levels work in a way to not overwhelm the user with options when they Tab twice, so only some but not all arguments to e.g. --quilt= are shown: $ dgit -- --baredebian --force-import-gitapply-no-absurd --baredebian+git --force-reusing-version --baredebian+tarball --force-unrepresentable --build-products-dir= --force-unsupported-source-format --clean --force-uploading-binaries --clean=dpkg-source --force-uploading-source-only --clean=git --gbp --clean=git-ff --include-dirty --damp-run --new --delayed= --no-rm-on-error --deliberately-fresh-repo --no-sign --deliberately-include-questionable-history --overwrite --deliberately-not-fast-forward --package --dep14tag --quilt --distro= --quilt=auto --dpm --quilt=linear --dry-run --rm-old-changes --force-changes-origs-exactly --save-dgit-view= --force-dsc-changes-mismatch --split-view= --force-import-dsc-with-dgit-field --upstream-commitish= --force-import-gitapply-absurd However, when the user types --quilt=, the rest of them are shown: $ dgit --quilt= auto baredebian+git dpm linear nofix unapplied baredebian baredebian+tarball gbp nocheck smash For --upstream-commitish= the script autocompletes some tags, starting with tags with the matching version, and the rest sorted by version: $ dgit --upstream-commitish=upstream/1. upstream/1.11.0 upstream/1.6.0 For options accepting both = and space (--quilt, --clean, --package) the completion is performed for both versions; the list of all options above shows the "spaced" (--clean) version and a couple of commonly used versions with = and an argument. For options only accepting =, the option ends with = to allow the user to start typing the argument directly after that. Signed-off-by: Andrej Shadura <[email protected]>
5ed9c1f
to
71a7bad
Compare
This PR provides a completion script for
The author of the PR @andrewshadura has already submitted the same completion script to Debian Bug Tracker System / I feel we should again try to contact the maintainer of
Note that there seem to be several other tools of the name
|
Thanks for the update. If you add information after others have made comments, you can mention it in new replies instead of silently editing the original post so that the others don't miss the new information.
So the contribution is still under review, i.e., the maintainer recognizes the contribution yet hasn't rejected it? We should ask the maintainer about the current status of the review before proceeding. We need to respect the efforts of the maintainer if any. I can guess why the review is delayed. Since the maintainer of [ Edit: I think maybe you can create a merge request (MR) at dgit / dgit · GitLab since it is more explicit on how the change should be applied. In creating the MR, please don't forget to mention the original threads, #928704 and #972904 ]. Also, I feel we need help from the developer of |
This script autocompletes the most common subcommands, but only provides arguments autocompletion for only two of them,
import-dsc
andrpush
, for practical reasons.For dgit options, it provides two-level completion for the most popular options, excluding rarely used or dangerous ("use when you know what you’re doing") options. The two-levels work in a way to not overwhelm the user with options when they Tab twice, so only some but not all arguments to e.g.
--quilt=
are shown:However, when the user types
--quilt=
, the rest of them are shown:For
--upstream-commitish=
the script autocompletes some tags, starting with tags with the matching version, and the rest sorted by version:For options accepting both
=
and space (--quilt
,--clean
,--package
) the completion is performed for both versions; the list of all options above shows the "spaced" (--clean
) version and a couple of commonly used versions with=
and an argument. For options only accepting=
, the option ends with=
to allow the user to start typing the argument directly after that.The script was originally submitted upstream in December 2019, but they haven’t had time to integrate it yet.