diff options
29 files changed, 1724 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..5b690514 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,15 @@ +bash-completion for Debian +-------------------------- + + Completions are kept in /usr/share/bash-completion/completions. + + If a package installs its completion files under /etc/bash_completion.d/, + bash-completion is still able to use them, but bash-completion itself does + not install any files under that directory. + + If you are a package maintainer, you are encouraged to use + dh_bash-completion(1), which will take care of installing third-party + completions into the appropriate directory. + + -- David Paleino <dapal@debian.org> Sun, 10 Apr 2011 15:33:19 +0200 + -- Gabriel F. T. Gomes <gabriel@inconstante.net.br> Mon, 12 Feb 2018 21:46:42 -0200 diff --git a/debian/bug-presubj b/debian/bug-presubj new file mode 100644 index 00000000..4af67786 --- /dev/null +++ b/debian/bug-presubj @@ -0,0 +1,8 @@ +Before reporting a bug in bash-completion, please check that you don't have +Acrobat's acroread.sh installed in /etc/bash_completion.d/. That completion, +in fact, redefines internal bash-completion functions, breaking it. + +For more information about this issue, please read: + + - http://forums.adobe.com/thread/745833 + - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616018 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..e6aa8950 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,755 @@ +bash-completion (1:2.9-2) UNRELEASED; urgency=medium + + -- Gabriel F. T. Gomes <gabriel@inconstante.net.br> Fri, 24 Jan 2020 19:13:40 -0300 + +bash-completion (1:2.9-1.1) unstable; urgency=high + + * Non-maintainer upload. + * No-chage source-only upload to allow testing migration. + (Closes: #949597) + + -- Boyuan Yang <byang@debian.org> Wed, 22 Jan 2020 11:42:20 -0500 + +bash-completion (1:2.9-1) unstable; urgency=medium + + * Update upstream sources (Closes: #921159, #933690, #933936). + + -- Gabriel F. T. Gomes <gabriel@inconstante.net.br> Mon, 12 Aug 2019 08:35:04 -0300 + +bash-completion (1:2.8-7) unstable; urgency=medium + + * Updated to Debian Policy 4.4.0. + * Update maintainer email address. + + -- Gabriel F. T. Gomes <gabriel@inconstante.net.br> Tue, 09 Jul 2019 23:43:09 -0300 + +bash-completion (1:2.8-6) unstable; urgency=medium + + [Gabriel F. T. Gomes <gabriel@inconstante.eti.br>] + * Fix bad array subscript error with slash. (Closes: #923167) + + [Daniel Lewart <lewart3@gmail.com>] + * Fix warning message for non-existent /etc/bash_completion.d. + (Closes: #923210) + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Fri, 01 Mar 2019 18:41:48 -0300 + +bash-completion (1:2.8-5) unstable; urgency=medium + + * Fix perl completions with a space between option and argument. + (Closes: #614775) + * Fix COMP_FILEDIR_FALLBACK to address comment #45 on bug #550676 + (https://bugs.debian.org/550676#45). (Closes: #550676) + * Remove obsolete conffiles from very old versions. (Closes: #645439) + * Remove patch to disable completion with avahi-browse for everyone. + Completion with avahi-browse is still disabled by default. To enable it, + set COMP_KNOWN_HOSTS_WITH_AVAHI to anything. (See #574950) + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Fri, 21 Dec 2018 22:34:39 -0200 + +bash-completion (1:2.8-4) unstable; urgency=medium + + * Allow `+' in (ssh/know_hosts) hostnames. (Closes: #848125) + * Add completions for OpenRC rc-service. (Closes: #865548) + * Add zstd completions for tar. (Closes: #913949) + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Sat, 17 Nov 2018 23:36:41 -0200 + +bash-completion (1:2.8-3) unstable; urgency=medium + + [G. Branden Robinson <g.branden.robinson@gmail.com>] + * Fix extremely annoying and long-standing breakage of completion + within POSIX command substitution $(). (Closes: #742466) + + [Gabriel F. T. Gomes <gabriel@inconstante.eti.br>] + * Revert `Extra fix for man completion' (from version 1:2.8-2). + * Fix wildcard completion. (Closes: #891667). + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Sat, 10 Nov 2018 18:00:06 -0200 + +bash-completion (1:2.8-2) unstable; urgency=low + + * Fix for held packages completion in dpkg (Closes: #907294) + * Extra fix for man completion (Closes: #892307) + * Fix for cvs log completion (Closes: #892080) + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Sun, 04 Nov 2018 18:01:45 -0200 + +bash-completion (1:2.8-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Use install-data-hook, not install-data-local (Closes: #910128) + + -- Emmanouil Kampitakis <info+debian@kampitakis.de> Sat, 27 Oct 2018 21:53:12 +0000 + +bash-completion (1:2.8-1) unstable; urgency=low + + * Update upstream sources. + * Complete package versions with apt-get install (Closes: #640217) + * Add support for extra dpkg-source options (Closes: #756887) + * Add support for extra openssl commands (Closes: #779814) + * Add support for extra aptitude commands (Closes: #867587) + * Fix regression when MANPATH is set with colons (Closes: #892307) + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Fri, 30 Mar 2018 20:07:32 -0300 + +bash-completion (1:2.7-1) unstable; urgency=medium + + * New maintainer (Closes: #876095). + * Update upstream sources (Closes: #847971). + - Complete python commands with pyz files (Closes: #888090). + - Fix acronym database path for wtf (Closes: #731567). + * debhelper compatibility bumped to 11. + * Standards-Version bump to 4.1.3: + - Copyright format URL updated to https (required since version 4.0.0). + + -- Gabriel F. T. Gomes <gabriel@inconstante.eti.br> Mon, 12 Feb 2018 20:36:42 -0200 + +bash-completion (1:2.1-4.3) unstable; urgency=medium + + * Non-maintainer upload. + * Stop shipping the mount/umount completions + - will be provided by mount package itself. (See: #820247) + + -- Andreas Henriksson <andreas@fatal.se> Tue, 12 Apr 2016 16:03:50 +0200 + +bash-completion (1:2.1-4.2) unstable; urgency=medium + + * Non-maintainer upload. + * fix location of bash-completion files + Closes: #668254 + + -- Andreas Tille <tille@debian.org> Tue, 18 Aug 2015 21:47:32 +0200 + +bash-completion (1:2.1-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Remove dmesg and renice completions which will instead be shipped + from src:util-linux in their respective packages (Closes: #755986) + + -- Andreas Henriksson <andreas@fatal.se> Wed, 06 May 2015 20:32:10 +0200 + +bash-completion (1:2.1-4) unstable; urgency=medium + + * Fix dont_return_from_sourced_script.patch: typo during the patch + backport (Closes: #742362) + + -- David Paleino <dapal@debian.org> Sat, 22 Mar 2014 21:57:39 +0100 + +bash-completion (1:2.1-3) unstable; urgency=medium + + * Import patch from Ubuntu: + - fix_quote_readline_by_ref.patch, thanks to JuanJo Ciarlante + (Closes: #739835): + + avoid escaping 1st '~' (LP: #1288314) + + avoid quoting if empty, else expansion without args only shows + dirs (LP: #1288031) + + replace double escaping to single (eg for completing file/paths + with spaces) + - words_bad_array_subscript.patch, thanks to Barry Warsaw + - dpkg_ddeb.patch: dpkg also supports *.ddeb, thanks to Sebastien + Bacher (LP: #568404, Closes: #737881) + - disable_avahi_browse.patch: slow, and doesn't scale to big + networks, thanks to Chris Jones (Closes: #574950, LP: #510591) + - xine_add_more_formats.patch: add oga and ogx to multimedia players + (Closes: #496162, LP: #311525) + * debian/maintscript, debian/postinst: + - clean etc conffiles on upgrade since completion files are in /usr + with 2.0, thanks to Sebastien Bacher + * debian/control: marked Multi-Arch: foreign + * debian/patches/: + - fix_gcc_detection.patch, correctly parses Debian's GCC version + number, thanks to Tomas Janousek (Closes: #665651) + - xpdf_support_compressed_pdf.patch, in Debian xpdf also supports + compressed files, thanks to Alfredo Finelli (Closes: #702498) + - dpkg_support_raw-extract_vextract.patch: add support for more + options in dpkg-deb, thanks to Uwe Storbeck (Closes: #698977) + - dpkg_fix_-W_option.patch: -W|--show doesn't support udebs/ddebs, + thanks to Luca Capello (Closes: #697513) + - aptitude_safe-upgrade.patch: safe-upgrade supports package names, + thanks to Nicolas Le Cam (Closes: #673235) + - ifconfig_locale.patch: _mac_addresses() didn't consider locale + awareness of ifconfig, thanks to Thilo Six (Closes: #704832) + - dont_return_from_sourced_script.patch: avoid problems with shells + not supporting returning from a sourced script (Closes: #741657) + - look_for_pod.patch: perldoc: look for .pod in addition to .pm + files, thanks to Carl Hayter (Closes: #708173) + * debian/extra/debhelper/dh_bash-completion: fix installation process + when more than one "proper snippet" is being installed, thanks to + Jean-Michel Vourgère (Closes: #680852) + * Dropped completions included in util-linux (Closes: #737672) + + -- David Paleino <dapal@debian.org> Wed, 19 Mar 2014 11:44:27 +0100 + +bash-completion (1:2.1-2) unstable; urgency=low + + * Don't install nmcli completion (Closes: #728742). + + -- David Paleino <dapal@debian.org> Tue, 05 Nov 2013 00:12:48 +0100 + +bash-completion (1:2.1-1) unstable; urgency=low + + * New upstream version: + - fusermount: Complete curlftpfs-mounts for "fusermount -u" + (Closes: #685377) + - colormake: New make alias completion (LP: #743208, Closes: #682557) + - ssh: Add -O argument completion (Closes: #680652) + - tar: Support *.tar.lz (Closes: #703599) + * Fixed typo in README.Debian (Closes: #689843) + * Use canonical Vcs-* urls. + * Standards-Version bump to 3.9.5, no changes needed. + * debhelper compatibility bumped to 9. + * Updated debian/copyright. + + -- David Paleino <dapal@debian.org> Mon, 04 Nov 2013 18:08:07 +0100 + +bash-completion (1:2.0-1) unstable; urgency=low + + [ David Paleino ] + * New upstream version + - Recognise symlinks to directories as directories (Closes: #666055) + - sudo -e should list filenames instead of commands (Closes: #446355) + - ri completion: defines function outside _* namespace (Closes: #669178) + - overrides lyx's bash-completion (Closes: #662203) + - complete 'apt-get changelog' (Closes: #659395) + - sudo su {user} -c "sss failing because of quotation (LP: #783136) + - scp and rsync error on local path completion (LP: #772571) + * Standards-Version bump to 3.9.3, no changes needed + * Updated debian/copyright + * Added Pre-Depends on dpkg because of dpkg-maintscript-helper + + [ Jonathan Nieder ] + * Replace /etc/bash_completion symlink with a shim script (Closes: #669180) + * Remove no longer needed symlink-issue patch + * Remove /etc/bash_completion symlink to make room for shim script + on upgrade from versions 1:1.99-2 and 1:1.99-3. + + -- David Paleino <dapal@debian.org> Sun, 17 Jun 2012 21:08:02 +0200 + +bash-completion (1:1.99-3) unstable; urgency=low + + * Fixed issue when loading completions from the /etc/bash_completion + symlink. + + -- David Paleino <dapal@debian.org> Wed, 11 Jan 2012 14:41:37 +0100 + +bash-completion (1:1.99-2) unstable; urgency=low + + * Make /etc/bash_completion a symlink to the new location, waiting + for bash to update its scripts (Closes: #648319) + * Dropped debian/NEWS + * Drop references to old triggers-mechanism (Closes: #655286) + + -- David Paleino <dapal@debian.org> Tue, 10 Jan 2012 07:26:30 +0100 + +bash-completion (1:1.99-1) unstable; urgency=low + + * Uploading to unstable + * New upstream pre-2.x snapshot + - correctly list purgeable packages for dpkg --listfiles and dpkg + --purge (Closes: #647684) + - fix bash_completion paths in README (Closes: #647941) + - _known_hosts_real: Handle more than two hostnames per known hosts + line (Closes: #647352) + - _known_hosts_real: Support > 1 files per *KnownHostsFile line + (Closes: #650514) + + -- David Paleino <dapal@debian.org> Sun, 08 Jan 2012 00:29:16 +0100 + +bash-completion (1:1.90-1) experimental; urgency=low + + * bash-completion 2 preview: dynamic loading of completions + - optionally fallback to generic file completion if _filedir + returns nothing (Closes: #619014, LP: #533985) + - various fixes (Closes: #622383) + - apt: add 'download' to subcommands (Closes: #625234, LP: #720541) + - aptitude: add 'versions' command (Closes: #604393) + - dpkg-query: use the 'dpkg' completion (Closes: #642526) + - lintian: remove --unpack-level (Closes: #623680) + - rrdtool: complete filenames after commands (Closes: #577933) + - provide profile.d hook for per user disabling of bash_completion + (Closes: #593835) + - mutt: support tildes when recursively sourcing muttrc files + (Closes: #615134) + - tar: improve tar *[cr]*f completions (Closes: #618734) + * More checks in update-bash-completion: avoid unnecessary + sourcing of completion if symlink already exists + * Add message for users before they report a bug (debian/bug-presubj), + I'm kind of fed-up with bugs caused by acroread.sh :/ + * Removed patches merged upstream + * Drop trigger-based completion loading + * Standards-Version bump to 3.9.2, no changes needed + + -- David Paleino <dapal@debian.org> Thu, 03 Nov 2011 13:03:51 +0100 + +bash-completion (1:1.3-3) experimental; urgency=low + + * Include install-completions from upstream + * Use new mechanism to symlink completions (Closes: #623880) + + -- David Paleino <dapal@debian.org> Mon, 25 Apr 2011 14:38:24 +0200 + +bash-completion (1:1.3-2) experimental; urgency=low + + * Change completion directory layout (00-change_completions_layout.patch) + * Use autoreconf in debian/rules + * Implement dpkg triggers and update-bash-completion script, and monthly + cronjob to clean up unused completions. + * Remove old UCF-related postinst tasks + * Remove old conffiles, using dpkg-maintscript-helper + * Added debian/NEWS, to explain the changes with this revision + * Use Breaks+Replaces xen-tools, because of conflicting files + * Added debian/README.Debian with instructions on the new layout, + and how to enable completions + + -- David Paleino <dapal@debian.org> Tue, 12 Apr 2011 12:15:12 +0200 + +bash-completion (1:1.3-1) unstable; urgency=low + + * New upstream release + - Fixed "service" completion, thanks to John Hedges (Closes: #586210) + - Fixed typo in openssl completion (Closes: #609552) + - Added ip completion (Closes: #600617) + - Added _tilde(), fix ~username completion (Closes: #587095) + - Add *.webm to mplayer file completions (Closes: #588079). + * debian/watch: fix to handle .tar.bz2 files + * Bump Standards-Version to 3.9.1, no changes needed + * Install upstream CHANGES file + * Update copyright years in debian/copyright + * debian/rules: reflect new source layout + + -- David Paleino <dapal@debian.org> Sun, 06 Feb 2011 22:00:58 +0100 + +bash-completion (1:1.2-3) unstable; urgency=low + + * Provide a saner upgrade path from older bash packages, which + shipped /etc/bash_completion (Closes: #564254) + + -- David Paleino <dapal@debian.org> Tue, 16 Nov 2010 09:06:24 +0100 + +bash-completion (1:1.2-2) unstable; urgency=low + + * debian/patches/: + - 00-fix_586210.patch added, fixes a weird error while loading + service(8) completions. Thanks to John Hedges (Closes: #586210) + * debian/control: + - added Replaces: cryptsetup (Closes: #586161) + + -- David Paleino <dapal@debian.org> Sun, 20 Jun 2010 09:57:35 +0200 + +bash-completion (1:1.2-1) unstable; urgency=low + + * New upstream release + - contrib/munin-node fixed (Closes: #550943) + - contrib/dpkg fixed -W and --show completing on .?(u)deb's + (Closes: #552109) + - added munindoc completion to contrib/munin-node, thanks to Tom + Feiner (Closes: #553371) + - contrib/cpio: added missing completions for -?, --help, --license, + --usage, --version and (-p) --to-stdout (Closes: #557436) + - added .okular completion to okular (Closes: #545530) + - refreshed reportbug completion, added --from-buildd (Closes: #579471) + - special-case "apt-get source" (Closes: #572000) + - added lintian completion (Closes: #547361) + - protect various completions from unusual user input by not embedding the + input in external command arguments (Closes: #552631) + - awk and sed usage portability fixes (Closes: #501479) + - fix completion of usernames (Closes: #511788) + - fix mount handling of escapes (LP: #219971, Closes: #511149) + - update find completion (LP: #570113) + * debian/patches/* removed, merged upstream + * debian/control: + - add Conflicts/Replaces on xen-tools (<= 4.1-1) (Closes: #550590) + - Standards-Version bumped to 3.8.4, no changes needed + * debian/links: remove dangling symlink in /usr/share/doc/bash + (Closes: #565447) + * debian/watch: fix regex to avoid old timestamp-based releases + * debian/preinst: definitely remove anything in /usr/share/doc/bash/ + * debian/source/format: using 3.0 (quilt) + * debin/rules made minimal + + -- David Paleino <dapal@debian.org> Wed, 16 Jun 2010 19:03:06 +0200 + +bash-completion (1:1.1-3) unstable; urgency=low + + * debian/patches/03-fix_552631.patch fixed (Closes: #556251) + + -- David Paleino <dapal@debian.org> Sat, 14 Nov 2009 23:42:55 +0100 + +bash-completion (1:1.1-2) unstable; urgency=low + + * debian/control, debian/rules: added quilt infrastructure + * debian/README.source added + * debian/patches/: + - 01-fix_550943.patch added, fixes function names (Closes: #550943) + - 02-fix_552109.patch added, fixes -W and --show completion for + dpkg-deb (Closes: #552109) + - 03-fix_552631.patch added (Closes: #552631) + * debian/control: + - updated my email address + - DMUA removed + + -- David Paleino <dapal@debian.org> Sat, 14 Nov 2009 18:10:49 +0100 + +bash-completion (1:1.1-1) unstable; urgency=low + + * New upstream release + - fix svk completion using $filenames instead of $default + (Closes: #524961) + - fix typo in .ass subtitles completion for mplayer + (Closes: #531337) + - fix regression on man(1) completion: also complete on local .3pm + files (Closes: #531343) + - added avahi-discovered hosts to _known_hosts_real() + (Closes: #518561) + - added m4v completion to mplayer (Closes: #504213) + - improve qemu completion (Closes: #534901) + - added sshfs completion (shares the same as scp) (Closes: #545978) + - added --no-generate to "apt-cache pkgnames" calls, make it faster + on certain configurations (Closes: #547550) + - add *.ogv to xine-based players (Closes: #540033) + - fix sbcl file/dirname completion (Closes: #545743) + - fix _quote_readline on bash 4 (Closes: #544024) + - patched _known_hosts() to support multiple + {Global,User}KnownHosts in SSH config files, thanks to Thomas + Nilsson (Closes: #524190) + - fix completing multiple hosts (Closes: #535585) + * debian/extra/bash-completion.pm moved to bash_completion.pm + (Closes: #535105) + * debian/patches/ removed, merged upstream + * debian/rules: + - passing debian/CHANGES to dh_installchangelogs, it's missing from + upstream tarball :( + - rewritten using dh7 + * debian/control: + - debhelper Build-Dependency bumped to >= 7.0.50 + - removed quilt Build-Dependency, no more used + - added ${misc:Depends} dependency + - Standards-Version bumped to 3.8.3, no changes needed + * debian/compat bumped to 7 + * debian/docs added + * debian/install updated, using upstream buildsystem + + -- David Paleino <d.paleino@gmail.com> Sat, 10 Oct 2009 18:11:00 +0200 + +bash-completion (1:1.0-3) unstable; urgency=low + + * debian/extra/bash-completion.pm added, thanks to Ryan Niebur + (Closes: #530598) + * debian/rules: added quilt support + * debian/control: added quilt Build-Depends + * debian/patches/: + - 01-529510.patch added, checks for GNUish userland fail on + GNU/kFreeBSD, GNU/kOpenSolaris, etc (Closes: #529510) + - 02-514377.patch added, assumes .gz files can't be concatenated + (Closes: #514377) + - 03-522656.patch added, evince supports compressed dvi files + (Closes: #522656) + - 04-495883.patch added, aptitude: add build-dep to bash_completion + (Closes: #495883) + + -- David Paleino <d.paleino@gmail.com> Sat, 30 May 2009 19:36:14 +0200 + +bash-completion (1:1.0-2) unstable; urgency=low + + * Remove mtx completion from bash_completion.d/ (Closes: #522545) + + -- David Paleino <d.paleino@gmail.com> Sat, 04 Apr 2009 21:16:38 +0200 + +bash-completion (1:1.0-1) unstable; urgency=low + + * New upstream release: + - also see /usr/share/doc/bash-completion/changelog.gz + - fix man -l completing filenames (Closes: #497074) + - (Partly) fixed java classes completion (Closes: #496828). Look for + FIXME in source. + - dump to /dev/null error message from look(1) with no arguments + (Closes: #495142) + - set ssh as default for rsync (was rsh) (Closes: #492328) + - added .oga, .ogv, .ogx to mplayer completion (Closes: #496162) + - added .epub to unzip|zipinfo completion (Closes: #492476) + - added ssh-copy-id completion (Closes: #491856) + - moved ssh completion to separate file (Closes: #360628) + - bogus completion when mounting subdirs fixed (Closes: #322238) + - fix `apt-cache showsrc` completing only on source package names + (Closes: #361535) + - fixed bugs with gdb completion: + - when an empty directory is in $PATH (thanks to Morita Sho) + (Closes: #497597) + - when a non-existing directory is in $PATH (Closes: #499780) + - fix missing completion for "-n" and "-e" (we were using echo, now + using printf) (thanks to Morita Sho) (Closes: #498105) + - fixed gpg completion --@(export|@(?(l|nr|nrl)sign|edit)-key)) + (Closes: #500316) + - fixed .cb[rz] completion for evince (Closes: #502885) + - added gpg2 completion (Closes: #489927) + - fixed mplayer -skin completion (Closes: #501473) + - fixed errors with POSIX enabled (Closes: #502804) + - fixed dpkg-source wrong exit() with return() (Closes: #503317) + - added --schedule-only to aptitude's completion (Closes: #502664) + - added build-dep to aptitude's completion (Closes: #495883) + - added support for `-F configfile' to _known_hosts(), ssh, scp and + sftp, thanks to Freddy Vulto (Closes: #504141) + - fixed sed quoting bug in _known_hosts(), thanks to Freddy Vulto + (Closes: #504650) + - allow for comments in known_hosts files (Closes: #511789) + - fixed perl -I/-x completion, thanks to Freddy Vulto + (Closes: #504547) + - README updated: explain how to use bash-completion correctly. + (Closes: #506560) + - added qdbus completion, thanks to Terence Simpson (LP: #257903) + - fixed completion of environment variables, thanks to Morita Sho + (Closes: #272660) + - fix dpkg completion bug: it listed only non-Essential packages + (Closes: #511790) + - fixed _dpkg_source completion (Closes: #503317) + - remove unused UNAME local variable in _info() (Closes: #501843) + - added .zip to jar completions (Closes: #521041) + - Merge from Ubuntu: + + consume error messages in configure completion (LP: #223882) + (Mika Fischer) + + quote $xspec in _filedir_xspec in case it is empty, which would + cause errors if there was no match under failglob. (LP: #194419) + (Mika Fischer) + - Ville Skyttä: + + remove duplicate cpio completion, thanks to Freddy Vulto + (Closes: #512823) + + fix awk error in "modprobe -r /" completion (Closes: #512556) + - Jakob Unterwurzacher: + + ps2pdf can run on .pdf files as well. + (Closes: #516614, LP: #316943) + * debian/links fixed (Closes: #494292) + * debian/control: + - fixed typo in the long description + - added Vcs-* fields + - Standards-Version to 3.8.1 + - DMUA set + - removed Luk Claes from Uploaders + - Homepage added + * debian/install: + - correctly install contrib/* under /etc/bash_completion.d/ + * debian/copyright updated + * debian/extra/dh_bash-completion: + - updated to support a list of files in debian/<package>.bash-completion + (Closes: #512917) + * debian/rules: + - install upstream CHANGES and AUTHORS too + + -- David Paleino <d.paleino@gmail.com> Fri, 03 Apr 2009 14:21:43 +0200 + +bash-completion (20080705) unstable; urgency=low + + [ David Paleino ] + * Added more completions to imagemagick (thanks to Nelson A. de + Oliveira) (Closes: #487786) + * Added xrandr completion (thanks to Anton Khirnov) (Closes: #487825) + * Improving _gdb completion: + - $filenames to $default (Closes: #463969) + - also show directory names (i.e. compgen -d) in COMPREPLY. + - added . to $PATH, to allow debugging "local" executables. + - do not complete Bash's builtins (thanks to Morita Sho) + + [ Luk Claes ] + * Remove use of ucf for /etc/bash-completion (Closes: #488171). + + -- Luk Claes <luk@debian.org> Sat, 05 Jul 2008 16:14:15 +0200 + +bash-completion (20080617.5) unstable; urgency=medium + + * Revert way of setting environment variables (Closes: #487774). + * Add equals sign to _get_cword for mutt_aliases (Closes: #482635). + * Enhance mlayer completion (Closes: #487826, #487838). + + -- Luk Claes <luk@debian.org> Tue, 24 Jun 2008 19:50:57 +0200 + +bash-completion (20080617.4) experimental; urgency=low + + [ David Paleino ] + * Merged Ubuntu changes: + - added quote(), quote_readline(), dequote() helper functions. + - added _remove_word() + - fixed _get_cword() + - refactored _filedir using quote_readline() + - refactored _filedir_xspec using quote_readline() + - fixed COMPREPLY's in _iwconfig + - fixed _cvs() + - _known_hosts(): use files from UserKnownHostsFile options in + addition to standard ones. + - fixed _command() to correctly prune the command line + - disabled completion of PostgreSQL users and databases + - fixed _java_packages() + - fixed _muttquery() + - added flv/FLV completion to mplayer + - added --installed to apt-cache + - only complete on filenames for aspell + - fixed code for exclusions compspecs + - added code to gracefully handle debug options (set +/-v) + + -- Luk Claes <luk@debian.org> Mon, 23 Jun 2008 19:25:25 +0200 + +bash-completion (20080617.3) unstable; urgency=low + + [ David Paleino ] + * Fixed IFS for filedir_xspec - Thanks to Stefan Lippers-Hollmann + (Closes: #487571) + + [ Luk Claes ] + * Install dh-bash-completion to ease installation of completions. + + -- Luk Claes <luk@debian.org> Mon, 23 Jun 2008 07:24:21 +0200 + +bash-completion (20080617.2) unstable; urgency=low + + [ David Paleino ] + * New upstream release + - provide a manpage for extra/dh_bash-completion + - fix semi-serious problem with _filedir() (Closes: #487449) + * debian/rules: + - added rule to generate dh_bash-completion's manpage + * debian/install, debian/dirs: + - installing dh_bash-completion into /usr/bin + * debian/control: + - new package dh-bash-completion + + [ Luk Claes ] + * Comment new package to make sure current fix gets in the archive first. + * Add compression completion for vi(m). + + -- Luk Claes <luk@debian.org> Sun, 22 Jun 2008 19:47:23 +0200 + +bash-completion (20080617.1) unstable; urgency=medium + + [ David Paleino ] + * Urgency set to medium because the package is currently unusable. + * New upstream sub-release + - fixed some typos here and there which prevented bash completions + at all (Closes: #487441). + - really closing Debian bug #455510. + + -- Luk Claes <luk@debian.org> Sun, 22 Jun 2008 00:22:53 +0200 + +bash-completion (20080617) unstable; urgency=low + + [ David Paleino ] + * New upstream release + - add more completions to aptitude (Closes: #432289) + - fixed UTF-8 problem with _get_cword(), thanks to + Andrei Paskevich (Closes: #472132) + - fixed autoremove completion, thanks to Flavio Visentin + (Closes: #474974) + - cmf and CMF added to playmidi completion (Closes: #365658) + - added rrdtool completion, thanks to Justin Pryzby (Closes: #428641) + - added OpenDocument completion for unzip/zipinfo (.od{f,g,p,s,t}) + (Closes: #472940) + - fixed escaping problems with job control (i.e. disown, jobs, bg, + fg): the argument is now surrounded by "" (Closes: #347316) + - make mkdir complete also on filenames (Closes: #376433) + - {bz,z}{cat,cmp,diff,egrep,fgrep,grep,less,more} now should complete + on all filenames, not just compressed archives (just commented out) + (Closes: #455510) + - fixes Perl completion (Closes: #470742) + - fixes get_cword -> _get_cword typo (Closes: #478596) + - fixes _get_cword() function to properly handle filenames with + whitespaces (Closes: #394636, #468254, #474094) + - added .pdf.bz2 completion to evince (Closes: #424736) + - added .svg completion to display (Closes: #441017) + - added .m2ts completion to mplayer (Closes: #480879) + - added extra/dh_bash-completion to ease future rewrite of bc. + * debian/copyright - now in a fancier machine-parsable format. + * debian/control: + - added myself to Uploaders + - debhelper Build-Depends updated to >= 6. + * debian/watch: + - improved current watch line regex + - added (commented out) probable future watch line + * debian/compat bumped to 6 + * debian/dirs, debian/install and debian/links added + * debian/rules: + - refactored to make use of debian/{dirs,install,links} + + [ Steve Kemp ] + * Applied patch to fix completion of umount command. + (Closes: #470539) + * Fixed the completion of Perl manpages. + (Closes: #404976) + * Added 'aif' to the filenames offed for completion for mplayer. + (Closes: #474517) + * Allow tsocks completion. + (Closes: #409423) + * Update mutt completion to handle local usernames. + (Closes: #416655) + * Update apt-get completion to include the flag "--no-install-recommends" + (Closes: #475242) + + -- Luk Claes <luk@debian.org> Sat, 21 Jun 2008 21:59:43 +0200 + +bash-completion (20060301-4) unstable; urgency=low + + * Add some fixes from Ubuntu: + * Fix completion of filenames with spaces (Closes: #468254). + * Fix parsing of SSH config files (Closes: #435117). + * Change priority to standard (Closes: #471666). + * Add some more completions for xine (Closes: #452083, #471249). + * Fix completion of gzip (Closes: #351913). + * Also use $HOSTFILE in hostname completion (Closes: #400380). + + -- Luk Claes <luk@debian.org> Sat, 22 Mar 2008 23:10:30 +0000 + +bash-completion (20060301-3) unstable; urgency=low + + * Fix kpdf completion (Closes: #468163, #413374). + * Fix completion of - or -- with _command (Closes: #415276). + * Add sux to the complete -u list (Closes: #466089). + * Add dvipdfm to the list of dvi programs (Closes: #396644). + * Add --purge-unused option completion for aptitude (Closes: #438471). + * Add divx extension completion for mplayer (Closes: #444294). + * Add pdf.gz completion for evince (Closes: #456887). + * Add --remove-all completion for update-alternatives (Closes: #269173). + + -- Luk Claes <luk@debian.org> Wed, 05 Mar 2008 22:57:27 +0100 + +bash-completion (20060301-2) unstable; urgency=low + + * Take over the package. + + -- Luk Claes <luk@debian.org> Wed, 27 Feb 2008 19:22:03 +0100 + +bash-completion (20060301-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose <doko@debian.org> Sat, 09 Feb 2008 23:18:20 +0100 + +bash-completion (20060301-0ubuntu2) hardy; urgency=low + + * Replace bash (<< 3.1dfsg-9), handle upgrade in preinst. + * Exclude hashed hostnames from ssh host completion results. Closes: #428085. + * Fix: ifup/down don't really complete. Closes: #463756. + * Allow perl completion to complete filenames, complete -I and -x arguments. + Closes: #443394. + * Add find -wholename completion. Closes: #431220. + * Handle whitespaces in $HOME for _known_hosts() completion. Closes: #414821. + * dpkg -L: complete for removed-but-not-purged packages. Closes: #372156. + * Complete for apt-get autoremove. Closes: #433542, #443816, #445332. + * Update completion for mplayer (mka/flac). Closes: #340452. + * Add ping6/fping6 completion. Closes: #413170. + * Handle whitespace in paths for mount/umount completion. Closes: #367957. + * apt-get: Support --auto-remove. LP: #60666. + + -- Matthias Klose <doko@ubuntu.com> Sat, 09 Feb 2008 23:11:32 +0100 + +bash-completion (20060301-0ubuntu1) hardy; urgency=low + + * Initial release, split out from the bash package. + The software currently is unsupported upstream. + * Don't try to set a readonly variable. LP: #149527. + * Support purge in apt-get auto completion (Mathias Gug). LP: #151677. + * evince: Autocomplete on cbr/cbz/djvu files. LP: #156200, #175220. + Closes: #400678. + * kdvi: complete .*\.dvi\.(gz|bz2). LP: #128234. + * kpdf: Complete postscript files. LP: #162319. + * Make completion working in the middle of a word (Adam Simpkins). + LP: #139666. + + -- Matthias Klose <doko@ubuntu.com> Fri, 08 Feb 2008 16:46:34 +0100 + diff --git a/debian/clean b/debian/clean new file mode 100644 index 00000000..f41aae72 --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +debian/extra/debhelper/dh_bash-completion.1 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..b4de3947 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..f216c8e3 --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: bash-completion +Section: shells +Priority: standard +Maintainer: Gabriel F. T. Gomes <gabriel@inconstante.net.br> +Build-Depends: debhelper (>= 11~) +Build-Depends-Indep: perl +Standards-Version: 4.4.0 +Vcs-Git: https://salsa.debian.org/debian/bash-completion.git +Vcs-Browser: https://salsa.debian.org/debian/bash-completion +Homepage: https://github.com/scop/bash-completion +Rules-Requires-Root: no + +Package: bash-completion +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends} +Description: programmable completion for the bash shell + bash completion extends bash's standard completion behavior to achieve + complex command lines with just a few keystrokes. This project was + conceived to produce programmable completion routines for the most + common Linux/UNIX commands, reducing the amount of typing sysadmins + and programmers need to do on a daily basis. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..0d36155c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,32 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: © 2006-2008, Ian Macdonald <ian@caliban.org> + © 2008-2018, Bash Completion Maintainers +License: GPL-2+ + +Files: debian/* +Copyright: © 2008, Luk Claes <luk@debian.org> + © 2008, Matthias Klose <doko@ubuntu.com> + © 2008-2013, David Paleino <d.paleino@gmail.com> + © 2017-2019, Gabriel F. T. Gomes <gabriel@inconstante.net.br> +License: GPL-2+ + +License: GPL-2+ + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..5faa2f27 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.md +AUTHORS diff --git a/debian/extra/bash_completion b/debian/extra/bash_completion new file mode 100644 index 00000000..41ffe595 --- /dev/null +++ b/debian/extra/bash_completion @@ -0,0 +1 @@ +. /usr/share/bash-completion/bash_completion diff --git a/debian/extra/debhelper/bash_completion.pm b/debian/extra/debhelper/bash_completion.pm new file mode 100644 index 00000000..23c74ff9 --- /dev/null +++ b/debian/extra/debhelper/bash_completion.pm @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; + +insert_after("dh_installman", "dh_bash-completion"); + +1; diff --git a/debian/extra/debhelper/dh_bash-completion b/debian/extra/debhelper/dh_bash-completion new file mode 100755 index 00000000..f96704b0 --- /dev/null +++ b/debian/extra/debhelper/dh_bash-completion @@ -0,0 +1,111 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_bash-completion - install bash completions for package + +=cut + +use strict; +use File::Find; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B<dh_bash-completion> [S<I<debhelper options>>] + +=head1 DESCRIPTION + +dh_bash-completion is a debhelper program that is responsible for installing +completions for bash, usable installing the "bash-completion" package. + +If a file named debian/package.bash-completion exists, then different actions +are performed, depending on its format. + +It can be a proper completion snippet, and in that case it would be installed +in the completion directory, and no other actions would be performed. + +It can also be a list of files, with an optionally specified name to call the +completion snippet after. The file format is as follows: + + my/path/to/foo-completion # this would be installed as "foo-completion" + my/path/to/bar-completion baz # this would be installed as "baz" + +=cut + +init(); + +my $srcdir = '.'; +$srcdir = $dh{SOURCEDIR}."/" if defined $dh{SOURCEDIR}; + +# PROMISE: DH NOOP WITHOUT bash-completion cli-options() + +PKG: foreach my $package (@{$dh{DOPACKAGES}}) { + next if is_udeb($package); + + my $tmp = tmpdir($package); + my $bc_dir = "$tmp/usr/share/bash-completion/completions"; + my $completions = pkgfile($package,"bash-completion"); + + my @install; + my $name; + + if ($completions) { + install_dir($bc_dir); + + # try parsing a list of files + @install = filedoublearray($completions); + foreach my $set (@install) { + my @filelist; + my @tmp = @$set; + if (@$set > 1) { + $name = pop @$set; + } + else { + $name = basename($tmp[0]); + } + verbose_print "installing $tmp[0] as $name"; + + my @found; + foreach my $glob (@$set) { + @found = glob "$srcdir/$glob"; + if (!compat(6)) { + # Fall back to looking into debian/tmp + if (!@found || !-e $found[0]) { + @found = glob "debian/tmp/$glob"; + } + } + + if (!@found || !-e $found[0]) { + warning "file-list parsing failed, installing as proper snippet"; + + install_file($completions, "$bc_dir/$package"); + next PKG + } + push @filelist, @found; + } + + if (!@filelist) { + error("$package missing files (@$set), aborting"); + } + + foreach my $src (@filelist) { + install_file($src, "$bc_dir/$name"); + } + } + } +} + +=head1 SEE ALSO + +L<debhelper(1)> + +This program is a part of bash-completion. + +L<bash(1)> + +=head1 AUTHOR + +David Paleino <d.paleino@gmail.com> + +=cut diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000..e26b1d6e --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +pristine-tar = True +upstream-tag = upstream/%(version)s + +[buildpackage] +ignore-branch = True diff --git a/debian/install b/debian/install new file mode 100644 index 00000000..fa9f4273 --- /dev/null +++ b/debian/install @@ -0,0 +1,3 @@ +debian/extra/bash_completion /etc/ +debian/extra/debhelper/dh_bash-completion /usr/bin/ +debian/extra/debhelper/bash_completion.pm /usr/share/perl5/Debian/Debhelper/Sequence/ diff --git a/debian/links b/debian/links new file mode 100644 index 00000000..cc24a75d --- /dev/null +++ b/debian/links @@ -0,0 +1 @@ +usr/share/doc/bash-completion/README.md.gz usr/share/doc/bash/README.md.bash_completion.gz diff --git a/debian/maintscript b/debian/maintscript new file mode 100644 index 00000000..b5d64628 --- /dev/null +++ b/debian/maintscript @@ -0,0 +1,190 @@ +rm_conffile /etc/bash_completion.d/harbour 1:2.8-5~ +rm_conffile /etc/bash_completion.d/lilypond 1:2.8-5~ +rm_conffile /etc/bash_completion.d/_subversion 1:2.8-5~ +rm_conffile /etc/bash_completion.d/bluez-utils 1:2.8-5~ +rm_conffile /etc/bash_completion.d/dcop 1:2.8-5~ +rm_conffile /etc/bash_completion.d/mock 1:2.8-5~ +rm_conffile /etc/bash_completion.d/modules 1:2.8-5~ +rm_conffile /etc/bash_completion.d/repomanage 1:2.8-5~ +rm_conffile /etc/apt/apt.conf.d/99-bash-completion 1:2.8-5~ +rm_conffile /etc/cron.monthly/bash-completion.cron 1:2.8-5~ +rm_conffile /etc/cron.monthly/bash-completion 1:2.8-5~ +rm_conffile /etc/bash_completion.d/helpers/perl 1:2.0-1 +rm_conffile /etc/bash_completion.d/abook 1:2.0-1 +rm_conffile /etc/bash_completion.d/ant 1:2.0-1 +rm_conffile /etc/bash_completion.d/apache2ctl 1:2.0-1 +rm_conffile /etc/bash_completion.d/apt 1:2.0-1 +rm_conffile /etc/bash_completion.d/apt-build 1:2.0-1 +rm_conffile /etc/bash_completion.d/aptitude 1:2.0-1 +rm_conffile /etc/bash_completion.d/aspell 1:2.0-1 +rm_conffile /etc/bash_completion.d/autoconf 1:2.0-1 +rm_conffile /etc/bash_completion.d/automake 1:2.0-1 +rm_conffile /etc/bash_completion.d/autorpm 1:2.0-1 +rm_conffile /etc/bash_completion.d/bash-builtins 1:2.0-1 +rm_conffile /etc/bash_completion.d/bind-utils 1:2.0-1 +rm_conffile /etc/bash_completion.d/bitkeeper 1:2.0-1 +rm_conffile /etc/bash_completion.d/bittorrent 1:2.0-1 +rm_conffile /etc/bash_completion.d/bluez 1:2.0-1 +rm_conffile /etc/bash_completion.d/brctl 1:2.0-1 +rm_conffile /etc/bash_completion.d/bzip2 1:2.0-1 +rm_conffile /etc/bash_completion.d/cardctl 1:2.0-1 +rm_conffile /etc/bash_completion.d/cfengine 1:2.0-1 +rm_conffile /etc/bash_completion.d/chkconfig 1:2.0-1 +rm_conffile /etc/bash_completion.d/chsh 1:2.0-1 +rm_conffile /etc/bash_completion.d/cksfv 1:2.0-1 +rm_conffile /etc/bash_completion.d/clisp 1:2.0-1 +rm_conffile /etc/bash_completion.d/configure 1:2.0-1 +rm_conffile /etc/bash_completion.d/coreutils 1:2.0-1 +rm_conffile /etc/bash_completion.d/cowsay 1:2.0-1 +rm_conffile /etc/bash_completion.d/cpan2dist 1:2.0-1 +rm_conffile /etc/bash_completion.d/cpio 1:2.0-1 +rm_conffile /etc/bash_completion.d/crontab 1:2.0-1 +rm_conffile /etc/bash_completion.d/cups 1:2.0-1 +rm_conffile /etc/bash_completion.d/cryptsetup 1:2.0-1 +rm_conffile /etc/bash_completion.d/cvs 1:2.0-1 +rm_conffile /etc/bash_completion.d/cvsps 1:2.0-1 +rm_conffile /etc/bash_completion.d/dd 1:2.0-1 +rm_conffile /etc/bash_completion.d/dhclient 1:2.0-1 +rm_conffile /etc/bash_completion.d/dict 1:2.0-1 +rm_conffile /etc/bash_completion.d/dpkg 1:2.0-1 +rm_conffile /etc/bash_completion.d/dselect 1:2.0-1 +rm_conffile /etc/bash_completion.d/dsniff 1:2.0-1 +rm_conffile /etc/bash_completion.d/dvd+rw-tools 1:2.0-1 +rm_conffile /etc/bash_completion.d/e2fsprogs 1:2.0-1 +rm_conffile /etc/bash_completion.d/findutils 1:2.0-1 +rm_conffile /etc/bash_completion.d/freeciv 1:2.0-1 +rm_conffile /etc/bash_completion.d/freerdp 1:2.0-1 +rm_conffile /etc/bash_completion.d/fuse 1:2.0-1 +rm_conffile /etc/bash_completion.d/gcc 1:2.0-1 +rm_conffile /etc/bash_completion.d/gcl 1:2.0-1 +rm_conffile /etc/bash_completion.d/gdb 1:2.0-1 +rm_conffile /etc/bash_completion.d/genisoimage 1:2.0-1 +rm_conffile /etc/bash_completion.d/getent 1:2.0-1 +rm_conffile /etc/bash_completion.d/gkrellm 1:2.0-1 +rm_conffile /etc/bash_completion.d/gnatmake 1:2.0-1 +rm_conffile /etc/bash_completion.d/gpg 1:2.0-1 +rm_conffile /etc/bash_completion.d/gpg2 1:2.0-1 +rm_conffile /etc/bash_completion.d/gzip 1:2.0-1 +rm_conffile /etc/bash_completion.d/heimdal 1:2.0-1 +rm_conffile /etc/bash_completion.d/hping2 1:2.0-1 +rm_conffile /etc/bash_completion.d/iconv 1:2.0-1 +rm_conffile /etc/bash_completion.d/iftop 1:2.0-1 +rm_conffile /etc/bash_completion.d/ifupdown 1:2.0-1 +rm_conffile /etc/bash_completion.d/imagemagick 1:2.0-1 +rm_conffile /etc/bash_completion.d/info 1:2.0-1 +rm_conffile /etc/bash_completion.d/iptables 1:2.0-1 +rm_conffile /etc/bash_completion.d/ipmitool 1:2.0-1 +rm_conffile /etc/bash_completion.d/iproute2 1:2.0-1 +rm_conffile /etc/bash_completion.d/ipsec 1:2.0-1 +rm_conffile /etc/bash_completion.d/ipv6calc 1:2.0-1 +rm_conffile /etc/bash_completion.d/isql 1:2.0-1 +rm_conffile /etc/bash_completion.d/jar 1:2.0-1 +rm_conffile /etc/bash_completion.d/java 1:2.0-1 +rm_conffile /etc/bash_completion.d/k3b 1:2.0-1 +rm_conffile /etc/bash_completion.d/kldload 1:2.0-1 +rm_conffile /etc/bash_completion.d/larch 1:2.0-1 +rm_conffile /etc/bash_completion.d/ldapvi 1:2.0-1 +rm_conffile /etc/bash_completion.d/lftp 1:2.0-1 +rm_conffile /etc/bash_completion.d/lilo 1:2.0-1 +rm_conffile /etc/bash_completion.d/links 1:2.0-1 +rm_conffile /etc/bash_completion.d/lintian 1:2.0-1 +rm_conffile /etc/bash_completion.d/lisp 1:2.0-1 +rm_conffile /etc/bash_completion.d/lrzip 1:2.0-1 +rm_conffile /etc/bash_completion.d/lsof 1:2.0-1 +rm_conffile /etc/bash_completion.d/lvm 1:2.0-1 +rm_conffile /etc/bash_completion.d/lzma 1:2.0-1 +rm_conffile /etc/bash_completion.d/lzop 1:2.0-1 +rm_conffile /etc/bash_completion.d/mailman 1:2.0-1 +rm_conffile /etc/bash_completion.d/make 1:2.0-1 +rm_conffile /etc/bash_completion.d/man 1:2.0-1 +rm_conffile /etc/bash_completion.d/mc 1:2.0-1 +rm_conffile /etc/bash_completion.d/mcrypt 1:2.0-1 +rm_conffile /etc/bash_completion.d/mdadm 1:2.0-1 +rm_conffile /etc/bash_completion.d/medusa 1:2.0-1 +rm_conffile /etc/bash_completion.d/minicom 1:2.0-1 +rm_conffile /etc/bash_completion.d/mkinitrd 1:2.0-1 +rm_conffile /etc/bash_completion.d/module-init-tools 1:2.0-1 +rm_conffile /etc/bash_completion.d/monodevelop 1:2.0-1 +rm_conffile /etc/bash_completion.d/mount 1:2.0-1 +rm_conffile /etc/bash_completion.d/mplayer 1:2.0-1 +rm_conffile /etc/bash_completion.d/msynctool 1:2.0-1 +rm_conffile /etc/bash_completion.d/munin-node 1:2.0-1 +rm_conffile /etc/bash_completion.d/mutt 1:2.0-1 +rm_conffile /etc/bash_completion.d/mysqladmin 1:2.0-1 +rm_conffile /etc/bash_completion.d/ncftp 1:2.0-1 +rm_conffile /etc/bash_completion.d/net-tools 1:2.0-1 +rm_conffile /etc/bash_completion.d/nmap 1:2.0-1 +rm_conffile /etc/bash_completion.d/ntpdate 1:2.0-1 +rm_conffile /etc/bash_completion.d/openldap 1:2.0-1 +rm_conffile /etc/bash_completion.d/openssl 1:2.0-1 +rm_conffile /etc/bash_completion.d/open-iscsi 1:2.0-1 +rm_conffile /etc/bash_completion.d/p4 1:2.0-1 +rm_conffile /etc/bash_completion.d/perl 1:2.0-1 +rm_conffile /etc/bash_completion.d/pine 1:2.0-1 +rm_conffile /etc/bash_completion.d/pkg-config 1:2.0-1 +rm_conffile /etc/bash_completion.d/pkg_install 1:2.0-1 +rm_conffile /etc/bash_completion.d/pkgtools 1:2.0-1 +rm_conffile /etc/bash_completion.d/pm-utils 1:2.0-1 +rm_conffile /etc/bash_completion.d/portupgrade 1:2.0-1 +rm_conffile /etc/bash_completion.d/postfix 1:2.0-1 +rm_conffile /etc/bash_completion.d/postgresql 1:2.0-1 +rm_conffile /etc/bash_completion.d/povray 1:2.0-1 +rm_conffile /etc/bash_completion.d/procps 1:2.0-1 +rm_conffile /etc/bash_completion.d/python 1:2.0-1 +rm_conffile /etc/bash_completion.d/qdbus 1:2.0-1 +rm_conffile /etc/bash_completion.d/qemu 1:2.0-1 +rm_conffile /etc/bash_completion.d/quota-tools 1:2.0-1 +rm_conffile /etc/bash_completion.d/rcs 1:2.0-1 +rm_conffile /etc/bash_completion.d/rdesktop 1:2.0-1 +rm_conffile /etc/bash_completion.d/reportbug 1:2.0-1 +rm_conffile /etc/bash_completion.d/resolvconf 1:2.0-1 +rm_conffile /etc/bash_completion.d/rfkill 1:2.0-1 +rm_conffile /etc/bash_completion.d/ri 1:2.0-1 +rm_conffile /etc/bash_completion.d/rpcdebug 1:2.0-1 +rm_conffile /etc/bash_completion.d/rpm 1:2.0-1 +rm_conffile /etc/bash_completion.d/rpmcheck 1:2.0-1 +rm_conffile /etc/bash_completion.d/rrdtool 1:2.0-1 +rm_conffile /etc/bash_completion.d/rsync 1:2.0-1 +rm_conffile /etc/bash_completion.d/rtcwake 1:2.0-1 +rm_conffile /etc/bash_completion.d/samba 1:2.0-1 +rm_conffile /etc/bash_completion.d/sbcl 1:2.0-1 +rm_conffile /etc/bash_completion.d/screen 1:2.0-1 +rm_conffile /etc/bash_completion.d/service 1:2.0-1 +rm_conffile /etc/bash_completion.d/sh 1:2.0-1 +rm_conffile /etc/bash_completion.d/shadow 1:2.0-1 +rm_conffile /etc/bash_completion.d/sitecopy 1:2.0-1 +rm_conffile /etc/bash_completion.d/smartctl 1:2.0-1 +rm_conffile /etc/bash_completion.d/snownews 1:2.0-1 +rm_conffile /etc/bash_completion.d/sqlite3 1:2.0-1 +rm_conffile /etc/bash_completion.d/ssh 1:2.0-1 +rm_conffile /etc/bash_completion.d/sshfs 1:2.0-1 +rm_conffile /etc/bash_completion.d/strace 1:2.0-1 +rm_conffile /etc/bash_completion.d/svk 1:2.0-1 +rm_conffile /etc/bash_completion.d/sysbench 1:2.0-1 +rm_conffile /etc/bash_completion.d/sysctl 1:2.0-1 +rm_conffile /etc/bash_completion.d/sysv-rc 1:2.0-1 +rm_conffile /etc/bash_completion.d/tar 1:2.0-1 +rm_conffile /etc/bash_completion.d/tcpdump 1:2.0-1 +rm_conffile /etc/bash_completion.d/unace 1:2.0-1 +rm_conffile /etc/bash_completion.d/unrar 1:2.0-1 +rm_conffile /etc/bash_completion.d/update-alternatives 1:2.0-1 +rm_conffile /etc/bash_completion.d/util-linux 1:2.0-1 +rm_conffile /etc/bash_completion.d/vncviewer 1:2.0-1 +rm_conffile /etc/bash_completion.d/vpnc 1:2.0-1 +rm_conffile /etc/bash_completion.d/wireless-tools 1:2.0-1 +rm_conffile /etc/bash_completion.d/wodim 1:2.0-1 +rm_conffile /etc/bash_completion.d/wol 1:2.0-1 +rm_conffile /etc/bash_completion.d/wtf 1:2.0-1 +rm_conffile /etc/bash_completion.d/wvdial 1:2.0-1 +rm_conffile /etc/bash_completion.d/xhost 1:2.0-1 +rm_conffile /etc/bash_completion.d/xm 1:2.0-1 +rm_conffile /etc/bash_completion.d/xmllint 1:2.0-1 +rm_conffile /etc/bash_completion.d/xmlwf 1:2.0-1 +rm_conffile /etc/bash_completion.d/xmms 1:2.0-1 +rm_conffile /etc/bash_completion.d/xmodmap 1:2.0-1 +rm_conffile /etc/bash_completion.d/xrandr 1:2.0-1 +rm_conffile /etc/bash_completion.d/xrdb 1:2.0-1 +rm_conffile /etc/bash_completion.d/xsltproc 1:2.0-1 +rm_conffile /etc/bash_completion.d/xz 1:2.0-1 +rm_conffile /etc/bash_completion.d/yp-tools 1:2.0-1 +rm_conffile /etc/bash_completion.d/yum-arch 1:2.0-1 diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 00000000..f41aae72 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +debian/extra/debhelper/dh_bash-completion.1 diff --git a/debian/patches/00-fix_quote_readline_by_ref.patch b/debian/patches/00-fix_quote_readline_by_ref.patch new file mode 100644 index 00000000..b1eeb112 --- /dev/null +++ b/debian/patches/00-fix_quote_readline_by_ref.patch @@ -0,0 +1,44 @@ +From: JuanJo Ciarlante <jjo@canonical.com> +Subject: fix _quote_readline_by_ref to: + - avoid escaping 1st '~' (lp: #1288314) + - avoid quoting if empty, else expansion without args only shows dirs + (lp: #1288031) + - replace double escaping to single (eg for completing file/paths with + spaces) +Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739835 +Bug-Debian: https://bugs.debian.org/739835 +Forwarded: yes, <5328F418.100@canonical.com> + +From: G. Branden Robinson <g.branden.robinson@gmail.com> +Subject: Revert "double escaping" hunk of patch. + - That portion fixed no cited bug. + - It broke extremely common command-substitution cases, e.g. + "grep pattern $(<TAB>)", producing: + bash: unexpected EOF while looking for matching `)' + bash: syntax error: unexpected end of file +Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742466 +Bug-Debian: https://bugs.debian.org/742466 + +--- + bash_completion | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- a/bash_completion ++++ b/bash_completion +@@ -526,9 +526,15 @@ + # @param $2 Name of variable to return result to + _quote_readline_by_ref() + { +- if [[ $1 == \'* ]]; then ++ if [ -z "$1" ]; then ++ # avoid quoting if empty ++ printf -v $2 %s "$1" ++ elif [[ $1 == \'* ]]; then + # Leave out first character + printf -v $2 %s "${1:1}" ++ elif [[ $1 == ~* ]]; then ++ # avoid escaping first ~ ++ printf -v $2 ~%q "${1:1}" + else + printf -v $2 %q "$1" + fi diff --git a/debian/patches/04-xine_add_more_formats.patch b/debian/patches/04-xine_add_more_formats.patch new file mode 100644 index 00000000..b19acd5f --- /dev/null +++ b/debian/patches/04-xine_add_more_formats.patch @@ -0,0 +1,30 @@ +From: j^ (j) <https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/311525/comments/2> +Subject: Add oga and ogx formats +Origin: vendor +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/311525 +Bug-Debian: https://bugs.debian.org/496162 + +--- + bash_completion | 8 ++++---- + completions/mplayer | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +--- bash-completion.orig/bash_completion ++++ bash-completion/bash_completion +@@ -1967,13 +1967,13 @@ _install_xspec '!*.@(?(e)ps|pdf)' ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr + _install_xspec '!*.texi*' makeinfo texi2html + _install_xspec '!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi xetex xelatex luatex lualatex + _install_xspec '!*.mp3' mpg123 mpg321 madplay +-_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmv]|OG[AGMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' xine aaxine fbxine +-_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmv]|OG[AGMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' kaffeine dragon ++_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmvx]|OG[AGMVX]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' xine aaxine fbxine ++_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmvx]|OG[AGMVX]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' kaffeine dragon + _install_xspec '!*.@(avi|asf|wmv)' aviplay + _install_xspec '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay + _install_xspec '!*.@(mpg|mpeg|avi|mov|qt)' xanim + _install_xspec '!*.@(og[ag]|m3u|flac|spx)' ogg123 +-_install_xspec '!*.@(mp3|ogg|pls|m3u)' gqmpeg freeamp ++_install_xspec '!*.@(mp3|og[ag]|pls|m3u)' gqmpeg freeamp + _install_xspec '!*.fig' xfig + _install_xspec '!*.@(mid?(i)|cmf)' playmidi + _install_xspec '!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)' timidity diff --git a/debian/patches/06-xpdf_support_compressed_pdf.patch b/debian/patches/06-xpdf_support_compressed_pdf.patch new file mode 100644 index 00000000..de050f4c --- /dev/null +++ b/debian/patches/06-xpdf_support_compressed_pdf.patch @@ -0,0 +1,21 @@ +From: Alfredo Finelli <0x4146@gmail.com> +Subject: xpdf in Debian also supports compressed PDFs +Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702498 +Bug-Debian: https://bugs.debian.org/702498 + +--- + bash_completion | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- bash-completion.orig/bash_completion ++++ bash-completion/bash_completion +@@ -1958,7 +1958,8 @@ _install_xspec '!*.@(gif|jp?(e)g?(2)|j2[ck]|jp[2f]|tif?(f)|png|p[bgp]m|bmp|x[bp] + _install_xspec '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv kghostview + _install_xspec '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi kdvi + _install_xspec '!*.dvi' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx +-_install_xspec '!*.[pf]df' acroread gpdf xpdf ++_install_xspec '!*.[pf]df' acroread gpdf ++_install_xspec '!*.@(pdf|fdf)?(.@(gz|GZ|bz2|BZ2|Z))' xpdf + _install_xspec '!*.@(?(e)ps|pdf)' kpdf + _install_xspec '!*.@(okular|@(?(e|x)ps|?(E|X)PS|[pf]df|[PF]DF|dvi|DVI|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM)?(.?(gz|GZ|bz2|BZ2|xz|XZ)))' okular + _install_xspec '!*.pdf' epdfview pdfunite diff --git a/debian/patches/07-dpkg_support_raw-extract_vextract.patch b/debian/patches/07-dpkg_support_raw-extract_vextract.patch new file mode 100644 index 00000000..692b1f7f --- /dev/null +++ b/debian/patches/07-dpkg_support_raw-extract_vextract.patch @@ -0,0 +1,59 @@ +From: Uwe Storbeck <uwe@ibr.ch> +Subject: support more options for dpkg-deb +Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698977 +Bug-Debian: https://bugs.debian.org/698977 +Forwarded: no + +--- + completions/dpkg | 44 +++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 41 insertions(+), 3 deletions(-) + +--- bash-completion.orig/completions/dpkg ++++ bash-completion/completions/dpkg +@@ -81,7 +81,45 @@ _dpkg() + COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + } && +-complete -F _dpkg dpkg dpkg-deb dpkg-query ++complete -F _dpkg dpkg dpkg-query ++ ++# Debian dpkg-deb(1) completion ++# ++_dpkg_deb() ++{ ++ local cur prev words cword split ++ _init_completion -s || return ++ ++ _expand || return 0 ++ ++ local i=$cword ++ ++ # find the last option flag ++ if [[ $cur != -* ]]; then ++ while [[ $prev != -* && $i -ne 1 ]]; do ++ i=$((i-1)) ++ prev=${words[i-1]} ++ done ++ fi ++ ++ case $prev in ++ -c|-I|-W|-f|-e|-x|-X|-R|--contents|--info|--show|--field|--control| \ ++ --extract|--vextract|--raw-extract|--fsys-tarfile) ++ _filedir '?(u|d)deb' ++ return 0 ++ ;; ++ -b|--build) ++ _filedir -d ++ return 0 ++ ;; ++ esac ++ ++ $split && return ++ ++ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) ++ [[ $COMPREPLY == *= ]] && compopt -o nospace ++} && ++complete -F _dpkg_deb dpkg-deb + + # Debian GNU dpkg-reconfigure(8) completion + # diff --git a/debian/patches/11-add-completions-for-openrc-rc-service.patch b/debian/patches/11-add-completions-for-openrc-rc-service.patch new file mode 100644 index 00000000..94525406 --- /dev/null +++ b/debian/patches/11-add-completions-for-openrc-rc-service.patch @@ -0,0 +1,144 @@ +From: Gabriel F. T. Gomes <gabriel@inconstante.eti.br> +Subject: Add completions for OpenRC rc-service +Origin: vendor, https://bugs.debian.org/865548 +Bug-Debian: https://bugs.debian.org/865548 +Forwarded: yes, https://github.com/scop/bash-completion/pull/254 + +This patch adds completions for the rc-service command from OpenRC, as +suggested and provided by Mathieu Roy via a Debian bug [1], fixed and +extended for more options by myself. + +When ran on a chroot with a freshly bootstrapped Debian system, the +following completions produce the following output. + +For the options: + + # rc-service [TAB][TAB] + -c -h --ifstopped -q savecache + -C --help kmod --quiet udev + cron -i -l -r -v + -d -I --list rc -V + -D --ifcrashed -N rcS --verbose + --debug --ifexists networking --resolve --version + --dry-run --ifinactive --nocolor rsyslog -Z + -e --ifnotstarted --nodeps -s + --exists --ifstarted procps -S + # rc-service [CURSOR] + + # rc-service -h[TAB] + # rc-service -h [CURSOR] + + # rc-service --v[TAB] + # rc-service --ver[CURSOR] + + # rc-service --ver[TAB][TAB] + --verbose --version + # rc-service --ver[CURSOR] + + # rc-service --verbose --l[TAB] + # rc-service --verbose --list [CURSOR] + +For the services: + + # rc-service --list[ENTER] + cron + hwclock.sh + kmod + networking + procps + rc + rcS + rsyslog + savecache + udev + + # rc-service r[TAB][TAB] + rc rcS rsyslog + # rc-service r[CURSOR] + + # rc-service --dry-run cr[TAB] + # rc-service --dry-run cron [CURSOR] + + # rc-service --dry-run cron [TAB][TAB] + force-reload reload restart start status stop + # rc-service --dry-run cron [CURSOR] + + # rc-service --dry-run cron re[TAB][TAB] + reload restart + # rc-service --dry-run cron re[CURSOR] + + # rc-service --dry-run cron res[TAB] + # rc-service --dry-run cron restart [CURSOR] + +Adding `set show-all-if-ambiguous on' to .inputrc yields the same +results, but without the need for the additional [TAB] as displayed +above. + +[1] https://bugs.debian.org/865548 +--- + completions/rc-service | 56 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 56 insertions(+) + create mode 100644 completions/rc-service + +diff --git a/completions/rc-service b/completions/rc-service +new file mode 100644 +index 00000000..f90c86ae +--- /dev/null ++++ b/completions/rc-service +@@ -0,0 +1,56 @@ ++# rc-service(8) completion -*- shell-script -*- ++# ++# Adapted from update-rc.d ++# ++# Copyright (C) 2004 Servilio Afre Puentes <servilio@gmail.com> ++# 2018 Mathieu Roy <yeupou@gnu.org> ++# 2018 Gabriel F. T. Gomes <gabriel@inconstante.eti.br> ++ ++_rc_service() ++{ ++ local cur prev words cword ++ _init_completion || return ++ ++ local sysvdir services options valid_options ++ ++ sysvdir=/etc/init.d ++ ++ services=( $( printf '%s ' $sysvdir/!(README*|*.sh|$_backup_glob) ) ) ++ services=( ${services[@]#$sysvdir/} ) ++ options=( -d --debug \ ++ -D --nodeps \ ++ -e --exists \ ++ -c --ifcrashed \ ++ -i --ifexists \ ++ -I --ifinactive \ ++ -N --ifnotstarted \ ++ -s --ifstarted \ ++ -S --ifstopped \ ++ -l --list \ ++ -r --resolve \ ++ -Z --dry-run \ ++ -h --help \ ++ -C --nocolor \ ++ -V --version \ ++ -v --verbose \ ++ -q --quiet \ ++ ) ++ ++ ++ if [[ ($cword -eq 1) || ("$prev" == -* ) ]]; then ++ COMPREPLY=( $( compgen -W '${options[@]} ${services[@]}' \ ++ -- "$cur" ) ) ++ elif [[ -x $sysvdir/$prev ]]; then ++ COMPREPLY=( $( compgen -W '`sed -e "y/|/ /" \ ++ -ne "s/^.*Usage:[ ]*[^ ]*[ ]*{*\([^}\"]*\).*$/\1/p" \ ++ $sysvdir/$prev`' \ ++ -- "$cur" ) ) ++ else ++ COMPREPLY=() ++ fi ++ ++ return 0 ++} && ++complete -F _rc_service rc-service ++ ++# ex: filetype=sh diff --git a/debian/patches/13-fix-perl-completions-with-a-space-between-option-and.patch b/debian/patches/13-fix-perl-completions-with-a-space-between-option-and.patch new file mode 100644 index 00000000..836fdf01 --- /dev/null +++ b/debian/patches/13-fix-perl-completions-with-a-space-between-option-and.patch @@ -0,0 +1,124 @@ +From: Jeff King <peff@peff.net> +Subject: Fix perl completions with a space between option and argument +Origin: vendor, https://bugs.debian.org/614775 +Bug-Debian: https://bugs.debian.org/614775 +Forwarded: yes, https://github.com/scop/bash-completion/pull/258 + +Most perl options do not allow a space between the switch and the +argument, however, bash-completion incorrectly suggests completions for +`-d', `-M` (or `-m'), and `-V', as reported in Debian bug #614775 [1], +as well as for `-x', which was not mentioned in the bug report. This +patch fixes the incorrect completions for these options, by falling back +to regular _filedir completion when a space is present. + +On the other hand, and unlike all other perl options, a space between +the `-e', `-E', and `-I' options and their arguments, e.g. `perl -e +"exit 2"', *is* valid syntax. However, the argument for `-e' and `-E' +is neither a filename nor a directory, but one line of perl program. +So, in order to keep the old behavior, which was correct, this patch +adds extra code that skips _filedir completion for `-e' and `-E' with a +space. + +Finally, the test case for `-x' requires changes, because it expects +that `-x' with a space should complete only with directories. That is +misleading, because it might suggest that the directory would be treated +as the argument to the `-x' option, when it will not, as can be verified +with the following test: + + $ cat test.pl + Some regular text with an embedded script + #!perl + use Cwd; + my $dir = getcwd; + print "$dir\n"; + __END__ + More text messages, not code. + +By executing the script with the `-x[dir]' option, the non-code part of +the file will be ignored, i.e. only the embedded script will be +executed. It will also be executed under [dir], if it is provided: + + $ perl -xperl/ test.pl + /tmp/perl + +However, if a space is present between `-x' and [dir], the script fails, +because the perl interpreter thinks that [dir] is a script, not the +argument to `-x': + + $ perl -x perl/ test.pl + Can't open perl script "perl/": Is a directory + +The rationale for the changes is based on `perl --help', which explains +that there are no spaces between options and arguments (see note below +for `-I'): + + $ perl --help | grep "\-d\|\-V\|-I\|-x\|-\[mM\]" + -d[:debugger] run program under debugger + -Idirectory specify @INC/#include directory (several -I's allowed) + -[mM][-]module execute "use/no module..." before executing program + -V[:variable] print configuration summary (or a single Config.pm variable) + -x[directory] ignore text before #!perl line (optionally cd to directory) + +When a space is required, `perl --help' makes it explicit: + + $ perl --help | grep "\-e\|-E" + -e program one line of program (several -e's allowed, omit programfile) + -E program like -e, but enables all optional features + +As an exception to this rule, `-I' does accept a space. ¬¬ + +[1] https://bugs.debian.org/614775 + +--- +diff --git a/completions/perl b/completions/perl +index 98ddb9eb..325c58d9 100644 +--- a/completions/perl ++++ b/completions/perl +@@ -27,7 +27,6 @@ _perl() + optPrefix=-P$prev + optSuffix=-S/ + prefix=$prev +- fi + + case $prev in + -*[DeEiFl]) +@@ -68,7 +67,23 @@ _perl() + ;; + esac + +- if [[ "$cur" == -* ]]; then ++ # Unlike other perl options, having a space between the `-e' and ++ # `-E' options and their arguments, e.g. `perl -e "exit 2"', is ++ # valid syntax. However, the argument is neither a filename nor a ++ # directory, but one line of perl program, thus do not suggest ++ # _filedir completion. ++ elif [[ "$prev" == -e ]] || [[ "$prev" == -E ]]; then ++ return ++ ++ # Likewise, `-I' also accepts a space between option and argument ++ # and it takes a directory as value. ++ elif [[ "$prev" == -I ]]; then ++ local IFS=$'\n' ++ compopt -o filenames ++ COMPREPLY=( $(compgen -d $optPrefix $optSuffix -- "$cur") ) ++ return ++ ++ elif [[ "$cur" == -* ]]; then + COMPREPLY=( $(compgen -W '-C -s -T -u -U -W -X -h -v -V -c -w -d -D -p + -n -a -F -l -0 -I -m -M -P -S -x -i -e' -- "$cur") ) + else +diff --git a/test/t/test_perl.py b/test/t/test_perl.py +index 7c0c6094..21ac10f4 100644 +--- a/test/t/test_perl.py ++++ b/test/t/test_perl.py +@@ -67,8 +67,8 @@ class TestPerl: + + @pytest.mark.complete("perl -x shared/default/b") + def test_15(self, completion): +- """-x with space should complete dirs.""" +- assert completion == ["shared/default/bar bar.d/"] ++ """-x with space should complete files+dirs.""" ++ assert completion == ["bar", "bar bar.d/"] + + @pytest.mark.complete("perl -d:", env=dict(PERL5LIB="$PWD/perl")) + def test_16(self, completion): diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..64120c80 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,6 @@ +00-fix_quote_readline_by_ref.patch +04-xine_add_more_formats.patch +06-xpdf_support_compressed_pdf.patch +07-dpkg_support_raw-extract_vextract.patch +11-add-completions-for-openrc-rc-service.patch +13-fix-perl-completions-with-a-space-between-option-and.patch diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 00000000..08638932 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e + +case "$1" in + configure) + if [ -d /etc/bash_completion.d ]; then + # let's remove old bash-completion conffiles + for f in $(find /etc/bash_completion.d/ -type f -name "*.dpkg-*"); do + dpkg-maintscript-helper rm_conffile ${f%.dpkg-*} 1:1.3-1 -- "$@" + done + fi + + if dpkg --compare-versions "$2" le "1:2.1-3"; then + if [ -d /etc/bash_completion.d/helpers ]; then + rmdir --ignore-fail-on-non-empty /etc/bash_completion.d/helpers 2>/dev/null + fi + # disabled from Ubuntu, third party packages might have installed things here + #if [ -d /etc/bash_completion.d ]; then + # rmdir --ignore-fail-on-non-empty /etc/bash_completion.d 2>/dev/null + #fi + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 00000000..d69ec6a9 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +case "$1" in + purge) + rm -f /etc/bash_completion + if [ -d /etc/bash_completion.d ]; then + # let's remove old bash-completion conffiles + for f in $(find /etc/bash_completion.d/ -type f -name "*.dpkg-*"); do + dpkg-maintscript-helper rm_conffile ${f%.dpkg-*} 1:1.3-1 -- "$@" + done + fi + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/preinst b/debian/preinst new file mode 100644 index 00000000..3f248659 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,36 @@ +#!/bin/sh + +set -e + +case "$1" in + install|upgrade) + if [ -e /usr/share/doc/bash/completion-contrib ]; then + rm -rf /usr/share/doc/bash/completion-contrib + fi + # let's remove old bash-completion conffiles + for f in $(dpkg-query -W -f='${Conffiles}\n' bash-completion | grep bash_completion.d | cut -d\ -f2); do + dpkg-maintscript-helper rm_conffile $f 1:1.3-1 -- "$@" + done + if dpkg --compare-versions "$2" lt-nl 1:2.0-1 && + dpkg --compare-versions "$2" ge 1:1.99-2 && + [ -L /etc/bash_completion ] && + [ "$(readlink /etc/bash_completion)" = \ + /usr/share/bash-completion/bash_completion ]; then + rm -f /etc/bash_completion + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..8f7fb550 --- /dev/null +++ b/debian/rules @@ -0,0 +1,40 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpkg/pkg-info.mk + +REMOVE=adb bts nmcli hwclock ionice mock modules mount rtcwake dmesg renice umount + +override_dh_auto_configure: + dh_auto_configure + + # needed by the testsuite + [ -d test/log ] || mkdir -p test/log + [ -d test/tmp ] || mkdir -p test/tmp + +override_dh_compress: + dh_compress -Xcompletions + +override_dh_installchangelogs: + dh_installchangelogs CHANGES + +dh_bash-completion.1: debian/extra/debhelper/dh_bash-completion + pod2man \ + --center "Bash-Completion Debhelper" \ + --release $(DEB_VERSION_UPSTREAM) \ + $< > debian/extra/debhelper/$@ + +override_dh_install: dh_bash-completion.1 + dh_install + for i in $(REMOVE); do \ + rm -vf debian/bash-completion/usr/share/bash-completion/completions/$$i; \ + done + +override_dh_auto_test: + # nothing + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..2f2a795d --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/bash-completion-$1\.tar\.gz/ \ + https://github.com/scop/bash-completion/tags .*/v?(\d\S+)\.tar\.gz |