summaryrefslogtreecommitdiff
path: root/debian/bash_completion
diff options
context:
space:
mode:
Diffstat (limited to 'debian/bash_completion')
-rw-r--r--debian/bash_completion/BUGS20
-rw-r--r--debian/bash_completion/COPYING340
-rw-r--r--debian/bash_completion/Changelog5142
-rw-r--r--debian/bash_completion/README448
-rw-r--r--debian/bash_completion/TODO55
-rw-r--r--debian/bash_completion/bash_completion9299
-rw-r--r--debian/bash_completion/bash_completion.sh18
-rw-r--r--debian/bash_completion/contrib/bitkeeper21
-rw-r--r--debian/bash_completion/contrib/bittorrent37
-rw-r--r--debian/bash_completion/contrib/cksfv29
-rw-r--r--debian/bash_completion/contrib/clisp25
-rw-r--r--debian/bash_completion/contrib/dsniff271
-rw-r--r--debian/bash_completion/contrib/freeciv63
-rw-r--r--debian/bash_completion/contrib/gcl24
-rw-r--r--debian/bash_completion/contrib/gkrellm36
-rw-r--r--debian/bash_completion/contrib/gnatmake31
-rw-r--r--debian/bash_completion/contrib/harbour8
-rw-r--r--debian/bash_completion/contrib/hg134
-rw-r--r--debian/bash_completion/contrib/isql12
-rw-r--r--debian/bash_completion/contrib/larch38
-rw-r--r--debian/bash_completion/contrib/lilypond5
-rw-r--r--debian/bash_completion/contrib/lisp25
-rw-r--r--debian/bash_completion/contrib/mailman532
-rw-r--r--debian/bash_completion/contrib/mcrypt79
-rw-r--r--debian/bash_completion/contrib/modules87
-rw-r--r--debian/bash_completion/contrib/mtx45
-rw-r--r--debian/bash_completion/contrib/p454
-rw-r--r--debian/bash_completion/contrib/povray58
-rw-r--r--debian/bash_completion/contrib/ri88
-rw-r--r--debian/bash_completion/contrib/sbcl24
-rw-r--r--debian/bash_completion/contrib/sitecopy30
-rw-r--r--debian/bash_completion/contrib/snownews18
-rw-r--r--debian/bash_completion/contrib/svk262
-rw-r--r--debian/bash_completion/contrib/unace28
-rw-r--r--debian/bash_completion/contrib/unrar30
35 files changed, 17416 insertions, 0 deletions
diff --git a/debian/bash_completion/BUGS b/debian/bash_completion/BUGS
new file mode 100644
index 0000000..4694eac
--- /dev/null
+++ b/debian/bash_completion/BUGS
@@ -0,0 +1,20 @@
+$Id: BUGS,v 1.3 2003/05/01 05:49:58 ianmacd Exp $
+
+The following are known bugs with the bash completion code. See also the
+KNOWN PROBLEMS section of the README file.
+
+- sudo completion goes awry when a command line contains wildcards
+
+ The problem arises because sudo needs to hand off completion duties to
+ the function bound to the command that it is told to execute. As part of
+ this process, any arguments on the command line are expanded.
+
+ Suppose you have the following command line:
+
+ $ sudo mv *.txt foo/
+
+ This command line contains four tokens, of which '*.txt' is the third.
+ However, after expansion of the wildcard, there may be any number of
+ arguments in the command-line that is ultimately handed to mv.
+
+ Note: this bug is believed to be fixed as of the 20030501 release
diff --git a/debian/bash_completion/COPYING b/debian/bash_completion/COPYING
new file mode 100644
index 0000000..d60c31a
--- /dev/null
+++ b/debian/bash_completion/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/debian/bash_completion/Changelog b/debian/bash_completion/Changelog
new file mode 100644
index 0000000..0c21fe7
--- /dev/null
+++ b/debian/bash_completion/Changelog
@@ -0,0 +1,5142 @@
+
+RCS file: /var/cvs/bash_completion/bash_completion,v
+Working file: bash_completion
+head: 1.872
+branch:
+locks: strict
+access list:
+symbolic names:
+ rel20060301: 1.872
+ rel20050721: 1.827
+ rel20050720: 1.819
+ rel20050712: 1.815
+ rel20050121: 1.786
+ rel20050120: 1.785
+ rel20050112: 1.776
+ rel20050103: 1.772
+ rel20041017: 1.758
+ rel20040711: 1.737
+ rel20040704: 1.731
+ rel20040526: 1.714
+ rel20040331: 1.700
+ rel20040214: 1.690
+ rel20040210: 1.683
+ rel20040101: 1.672
+ rel20031225: 1.667
+ rel20031215: 1.662
+ rel20031125: 1.657
+ rel20031112: 1.653
+ rel20031022: 1.644
+ rel20031007: 1.637
+ rel20031029: 1.630
+ rel20030911: 1.624
+ rel20030821: 1.617
+ rel20030811: 1.610
+ rel20030803: 1.603
+ rel20030721: 1.594
+ rel20030713: 1.590
+ rel20030630: 1.585
+ rel20030607: 1.579
+ rel20030527: 1.571
+ rel20030505: 1.562
+ rel20030501: 1.560
+ rel20030419: 1.548
+ rel20030414: 1.543
+ rel20030327: 1.538
+ rel20030227: 1.535
+ rel20030209: 1.529
+ rel20030201: 1.524
+ rel20030126: 1.520
+ rel20030118: 1.515
+ rel20030113: 1.511
+ devel: 1.504.0.2
+ rel20021231: 1.504
+ rel20021223: 1.499
+ rel20021221: 1.493
+ rel20021217: 1.489
+ rel20021213: 1.486
+ rel20021205: 1.480
+ rel20021026: 1.462
+ rel20021022: 1.455
+ rel20021021: 1.453
+ rel20021017: 1.448
+ rel20021013: 1.438
+ rel20021007: 1.432
+ rel20021005: 1.428
+ rel20021001: 1.420
+ rel20020928: 1.415
+ rel20020909: 1.410
+ rel20020819: 1.404
+ rel20020812: 1.401
+ rel20020803: 1.397
+ rel20020727: 1.390
+ rel20020723: 1.387
+ rel20020716: 1.383
+ rel20020711: 1.379
+ rel20020704: 1.377
+ rel20020626: 1.374
+ rel20020624: 1.370
+ rel20020621: 1.366
+ rel20020619: 1.362
+ rel20020616: 1.358
+ rel20020611: 1.355
+ rel20020609: 1.353
+ rel20020605: 1.348
+ rel20020601: 1.339
+ rel20020528: 1.335
+ rel20020521: 1.332
+ rel20020519: 1.329
+ rel20020516: 1.322
+ rel20020514: 1.317
+ rel20020511: 1.313
+ rel20020507: 1.305
+ rel20020504: 1.297
+ rel20020430: 1.290
+ rel20020427: 1.286
+ rel20020422: 1.278
+ rel20020418: 1.272
+ rel20020413: 1.267
+ rel20020408: 1.264
+ rel20020406: 1.262
+ rel20020404: 1.259
+ rel20020402: 1.246
+ rel20020331: 1.239
+ rel20020330: 1.237
+ rel20020328: 1.229
+ rel20020326: 1.221
+ rel20020324: 1.213
+ rel20020322: 1.210
+ rel20020318: 1.204
+ rel20020314: 1.197
+ rel20020311: 1.195
+ rel20020306: 1.180
+ rel20020304: 1.177
+ rel20020227: 1.163
+ rel20020225: 1.145
+ rel20020220: 1.138
+ rel20020215: 1.118
+ rel20020213: 1.108
+ rel20020212: 1.105
+ rel20020209: 1.96
+ rel20020206: 1.93
+ rel20020204: 1.84
+ rel20020130: 1.77
+ rel20020124: 1.70
+ rel20020121: 1.60
+ rel20020115: 1.55
+ rel20020109: 1.53
+ rel20020105: 1.47
+keyword substitution: kv
+total revisions: 876; selected revisions: 876
+description:
+----------------------------
+revision 1.872
+date: 2006/03/01 16:20:18; author: ianmacd; state: Exp; lines: +2 -2
+
+Release 20060301.
+----------------------------
+revision 1.871
+date: 2006/03/01 13:15:43; author: ianmacd; state: Exp; lines: +3 -3
+
+There were probable bash 3.1 POSIX quote problems if UserKnownHostsFile or
+GlobalKnownHostsFile keywords were used inside ssh config files. Fixed.
+----------------------------
+revision 1.870
+date: 2006/03/01 10:22:43; author: ianmacd; state: Exp; lines: +425 -1
+
+Added new subversion completion implementation by Guillaume Rousse
+<guillomovitch@zarb.org> and removed the old one from contrib.
+----------------------------
+revision 1.869
+date: 2006/03/01 10:13:27; author: ianmacd; state: Exp; lines: +38 -1
+
+Added minicom completion by Guillaume Rousse <guillomovitch@zarb.org>.
+----------------------------
+revision 1.868
+date: 2006/03/01 10:05:29; author: ianmacd; state: Exp; lines: +14 -2
+
+--nodigest and --nosignature options must be set in $nodig and $nosig within
+_rpm_installed_packages() itself, not just set in _rpm() before
+_rpm_installed_packages() is called. This is because other completion
+functions also call _rpm_installed_packages().
+
+Fix from Guillaume Rousse <guillomovitch@zarb.org>.
+----------------------------
+revision 1.867
+date: 2006/03/01 09:55:31; author: ianmacd; state: Exp; lines: +3 -3
+
+Minor playmidi and timidity additions for .MID(I) (capital letters) files.
+----------------------------
+revision 1.866
+date: 2006/03/01 09:49:52; author: ianmacd; state: Exp; lines: +2 -2
+
+Add kdvi, dvipdf and advi to programs that complete on .dvi files. Thanks to
+Guillaume Rousse <guillomovitch@zarb.org>.
+----------------------------
+revision 1.865
+date: 2006/03/01 09:47:38; author: ianmacd; state: Exp; lines: +10 -9
+
+iconv completion improvement from Guillaume Rousse <guillomovitch@zarb.org>.
+----------------------------
+revision 1.864
+date: 2006/03/01 09:40:27; author: ianmacd; state: Exp; lines: +97 -18
+
+Replace invoke-rc.d completion with an implementation by Servilio Afre Puentes
+<servilio@gmail.com>.
+----------------------------
+revision 1.863
+date: 2006/02/28 12:53:20; author: ianmacd; state: Exp; lines: +2 -2
+
+Fix _pkg_config() typo. Thanks to Koblinger Egmont <egmont@cs.bme.hu>.
+----------------------------
+revision 1.862
+date: 2006/02/26 19:20:21; author: ianmacd; state: Exp; lines: +12 -7
+
+yum completion update from Ville Skyttä <ville.skytta@iki.fi>.
+----------------------------
+revision 1.861
+date: 2006/02/26 00:12:40; author: ianmacd; state: Exp; lines: +30 -2
+
+Debian invoke-rc.d completion by Jan Christoph Ebersbach
+<jan-christoph.ebersbach@e-jc.de>.
+----------------------------
+revision 1.860
+date: 2006/02/25 13:36:12; author: ianmacd; state: Exp; lines: +7 -4
+
+Use ant's complete-ant-cmd.pl if it's available. Suggested by Greg Kedge
+<gkedge@paychex.com>.
+----------------------------
+revision 1.859
+date: 2006/02/25 13:02:25; author: ianmacd; state: Exp; lines: +17 -1
+
+sysctl(8) completion, modified from code sent in by Jonas Davidsson
+<aphex@bredband.net>.
+----------------------------
+revision 1.858
+date: 2006/02/25 11:55:56; author: ianmacd; state: Exp; lines: +8 -1
+
+Add 'cvs update' completion. Patch from Rafael Luque Leiva
+<rafael.luque@hp.com>.
+----------------------------
+revision 1.857
+date: 2006/02/25 11:49:40; author: ianmacd; state: Exp; lines: +30 -1
+
+vncviewer(1) completion by Dean Montgomery <dmonty@sd73.bc.ca>.
+----------------------------
+revision 1.856
+date: 2006/02/25 11:37:32; author: ianmacd; state: Exp; lines: +6 -1
+
+Add support for PLD Linux to _configured_interfaces(). Patch from Elan
+Ruusamäe <glen@delfi.ee>.
+----------------------------
+revision 1.855
+date: 2006/02/25 00:24:16; author: ianmacd; state: Exp; lines: +193 -1
+
+smartctl completion by Guillaume Rousse <Guillaume.Rousse@inria.fr>.
+----------------------------
+revision 1.854
+date: 2006/02/24 23:55:13; author: ianmacd; state: Exp; lines: +2 -2
+
+Make make(1) et al complete on filenames, too. Suggested by Christian Boltz
+<cb@cboltz.de>.
+----------------------------
+revision 1.853
+date: 2006/02/24 22:07:47; author: ianmacd; state: Exp; lines: +3 -4
+
+Use $BASH_COMPLETION_DEBUG to turn on debugging, rather than $DEBUG.
+----------------------------
+revision 1.852
+date: 2006/02/24 12:59:03; author: ianmacd; state: Exp; lines: +5 -3
+
+Make 'aptitude show' work the same way as 'apt-cache show'. Fix from nerf
+<j-andrieux@laposte.net>.
+----------------------------
+revision 1.851
+date: 2006/02/24 12:48:59; author: ianmacd; state: Exp; lines: +2 -5
+
+Accidentally left some echo commands for debugging.
+----------------------------
+revision 1.850
+date: 2006/02/24 12:04:52; author: ianmacd; state: Exp; lines: +3 -2
+
+Make clear that this works with bash and 2.05b, too.
+----------------------------
+revision 1.849
+date: 2006/02/24 12:02:15; author: ianmacd; state: Exp; lines: +2 -2
+
+Add .flac completion for MPlayer. Suggested by Robert Millan <rmh@debian.org>.
+----------------------------
+revision 1.848
+date: 2006/02/24 12:00:38; author: ianmacd; state: Exp; lines: +131 -1
+
+Add dpkg-source completion from Sven Mueller <debian@incase.de>.
+----------------------------
+revision 1.847
+date: 2006/02/24 11:51:39; author: ianmacd; state: Exp; lines: +2 -2
+
+Add .exe.so completion to wine. Suggested by Johannes Rohr
+<j.rohr@comlink.org>.
+----------------------------
+revision 1.846
+date: 2006/02/24 11:41:04; author: ianmacd; state: Exp; lines: +2 -2
+
+unzip can make use of oowriter's .ott files. Suggested by "Mykola A.
+Nickishov" <mn@mn.com.ua>.
+----------------------------
+revision 1.845
+date: 2006/02/24 11:37:04; author: ianmacd; state: Exp; lines: +2 -2
+
+Fix gdb completion issue when completing second parameter after first
+parameter that has white space. Reported by Branden Robinson
+<branden@debian.org>.
+----------------------------
+revision 1.844
+date: 2006/02/24 11:19:41; author: ianmacd; state: Exp; lines: +2 -2
+
+Add .mng to file types that xine et al can complete on. Suggested by Patrick
+Fritzsch <fritzsch@cip.physik.uni-muenchen.de>.
+----------------------------
+revision 1.843
+date: 2006/02/24 01:10:58; author: ianmacd; state: Exp; lines: +2 -2
+
+MPlayer can also complete on .mpc files. Suggested by knefas
+<knefas@gmail.com>.
+----------------------------
+revision 1.842
+date: 2006/02/24 01:09:23; author: ianmacd; state: Exp; lines: +2 -2
+
+mkisofs completion now defaults to treating completions as filenames.
+----------------------------
+revision 1.841
+date: 2006/02/24 01:03:37; author: ianmacd; state: Exp; lines: +2 -2
+
+More timidity completions from Tijmen Baarda <tijmenbaarda@tijgerweb.net>.
+----------------------------
+revision 1.840
+date: 2006/02/24 00:57:25; author: ianmacd; state: Exp; lines: +2 -3
+
+gdb completion wasn't completing second parameter correctly when it was a
+file, rather than a PID. Fix from unknown Google source, but provided via
+Peter Duff <duff@google.com>.
+----------------------------
+revision 1.839
+date: 2006/02/24 00:46:30; author: ianmacd; state: Exp; lines: +3 -3
+
+Minor cvs completion change.
+----------------------------
+revision 1.838
+date: 2006/02/24 00:25:33; author: ianmacd; state: Exp; lines: +7 -5
+
+Allow man completion to work on OpenBSD, too. Patch by Kyle Wheeler
+<kyle@memoryhole.net>.
+----------------------------
+revision 1.837
+date: 2006/02/24 00:12:41; author: ianmacd; state: Exp; lines: +5 -2
+
+Avoid the need for grep in _rl_enabled(). Modified from a suggestion by Kyle
+Wheeler <kyle@memoryhole.net>.
+----------------------------
+revision 1.836
+date: 2006/02/23 22:55:44; author: ianmacd; state: Exp; lines: +15 -1
+
+aptitude patch to use grep-status, if available. Patch from Kyle Wheeler
+<kyle@memoryhole.net>.
+----------------------------
+revision 1.835
+date: 2006/02/23 21:16:16; author: ianmacd; state: Exp; lines: +2 -2
+
+MPlayer can play 3gp files produced by mobile phones. Suggested by Ismail
+Donmez <ismail@uludag.org.tr>.
+----------------------------
+revision 1.834
+date: 2006/02/23 20:27:59; author: ianmacd; state: Exp; lines: +6 -6
+
+Add support for 'cvs stat'. Thanks to Ville Skyttä <ville.skytta@iki.fi>.
+----------------------------
+revision 1.833
+date: 2006/02/23 20:26:10; author: ianmacd; state: Exp; lines: +2 -2
+
+Add mtr to known hosts completion. Thanks to Ville Skyttä
+<ville.skytta@iki.fi>.
+----------------------------
+revision 1.832
+date: 2006/02/23 18:01:37; author: ianmacd; state: Exp; lines: +5 -5
+
+_known_hosts() and _mount() were broken by bash 3.1. Some aspect of how
+POSIX-quoted strings (e.g. $'\t') are expanded has changed in this version,
+requiring that such strings no longer appear inside double-quotes.
+
+Ville Skyttä <ville.skytta@iki.fi> pointed out the symptoms and suggested a
+fix for _known_hosts(), but that fix relied upon sed understanding \t, which
+some versions of sed do not. This version of the fix puts POSIX-quoted strings
+outside of the double-quotes.
+----------------------------
+revision 1.831
+date: 2005/07/30 06:27:32; author: ianmacd; state: Exp; lines: +2 -2
+
+Use -o filenames instead of -o default for Perl.
+----------------------------
+revision 1.830
+date: 2005/07/28 00:11:14; author: ianmacd; state: Exp; lines: +3 -3
+
+Minor _filedir() edit to remove code no longer in use.
+----------------------------
+revision 1.829
+date: 2005/07/28 00:04:59; author: ianmacd; state: Exp; lines: +2 -2
+
+evince command was missing
+----------------------------
+revision 1.828
+date: 2005/07/24 08:12:41; author: ianmacd; state: Exp; lines: +3 -2
+
+Allow evince to complete on wider variety of files (from Vijay Durairaj
+<durairaj@cs.utah.edu>)
+----------------------------
+revision 1.827
+date: 2005/07/21 19:21:22; author: ianmacd; state: Exp; lines: +2 -2
+
+Bumped release to 20050721.
+----------------------------
+revision 1.826
+date: 2005/07/21 01:43:47; author: ianmacd; state: Exp; lines: +4 -4
+
+MPlayer options should now use dashes, not underscores. (Thanks to Guillaume
+Rousse <Guillaume.Rousse@inria.fr>)
+----------------------------
+revision 1.825
+date: 2005/07/21 01:26:01; author: ianmacd; state: Exp; lines: +27 -3
+
+Extended mc completion by Guillaume Rousse <Guillaume.Rousse@inria.fr>.
+----------------------------
+revision 1.824
+date: 2005/07/21 01:20:36; author: ianmacd; state: Exp; lines: +11 -5
+
+lilo completion fix from Guillaume Rousse <Guillaume.Rousse@inria.fr>.
+----------------------------
+revision 1.823
+date: 2005/07/21 01:09:27; author: ianmacd; state: Exp; lines: +2 -2
+
+Not sure why we had that superfluous echo in there. Perhaps it was to work
+around a bug in older versions of bash.
+----------------------------
+revision 1.822
+date: 2005/07/21 00:57:24; author: ianmacd; state: Exp; lines: +30 -7
+
+iwconfig improvements by Guillaume Rousse <Guillaume.Rousse@inria.fr>
+----------------------------
+revision 1.821
+date: 2005/07/21 00:54:36; author: ianmacd; state: Exp; lines: +3 -3
+
+Fix up tcpdump and dhclient completion to use correct interfaces function
+(patch by Guillaume Rousse <Guillaume.Rousse@inria.fr>)
+----------------------------
+revision 1.820
+date: 2005/07/21 00:40:14; author: ianmacd; state: Exp; lines: +4 -4
+
+Turn off expansion disabling in _filedir(), as this has the annoying
+side-effect of cancelling alias expansion for a given invocation of a command.
+----------------------------
+revision 1.819
+date: 2005/07/20 07:41:41; author: ianmacd; state: Exp; lines: +2 -2
+
+Version bumped to 20050720.
+----------------------------
+revision 1.818
+date: 2005/07/19 17:38:39; author: ianmacd; state: Exp; lines: +6 -3
+
+- evince completion for .pdf files.
+- More OpenOffice 2 completions
+
+This patch from Horst von Brand via Ville Skyttä <ville.skytta@iki.fi>.
+----------------------------
+revision 1.817
+date: 2005/07/19 06:32:31; author: ianmacd; state: Exp; lines: +8 -8
+
+Fix up patterns for tarball matching (patch by Ville Skyttä
+<ville.skytta@iki.fi>).
+----------------------------
+revision 1.816
+date: 2005/07/19 06:28:48; author: ianmacd; state: Exp; lines: +4 -4
+
+Add completion for xine front-ends, plus kplayer/mplayer (patch by Ville
+Skyttä <ville.skytta@iki.fi>).
+----------------------------
+revision 1.815
+date: 2005/07/12 19:13:02; author: ianmacd; state: Exp; lines: +2 -2
+
+Minor brace fix.
+----------------------------
+revision 1.814
+date: 2005/07/12 16:32:54; author: ianmacd; state: Exp; lines: +3 -3
+
+Bump version to 20050712.
+----------------------------
+revision 1.813
+date: 2005/07/12 07:28:08; author: ianmacd; state: Exp; lines: +9 -7
+
+Make mutt completion also work for muttng (patch by Marcin Kryczek
+<aye@gentoo.pl>).
+----------------------------
+revision 1.812
+date: 2005/07/12 07:22:57; author: ianmacd; state: Exp; lines: +3 -3
+
+tar 1.15.1 can unpack compressed archives, even if [IZzjy] are not given
+(patch by Aaron Walker <ka0ttic@gentoo.org>).
+----------------------------
+revision 1.811
+date: 2005/07/12 06:50:25; author: ianmacd; state: Exp; lines: +7 -2
+
+Fix _filedir(), so that literal filenames that appear to be glob patterns are
+not treated as such (patch by Claudio Bley <bley@linuxmail.org>).
+----------------------------
+revision 1.810
+date: 2005/07/12 00:24:19; author: ianmacd; state: Exp; lines: +2 -1
+
+rpm2cpio completion (thanks to Guillaume Rousse <rousse@ccr.jussieu.fr>).
+----------------------------
+revision 1.809
+date: 2005/07/12 00:23:30; author: ianmacd; state: Exp; lines: +42 -26
+
+User and group factorisation patch from Guillaume Rousse
+<rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.808
+date: 2005/07/12 00:21:13; author: ianmacd; state: Exp; lines: +32 -1
+
+ntpdate completion by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.807
+date: 2005/07/12 00:20:16; author: ianmacd; state: Exp; lines: +46 -1
+
+getent completion by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.806
+date: 2005/07/12 00:19:05; author: ianmacd; state: Exp; lines: +20 -1
+
+id completion by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.805
+date: 2005/07/12 00:18:01; author: ianmacd; state: Exp; lines: +112 -1
+
+cpio completion by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.804
+date: 2005/07/11 23:38:42; author: ianmacd; state: Exp; lines: +3 -3
+
+More extensions for MPlayer (patch by Aaron Walker <ka0ttic@gentoo.org>).
+----------------------------
+revision 1.803
+date: 2005/07/11 23:36:59; author: ianmacd; state: Exp; lines: +3 -2
+
+Accept .rmi as an extension for Timidity (patch by Aaron Walker
+<ka0ttic@gentoo.org>).
+----------------------------
+revision 1.802
+date: 2005/07/11 23:36:17; author: ianmacd; state: Exp; lines: +7 -7
+
+Use sed instead of awk in LVM completion (patch by Aaron Walker
+<ka0ttic@gentoo.org>)
+----------------------------
+revision 1.801
+date: 2005/07/08 04:20:58; author: ianmacd; state: Exp; lines: +6 -6
+
+Avoid exit status of 1 when reassigning read-only variables.
+----------------------------
+revision 1.800
+date: 2005/07/08 01:47:14; author: ianmacd; state: Exp; lines: +9 -15
+
+Simplify definition of BASH_COMPLETION and BASH_COMPLETION_DIR variables.
+----------------------------
+revision 1.799
+date: 2005/07/08 01:36:51; author: ianmacd; state: Exp; lines: +162 -162
+
+Remove checks of $have by compounding complete commands after function
+definitions.
+----------------------------
+revision 1.798
+date: 2005/07/07 23:43:25; author: ianmacd; state: Exp; lines: +135 -135
+
+Move _lvm() completion to end of all LVM commands.
+----------------------------
+revision 1.797
+date: 2005/07/07 23:41:15; author: ianmacd; state: Exp; lines: +3 -6
+
+Installation of info completion should not depend on OS.
+----------------------------
+revision 1.796
+date: 2005/07/07 23:35:09; author: ianmacd; state: Exp; lines: +3 -3
+
+make completion should also work for gnumake.
+----------------------------
+revision 1.795
+date: 2005/07/07 23:09:39; author: ianmacd; state: Exp; lines: +12 -16
+
+Don't define _pids() and _pgids() twice on Solaris and AIX.
+----------------------------
+revision 1.794
+date: 2005/07/07 22:11:38; author: ianmacd; state: Exp; lines: +7 -7
+
+Fix scp completion when filename contains shell metacharacters. (Patch from
+Markus Wiederkehr <markus.wiederkehr@gmail.com>).
+----------------------------
+revision 1.793
+date: 2005/07/07 22:07:00; author: ianmacd; state: Exp; lines: +2 -2
+
+Add .rmbv file extension to MPlayer completion. (Thanks to Joseph Yen
+<joseph.yen@gmail.com>)
+----------------------------
+revision 1.792
+date: 2005/07/07 21:52:03; author: ianmacd; state: Exp; lines: +4 -4
+
+Support the new open document formats of OpenOffice 2.0. (patch from Hanno
+Böck <mail@hboeck.de>)
+----------------------------
+revision 1.791
+date: 2005/07/07 21:45:26; author: ianmacd; state: Exp; lines: +2 -2
+
+Use -o filenames for rsync completion.
+----------------------------
+revision 1.790
+date: 2005/02/08 21:50:01; author: ianmacd; state: Exp; lines: +3 -3
+
+Minor CVS fix from "Samuel J. Irlapati" <Samuel.Irlapati@unisys.com>.
+----------------------------
+revision 1.789
+date: 2005/02/03 09:12:44; author: ianmacd; state: Exp; lines: +2 -2
+
+- Minor fix to xscreensaver completion.
+----------------------------
+revision 1.788
+date: 2005/01/25 10:11:02; author: ianmacd; state: Exp; lines: +2 -2
+
+- Support more MPlayer subtitle types. (Thanks to justus schwartz
+ <justus@gmx.li>)
+----------------------------
+revision 1.787
+date: 2005/01/25 01:41:25; author: ianmacd; state: Exp; lines: +2 -2
+
+- Remove w3m from commands that complete on .html files, as it's now a more
+ general file browser. (Debian #291359)
+----------------------------
+revision 1.786
+date: 2005/01/21 22:29:49; author: ianmacd; state: Exp; lines: +5 -2
+
+- Fix broken sudo completion.
+- Bump version to 20050121
+----------------------------
+revision 1.785
+date: 2005/01/20 10:10:00; author: ianmacd; state: Exp; lines: +2 -2
+
+- Bump version to 20050120.
+----------------------------
+revision 1.784
+date: 2005/01/19 04:41:36; author: ianmacd; state: Exp; lines: +45 -15
+
+- Improve ssh2 known hosts completion. (Debian bug #282767)
+----------------------------
+revision 1.783
+date: 2005/01/19 04:22:03; author: ianmacd; state: Exp; lines: +2 -2
+
+- Remove xargs from list of commands that do longopts completion. xargs
+ now does completion like sudo, exec, nice, strace, etc.
+----------------------------
+revision 1.782
+date: 2005/01/19 04:19:45; author: ianmacd; state: Exp; lines: +19 -7
+
+- Pass over switches to metacommands like sudo, nice, exec, etc.
+ (Debian bug #289847)
+----------------------------
+revision 1.781
+date: 2005/01/16 19:10:51; author: ianmacd; state: Exp; lines: +2 -2
+
+- Trivial fix to allow python to be called with a path component without
+ bash displaying a bad subscript error. (Debian bug #290748)
+----------------------------
+revision 1.780
+date: 2005/01/16 18:44:15; author: ianmacd; state: Exp; lines: +2 -2
+
+- unzip should also work on .sxw files. (Debian bug #286738)
+----------------------------
+revision 1.779
+date: 2005/01/16 18:42:01; author: ianmacd; state: Exp; lines: +10 -5
+
+- Lots of commands that use _longopts() don't use filenames at all, so
+ these shouldn't be mapped with '-o filenames'. (Debian bug #283069, which
+ related only to wget)
+----------------------------
+revision 1.778
+date: 2005/01/16 18:27:29; author: ianmacd; state: Exp; lines: +4 -4
+
+- Make dd treat completions as filenames, which is bad for options, but
+ good for filename arguments to 'if' and 'of'. (Debian bug #287286)
+----------------------------
+revision 1.777
+date: 2005/01/16 18:12:27; author: ianmacd; state: Exp; lines: +2 -2
+
+- Fix lvresize errors when running as non-root (Debian #285604)
+----------------------------
+revision 1.776
+date: 2005/01/13 02:22:45; author: ianmacd; state: Exp; lines: +34 -34
+
+- Bump version to 20050112
+----------------------------
+revision 1.775
+date: 2005/01/12 22:45:16; author: ianmacd; state: Exp; lines: +7 -3
+
+- Make completion work for chown/chgrp when group names contain spaces.
+ Patch by Robin Rosenberg <robin.rosenberg@dewire.com>
+----------------------------
+revision 1.774
+date: 2005/01/10 23:39:56; author: ianmacd; state: Exp; lines: +133 -80
+
+- Wireless tools completion improvements by Guillaume Rousse
+ <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.773
+date: 2005/01/04 23:35:41; author: ianmacd; state: Exp; lines: +2 -1
+
+- Make location of openssl.cnf somewhat more flexible (patch by
+ Ville Skyttä <ville.skytta@iki.fi>)
+----------------------------
+revision 1.772
+date: 2005/01/04 06:37:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- Update version to 20050103.
+----------------------------
+revision 1.771
+date: 2005/01/03 05:38:41; author: ianmacd; state: Exp; lines: +472 -4
+
+- Complete rewrite of openssl(1) completion by Guillaume Rousse
+ <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.770
+date: 2005/01/03 05:31:38; author: ianmacd; state: Exp; lines: +28 -1
+
+- pkg-config completion by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.769
+date: 2005/01/03 03:42:12; author: ianmacd; state: Exp; lines: +6 -1
+
+- Cygwin patch for mount and minor find (fstab) robustness fix by
+ Reini Urban <rurban@x-ray.at>
+----------------------------
+revision 1.768
+date: 2005/01/03 03:11:55; author: ianmacd; state: Exp; lines: +22 -12
+
+- Completion for alternate Makefile paths by Christoph Gysin <cgysin@gmx.ch>.
+----------------------------
+revision 1.767
+date: 2005/01/03 02:51:15; author: ianmacd; state: Exp; lines: +2 -1
+
+- ps2pdf completion by Volker Stolz <stolz@i2.informatik.rwth-aachen.de>.
+----------------------------
+revision 1.766
+date: 2005/01/03 02:35:57; author: ianmacd; state: Exp; lines: +70 -1
+
+- mkinitrd completion by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.765
+date: 2005/01/03 02:24:14; author: ianmacd; state: Exp; lines: +13 -8
+
+- modprobe factorisation patch by Guillaume Rousse <rousse@ccr.jussieu.fr>.
+----------------------------
+revision 1.764
+date: 2005/01/03 02:02:16; author: ianmacd; state: Exp; lines: +67 -1
+
+- Wireless tools patch by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.763
+date: 2005/01/03 00:53:47; author: ianmacd; state: Exp; lines: +12 -5
+
+- cvs(1) completion fixes from Richard Lärkäng <nouseforaname@home.se>.
+----------------------------
+revision 1.762
+date: 2005/01/03 00:48:27; author: ianmacd; state: Exp; lines: +8 -3
+
+- Add ,v files to list rcs(1) can complete on. From Ed Catmur
+ <ed@catmur.co.uk> via Aaron Walker <ka0ttic@gentoo.org>.
+----------------------------
+revision 1.761
+date: 2004/11/22 21:20:43; author: ianmacd; state: Exp; lines: +3 -3
+
+- make sure unaliased grep is used in a couple of places. This really needs
+ to be performed throughout the file, everywhere where an external command
+ (or even a built-in) is called.
+----------------------------
+revision 1.760
+date: 2004/10/24 19:01:56; author: ianmacd; state: Exp; lines: +3 -3
+
+- fixes for completing RealAudio files (patch by Peter Adolphs
+ <futzilogik@arcor.de>)
+----------------------------
+revision 1.759
+date: 2004/10/19 05:51:04; author: ianmacd; state: Exp; lines: +4 -4
+
+- make screen completion include the socket part of session names (patch by
+ John Russell <jjrussell@gmail.com>)
+----------------------------
+revision 1.758
+date: 2004/10/17 08:25:34; author: ianmacd; state: Exp; lines: +2 -2
+
+- bumped version to 20041017
+----------------------------
+revision 1.757
+date: 2004/10/15 18:27:22; author: ianmacd; state: Exp; lines: +3 -2
+
+- properly unset $have at end of sourcing
+----------------------------
+revision 1.756
+date: 2004/10/15 07:51:09; author: ianmacd; state: Exp; lines: +4 -6
+
+- scp completion was still broken for file names, both local and remote, that
+ contained shell metacharacters.
+----------------------------
+revision 1.755
+date: 2004/10/15 07:30:00; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix gzip with files whose names contain spaces
+----------------------------
+revision 1.754
+date: 2004/10/15 06:47:39; author: ianmacd; state: Exp; lines: +7 -7
+
+- rename _comp-dpkg-installed-packages() to _comp_dpkg_installed_packages()
+ to comply with POSIX.2 shell function naming
+----------------------------
+revision 1.753
+date: 2004/10/15 06:42:27; author: ianmacd; state: Exp; lines: +2 -2
+
+- make talk, ytalk and finger not add a suffix of '@' after completing a user
+ name. This makes same-host completion more pleasant.
+----------------------------
+revision 1.752
+date: 2004/10/14 16:57:41; author: ianmacd; state: Exp; lines: +3 -3
+
+- apt-cache improvements from savar@gmx.de
+----------------------------
+revision 1.751
+date: 2004/10/14 09:31:18; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .miff as an extension for display completion
+----------------------------
+revision 1.750
+date: 2004/10/14 09:24:15; author: ianmacd; state: Exp; lines: +10 -4
+
+- process targets in included Makefiles during make completion (patch by
+ Christoph Gysin <cgysin@gmx.ch>)
+----------------------------
+revision 1.749
+date: 2004/10/14 09:14:12; author: ianmacd; state: Exp; lines: +5 -5
+
+- quote bash completion location variables for safety (paths containing spaces
+ would be problematic)
+----------------------------
+revision 1.748
+date: 2004/10/14 09:10:11; author: ianmacd; state: Exp; lines: +3 -9
+
+- some more minor tidying
+----------------------------
+revision 1.747
+date: 2004/10/14 09:08:33; author: ianmacd; state: Exp; lines: +6 -4
+
+- tidy up screen completion
+----------------------------
+revision 1.746
+date: 2004/10/14 08:54:55; author: ianmacd; state: Exp; lines: +3 -3
+
+- test for dhclient before installing its completion function
+----------------------------
+revision 1.745
+date: 2004/10/14 08:52:14; author: ianmacd; state: Exp; lines: +1163 -1
+
+- new dhclient and lvm completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.744
+date: 2004/10/13 20:58:48; author: ianmacd; state: Exp; lines: +4 -4
+
+- fix scp completion breakage when filenames contained an ampersand
+----------------------------
+revision 1.743
+date: 2004/10/08 16:31:28; author: ianmacd; state: Exp; lines: +3 -4
+
+- fix sed error on service completion
+----------------------------
+revision 1.742
+date: 2004/09/30 09:48:57; author: ianmacd; state: Exp; lines: +3 -3
+
+- add kghostview and kpdf for PostScript and PDF files
+----------------------------
+revision 1.741
+date: 2004/09/20 15:58:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow mplayer to complete on .dv files
+----------------------------
+revision 1.740
+date: 2004/07/23 00:41:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- grep doesn't support -q on Solaris, so send to /dev/null instead (reported
+ by Chris Dennis <Chris.Dennis@invidi.com>)
+----------------------------
+revision 1.739
+date: 2004/07/19 08:45:15; author: ianmacd; state: Exp; lines: +5 -4
+
+- CVS completion fix by Ville Skyttä <ville.skytta@iki.fi>, to allow better
+ handling of files and dirs whose names contain whitespace
+----------------------------
+revision 1.738
+date: 2004/07/19 08:43:10; author: ianmacd; state: Exp; lines: +10 -9
+
+- rpm completion fix from Ville Skyttä <ville.skytta@iki.fi> to avoid
+ "--nodigest --nosignatures" being passed as a single option.
+----------------------------
+revision 1.737
+date: 2004/07/11 18:36:39; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20040711
+----------------------------
+revision 1.736
+date: 2004/07/11 18:18:24; author: ianmacd; state: Exp; lines: +3 -3
+
+- eliminate use of grep in _filedir_xspec() (patch by Claudio Bley
+ <bley@CS.uni-magdeburg.de>)
+----------------------------
+revision 1.735
+date: 2004/07/06 06:10:33; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor fix to mutt completion
+----------------------------
+revision 1.734
+date: 2004/07/05 23:45:00; author: ianmacd; state: Exp; lines: +6 -5
+
+- fix for dpkg completion (patch by Itay Ben-Yaacov <nib_maps@yahoo.com>)
+----------------------------
+revision 1.733
+date: 2004/07/05 23:35:36; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow symbolic links in /etc/bash_completion.d (patch by Ville Skyttä
+ <ville.skytta@iki.fi>)
+----------------------------
+revision 1.732
+date: 2004/07/05 23:31:47; author: ianmacd; state: Exp; lines: +3 -3
+
+- improve insmod, modinfo etc completion with path names (patch by Ville
+ Skyttä <ville.skytta@iki.fi>)
+----------------------------
+revision 1.731
+date: 2004/07/04 01:47:31; author: ianmacd; state: Exp; lines: +2 -2
+
+- release updated to 20040704
+----------------------------
+revision 1.730
+date: 2004/07/04 01:40:08; author: ianmacd; state: Exp; lines: +3 -3
+
+- '[' must come first in character classes for sed 4.1. _configure() needed to
+ be fixed.
+----------------------------
+revision 1.729
+date: 2004/07/04 01:15:29; author: ianmacd; state: Exp; lines: +15 -4
+
+mark-directories and mark-symlinked-directories are very convenient readline
+settings which append a slash to a completed directory/symlinked directory.
+Unfortunately, this doesn't work with directories found by looking at $CDPATH.
+
+There is now also a slash appended if the user completes on an unambiguous
+directory found by looking at $CDPATH.
+
+Patch by Claudio Bley <bley@CS.uni-magdeburg.de>.
+----------------------------
+revision 1.728
+date: 2004/07/04 00:56:08; author: ianmacd; state: Exp; lines: +10 -1
+
+- add _rl_enabled() to detect whether a given readline variable is on. (patch
+ by Claudio Bley <bley@CS.uni-magdeburg.de>)
+----------------------------
+revision 1.727
+date: 2004/07/04 00:51:18; author: ianmacd; state: Exp; lines: +21 -1
+
+- pgrep and pidof completion by "Peter K. Jensen" <pekaje@gmx.net>
+----------------------------
+revision 1.726
+date: 2004/07/04 00:31:33; author: ianmacd; state: Exp; lines: +9 -3
+
+- use getent for UID and GID completion when available (based on a patch from
+ Guillaume Rousse <rousse@ccr.jussieu.fr>)
+----------------------------
+revision 1.725
+date: 2004/07/04 00:26:29; author: ianmacd; state: Exp; lines: +9 -4
+
+- allow service completion to work on xinetd services (patch by Guillaume
+ Rousse <rousse@ccr.jussieu.fr>)
+----------------------------
+revision 1.724
+date: 2004/07/04 00:23:57; author: ianmacd; state: Exp; lines: +3 -2
+
+- fix some spurious warnings in CVS completion (patch by Guillaume Rousse
+ <rousse@ccr.jussieu.fr>)
+----------------------------
+revision 1.723
+date: 2004/07/04 00:20:34; author: ianmacd; state: Exp; lines: +3 -29
+
+- use --dump-options with gpg to get viable options (much cleaner than listing
+ them all) (patch by Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>)
+----------------------------
+revision 1.722
+date: 2004/07/04 00:11:09; author: ianmacd; state: Exp; lines: +8 -2
+
+- fix mutt completion so that leading '=' character is handled properly
+ (patch from Joe Nahmias <joe@nahmias.net>)
+----------------------------
+revision 1.721
+date: 2004/07/04 00:03:19; author: ianmacd; state: Exp; lines: +3 -2
+
+- allow Emacs to complete on archives (patch from Frédéric Bothamy
+ <frederic.bothamy@free.fr>)
+----------------------------
+revision 1.720
+date: 2004/07/04 00:01:03; author: ianmacd; state: Exp; lines: +2 -2
+
+- add autossh to list of commands that perform _ssh() completion
+----------------------------
+revision 1.719
+date: 2004/06/18 07:40:28; author: ianmacd; state: Exp; lines: +3 -3
+
+- properly complete on .Z files during tar completion
+----------------------------
+revision 1.718
+date: 2004/06/14 07:59:41; author: ianmacd; state: Exp; lines: +2 -2
+
+- add ssh-installkeys to list of programs that use known host completion
+ (Josh Glover <jmglov@jmglov.net>)
+----------------------------
+revision 1.717
+date: 2004/06/14 07:56:58; author: ianmacd; state: Exp; lines: +4 -1
+
+- Various OpenOffice completions from Ian Redfern <Ian.Redfern@LogicaCMG.com>
+----------------------------
+revision 1.716
+date: 2004/06/01 08:08:18; author: ianmacd; state: Exp; lines: +15 -1
+
+- fix PID completion for AIX and Solaris. Patch by Benjamin Floering
+ <floering@us.ibm.com>
+----------------------------
+revision 1.715
+date: 2004/06/01 08:02:57; author: ianmacd; state: Exp; lines: +22 -9
+
+- update to aptitude completion by Rafael Sepulveda <rsepulveda@gmail.com>
+----------------------------
+revision 1.714
+date: 2004/05/26 07:20:56; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20040526
+----------------------------
+revision 1.713
+date: 2004/05/26 07:15:28; author: ianmacd; state: Exp; lines: +56 -2
+
+- info completion by Matt Perry <matt@primefactor.com>
+----------------------------
+revision 1.712
+date: 2004/05/24 09:50:30; author: ianmacd; state: Exp; lines: +23 -18
+
+- chkconfig factorisation and improvements by
+ Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.711
+date: 2004/05/24 09:44:44; author: ianmacd; state: Exp; lines: +24 -2
+
+- xmms(1) gets its own completion function.
+ Patch by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.710
+date: 2004/05/24 09:43:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- use filenames by default for cdrecord completion
+----------------------------
+revision 1.709
+date: 2004/05/24 09:42:32; author: ianmacd; state: Exp; lines: +101 -1
+
+- aspell completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.708
+date: 2004/05/24 09:12:31; author: ianmacd; state: Exp; lines: +8 -1
+
+- add SuSE support for ifup/down and ifstatus, if present. Patch from
+ Jonathan <rise@knavery.net>
+----------------------------
+revision 1.707
+date: 2004/05/24 09:00:23; author: ianmacd; state: Exp; lines: +20 -21
+
+- improvement to _update_alternatives() by Ville Skyttä <ville.skytta@iki.fi>
+----------------------------
+revision 1.706
+date: 2004/05/24 08:28:20; author: ianmacd; state: Exp; lines: +3 -3
+
+- minor fix to _command() to allow leading whitespace on the command line
+----------------------------
+revision 1.705
+date: 2004/05/20 06:40:59; author: ianmacd; state: Exp; lines: +3 -3
+
+- dpkg -P is not recognised or completed. Fix from Paul Brook <paul@nowt.org>
+----------------------------
+revision 1.704
+date: 2004/05/16 00:07:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- don't allow aliases for grep to be used during make completion
+----------------------------
+revision 1.703
+date: 2004/05/16 00:01:29; author: ianmacd; state: Exp; lines: +2 -2
+
+- make mutt file completion actually work after redirection
+----------------------------
+revision 1.702
+date: 2004/05/15 23:58:30; author: ianmacd; state: Exp; lines: +7 -7
+
+- fix mutt sed errors after redirection
+----------------------------
+revision 1.701
+date: 2004/05/11 18:06:08; author: ianmacd; state: Exp; lines: +4 -1
+
+- builtin completes on builtins
+----------------------------
+revision 1.700
+date: 2004/03/31 17:45:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20040331
+----------------------------
+revision 1.699
+date: 2004/03/30 23:21:51; author: ianmacd; state: Exp; lines: +2 -2
+
+- remove links from list of commands that complete on .html
+----------------------------
+revision 1.698
+date: 2004/03/30 23:16:24; author: ianmacd; state: Exp; lines: +2 -2
+
+- mplayer file extension additions from Michael Spurlock <mspurloc@us.ibm.com>
+----------------------------
+revision 1.697
+date: 2004/03/30 23:01:33; author: ianmacd; state: Exp; lines: +15 -1
+
+- CUPS cancel(1) completion by Jean-Baptiste Quenot <jb.quenot@caraldi.com>
+----------------------------
+revision 1.696
+date: 2004/03/30 22:17:15; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor mkisofs fix
+----------------------------
+revision 1.695
+date: 2004/03/30 22:16:07; author: ianmacd; state: Exp; lines: +2 -2
+
+- add amaya to list of browsers
+----------------------------
+revision 1.694
+date: 2004/03/30 22:15:33; author: ianmacd; state: Exp; lines: +3 -3
+
+- _comp-dpkg-installed-packages() was not returning packages designated
+ 'essential'
+----------------------------
+revision 1.693
+date: 2004/03/30 22:12:09; author: ianmacd; state: Exp; lines: +26 -8
+
+- allow cvs completion to handle the various sub-command abbreviataions, such
+ as 'di' for 'diff', etc. (patch from Chris Halls <halls@debian.org>)
+----------------------------
+revision 1.692
+date: 2004/03/30 21:02:46; author: ianmacd; state: Exp; lines: +12 -5
+
+- fix man and cc completion for Cygwin (patch by Mike Wittman
+ <mwittman@seismicmicro.com>)
+----------------------------
+revision 1.691
+date: 2004/02/25 04:03:28; author: ianmacd; state: Exp; lines: +3 -3
+
+- some versions of bash don't like function names containing hyphens
+----------------------------
+revision 1.690
+date: 2004/02/15 03:45:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20040214
+----------------------------
+revision 1.689
+date: 2004/02/14 10:28:58; author: ianmacd; state: Exp; lines: +3 -4
+
+- big speed up for dpkg completion (patch from Philipp Weis <pweis@pweis.com>)
+----------------------------
+revision 1.688
+date: 2004/02/13 08:47:38; author: ianmacd; state: Exp; lines: +7 -3
+
+- fix chsh completion to work on Debian
+----------------------------
+revision 1.687
+date: 2004/02/13 08:27:24; author: ianmacd; state: Exp; lines: +3 -1
+
+- fix for ant completion by Itamar Almeida de Carvalho <itamar@oktiva.com.br>
+----------------------------
+revision 1.686
+date: 2004/02/13 08:24:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- make 'make -f' completion work properly (fix from
+ Matthew Cheetah Gabeler-Lee <cheetah@fastcat.org>
+----------------------------
+revision 1.685
+date: 2004/02/12 21:48:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- don't unset $have twice at end of script (fix from
+ Salve Nilsen <salve.nilsen@met.no>)
+----------------------------
+revision 1.684
+date: 2004/02/12 21:37:39; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix up a continuation error in _filedir()
+----------------------------
+revision 1.683
+date: 2004/02/10 09:33:22; author: ianmacd; state: Exp; lines: +2 -2
+
+- update to release 20040210
+----------------------------
+revision 1.682
+date: 2004/02/09 22:12:40; author: ianmacd; state: Exp; lines: +2 -2
+
+- make apt-cache know about the rdepends option
+ (patch by Vince <loki@internode.on.net>)
+----------------------------
+revision 1.681
+date: 2004/02/09 22:06:01; author: ianmacd; state: Exp; lines: +3 -2
+
+- install yum-arch completion only if we also have yum
+----------------------------
+revision 1.680
+date: 2004/02/09 22:02:48; author: ianmacd; state: Exp; lines: +34 -1
+
+- dd completion by Andrew Taylor <ataylor@its.to>
+----------------------------
+revision 1.679
+date: 2004/02/09 21:57:31; author: ianmacd; state: Exp; lines: +3 -3
+
+- xine and mplayer can complete on .VOB files (previously, only .vob was
+ supported)
+----------------------------
+revision 1.678
+date: 2004/02/09 21:52:35; author: ianmacd; state: Exp; lines: +3 -2
+
+- make xspec parsing immune to comments (Debian bug #226812)
+ (fix by Immanuel Halupczok <debian@karimmi.de>)
+----------------------------
+revision 1.677
+date: 2004/02/09 21:40:41; author: ianmacd; state: Exp; lines: +4 -9
+
+- stop things like 'sudo mount<Tab>' from returning all possible completions
+ as a single argument.
+
+ Sigh. I no longer understand this function and I'm sure this has now
+ broken something else. This is simply impossible to get right. Shell
+ was never meant for anything this complicated. :-(
+
+ The breakage seems to have been introduced as part of 1.577.
+----------------------------
+revision 1.676
+date: 2004/02/09 20:57:10; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow mplayer to complete on .m2v files, too
+----------------------------
+revision 1.675
+date: 2004/02/09 20:52:56; author: ianmacd; state: Exp; lines: +5 -2
+
+- make export completion do proper quoting when completing a variable's
+ value (patch from Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+----------------------------
+revision 1.674
+date: 2004/02/09 20:50:56; author: ianmacd; state: Exp; lines: +7 -4
+
+- add 'up' as a synonym to 'update' in CVS completion (patch from
+ Ville Skyttä <ville.skytta@iki.fi>
+----------------------------
+revision 1.673
+date: 2004/02/09 20:49:11; author: ianmacd; state: Exp; lines: +2 -2
+
+- xine can also complete on .asx files
+----------------------------
+revision 1.672
+date: 2004/01/01 07:39:28; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20040101
+----------------------------
+revision 1.671
+date: 2004/01/01 01:18:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- avoid pulling in .rpm* files from $BASH_COMPLETION_DIR/*
+ (fix by Ville Skyttä <ville.skytta@iki.fi>)
+----------------------------
+revision 1.670
+date: 2004/01/01 00:58:30; author: ianmacd; state: Exp; lines: +18 -1
+
+- Postfix completion enhancement by Michael G <michaelg@amerion.net>
+----------------------------
+revision 1.669
+date: 2004/01/01 00:51:46; author: ianmacd; state: Exp; lines: +16 -11
+
+- wvdial patch from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.668
+date: 2004/01/01 00:48:05; author: ianmacd; state: Exp; lines: +4 -3
+
+- FreeBSD portinstall fix from Jean-Baptiste Quenot <jb.quenot@caraldi.com>
+----------------------------
+revision 1.667
+date: 2003/12/24 23:19:13; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20031225
+----------------------------
+revision 1.666
+date: 2003/12/24 16:11:43; author: ianmacd; state: Exp; lines: +2 -2
+
+- ogg123 can now handle .flac and .spx files
+----------------------------
+revision 1.665
+date: 2003/12/15 19:02:22; author: ianmacd; state: Exp; lines: +53 -21
+
+- mutt completion improvements by Rodrigo Bernardo Pimentel <rbp@isnomore.net>
+----------------------------
+revision 1.664
+date: 2003/12/15 18:57:49; author: ianmacd; state: Exp; lines: +8 -2
+
+- more improvements to find(1) completion by Rodrigo Bernardo Pimentel
+ <rbp@isnomore.net>
+----------------------------
+revision 1.663
+date: 2003/12/15 18:54:17; author: ianmacd; state: Exp; lines: +2 -2
+
+- forgot to update release
+----------------------------
+revision 1.662
+date: 2003/12/15 09:49:51; author: ianmacd; state: Exp; lines: +13 -7
+
+- find(1) completion improvements by Rodrigo Bernardo Pimentel
+ <rbp@isnomore.net>
+----------------------------
+revision 1.661
+date: 2003/12/15 09:42:50; author: ianmacd; state: Exp; lines: +376 -3
+
+- ImageMagick completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.660
+date: 2003/12/15 09:30:23; author: ianmacd; state: Exp; lines: +54 -54
+
+- replace some white space
+----------------------------
+revision 1.659
+date: 2003/12/15 09:09:01; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow gpdf to complete on PDF files
+----------------------------
+revision 1.658
+date: 2003/12/12 11:10:49; author: ianmacd; state: Exp; lines: +8 -7
+
+- apt-cache completion updates from Danilo Piazzalunga
+ <danilopiazza@libero.it>
+----------------------------
+revision 1.657
+date: 2003/11/25 19:07:20; author: ianmacd; state: Exp; lines: +2 -2
+
+- update version to 20031125
+----------------------------
+revision 1.656
+date: 2003/11/25 18:37:37; author: ianmacd; state: Exp; lines: +97 -1
+
+- first cut at mutt completion by Rodrigo Bernardo Pimentel <rbp@isnomore.net>
+----------------------------
+revision 1.655
+date: 2003/11/19 19:11:25; author: ianmacd; state: Exp; lines: +2 -2
+
+- user completion for w(1)
+----------------------------
+revision 1.654
+date: 2003/11/15 08:59:13; author: ianmacd; state: Exp; lines: +52 -31
+
+- yum completion improvements from Haakon Nilsen <haakon@ii.uib.no>
+----------------------------
+revision 1.653
+date: 2003/11/12 10:20:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20031112
+----------------------------
+revision 1.652
+date: 2003/11/12 10:19:52; author: ianmacd; state: Exp; lines: +4 -1
+
+- default to file completion in perldoc, if current parameter contains
+ a slash
+----------------------------
+revision 1.651
+date: 2003/11/12 10:10:52; author: ianmacd; state: Exp; lines: +4 -3
+
+- further bogus matches removed from makefile completion
+----------------------------
+revision 1.650
+date: 2003/11/05 19:41:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .aac and .mp4 support to mplayer
+----------------------------
+revision 1.649
+date: 2003/11/04 00:27:29; author: ianmacd; state: Exp; lines: +3 -4
+
+- remove bogus targets from make completion
+----------------------------
+revision 1.648
+date: 2003/11/03 23:33:01; author: ianmacd; state: Exp; lines: +2 -2
+
+- add support for matroska files to mplayer
+----------------------------
+revision 1.647
+date: 2003/11/03 23:28:55; author: ianmacd; state: Exp; lines: +14 -1
+
+- rpm -qf improvement by Götz Waschk <waschk@informatik.uni-rostock.de>
+----------------------------
+revision 1.646
+date: 2003/11/02 21:19:46; author: ianmacd; state: Exp; lines: +3 -1
+
+- gzip should complete on .gz files after redirection
+----------------------------
+revision 1.645
+date: 2003/10/30 22:40:28; author: ianmacd; state: Exp; lines: +2 -2
+
+- bash 'command' built-in should also complete on commands
+----------------------------
+revision 1.644
+date: 2003/10/22 09:16:51; author: ianmacd; state: Exp; lines: +2 -2
+
+- update version to 20031022
+----------------------------
+revision 1.643
+date: 2003/10/20 21:07:58; author: ianmacd; state: Exp; lines: +2 -2
+
+- another unbound variable warning removed
+----------------------------
+revision 1.642
+date: 2003/10/20 21:05:20; author: ianmacd; state: Exp; lines: +7 -3
+
+- add URL for latest version of software
+----------------------------
+revision 1.641
+date: 2003/10/17 08:51:32; author: ianmacd; state: Exp; lines: +3 -3
+
+- add completion for vsound and really
+----------------------------
+revision 1.640
+date: 2003/10/17 08:26:39; author: ianmacd; state: Exp; lines: +4 -3
+
+- FreeBSD portinstall speed improvements from
+ Jean-Baptiste Quenot <jb.quenot@caraldi.com>
+----------------------------
+revision 1.639
+date: 2003/10/17 08:24:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- ee and display also complete on .pcx files
+----------------------------
+revision 1.638
+date: 2003/10/08 03:12:27; author: ianmacd; state: Exp; lines: +3 -3
+
+- yum and yum-arch now use -o filenames
+----------------------------
+revision 1.637
+date: 2003/10/07 08:50:16; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20031007
+----------------------------
+revision 1.636
+date: 2003/10/07 08:42:33; author: ianmacd; state: Exp; lines: +18 -40
+
+- more bash 3.x compatibility fixes
+----------------------------
+revision 1.635
+date: 2003/10/07 08:17:33; author: ianmacd; state: Exp; lines: +65 -1
+
+- yum(8) and yum-arch(8) completion by Ville Skyttä <ville.skytta@iki.fi>
+----------------------------
+revision 1.634
+date: 2003/10/07 08:02:00; author: ianmacd; state: Exp; lines: +50 -14
+
+- compatibility fixes for bash 3.x
+----------------------------
+revision 1.633
+date: 2003/10/07 06:50:08; author: ianmacd; state: Exp; lines: +2 -2
+
+- ggv can also handle .bz2 files
+----------------------------
+revision 1.632
+date: 2003/10/07 06:47:55; author: ianmacd; state: Exp; lines: +10 -2
+
+- iptables fixes from Alexander Davydenko <mba@cs.tu-berlin.de>
+----------------------------
+revision 1.631
+date: 2003/10/07 06:45:03; author: ianmacd; state: Exp; lines: +7 -6
+
+- minor IPSec fixes
+----------------------------
+revision 1.630
+date: 2003/09/29 18:08:05; author: ianmacd; state: Exp; lines: +2 -2
+
+- update version to 20030929
+----------------------------
+revision 1.629
+date: 2003/09/29 09:24:15; author: ianmacd; state: Exp; lines: +2 -2
+
+- simple perl completion fix by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.628
+date: 2003/09/17 07:41:37; author: ianmacd; state: Exp; lines: +12 -17
+
+- Java fixes from Markus Wiederkehr <wmax@gmx.net>
+----------------------------
+revision 1.627
+date: 2003/09/13 17:06:14; author: ianmacd; state: Exp; lines: +1 -250
+
+- urpmi completion removed; it's now maintained separately by
+ Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.626
+date: 2003/09/13 16:49:49; author: ianmacd; state: Exp; lines: +33 -7
+
+- postsuper patch from Liviu Daia <Liviu.Daia@imar.ro>
+----------------------------
+revision 1.625
+date: 2003/09/13 08:24:24; author: ianmacd; state: Exp; lines: +3 -3
+
+- .m3u completion for relevant tools
+----------------------------
+revision 1.624
+date: 2003/09/11 23:16:44; author: ianmacd; state: Exp; lines: +2 -2
+
+- update version to 20030911
+----------------------------
+revision 1.623
+date: 2003/09/11 23:13:40; author: ianmacd; state: Exp; lines: +64 -9
+
+- gzip and bzip2 rewrite by Liviu Daia <Liviu.Daia@imar.ro>
+----------------------------
+revision 1.622
+date: 2003/09/11 23:04:10; author: ianmacd; state: Exp; lines: +2 -2
+
+- really fix Java classpath thing
+----------------------------
+revision 1.621
+date: 2003/09/11 00:50:30; author: ianmacd; state: Exp; lines: +5 -2
+
+- fix service completion from completing on ~ and function files
+----------------------------
+revision 1.620
+date: 2003/09/11 00:32:22; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .xpi files to unzip completion
+----------------------------
+revision 1.619
+date: 2003/09/11 00:21:25; author: ianmacd; state: Exp; lines: +2 -2
+
+- properly skip classpath string in Java completion
+----------------------------
+revision 1.618
+date: 2003/08/22 07:12:51; author: ianmacd; state: Exp; lines: +3 -3
+
+- minor ant completion fix by Bart Vanhaute <bart.vanhaute@skynet.be>
+----------------------------
+revision 1.617
+date: 2003/08/21 09:55:40; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030821
+----------------------------
+revision 1.616
+date: 2003/08/19 18:52:31; author: ianmacd; state: Exp; lines: +2 -2
+
+- bind pkill to same completion function as killall for now
+----------------------------
+revision 1.615
+date: 2003/08/18 21:59:05; author: ianmacd; state: Exp; lines: +20 -1
+
+- mc completion by Koblinger Egmont <egmont@uhulinux.hu>
+----------------------------
+revision 1.614
+date: 2003/08/18 21:31:45; author: ianmacd; state: Exp; lines: +46 -6
+
+- add postcat completion and make minor improvements to other Postfix
+ command completions (patch by Liviu Daia <Liviu.Daia@imar.ro>)
+----------------------------
+revision 1.613
+date: 2003/08/18 09:54:07; author: ianmacd; state: Exp; lines: +11 -16
+
+- make chown completion work, whether or not the colon between user and
+ group name is escaped (fix from Oliver Kiddle <okiddle@yahoo.co.uk>)
+----------------------------
+revision 1.612
+date: 2003/08/18 09:33:29; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow rpm to complete on .nosrc.rpm packages
+----------------------------
+revision 1.611
+date: 2003/08/17 17:21:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- xine can also play .wav files
+----------------------------
+revision 1.610
+date: 2003/08/11 20:36:19; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030811
+----------------------------
+revision 1.609
+date: 2003/08/08 23:21:51; author: ianmacd; state: Exp; lines: +4 -4
+
+- fix killall completion on bash 2.05a (by Liviu.Daia@imar.ro)
+----------------------------
+revision 1.608
+date: 2003/08/05 17:41:40; author: ianmacd; state: Exp; lines: +18 -12
+
+- more make completion fixes from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.607
+date: 2003/08/05 00:32:25; author: ianmacd; state: Exp; lines: +15 -5
+
+- make _uids() and _gids() functions use Perl for getpwent(3)
+----------------------------
+revision 1.606
+date: 2003/08/04 05:15:28; author: ianmacd; state: Exp; lines: +91 -5
+
+- mkisofs completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.605
+date: 2003/08/04 01:40:25; author: ianmacd; state: Exp; lines: +7 -9
+
+- minor reorganisation
+----------------------------
+revision 1.604
+date: 2003/08/04 01:36:10; author: ianmacd; state: Exp; lines: +81 -3
+
+- cdrecord completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.603
+date: 2003/08/03 04:02:32; author: ianmacd; state: Exp; lines: +3 -3
+
+- update release to 20030803
+----------------------------
+revision 1.602
+date: 2003/08/03 03:23:26; author: ianmacd; state: Exp; lines: +2 -2
+
+- stop vi et al from completing on Java .class files
+----------------------------
+revision 1.601
+date: 2003/08/03 03:19:30; author: ianmacd; state: Exp; lines: +58 -50
+
+- 'make' completion rewrite by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.600
+date: 2003/08/03 03:07:38; author: ianmacd; state: Exp; lines: +3 -3
+
+- turn --targetbuildarch into --target and --buildarch in rpm completion
+- rpm's --rebuild and --recompile can also use --target
+----------------------------
+revision 1.599
+date: 2003/08/03 02:57:49; author: ianmacd; state: Exp; lines: +36 -13
+
+- tcpdump fixes from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.598
+date: 2003/08/03 02:52:43; author: ianmacd; state: Exp; lines: +170 -15
+
+- mplayer improvements from Ariel Fermani <the_end@bbs.frc.utn.edu.ar>
+----------------------------
+revision 1.597
+date: 2003/08/03 02:42:45; author: ianmacd; state: Exp; lines: +3 -1
+
+- allow find completion to return filenames in addition to options if
+ completing on a null token
+----------------------------
+revision 1.596
+date: 2003/07/29 04:19:03; author: ianmacd; state: Exp; lines: +5 -5
+
+- some perldoc clean-up
+----------------------------
+revision 1.595
+date: 2003/07/21 10:05:34; author: ianmacd; state: Exp; lines: +3 -3
+
+- add --triggerscripts option to rpm completion
+----------------------------
+revision 1.594
+date: 2003/07/21 07:59:24; author: ianmacd; state: Exp; lines: +2 -2
+
+- update to 20030721
+----------------------------
+revision 1.593
+date: 2003/07/20 09:52:57; author: ianmacd; state: Exp; lines: +5 -5
+
+- .shtml completion for browsers
+- extra extension completions for xine and xanim
+- vim et all should not complete on .gz and .bz2 files
+ (all of the above by Ariel Fermani <the_end@bbs.frc.utn.edu.ar>)
+----------------------------
+revision 1.592
+date: 2003/07/20 09:45:06; author: ianmacd; state: Exp; lines: +26 -14
+
+- mplayer fixes and improvements from Ariel Fermani
+ <the_end@bbs.frc.utn.edu.ar>
+----------------------------
+revision 1.591
+date: 2003/07/20 08:46:37; author: ianmacd; state: Exp; lines: +3 -3
+
+- dselect fix by Ariel Fermani <the_end@bbs.frc.utn.edu.ar>
+----------------------------
+revision 1.590
+date: 2003/07/13 08:12:26; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030713
+----------------------------
+revision 1.589
+date: 2003/07/13 03:37:07; author: ianmacd; state: Exp; lines: +2 -2
+
+- _iwfconfig() typo fix by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.588
+date: 2003/07/11 09:22:55; author: ianmacd; state: Exp; lines: +9 -4
+
+- allow find to search through more than one directory root
+ (fix derived from patch by Denis McLaughlin <denism@cyberus.ca>)
+----------------------------
+revision 1.587
+date: 2003/07/11 08:48:07; author: ianmacd; state: Exp; lines: +5 -4
+
+- update rpm completion for rpm 4.2 (patch from Götz Waschk
+ <waschk@informatik.uni-rostock.de>)
+----------------------------
+revision 1.586
+date: 2003/07/11 08:30:59; author: ianmacd; state: Exp; lines: +9 -4
+
+- modify kldload and portinstall completion for FreeBSD 5
+ (patch from Jean-Baptiste Quenot <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.585
+date: 2003/06/30 01:41:57; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030630
+----------------------------
+revision 1.584
+date: 2003/06/30 01:35:57; author: ianmacd; state: Exp; lines: +4 -3
+
+- fix process truncation problem with killall completion
+----------------------------
+revision 1.583
+date: 2003/06/23 15:54:01; author: ianmacd; state: Exp; lines: +4 -3
+
+- psql update from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.582
+date: 2003/06/23 15:39:59; author: ianmacd; state: Exp; lines: +4 -3
+
+- new urpmi update from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.581
+date: 2003/06/18 00:18:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow mplayer to complete on .dump files
+----------------------------
+revision 1.580
+date: 2003/06/10 21:55:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- add xhost to host completion
+----------------------------
+revision 1.579
+date: 2003/06/07 23:23:49; author: ianmacd; state: Exp; lines: +4 -3
+
+- update release to 20030607
+----------------------------
+revision 1.578
+date: 2003/06/07 23:11:27; author: ianmacd; state: Exp; lines: +6 -1
+
+- some standard make commands (e.g. make world) for FreeBSD
+----------------------------
+revision 1.577
+date: 2003/06/07 23:09:34; author: ianmacd; state: Exp; lines: +35 -27
+
+- patch from Ilya <ilya@po4ta.com> to fix _command(), so that (in his words):
+ - Now work ok for commands with spaces
+ - Work if command completion is set with complete -W '...'
+ - Work in case when complete -F function and function use COMP_POINT or
+ COMP_LINE
+ - Fixed bug of incorrect completion list in case 'sudo vim <Tab>'
+----------------------------
+revision 1.576
+date: 2003/06/07 22:59:37; author: ianmacd; state: Exp; lines: +7 -5
+
+- make ifconfig completion work on FreeBSD, too
+----------------------------
+revision 1.575
+date: 2003/06/07 22:46:04; author: ianmacd; state: Exp; lines: +3 -3
+
+- explicit path to postconf(1) for Postfix completion
+----------------------------
+revision 1.574
+date: 2003/06/02 02:41:33; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor mount completion fix
+----------------------------
+revision 1.573
+date: 2003/06/01 20:44:41; author: ianmacd; state: Exp; lines: +2 -2
+
+- make .html completion case-insensitive
+----------------------------
+revision 1.572
+date: 2003/06/01 20:09:45; author: ianmacd; state: Exp; lines: +1 -2
+
+- fix FreeBSD portinstall completion
+----------------------------
+revision 1.571
+date: 2003/05/26 18:22:44; author: ianmacd; state: Exp; lines: +4 -2
+
+- minor apt-cache completion fix
+----------------------------
+revision 1.570
+date: 2003/05/26 18:17:05; author: ianmacd; state: Exp; lines: +14 -3
+
+- handle the case whereby we're sourced from a shell function
+----------------------------
+revision 1.569
+date: 2003/05/26 06:50:45; author: ianmacd; state: Exp; lines: +4 -3
+
+- dpkg completion was missing the -x option
+----------------------------
+revision 1.568
+date: 2003/05/21 17:01:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- add pkg_delete and pkg_info back onto FreeBSD commands that use
+ _pkg_delete()
+----------------------------
+revision 1.567
+date: 2003/05/21 09:57:58; author: ianmacd; state: Exp; lines: +26 -2
+
+- add FreeBSD portinstall completion (patch by Jean-Baptiste Quenot
+ <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.566
+date: 2003/05/17 09:55:11; author: ianmacd; state: Exp; lines: +6 -6
+
+- various bits of code referred to ${#COMP_WORDS} instead of ${#COMP_WORDS[@]}
+----------------------------
+revision 1.565
+date: 2003/05/17 09:52:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- silence stderr in man invocation in perldoc completion
+----------------------------
+revision 1.564
+date: 2003/05/16 07:12:14; author: ianmacd; state: Exp; lines: +2 -2
+
+- make insmod/modprobe completion handle .ko files for the 2.5/2.6 Linux kernel
+----------------------------
+revision 1.563
+date: 2003/05/06 08:39:49; author: ianmacd; state: Exp; lines: +8 -2
+
+- modify _cd() to make an attempt at variable completion
+----------------------------
+revision 1.562
+date: 2003/05/05 06:48:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20030505
+----------------------------
+revision 1.561
+date: 2003/05/04 18:35:17; author: ianmacd; state: Exp; lines: +2 -2
+
+- rpm completion was broken for Mandrake 9.1. Its rpm 4.0.4 doesn't allow
+ --nodigest
+----------------------------
+revision 1.560
+date: 2003/05/01 05:42:25; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030501
+----------------------------
+revision 1.559
+date: 2003/04/29 07:38:32; author: ianmacd; state: Exp; lines: +3 -2
+
+- minor fix to _insmod() to get modprobe -k <Tab> to do something.
+ patch from Josh Rosenau <jrosenau@ukans.edu>
+----------------------------
+revision 1.558
+date: 2003/04/29 07:28:10; author: ianmacd; state: Exp; lines: +18 -8
+
+- some rpm completion speed-ups, adapted from a patch by Dag Wieers
+ <dag@wieers.com>
+----------------------------
+revision 1.557
+date: 2003/04/29 02:24:20; author: ianmacd; state: Exp; lines: +35 -36
+
+- new urpmi completion patch from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.556
+date: 2003/04/26 02:33:16; author: ianmacd; state: Exp; lines: +2 -2
+
+- add --target to rpm -[bt] completion
+----------------------------
+revision 1.555
+date: 2003/04/23 07:30:46; author: ianmacd; state: Exp; lines: +26 -21
+
+- more urpmi updates from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.554
+date: 2003/04/20 22:30:40; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow xmms to complete on .mp2 files
+----------------------------
+revision 1.553
+date: 2003/04/20 22:19:55; author: ianmacd; state: Exp; lines: +3 -3
+
+- fix scp completion problem where 'scp file\ <Tab>' did not complete for
+ a file with a space in the name
+----------------------------
+revision 1.552
+date: 2003/04/20 22:15:38; author: ianmacd; state: Exp; lines: +3 -2
+
+- make have() user a wider path for searching for binaries on the system.
+ This enables completion functions for more binaries present on the system
+ to be installed
+----------------------------
+revision 1.551
+date: 2003/04/20 21:53:43; author: ianmacd; state: Exp; lines: +10 -9
+
+- fix up command completion noglob stuff ('sudo service' was broken, for
+ example)
+----------------------------
+revision 1.550
+date: 2003/04/20 21:28:17; author: ianmacd; state: Exp; lines: +17 -16
+
+- urpmi completion update from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.549
+date: 2003/04/19 08:52:57; author: ianmacd; state: Exp; lines: +3 -3
+
+- fix FreeBSD ports programs completion
+----------------------------
+revision 1.548
+date: 2003/04/19 07:44:04; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030419
+----------------------------
+revision 1.547
+date: 2003/04/19 07:43:41; author: ianmacd; state: Exp; lines: +10 -2
+
+- fix for sudo completion when subcommand is passed wildcard globs
+ (patch by Lucien Saviot <Lucien.Saviot@u-bourgogne.fr>)
+----------------------------
+revision 1.546
+date: 2003/04/19 01:12:37; author: ianmacd; state: Exp; lines: +17 -10
+
+- minor improvement to --export completion of gpg and the addition of
+ --recipient completion (patch by jens.heunemann@tngtech.com)
+----------------------------
+revision 1.545
+date: 2003/04/17 09:38:27; author: ianmacd; state: Exp; lines: +2 -2
+
+- somehow, _expand had been disabled by a stray colon, so that ~user would
+ be expanded, but ~user/foo* would not
+----------------------------
+revision 1.544
+date: 2003/04/15 08:54:50; author: ianmacd; state: Exp; lines: +74 -2
+
+- move dict completion into main file and rewrite from scratch
+----------------------------
+revision 1.543
+date: 2003/04/14 09:42:09; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030414
+----------------------------
+revision 1.542
+date: 2003/04/14 08:35:23; author: ianmacd; state: Exp; lines: +28 -1
+
+- added completion for iconv(1)
+----------------------------
+revision 1.541
+date: 2003/04/12 05:05:37; author: ianmacd; state: Exp; lines: +3 -3
+
+- make apt-cache complete the showsrc argument
+----------------------------
+revision 1.540
+date: 2003/04/08 07:48:47; author: ianmacd; state: Exp; lines: +19 -1
+
+- KDE dcop completion by Haakon Nilsen <haakon.nilsen@student.uib.no>
+----------------------------
+revision 1.539
+date: 2003/03/29 08:29:49; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix another unset variable warning in CVS completion
+----------------------------
+revision 1.538
+date: 2003/03/27 09:07:11; author: ianmacd; state: Exp; lines: +2 -2
+
+- update to release 20030327
+----------------------------
+revision 1.537
+date: 2003/03/27 07:48:09; author: ianmacd; state: Exp; lines: +38 -37
+
+- when completing on file in /etc/init.d, only complete if we really are
+ dealing with the init script, not a stand-alone file of the same name
+----------------------------
+revision 1.536
+date: 2003/03/18 00:34:02; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix core file completion in gdb
+----------------------------
+revision 1.535
+date: 2003/02/27 09:31:14; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030227
+----------------------------
+revision 1.534
+date: 2003/02/27 09:30:07; author: ianmacd; state: Exp; lines: +3 -2
+
+- exclude mysql init script from completion, as it clashes with completion
+ for stand-alone mysql
+----------------------------
+revision 1.533
+date: 2003/02/26 01:17:54; author: ianmacd; state: Exp; lines: +11 -11
+
+- patch from Oliver Kiddle to make bash-completion compatible with the
+ new bash completion emulation feature of zsh
+----------------------------
+revision 1.532
+date: 2003/02/18 21:35:56; author: ianmacd; state: Exp; lines: +2 -2
+
+- exclude ssh from service completion, as it clashes with regular ssh
+ completion on Debian
+----------------------------
+revision 1.531
+date: 2003/02/16 08:39:26; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .tga completion to ee and display
+----------------------------
+revision 1.530
+date: 2003/02/10 07:55:22; author: ianmacd; state: Exp; lines: +3 -3
+
+- make slay complete on users and don't redefine su completion
+----------------------------
+revision 1.529
+date: 2003/02/09 09:14:09; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20030209
+----------------------------
+revision 1.528
+date: 2003/02/08 07:33:51; author: ianmacd; state: Exp; lines: +14 -2
+
+- allow 'cvs -d' to complete from ~/.cvspass (modified patch from
+ Rodrigo Damazio <rodrigo.damazio@poli.usp.br>)
+----------------------------
+revision 1.527
+date: 2003/02/07 18:04:35; author: ianmacd; state: Exp; lines: +3 -3
+
+- don't append spaces after directories when doing mount completion
+- allow default completion if there are no matches during make completion
+----------------------------
+revision 1.526
+date: 2003/02/06 19:08:16; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow Java completion to cover .ear files (J2EE Enterprise Application
+ aRchive)
+----------------------------
+revision 1.525
+date: 2003/02/06 19:06:29; author: ianmacd; state: Exp; lines: +7 -7
+
+- silence more unset variable warnings in CVS completion
+----------------------------
+revision 1.524
+date: 2003/02/01 22:39:25; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030201
+----------------------------
+revision 1.523
+date: 2003/01/30 09:22:43; author: ianmacd; state: Exp; lines: +13 -9
+
+- make service completion Debian compatible
+----------------------------
+revision 1.522
+date: 2003/01/30 08:56:28; author: ianmacd; state: Exp; lines: +95 -2
+
+- rsync completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.521
+date: 2003/01/30 08:41:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor cvs fix
+----------------------------
+revision 1.520
+date: 2003/01/27 00:41:23; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030126
+----------------------------
+revision 1.519
+date: 2003/01/25 22:22:16; author: ianmacd; state: Exp; lines: +5 -5
+
+- silence more unset variable warnings in cvs completion
+ (patch from "Irlapati, Samuel J." <samuel.irlapati@unisys.com>)
+----------------------------
+revision 1.518
+date: 2003/01/25 22:11:18; author: ianmacd; state: Exp; lines: +3 -1
+
+- minor fix to ant completion from Jean-Baptiste Quenot <jb.quenot@caraldi.com>
+----------------------------
+revision 1.517
+date: 2003/01/21 08:21:15; author: ianmacd; state: Exp; lines: +5 -3
+
+- make completion now also supports GNUmakefile
+----------------------------
+revision 1.516
+date: 2003/01/21 07:37:44; author: ianmacd; state: Exp; lines: +5 -4
+
+- make modinfo complete the same as insmod and modprobe
+----------------------------
+revision 1.515
+date: 2003/01/18 09:36:22; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030118
+----------------------------
+revision 1.514
+date: 2003/01/17 10:09:59; author: ianmacd; state: Exp; lines: +15 -2
+
+- improve handling of 'cvs export' (patch by Liviu Daia <Liviu.Daia@imar.ro>)
+----------------------------
+revision 1.513
+date: 2003/01/17 10:01:29; author: ianmacd; state: Exp; lines: +9 -4
+
+- fix mount completion so that it also works on Solaris
+----------------------------
+revision 1.512
+date: 2003/01/17 09:54:32; author: ianmacd; state: Exp; lines: +9 -9
+
+- fixes to man completion to make it work on Solaris
+ (patch by Pablo Mejia <pjm@cctechnol.com>)
+----------------------------
+revision 1.511
+date: 2003/01/13 16:31:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030113
+----------------------------
+revision 1.510
+date: 2003/01/13 16:30:56; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow vim et al to complete on .a files
+----------------------------
+revision 1.509
+date: 2003/01/13 03:30:37; author: ianmacd; state: Exp; lines: +6 -2
+
+- cd should also complete on variable names if cdable_vars is set
+----------------------------
+revision 1.508
+date: 2003/01/13 03:28:28; author: ianmacd; state: Exp; lines: +2 -3
+
+- jar completes on .war as well as .jar
+----------------------------
+revision 1.507
+date: 2003/01/09 11:44:29; author: ianmacd; state: Exp; lines: +14 -6
+
+- when completing on classes inside Java JAR files, use zipinfo instead of
+ the jar command, if it is available
+----------------------------
+revision 1.506
+date: 2003/01/09 11:25:58; author: ianmacd; state: Exp; lines: +2 -2
+
+- silence awk errors in known_hosts completion
+----------------------------
+revision 1.505
+date: 2003/01/02 02:04:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow vi(m) to complete on ld.so.conf
+----------------------------
+revision 1.504
+date: 2002/12/31 17:00:06; author: ianmacd; state: Exp; lines: +2 -2
+branches: 1.504.2;
+
+- update release to 20021231
+----------------------------
+revision 1.503
+date: 2002/12/31 03:15:25; author: ianmacd; state: Exp; lines: +4 -4
+
+- minor known_hosts() fix
+----------------------------
+revision 1.502
+date: 2002/12/31 02:59:25; author: ianmacd; state: Exp; lines: +59 -2
+
+- extensive gpg(1) completion (more than just longopts, anyway) by
+ "Guillaume Rousse" <rousse@ccr.jussieu.fr> with fix-ups by me
+----------------------------
+revision 1.501
+date: 2002/12/31 02:40:22; author: ianmacd; state: Exp; lines: +43 -1
+
+- wvdial(1) completion by "Guillaume Rousse" <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.500
+date: 2002/12/30 22:23:21; author: ianmacd; state: Exp; lines: +142 -86
+
+- mplayer improvements from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.499
+date: 2002/12/23 18:28:54; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20021223
+----------------------------
+revision 1.498
+date: 2002/12/23 08:53:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- add groups(1) to list of commands that complete on user names
+----------------------------
+revision 1.497
+date: 2002/12/23 08:52:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- add dig to commands that complete on known hosts
+----------------------------
+revision 1.496
+date: 2002/12/23 08:51:39; author: ianmacd; state: Exp; lines: +5 -3
+
+- in known hosts completion, check for known hosts files in
+ /etc/ssh/ssh_known_hosts and /etc/ssh/ssh_known_hosts2
+----------------------------
+revision 1.495
+date: 2002/12/22 18:45:02; author: ianmacd; state: Exp; lines: +8 -7
+
+- mplayer fixes
+----------------------------
+revision 1.494
+date: 2002/12/22 18:29:34; author: ianmacd; state: Exp; lines: +2 -2
+
+- Java classpath string was not being skipped
+----------------------------
+revision 1.493
+date: 2002/12/21 06:47:34; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021221
+----------------------------
+revision 1.492
+date: 2002/12/19 21:57:36; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor removepkg fix
+----------------------------
+revision 1.491
+date: 2002/12/19 21:56:47; author: ianmacd; state: Exp; lines: +110 -3
+
+- proper mplayer completion by Peter Valach <pvalach@gmx.net>
+----------------------------
+revision 1.490
+date: 2002/12/18 19:15:46; author: ianmacd; state: Exp; lines: +61 -58
+
+- reinstate Samuel J. Irlapati's patch to avoid unbound variable warnings
+ when bash is run with 'set -u'. This also fixes a CVS completion error
+ if CVS completion is attempted in a directory with no CVS/Entries file.
+ Patch was modified to test for set variables with -n, rather than ! -z.
+----------------------------
+revision 1.489
+date: 2002/12/17 09:43:45; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021217
+----------------------------
+revision 1.488
+date: 2002/12/16 20:48:58; author: ianmacd; state: Exp; lines: +5 -4
+
+- tar should also be able to recognise .tar.Z (or .tZ for that matter) files
+----------------------------
+revision 1.487
+date: 2002/12/14 02:17:43; author: ianmacd; state: Exp; lines: +2 -1
+
+- perldoc completion also returns names of core Perl man pages
+----------------------------
+revision 1.486
+date: 2002/12/13 05:12:34; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021213
+----------------------------
+revision 1.485
+date: 2002/12/10 17:05:31; author: ianmacd; state: Exp; lines: +51 -52
+
+- revert unbound variable patch
+----------------------------
+revision 1.484
+date: 2002/12/10 01:30:08; author: ianmacd; state: Exp; lines: +6 -5
+
+- ytalk now completes in the same way as talk
+- traceroute6, tracepath and tracepath6 now also complete on known hosts
+- command completion now also performed for ltrace, then, else and do
+ (patches from Koblinger Egmont <egmont@uhulinux.hu>)
+----------------------------
+revision 1.483
+date: 2002/12/09 21:48:15; author: ianmacd; state: Exp; lines: +52 -51
+
+- fix a lot of variable tests to avoid 'unbound variable' warnings when
+ running bash with 'set -u' (some still remain, but the file now at least
+ sources without warnings) (patch by Samuel Irlapati
+ <samuel.irlapati@unisys.com>)
+----------------------------
+revision 1.482
+date: 2002/12/09 21:35:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor fix to gdb completion
+----------------------------
+revision 1.481
+date: 2002/12/06 22:43:02; author: ianmacd; state: Exp; lines: +2 -2
+
+- commands that complete on .htm(l) files now complete on .(x)htm(l)
+----------------------------
+revision 1.480
+date: 2002/12/05 21:43:10; author: ianmacd; state: Exp; lines: +12 -8
+
+- fix ypmatch completion
+- update release to 20021205
+----------------------------
+revision 1.479
+date: 2002/12/05 17:58:26; author: ianmacd; state: Exp; lines: +8 -5
+
+- ypmatch takes parameters of key, map -- not map, key -- so key completion
+ is not possible
+----------------------------
+revision 1.478
+date: 2002/12/05 06:31:42; author: ianmacd; state: Exp; lines: +22 -1
+
+- first stab at ypmatch(1) and ypcat(1) completion
+----------------------------
+revision 1.477
+date: 2002/12/05 05:22:22; author: ianmacd; state: Exp; lines: +8 -8
+
+- check for insmod and rmmod in path before installing completion functions
+----------------------------
+revision 1.476
+date: 2002/12/05 02:58:28; author: ianmacd; state: Exp; lines: +2 -2
+
+- add rcsdiff to list of RCS commands that use RCS completion function
+----------------------------
+revision 1.475
+date: 2002/12/05 02:56:19; author: ianmacd; state: Exp; lines: +25 -22
+
+- don't bother completing on PIDs in screen completion
+ (patch by Jean-Baptiste Quenot <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.474
+date: 2002/12/05 02:52:56; author: ianmacd; state: Exp; lines: +29 -5
+
+- add FreeBSD portupgrade completion
+ (from Jean-Baptiste Quenot <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.473
+date: 2002/12/05 02:47:49; author: ianmacd; state: Exp; lines: +30 -4
+
+- add FreeBSD kernel module command completion (patch from
+ Jean-Baptiste Quenot <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.472
+date: 2002/12/05 02:31:52; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .zargo to list of extensions that unzip can complete on (this is for
+ Gentleware)
+----------------------------
+revision 1.471
+date: 2002/12/05 02:18:17; author: ianmacd; state: Exp; lines: +3 -2
+
+- don't source files in $BASH_COMPLETION_DIR if they are vi swap files,
+ Debian back-ups, Emacs temp files, back-ups, etc.
+----------------------------
+revision 1.470
+date: 2002/12/04 07:41:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- don't source files in $BASH_COMPLETION_DIR if they end in ~ or .bak
+----------------------------
+revision 1.469
+date: 2002/12/04 07:26:35; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .flac completion to xmms
+----------------------------
+revision 1.468
+date: 2002/12/04 07:25:47; author: ianmacd; state: Exp; lines: +2 -2
+
+- make dpkg completion also handle .udeb files
+----------------------------
+revision 1.467
+date: 2002/12/04 07:17:47; author: ianmacd; state: Exp; lines: +2 -2
+
+- dpkg completion completes for -c as for --contents
+----------------------------
+revision 1.466
+date: 2002/12/04 05:43:34; author: ianmacd; state: Exp; lines: +2 -2
+
+- make gzip work with .tgz files, not just .gz files
+----------------------------
+revision 1.465
+date: 2002/12/04 05:37:03; author: ianmacd; state: Exp; lines: +2 -2
+
+- make ee and display complete on .pnm and .xwd files
+----------------------------
+revision 1.464
+date: 2002/12/04 05:32:06; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor rpm fix
+----------------------------
+revision 1.463
+date: 2002/12/04 05:02:12; author: ianmacd; state: Exp; lines: +3 -3
+
+- make texi2dvi complete like other LaTeX programs
+----------------------------
+revision 1.462
+date: 2002/10/26 06:11:59; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20021026
+----------------------------
+revision 1.461
+date: 2002/10/26 06:04:45; author: ianmacd; state: Exp; lines: +51 -19
+
+- Mandrake urpmi completion improvements from Guillaume Rousse
+ <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.460
+date: 2002/10/26 05:54:48; author: ianmacd; state: Exp; lines: +3 -2
+
+- .wav completion for mplayer
+----------------------------
+revision 1.459
+date: 2002/10/25 22:45:23; author: ianmacd; state: Exp; lines: +10 -11
+
+- more scp fixes and simplifications
+----------------------------
+revision 1.458
+date: 2002/10/23 16:05:16; author: ianmacd; state: Exp; lines: +17 -1
+
+- very basic look(1) completion
+----------------------------
+revision 1.457
+date: 2002/10/23 15:50:04; author: ianmacd; state: Exp; lines: +2 -2
+
+- previous fix to man completion when completing on name with '.' in it,
+ broke completion on names with colons in them. This fixes that.
+----------------------------
+revision 1.456
+date: 2002/10/22 20:23:41; author: ianmacd; state: Exp; lines: +3 -3
+
+- use external ls in scp completion if an alias has been defined
+----------------------------
+revision 1.455
+date: 2002/10/22 16:00:22; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021022
+----------------------------
+revision 1.454
+date: 2002/10/22 15:59:44; author: ianmacd; state: Exp; lines: +10 -11
+
+- get rid of scp helper function, as interpolation is subject to error
+----------------------------
+revision 1.453
+date: 2002/10/21 06:42:40; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021021
+----------------------------
+revision 1.452
+date: 2002/10/20 22:20:49; author: ianmacd; state: Exp; lines: +7 -3
+
+- PID is optional in screen completion
+ (patch from Jean-Baptiste Quenot <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.451
+date: 2002/10/20 22:11:21; author: ianmacd; state: Exp; lines: +11 -7
+
+- redirect stderr to /dev/null when performing remote path completion for
+ scp
+- factor out the scp ls completion code into its own function, as we need to
+ call this once remotely and once locally
+----------------------------
+revision 1.450
+date: 2002/10/20 06:56:41; author: ianmacd; state: Exp; lines: +6 -5
+
+- references to ps now use command built-in to avoid ps calling alias or
+ function on systems where those are in use
+----------------------------
+revision 1.449
+date: 2002/10/17 20:51:25; author: ianmacd; state: Exp; lines: +4 -4
+
+- fix sockets being returned in scp completon
+- fix FreeBSD pkg_delete completion
+----------------------------
+revision 1.448
+date: 2002/10/17 07:20:05; author: ianmacd; state: Exp; lines: +5 -5
+
+- update release to 20021017
+----------------------------
+revision 1.447
+date: 2002/10/17 05:33:24; author: ianmacd; state: Exp; lines: +13 -5
+
+- scp completion fixes
+ - don't escape : with \
+ - doesn't require bash on remote machine
+ - deal properly with file names containing spaces
+ (patch by Lucien Saviot <Lucien.Saviot@u-bourgogne.fr>, with minor
+ alterations from me)
+----------------------------
+revision 1.446
+date: 2002/10/17 05:01:21; author: ianmacd; state: Exp; lines: +19 -2
+
+- simplify FreeBSD pkg_delete completion, so that it doesn't need sed
+- add Slackware Linux removepkg completion (by Christian Birchinger
+ <joker@netswarm.net>)
+----------------------------
+revision 1.445
+date: 2002/10/17 03:18:34; author: ianmacd; state: Exp; lines: +16 -1
+
+- add FreeBSD pkg_delete and pkg_info completion
+ (patch by Jean-Baptiste Quenot <jb.quenot@caraldi.com>)
+----------------------------
+revision 1.444
+date: 2002/10/17 03:05:29; author: ianmacd; state: Exp; lines: +2 -2
+
+- Perl module completion loops endlessly if an element of the @INC path does
+ not exist and there are subdirectories in the current directory
+ (patch from Alexander Kreuzer <alex@flotzen.de>)
+----------------------------
+revision 1.443
+date: 2002/10/17 02:53:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- minor fix to apt-build completion
+----------------------------
+revision 1.442
+date: 2002/10/17 02:47:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow xmms to also complete on .wav files
+----------------------------
+revision 1.441
+date: 2002/10/16 00:09:09; author: ianmacd; state: Exp; lines: +2 -3
+
+- return core files in gdb completion
+----------------------------
+revision 1.440
+date: 2002/10/14 19:57:15; author: ianmacd; state: Exp; lines: +2 -2
+
+- tar file completion on files within .bz2 archives did not work
+----------------------------
+revision 1.439
+date: 2002/10/14 18:56:46; author: ianmacd; state: Exp; lines: +2 -2
+
+- in _tar(), don't perform regular file completion when completing on files
+ inside tar files
+----------------------------
+revision 1.438
+date: 2002/10/13 18:06:00; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021013
+----------------------------
+revision 1.437
+date: 2002/10/13 03:46:49; author: ianmacd; state: Exp; lines: +90 -58
+
+various fixes from Rafael Sepúlveda <drs@gnulinux.org.mx>
+- fixed apt-cache 'show' completion bug
+- fixed function names with hyphens
+- aptitude completion function was loaded, regardless of presence of program
+- various improvements to other Debian commands
+----------------------------
+revision 1.436
+date: 2002/10/10 15:43:38; author: ianmacd; state: Exp; lines: +2 -2
+
+- mount completion should ignore commented out lines in /etc/fstab
+----------------------------
+revision 1.435
+date: 2002/10/10 08:38:05; author: ianmacd; state: Exp; lines: +37 -5
+
+- add option completion to Python
+- make Python completion append a '/' at the end of directories
+ (use -o filenames rather than -o default to compgen)
+ (patch by Rafael Sepúlveda <drs@gnulinux.org.mx>)
+----------------------------
+revision 1.434
+date: 2002/10/09 07:29:14; author: ianmacd; state: Exp; lines: +2 -2
+
+- offer --force-confmiss, not --force-miss with dpkg completion
+----------------------------
+revision 1.433
+date: 2002/10/08 07:00:57; author: ianmacd; state: Exp; lines: +4 -1
+
+- perform file completion with ssh when -i is given
+----------------------------
+revision 1.432
+date: 2002/10/07 16:31:47; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021007
+----------------------------
+revision 1.431
+date: 2002/10/07 16:27:01; author: ianmacd; state: Exp; lines: +2 -2
+
+- back out double hostname fix for scp
+----------------------------
+revision 1.430
+date: 2002/10/06 22:24:18; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix error message when using insmod to complete on a file in ..
+----------------------------
+revision 1.429
+date: 2002/10/05 21:33:03; author: ianmacd; state: Exp; lines: +9 -2
+
+- option completion for find had mysteriously disappeared
+----------------------------
+revision 1.428
+date: 2002/10/05 09:48:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021005
+----------------------------
+revision 1.427
+date: 2002/10/05 09:34:57; author: ianmacd; state: Exp; lines: +2 -2
+
+- make jar completion accept a leading dash to its option list
+ (patch by "C. Scott Ananian" <cananian@lesser-magoo.lcs.mit.edu>)
+----------------------------
+revision 1.426
+date: 2002/10/05 09:33:14; author: ianmacd; state: Exp; lines: +3 -4
+
+- fix cvs counting bug
+ (patch by "C. Scott Ananian" <cananian@lesser-magoo.lcs.mit.edu>
+----------------------------
+revision 1.425
+date: 2002/10/05 09:31:43; author: ianmacd; state: Exp; lines: +26 -5
+
+- make java completion aware of -jar
+----------------------------
+revision 1.424
+date: 2002/10/05 08:08:53; author: ianmacd; state: Exp; lines: +6 -6
+
+- silence some apt-cache complaints in various completions
+ (patch by Rafael Sepúlveda <drs@gnulinux.org.mx>)
+----------------------------
+revision 1.423
+date: 2002/10/05 08:03:21; author: ianmacd; state: Exp; lines: +4 -2
+
+- avoid awk error message in rmmod completion and grep error message in
+ mount completion, when attempting to complete on a backslash
+----------------------------
+revision 1.422
+date: 2002/10/05 07:52:37; author: ianmacd; state: Exp; lines: +3 -3
+
+- avoid double machine name bug in scp
+----------------------------
+revision 1.421
+date: 2002/10/02 03:32:40; author: ianmacd; state: Exp; lines: +94 -66
+
+- many Debian command updates from Rafael Sepúlveda <drs@gnulinux.org.mx>
+----------------------------
+revision 1.420
+date: 2002/10/01 09:06:01; author: ianmacd; state: Exp; lines: +3 -1
+
+- check for existence of links history file in links completion
+----------------------------
+revision 1.419
+date: 2002/10/01 08:57:31; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20021001
+----------------------------
+revision 1.418
+date: 2002/10/01 08:55:38; author: ianmacd; state: Exp; lines: +37 -2
+
+- links completion by Alan Ford <alan@whirlnet.co.uk>
+----------------------------
+revision 1.417
+date: 2002/10/01 08:07:33; author: ianmacd; state: Exp; lines: +3 -3
+
+- some quoting changes to make life easier for Emacs users
+----------------------------
+revision 1.416
+date: 2002/10/01 05:57:54; author: ianmacd; state: Exp; lines: +3 -3
+
+- fix quoting issue in chown and chgrp completion
+----------------------------
+revision 1.415
+date: 2002/09/28 18:48:02; author: ianmacd; state: Exp; lines: +3 -5
+
+- apt-build completion was always installed, even if not present
+----------------------------
+revision 1.414
+date: 2002/09/28 18:38:50; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020928
+----------------------------
+revision 1.413
+date: 2002/09/28 18:33:12; author: ianmacd; state: Exp; lines: +23 -20
+
+- add some options to apt-build completion
+ (Patch by Rafael Sepúlveda <drs@gnulinux.org.mx>)
+----------------------------
+revision 1.412
+date: 2002/09/28 18:12:24; author: ianmacd; state: Exp; lines: +54 -48
+
+- add some parameters to apt-get completion
+ (patch by Rafael Sepúlveda <drs@gnulinux.org.mx>
+- white-space clean-up
+----------------------------
+revision 1.411
+date: 2002/09/19 06:21:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- make gvim complete on same files as vim
+----------------------------
+revision 1.410
+date: 2002/09/09 18:31:59; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020909
+----------------------------
+revision 1.409
+date: 2002/09/09 18:26:14; author: ianmacd; state: Exp; lines: +11 -11
+
+- rename rpm helper functions to be more consistent
+----------------------------
+revision 1.408
+date: 2002/09/09 15:46:17; author: ianmacd; state: Exp; lines: +5 -5
+
+- fix for 'cvs add', where filename ends with another filename, such as
+ aa.c and a.c
+----------------------------
+revision 1.407
+date: 2002/09/08 22:04:26; author: ianmacd; state: Exp; lines: +16 -3
+
+- option completion for chown and chgrp
+----------------------------
+revision 1.406
+date: 2002/09/08 21:48:27; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .ogm and .mp4 to mplayer and xine
+----------------------------
+revision 1.405
+date: 2002/08/23 02:00:04; author: ianmacd; state: Exp; lines: +2 -2
+
+- more file-types for xmms to complete on
+----------------------------
+revision 1.404
+date: 2002/08/19 16:58:12; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020819
+----------------------------
+revision 1.403
+date: 2002/08/19 16:56:55; author: ianmacd; state: Exp; lines: +55 -38
+
+- add Linux iwconfig completion
+- consolidate most of ifconfig and iwconfig completion into _ifwconfig()
+----------------------------
+revision 1.402
+date: 2002/08/12 16:04:58; author: ianmacd; state: Exp; lines: +3 -2
+
+- xmms can now also complete on .xm, .mod and .s3m files
+----------------------------
+revision 1.401
+date: 2002/08/12 15:29:35; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020812
+----------------------------
+revision 1.400
+date: 2002/08/06 22:04:47; author: ianmacd; state: Exp; lines: +3 -3
+
+- ./configure completion was not returning all possible completions for
+ mawk users, as mawk does not recognise \w
+----------------------------
+revision 1.399
+date: 2002/08/05 07:47:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- no space after export completion (assuming bash 2.05b)
+----------------------------
+revision 1.398
+date: 2002/08/05 07:39:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .wmv files to those that aviplay will complete on
+----------------------------
+revision 1.397
+date: 2002/08/03 09:35:33; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020803
+----------------------------
+revision 1.396
+date: 2002/08/01 01:18:51; author: ianmacd; state: Exp; lines: +3 -2
+
+- silence eval errors in _filedir_xspec() when quoting goes awry
+----------------------------
+revision 1.395
+date: 2002/08/01 01:11:14; author: ianmacd; state: Exp; lines: +56 -1
+
+- add apt-build completion by Rafael Sepúlveda <drs@gnulinux.org.mx>
+----------------------------
+revision 1.394
+date: 2002/07/30 15:38:11; author: ianmacd; state: Exp; lines: +2 -2
+
+- add elinks to commands performing .html completion
+----------------------------
+revision 1.393
+date: 2002/07/29 18:05:59; author: ianmacd; state: Exp; lines: +116 -2
+
+- perl and perldoc completion by Alex Shinn <foof@synthcode.com>
+----------------------------
+revision 1.392
+date: 2002/07/29 06:48:29; author: ianmacd; state: Exp; lines: +2 -2
+
+- apparently, vim can edit .gz and .bz2 files, so don't exclude these from
+ the completion list
+----------------------------
+revision 1.391
+date: 2002/07/29 06:44:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix sed error when completing a relative path in insmod completion
+----------------------------
+revision 1.390
+date: 2002/07/27 09:12:57; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020727
+----------------------------
+revision 1.389
+date: 2002/07/27 09:12:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix typo in vim completion and add a couple more file types to avoid
+ returning as possible completions
+----------------------------
+revision 1.388
+date: 2002/07/26 18:55:35; author: ianmacd; state: Exp; lines: +2 -2
+
+- _man(): when completing on man page names, a trailing dot would be removed
+ when trying to complete a man page such as syslog.conf
+----------------------------
+revision 1.387
+date: 2002/07/23 15:59:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- update to release 20020723
+----------------------------
+revision 1.386
+date: 2002/07/23 15:59:15; author: ianmacd; state: Exp; lines: +4 -4
+
+- allow '@' in the release of RPM packages for rpm completion
+----------------------------
+revision 1.385
+date: 2002/07/22 20:08:53; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow gunzip et al to recognise .dz files (compressed dict files)
+----------------------------
+revision 1.384
+date: 2002/07/22 18:57:28; author: ianmacd; state: Exp; lines: +22 -4
+
+- add _user_at_host() for user@host style completion. Use this for finger
+ and talk
+- scp completion now no longer appends a space with bash 2.05b
+- scp completion now discards stderr when performing remote path completion
+----------------------------
+revision 1.383
+date: 2002/07/16 08:16:50; author: ianmacd; state: Exp; lines: +3 -3
+
+- bzgrep et all now also recognise .tbz2
+- update release to 20020716
+----------------------------
+revision 1.382
+date: 2002/07/16 01:07:03; author: ianmacd; state: Exp; lines: +10 -2
+
+- mount completion will now complete on Samba shares (only the volume, not
+ the hostname part)
+----------------------------
+revision 1.381
+date: 2002/07/15 23:07:02; author: ianmacd; state: Exp; lines: +5 -3
+
+- catch more possible completions in configure completion
+----------------------------
+revision 1.380
+date: 2002/07/12 09:21:06; author: ianmacd; state: Exp; lines: +2 -2
+
+- add some file types that xv can complete on
+----------------------------
+revision 1.379
+date: 2002/07/11 07:54:51; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020711
+----------------------------
+revision 1.378
+date: 2002/07/08 05:09:22; author: ianmacd; state: Exp; lines: +3 -3
+
+- PINE address book completion fix
+- allow WINE to complete on .scr files
+----------------------------
+revision 1.377
+date: 2002/07/04 07:13:41; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020704
+----------------------------
+revision 1.376
+date: 2002/07/04 05:45:06; author: ianmacd; state: Exp; lines: +19 -7
+
+- urpmi completion update from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.375
+date: 2002/07/04 05:14:47; author: ianmacd; state: Exp; lines: +2 -2
+
+- touch-ups to mplayer completion
+----------------------------
+revision 1.374
+date: 2002/06/26 08:28:12; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020626
+----------------------------
+revision 1.373
+date: 2002/06/26 05:30:50; author: ianmacd; state: Exp; lines: +6 -4
+
+- make tilde expansion work during chown completion
+----------------------------
+revision 1.372
+date: 2002/06/25 15:48:33; author: ianmacd; state: Exp; lines: +3 -2
+
+- make tar completion -o filenames by default.
+ -o dirnames can be obtained by setting $COMP_TAR_INTERNAL_PATHS prior to
+ sourcing.
+----------------------------
+revision 1.371
+date: 2002/06/24 21:40:04; author: ianmacd; state: Exp; lines: +7 -3
+
+- restore expansion of ~: its removal broke too much
+----------------------------
+revision 1.370
+date: 2002/06/24 16:37:13; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020624
+----------------------------
+revision 1.369
+date: 2002/06/24 16:34:50; author: ianmacd; state: Exp; lines: +3 -6
+
+- avoid tilde expansion where possible, but do interpret the meaning of
+ ~user. This stops 'cd ~us<Tab>' from expanding to 'cd /home/user/'
+----------------------------
+revision 1.368
+date: 2002/06/24 08:22:11; author: ianmacd; state: Exp; lines: +6 -8
+
+- gdb completion defaults to -o filenames, not -o default
+- simplify process matching code in gdb completion
+----------------------------
+revision 1.367
+date: 2002/06/24 07:52:54; author: ianmacd; state: Exp; lines: +2 -2
+
+- allow unzip to complete on Java Enterprise Application Archive files (.ear)
+----------------------------
+revision 1.366
+date: 2002/06/21 09:12:59; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020621
+----------------------------
+revision 1.365
+date: 2002/06/21 09:11:32; author: ianmacd; state: Exp; lines: +9 -8
+
+- add edit and unedit to cvs completion
+----------------------------
+revision 1.364
+date: 2002/06/19 17:12:52; author: ianmacd; state: Exp; lines: +2 -2
+
+- don't exclude .o files from make completion
+----------------------------
+revision 1.363
+date: 2002/06/19 16:53:48; author: ianmacd; state: Exp; lines: +5 -5
+
+- {gzip,bzip2} -t should also complete on .gz and .bz2 files, respectively
+- man completion still needed one fix for FreeBSD
+----------------------------
+revision 1.362
+date: 2002/06/19 08:18:28; author: ianmacd; state: Exp; lines: +3 -3
+
+- update release to 20020619
+----------------------------
+revision 1.361
+date: 2002/06/17 16:40:59; author: ianmacd; state: Exp; lines: +3 -3
+
+- allow .tbz as an extension during tar completion
+----------------------------
+revision 1.360
+date: 2002/06/17 16:38:37; author: ianmacd; state: Exp; lines: +5 -1
+
+- check for non-Linux and presence of gsed (GNU sed). If it's there, alias
+ it to sed.
+----------------------------
+revision 1.359
+date: 2002/06/17 02:08:45; author: ianmacd; state: Exp; lines: +3 -3
+
+- make man completion work for FreeBSD
+----------------------------
+revision 1.358
+date: 2002/06/16 18:35:58; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020616
+----------------------------
+revision 1.357
+date: 2002/06/16 18:35:28; author: ianmacd; state: Exp; lines: +4 -4
+
+- eliminate errors when setting read-only variables
+----------------------------
+revision 1.356
+date: 2002/06/12 21:43:00; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix quoting bug in PINE address completion
+----------------------------
+revision 1.355
+date: 2002/06/11 18:49:57; author: ianmacd; state: Exp; lines: +3 -3
+
+- update release to 20020611
+----------------------------
+revision 1.354
+date: 2002/06/10 15:36:50; author: ianmacd; state: Exp; lines: +4 -4
+
+- BASH_COMPLETION_DIR had a typo and was set to /etc/bash_completion
+ instead of /etc/bash_completion.d
+- in tar completion, completing on files within a tar file would consume all
+ memory in bash 2.05a (the perennial compgen -W bug)
+----------------------------
+revision 1.353
+date: 2002/06/09 17:22:26; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020609
+----------------------------
+revision 1.352
+date: 2002/06/09 08:38:04; author: ianmacd; state: Exp; lines: +2 -2
+
+- unzip and zipinfo now recognise the .wsz extension (used for Winzip skin
+ files and xmms)
+----------------------------
+revision 1.351
+date: 2002/06/09 08:35:56; author: ianmacd; state: Exp; lines: +3 -3
+
+- tar completion now recognises the .tbz2 extension
+----------------------------
+revision 1.350
+date: 2002/06/09 08:30:35; author: ianmacd; state: Exp; lines: +2 -2
+
+- galeon, links and curl now also complete on .html files
+----------------------------
+revision 1.349
+date: 2002/06/06 16:48:16; author: ianmacd; state: Exp; lines: +2 -2
+
+- tar cf completed properly, but tar -cf did not
+----------------------------
+revision 1.348
+date: 2002/06/05 09:55:22; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020605
+----------------------------
+revision 1.347
+date: 2002/06/05 09:52:44; author: ianmacd; state: Exp; lines: +3 -2
+
+- _tar(): display directories properly when returning contents of tar files
+- add .html file completion for netscape, mozilla, lynx, w3m
+----------------------------
+revision 1.346
+date: 2002/06/04 05:45:09; author: ianmacd; state: Exp; lines: +21 -17
+
+- use of \ls to avoid calling an alias will still call a function of that
+ name, if one is defined. Use built-in 'command' instead
+----------------------------
+revision 1.345
+date: 2002/06/04 05:28:41; author: ianmacd; state: Exp; lines: +3 -2
+
+- add newgrp to list of commands that complete on group names
+----------------------------
+revision 1.344
+date: 2002/06/04 05:27:03; author: ianmacd; state: Exp; lines: +2 -2
+
+- _tar(): use parameter substitution instead of calling tr(1)
+----------------------------
+revision 1.343
+date: 2002/06/02 22:19:38; author: ianmacd; state: Exp; lines: +29 -8
+
+- tar completion now completes first on tar files, then on their contents
+----------------------------
+revision 1.342
+date: 2002/06/01 21:16:20; author: ianmacd; state: Exp; lines: +55 -1
+
+- bash complete completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.341
+date: 2002/06/01 21:01:05; author: ianmacd; state: Exp; lines: +50 -1
+
+- lilo(8) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.340
+date: 2002/06/01 20:58:06; author: ianmacd; state: Exp; lines: +212 -43
+
+- Java completion overhaul by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.339
+date: 2002/06/01 18:46:19; author: ianmacd; state: Exp; lines: +3 -3
+
+- updated release to 20020601
+----------------------------
+revision 1.338
+date: 2002/05/30 20:26:41; author: ianmacd; state: Exp; lines: +4 -4
+
+- _known_hosts(): BSD sed (and others) has no /i modifier, so we need
+ [Mm][Aa][Dd][Nn][Ee][Ss][Ss] style matching. Sigh...
+----------------------------
+revision 1.337
+date: 2002/05/30 20:17:29; author: ianmacd; state: Exp; lines: +3 -3
+
+From: Dr.Rafael Sepúlveda <drs@gnulinux.org.mx>
+- fix bug present in both _comp-dpkg-installed-packages() and
+ _comp-dpkg-hold-packages() that results in all packages being returned.
+----------------------------
+revision 1.336
+date: 2002/05/30 19:08:15; author: ianmacd; state: Exp; lines: +33 -1
+
+- add basic completion for RCS suite (rcs, rlog, ci, co)
+----------------------------
+revision 1.335
+date: 2002/05/28 20:34:38; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020528
+----------------------------
+revision 1.334
+date: 2002/05/28 20:34:11; author: ianmacd; state: Exp; lines: +6 -2
+
+From Goetz Waschk <waschk@informatik.uni-rostock.de>
+- java -jar completes on .jar files
+----------------------------
+revision 1.333
+date: 2002/05/28 20:16:05; author: ianmacd; state: Exp; lines: +79 -5
+
+From: Guillaume Rousse <rousse@ccr.jussieu.fr>
+- urpmi now completes on rpm files
+- urpmf, urpme, urpmq completion added
+----------------------------
+revision 1.332
+date: 2002/05/21 17:10:13; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020521
+----------------------------
+revision 1.331
+date: 2002/05/21 05:35:40; author: ianmacd; state: Exp; lines: +3 -2
+
+- add bzme completion (Mandrake)
+- unzip & zipinfo also complete on .war files (as used by Tomcat, etc.)
+ (submission from Goetz Waschk <waschk@informatik.uni-rostock.de>)
+----------------------------
+revision 1.330
+date: 2002/05/21 00:36:07; author: ianmacd; state: Exp; lines: +3 -3
+
+- _comp-dpkg-installed-packages(): remove dependence on grep-dctrl
+ (patch by Dr.Rafael Sepúlveda <drs@gnulinux.org.mx>)
+----------------------------
+revision 1.329
+date: 2002/05/19 16:56:55; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020519
+----------------------------
+revision 1.328
+date: 2002/05/19 16:56:19; author: ianmacd; state: Exp; lines: +13 -14
+
+- there were still references to _file_glob() in the code
+----------------------------
+revision 1.327
+date: 2002/05/19 09:16:30; author: ianmacd; state: Exp; lines: +6 -9
+
+- remove some dependence on grep-dctrl in Debian-specific completion
+ functions
+- don't split ksh style globs over more than one line, since this doesn't seem
+ to work
+both of the above fixes supplied by Dr.Rafael Sepúlveda <drs@gnulinux.org.mx>
+----------------------------
+revision 1.326
+date: 2002/05/18 23:00:14; author: ianmacd; state: Exp; lines: +9 -18
+
+- replace many calls to compgen -f/-d with calls to _filedir()
+----------------------------
+revision 1.325
+date: 2002/05/18 19:05:08; author: ianmacd; state: Exp; lines: +29 -13
+
+- Python now completes first on a .(py|pyc|pyo) file, then on any file
+- rpm helper function _file_glob() has been integrated into _filedir(), as
+ the principle was the same
+----------------------------
+revision 1.324
+date: 2002/05/18 00:35:26; author: ianmacd; state: Exp; lines: +21 -17
+
+- move code that handles host alias completion from _ssh() to _known_hosts()
+ and call it with _known_hosts -c. This means that _scp() can now also call
+ it and complete on aliases in the ssh config files
+----------------------------
+revision 1.323
+date: 2002/05/16 18:07:38; author: ianmacd; state: Exp; lines: +1 -2
+
+- remove redundant line from add_entries() (_cvs() helper function)
+----------------------------
+revision 1.322
+date: 2002/05/16 16:15:19; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020516
+----------------------------
+revision 1.321
+date: 2002/05/16 09:10:04; author: ianmacd; state: Exp; lines: +3 -1
+
+- _cvs(): get rid of grep in get_entries(), so that characters such as '.'
+ in file names don't get interpreted
+----------------------------
+revision 1.320
+date: 2002/05/16 09:05:04; author: ianmacd; state: Exp; lines: +8 -9
+
+- _cd(): completion was failing when CDPATH pointed to directories containing
+ spaces in their names
+----------------------------
+revision 1.319
+date: 2002/05/15 20:56:25; author: ianmacd; state: Exp; lines: +3 -5
+
+- _make(): don't include variable assignments when returning targets
+----------------------------
+revision 1.318
+date: 2002/05/15 19:43:47; author: ianmacd; state: Exp; lines: +2 -3
+
+- _cvs(): fix bug that caused null completion list in 'cvs diff'
+----------------------------
+revision 1.317
+date: 2002/05/14 15:54:38; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020514
+----------------------------
+revision 1.316
+date: 2002/05/14 15:53:58; author: ianmacd; state: Exp; lines: +4 -1
+
+- _cd(): still need to separate COMPREPLY on spaces
+----------------------------
+revision 1.315
+date: 2002/05/13 23:43:29; author: ianmacd; state: Exp; lines: +4 -4
+
+- _ssh() and _known_hosts(): ssh config file directives are case-insensitive
+----------------------------
+revision 1.314
+date: 2002/05/13 23:40:40; author: ianmacd; state: Exp; lines: +4 -13
+
+- _cd(): need to allow \n as separator
+- _cd(): removed a chunk of code that probably hasn't worked for a while
+----------------------------
+revision 1.313
+date: 2002/05/11 17:28:58; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020511
+----------------------------
+revision 1.312
+date: 2002/05/11 17:22:12; author: ianmacd; state: Exp; lines: +2 -2
+
+- _ssh(): fix newline from making it into compgen -W and consuming all of
+ system memory
+----------------------------
+revision 1.311
+date: 2002/05/11 09:28:58; author: ianmacd; state: Exp; lines: +12 -10
+
+- perform tilde expansion in dpkg completion
+----------------------------
+revision 1.310
+date: 2002/05/10 18:09:35; author: ianmacd; state: Exp; lines: +2 -2
+
+- use sed instead of Perl in urpmi completion (patch from Guillaume Rousse
+ <rousse@ccr.jussieu.fr>)
+----------------------------
+revision 1.309
+date: 2002/05/09 18:20:53; author: ianmacd; state: Exp; lines: +16 -15
+
+- add MP3 files to those on which mplayer and xine will complete
+- mpg321 completes on MP3 files
+- minor code patch-ups to make Linux-specific functions work on HURD systems
+ (all of the above from Robert Millan <zeratul2@wanadoo.es>)
+----------------------------
+revision 1.308
+date: 2002/05/08 17:38:56; author: ianmacd; state: Exp; lines: +3 -3
+
+- changes to aptitude completion comments by Dr.Rafael Sepúlveda
+ <drs@gnulinux.org.mx>
+----------------------------
+revision 1.307
+date: 2002/05/08 17:26:18; author: ianmacd; state: Exp; lines: +3 -2
+
+- in cvs checkout mode, "cvs co -c" should take into account "-d" (patch by
+ Liviu Daia <Liviu.Daia@imar.ro>)
+----------------------------
+revision 1.306
+date: 2002/05/08 17:23:51; author: ianmacd; state: Exp; lines: +11 -2
+
+- postmap(1) and postalias(1) from the latest Postfix snapshot have a
+ new option, "-o" (patch by Liviu Daia <Liviu.Daia@imar.ro>)
+
+- postfix(1) completion added (patch by Liviu Daia <Liviu.Daia@imar.ro>)
+----------------------------
+revision 1.305
+date: 2002/05/07 08:16:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020507
+----------------------------
+revision 1.304
+date: 2002/05/06 01:31:28; author: ianmacd; state: Exp; lines: +31 -9
+
+- _known_hosts(): check /etc/ssh/ssh_config and ~/ssh/config to get location
+ of global and user known hosts files, rather than just assuming we know
+ where they are
+----------------------------
+revision 1.303
+date: 2002/05/05 23:28:59; author: ianmacd; state: Exp; lines: +13 -2
+
+- _ssh(): now also returns host aliases from /etc/ssh/config and ~/.ssh/config
+ files
+----------------------------
+revision 1.302
+date: 2002/05/05 22:46:30; author: ianmacd; state: Exp; lines: +107 -1
+
+- add completion for Postfix commands (patch by Liviu Daia <Liviu.Daia@imar.ro>
+ and Carsten Hoeger <choeger@suse.de>)
+----------------------------
+revision 1.301
+date: 2002/05/05 20:29:35; author: ianmacd; state: Exp; lines: +3 -12
+
+- _cvs(): cvs checkout now checks for registered modules, not just raw
+ directories in $CVSROOT
+----------------------------
+revision 1.300
+date: 2002/05/05 20:20:02; author: ianmacd; state: Exp; lines: +21 -9
+
+- _rpm(): additions for rpm 4.1
+----------------------------
+revision 1.299
+date: 2002/05/05 19:24:31; author: ianmacd; state: Exp; lines: +78 -1
+
+- add Debian Linux aptitude(8) completion
+----------------------------
+revision 1.298
+date: 2002/05/05 17:42:42; author: ianmacd; state: Exp; lines: +6 -5
+
+- _comp-dpkg-installed-packages(): return list of installed packages, rather
+ installable packages (patch by Dr.Rafael Sepúlveda <drs@gnulinux.org.mx>)
+----------------------------
+revision 1.297
+date: 2002/05/04 20:42:31; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020504
+----------------------------
+revision 1.296
+date: 2002/05/03 01:00:04; author: ianmacd; state: Exp; lines: +2 -1
+
+- python completion on .py, .pyc and .pyo files
+----------------------------
+revision 1.295
+date: 2002/05/03 00:58:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- make xine complete on the same files as mplayer
+----------------------------
+revision 1.294
+date: 2002/05/03 00:43:50; author: ianmacd; state: Exp; lines: +23 -23
+
+- define CVS helper functions outside of _cvs(), since that just parses them
+ at run-time anyway
+----------------------------
+revision 1.293
+date: 2002/04/30 22:16:35; author: ianmacd; state: Exp; lines: +14 -8
+
+- add long option completion to psql completion
+ (patch by Laurent Martelli <laurent@bearteam.org>)
+----------------------------
+revision 1.292
+date: 2002/04/30 21:55:20; author: ianmacd; state: Exp; lines: +9 -1
+
+- cvs completion now handles diff
+ (patch by Laurent Martelli <laurent@bearteam.org>)
+----------------------------
+revision 1.291
+date: 2002/04/30 21:47:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- _filedir_xspec(): avoid eval errors when completing within backticks or
+ quotes
+----------------------------
+revision 1.290
+date: 2002/04/30 16:16:22; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020430
+----------------------------
+revision 1.289
+date: 2002/04/29 20:58:39; author: ianmacd; state: Exp; lines: +6 -5
+
+- make installation of RPM functions a compound statement
+----------------------------
+revision 1.288
+date: 2002/04/29 20:36:04; author: ianmacd; state: Exp; lines: +98 -9
+
+- reworking of Postgresql completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.287
+date: 2002/04/29 20:21:41; author: ianmacd; state: Exp; lines: +18 -3
+
+- _cvs(): remove a superfluous grep and redirect stderr on ls
+- add PINE address-book completion
+----------------------------
+revision 1.286
+date: 2002/04/27 18:45:24; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020427
+----------------------------
+revision 1.285
+date: 2002/04/24 22:26:49; author: ianmacd; state: Exp; lines: +92 -1
+
+- add update-alternatives completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.284
+date: 2002/04/24 15:40:37; author: ianmacd; state: Exp; lines: +3 -3
+
+- _urpmi_media(): urpmi completion now deals properly with spaces (patch
+ from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.283
+date: 2002/04/24 15:28:56; author: ianmacd; state: Exp; lines: +2 -2
+
+- check that the files we try to source in $BASH_COMPLETION_DIR are actually
+ plain old files
+----------------------------
+revision 1.282
+date: 2002/04/23 16:01:39; author: ianmacd; state: Exp; lines: +2 -2
+
+- zipinfo now completes on the same files as unzip
+----------------------------
+revision 1.281
+date: 2002/04/23 02:51:54; author: ianmacd; state: Exp; lines: +4 -1
+
+- _export(): make 'export FOO=$<Tab>' complete on variable names
+----------------------------
+revision 1.280
+date: 2002/04/22 17:34:35; author: ianmacd; state: Exp; lines: +2 -2
+
+- latex et al now also complete on .dtx and .ins files
+----------------------------
+revision 1.279
+date: 2002/04/22 08:39:07; author: ianmacd; state: Exp; lines: +27 -1
+
+- add Debian dselect(8) completion
+----------------------------
+revision 1.278
+date: 2002/04/22 08:25:31; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020422
+----------------------------
+revision 1.277
+date: 2002/04/22 08:17:57; author: ianmacd; state: Exp; lines: +2 -2
+
+- tex, latex et al now also complete on .latex files
+----------------------------
+revision 1.276
+date: 2002/04/22 07:59:08; author: ianmacd; state: Exp; lines: +23 -23
+
+- use $UNAME instead of $OS, since the latter purportedly has bad interactions
+ in environments such as Cygwin
+----------------------------
+revision 1.275
+date: 2002/04/22 07:48:12; author: ianmacd; state: Exp; lines: +1 -46
+
+- move ri completion into contrib dir, because it's relatively uncommon
+----------------------------
+revision 1.274
+date: 2002/04/20 23:55:18; author: ianmacd; state: Exp; lines: +3 -3
+
+- _man(): avoid calling alias, if an alias called man exists
+- bind rpmbuild to _rpm() function
+----------------------------
+revision 1.273
+date: 2002/04/20 23:51:33; author: ianmacd; state: Exp; lines: +2 -4
+
+- _filedir(): fix error when completing on a quoted parameter
+- _cd(): remove useless call of _expand()
+----------------------------
+revision 1.272
+date: 2002/04/18 16:05:31; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020418
+----------------------------
+revision 1.271
+date: 2002/04/18 15:55:50; author: ianmacd; state: Exp; lines: +6 -5
+
+- add 'annotate' to list of cvs commands that perform completion
+----------------------------
+revision 1.270
+date: 2002/04/18 15:29:56; author: ianmacd; state: Exp; lines: +46 -1
+
+- added ri (Ruby documentation) completion
+----------------------------
+revision 1.269
+date: 2002/04/17 08:44:12; author: ianmacd; state: Exp; lines: +21 -14
+
+- _rpm(): rpm -qf worked, but rpm -q -f didn't. Simiarly, rpm -V -f didn't
+ work; nor did rpm -Vg or rpm -V -g
+----------------------------
+revision 1.268
+date: 2002/04/15 00:41:04; author: ianmacd; state: Exp; lines: +6 -5
+
+- avoid errors when comp{gen,lete} -g don't work on an unpatched bash 2.05
+----------------------------
+revision 1.267
+date: 2002/04/13 19:24:28; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020412
+----------------------------
+revision 1.266
+date: 2002/04/13 19:21:42; author: ianmacd; state: Exp; lines: +2 -2
+
+- _command(): back out change from 1.265, as we can't reliably avoid expansion
+ of wildcards prior to handing off for subcompletion. Also, back out change
+ from 1.242 (release 20020402) that set the command line token pointer to be
+ n-1 after expansion of any wildcards. We can't reliably know what the
+ position of the current token is after expansion, since someone may do
+ something like 'sudo ls fo*<Tab> bar', where 'fo*' expands to multiple
+ tokens.
+----------------------------
+revision 1.265
+date: 2002/04/12 00:24:08; author: ianmacd; state: Exp; lines: +4 -5
+
+- _command(): stop wildcards from expanding prior to handing off command line
+ for subcompletion
+----------------------------
+revision 1.264
+date: 2002/04/08 16:30:59; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020408
+----------------------------
+revision 1.263
+date: 2002/04/07 19:17:13; author: ianmacd; state: Exp; lines: +43 -29
+
+- _apt-get improvements from Laurent Martelli <laurent@bearteam.org>
+- make _rpm()'s helper functions global. Having them within the _rpm() function
+ body doesn't make them global anyway; it just makes them get sourced at
+ run-time when _rpm() gets called, so this should be slightly faster
+----------------------------
+revision 1.262
+date: 2002/04/06 22:21:13; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020406
+----------------------------
+revision 1.261
+date: 2002/04/06 22:18:59; author: ianmacd; state: Exp; lines: +13 -12
+
+- various fixes to urpmi function names to make them officially valid
+----------------------------
+revision 1.260
+date: 2002/04/05 19:45:05; author: ianmacd; state: Exp; lines: +5 -5
+
+- _rpm(): rpm would try group query completion instead of either uninstalled or
+ installed query completion when passed a long option that ended with 'g'.
+ Similarly, it would attempt uninstalled package completion instead of
+ installed package completion when passed a long option that ended with 'p'.
+
+ verify completion suffered from a similar bug
+----------------------------
+revision 1.259
+date: 2002/04/04 16:49:40; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020404
+----------------------------
+revision 1.258
+date: 2002/04/04 16:27:06; author: ianmacd; state: Exp; lines: +2 -2
+
+- add compressed files (.Z) to the list that gv and ggv will complete on
+----------------------------
+revision 1.257
+date: 2002/04/04 00:42:14; author: ianmacd; state: Exp; lines: +2 -2
+
+- add .m3u to list of extensions that xmms et al can complete on
+----------------------------
+revision 1.256
+date: 2002/04/03 23:17:10; author: ianmacd; state: Exp; lines: +13 -12
+
+- clean up numerous areas where grep would complain if passed a $cur with
+ a space in it
+----------------------------
+revision 1.255
+date: 2002/04/03 23:10:35; author: ianmacd; state: Exp; lines: +15 -16
+
+- _rpm(): make package group completion a subcase of -q completion
+ It was very buggy before, completing only when 'rpm -g' was given (which is
+ invalid), instead of 'rpm -qg'
+----------------------------
+revision 1.254
+date: 2002/04/03 21:10:49; author: ianmacd; state: Exp; lines: +39 -3
+
+- _route(): add 'default' and 'gw' as possible completions
+- add lftp(1) and autorpm(1) completion from Kirk Bauer <kirk@kaybee.org>
+----------------------------
+revision 1.253
+date: 2002/04/03 19:19:30; author: ianmacd; state: Exp; lines: +47 -42
+
+- attempt to make everything bash 2.04 compatible by putting making the -o
+ switch to comp{lete,gen} a shell variable
+- allow group completion in bash versions > 2.04 (was > 2.05, but that would
+ break group completion for anyone who has installed a suitably patched 2.05)
+----------------------------
+revision 1.252
+date: 2002/04/03 18:56:55; author: ianmacd; state: Exp; lines: +3 -3
+
+- add which(1) to list of commands that complete on commands
+----------------------------
+revision 1.251
+date: 2002/04/03 18:56:01; author: ianmacd; state: Exp; lines: +3 -3
+
+- _umount(): make returned completions behave properly (remove -o filenames)
+ and default to directories if all else fails (add -o dirnames)
+----------------------------
+revision 1.250
+date: 2002/04/03 07:11:06; author: ianmacd; state: Exp; lines: +4 -8
+
+- _cd(): back out some code that attempted to add a trailing slash to
+ completions relative to paths in $CDPATH, since this caused problems
+ elsewhere
+----------------------------
+revision 1.249
+date: 2002/04/03 01:37:51; author: ianmacd; state: Exp; lines: +20 -12
+
+- set $nospace if bash 2.05b
+- only use comp{gen,lete} -g if bash > 2.05
+- _cd(): don't append a space to paths relative to $CDPATH when using bash
+ 2.05b
+----------------------------
+revision 1.248
+date: 2002/04/02 19:22:40; author: ianmacd; state: Exp; lines: +11 -9
+
+- _cvs(): set $COMP_CVS_REMOTE to get remote repository completion on
+ 'cvs commit'
+- _configure(): set $COMP_CONFIGURE_HINTS to get 'SETTING' included on
+ --option=SETTING style completions
+----------------------------
+revision 1.247
+date: 2002/04/02 16:56:59; author: ianmacd; state: Exp; lines: +8 -4
+
+- _configure(): when a completion is of the form --option=SETTING, make the
+ inclusion of SETTING in the completion be optional (set $hints)
+----------------------------
+revision 1.246
+date: 2002/04/02 10:04:57; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020402
+----------------------------
+revision 1.245
+date: 2002/04/02 08:22:27; author: ianmacd; state: Exp; lines: +3 -3
+
+- _kill(): call _pids rather than duplicate code
+- _longopt(): when parsing --help output, pipe stderr through stdout
+----------------------------
+revision 1.244
+date: 2002/04/02 08:17:35; author: ianmacd; state: Exp; lines: +46 -2
+
+- add netstat to list of commands that complete on long options
+- add renice completion, submitted by Michael G <michaelg@amerion.net>,
+ and rewritten helper functions _pids() and _pgids()
+----------------------------
+revision 1.243
+date: 2002/04/02 07:27:50; author: ianmacd; state: Exp; lines: +28 -8
+
+- _dpkg-reconfigure() fix and enhancements from
+ Dr.Rafael Sepúlveda <drs@gnulinux.org.mx>
+----------------------------
+revision 1.242
+date: 2002/04/01 18:50:05; author: ianmacd; state: Exp; lines: +4 -3
+
+- _command(): when passing off command lines for subcompletion by other
+ functions, we were passing incorrect information about the current line
+ position when the command line contained wildcards that expanded arguments
+ to multiple arguments
+----------------------------
+revision 1.241
+date: 2002/04/01 16:45:45; author: ianmacd; state: Exp; lines: +18 -10
+
+- _cvs(): make 'cvs commit' default to local file completion, since remote
+ completion is very annoying for those who have to supply a password.
+ Set 'remote=yes' within _cvs() to get the old behaviour.
+----------------------------
+revision 1.240
+date: 2002/04/01 01:12:50; author: ianmacd; state: Exp; lines: +2 -2
+
+- _scp(): silence errors from remote path completion
+----------------------------
+revision 1.239
+date: 2002/03/31 08:06:52; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020331
+----------------------------
+revision 1.238
+date: 2002/03/31 08:04:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- fix minor quoting problem in _cd()
+----------------------------
+revision 1.237
+date: 2002/03/30 19:33:56; author: ianmacd; state: Exp; lines: +2 -2
+
+- release updated to 20020330
+----------------------------
+revision 1.236
+date: 2002/03/30 19:20:51; author: ianmacd; state: Exp; lines: +10 -1
+
+- _command(): commands like 'sudo chown' return completions of the form
+ 'user:'. This gets escaped by _chown() and passed back as 'user\:'.
+ _command() then escapes this further to 'user\\\:', so we need to unescape it
+ to have things work correctly.
+
+ Unfortunately, 'sudo rm' might pass back the name of a file that has a
+ backslash followed by a colon in the name, e.g. 'foo\:bar'. This is
+ escaped by _command() to 'foo\\\:bar', which we should not unescape.
+
+ How to tell the difference between a completion that contains a backslash
+ that is escaping the following character, and one that has literal
+ backslashes?
+
+ We extract the '-o <type>' information from the compspec and, if we are
+ dealing with a spec that does not specify that it passes back filenames or
+ dirnames, we unescape any backslash/colon pairings. Of course, this means
+ that 'sudo chown' will still do the wrong thing when dealing with a
+ directory or filename that contains '\:'. Oh well...
+----------------------------
+revision 1.235
+date: 2002/03/29 16:33:08; author: ianmacd; state: Exp; lines: +18 -17
+
+- fixes to _ant(), _java() and _urpmi() from
+ Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.234
+date: 2002/03/29 08:30:47; author: ianmacd; state: Exp; lines: +90 -103
+
+- _rpm(): replace add_package_list() with installed_packages()
+- _rpm(): remove uninstalled_packages()
+- _rpm(): only offer rpm options as possible completions if parameter begins
+ with a dash
+----------------------------
+revision 1.233
+date: 2002/03/29 03:43:09; author: ianmacd; state: Exp; lines: +12 -14
+
+- _cd(): checking for CDPATH at the start of the function simplifies things
+ somewhat
+----------------------------
+revision 1.232
+date: 2002/03/29 03:35:42; author: ianmacd; state: Exp; lines: +6 -2
+
+- _insmod(): Mandrake Linux has gzipped modules
+- add comments to make Emacs go into shell-script-mode upon editing
+----------------------------
+revision 1.231
+date: 2002/03/28 23:41:44; author: ianmacd; state: Exp; lines: +12 -8
+
+- _cd(): don't foist the new relative to absolute path conversion on people
+ who don't use $CDPATH
+----------------------------
+revision 1.230
+date: 2002/03/28 19:36:19; author: ianmacd; state: Exp; lines: +4 -4
+
+- urpmi completion fixes from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.229
+date: 2002/03/28 17:22:24; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020328
+----------------------------
+revision 1.228
+date: 2002/03/28 08:41:09; author: ianmacd; state: Exp; lines: +2 -4
+
+- _longopt(): remove call to _expand(), since this gets called indirectly
+ anyway when _filedir() is called. This fixes a double escaping of trailing
+ backslashes when doing something like 'mv foo\<Tab>', which would cause an
+ eval error in _filedir()
+----------------------------
+revision 1.227
+date: 2002/03/27 19:33:34; author: ianmacd; state: Exp; lines: +21 -4
+
+- dpkg completion enhancements from Laurent Martelli <laurent@bearteam.org>
+ - options which complete on package names or .deb files now can
+ complete several of them.
+ - --listfiles complete on installed package names
+ - --list complete on package names
+ - added --force options
+----------------------------
+revision 1.226
+date: 2002/03/27 07:32:19; author: ianmacd; state: Exp; lines: +8 -4
+
+- _cd(): when CDPATH=.:$HOME and $PWD = $HOME, every subdir of $HOME will be
+ returned both as $HOME/foo and foo. bash regards these as separate
+ directories, even though when displayed, bash will strip them to the
+ basename. Add code to turn any directory that is a subdir of $PWD into an
+ absolute path, so that it duplicates $HOME/dir and gets deduped.
+----------------------------
+revision 1.225
+date: 2002/03/26 20:28:58; author: ianmacd; state: Exp; lines: +2 -2
+
+- make fakeroot complete just like sudo
+----------------------------
+revision 1.224
+date: 2002/03/26 20:28:01; author: ianmacd; state: Exp; lines: +2 -2
+
+- simplify gv and ggv completion
+----------------------------
+revision 1.223
+date: 2002/03/26 19:45:45; author: ianmacd; state: Exp; lines: +6 -5
+
+- _querybts(): compgen was missing a continuation line that probably
+ resulted in lots of memory being eaten
+- _querybts() and _reportbug(): --ui and --interface were missing '|'
+ separator
+----------------------------
+revision 1.222
+date: 2002/03/26 19:41:47; author: ianmacd; state: Exp; lines: +3 -3
+
+- _java(): escape arguments to grep and find
+----------------------------
+revision 1.221
+date: 2002/03/26 16:55:10; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020326
+----------------------------
+revision 1.220
+date: 2002/03/26 16:36:00; author: ianmacd; state: Exp; lines: +3 -3
+
+- _ncftp(): slight modification to sed command to make it more compatible
+ across versions of sed
+----------------------------
+revision 1.219
+date: 2002/03/26 16:27:02; author: ianmacd; state: Exp; lines: +3 -3
+
+- _tar(): some distros (notably Slackware and Sorceror), use -y as the
+ bzip compression switch, so we add this, along with -I, as that is sometimes
+ used, too
+----------------------------
+revision 1.218
+date: 2002/03/26 16:17:12; author: ianmacd; state: Exp; lines: +7 -10
+
+- _chown(): make ':' the user:group separator, since only GNU chown supports
+ '.'. This requires some escaping work, but makes chown completion work on
+ any *NIX based system.
+----------------------------
+revision 1.217
+date: 2002/03/24 20:26:34; author: ianmacd; state: Exp; lines: +3 -3
+
+- _ncftp(): replace cut with sed, since the existing cut command uses
+ --output-delimiter, which FreeBSD's cut doesn't have. We now also output
+ only the name of the bookmark, not the expansion to which it points.
+----------------------------
+revision 1.216
+date: 2002/03/24 20:05:07; author: ianmacd; state: Exp; lines: +2 -2
+
+- _screen(): when dealing with -s, /etc/shells can have comment lines in it
+----------------------------
+revision 1.215
+date: 2002/03/24 19:57:37; author: ianmacd; state: Exp; lines: +4 -4
+
+- _mount(): showmount is in /bin on FreeBSD
+- _mount(): --show-headers is a GNU option not supported on FreeBSD's
+ showmount, so pipe through 'sed 1d' instead
+- _killall(): 'c' switch to ps is superfluous
+----------------------------
+revision 1.214
+date: 2002/03/24 19:44:55; author: ianmacd; state: Exp; lines: +31 -2
+
+- add handling of -r|--remove|--purge to dpkg completion
+- add completion for dpkg-reconfigure
+- add time to list of commands that use _command() for completion
+----------------------------
+revision 1.213
+date: 2002/03/24 08:11:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020324
+----------------------------
+revision 1.212
+date: 2002/03/24 01:34:33; author: ianmacd; state: Exp; lines: +6 -5
+
+- killall completion now also works on FreeBSD
+----------------------------
+revision 1.211
+date: 2002/03/23 22:59:49; author: ianmacd; state: Exp; lines: +5 -17
+
+- alter _kill() to use /proc, so that it also works on FreeBSD and maybe other
+ systems, too
+- alter _killall() to use simpler and more reliable way of getting at the
+ process name
+----------------------------
+revision 1.210
+date: 2002/03/22 16:54:52; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020322
+----------------------------
+revision 1.209
+date: 2002/03/22 16:50:29; author: ianmacd; state: Exp; lines: +1 -62
+
+- move p4 completion into contrib, since not many people have this
+----------------------------
+revision 1.208
+date: 2002/03/22 16:45:42; author: ianmacd; state: Exp; lines: +8 -10
+
+- _rpm(): RPM kan also verify uninstalled packages these days, so detect
+ and act on -p
+- _rpm(): add --querytags, --specfile, --whatrequires and --whatprovides
+ to options that 'rpm -V' can take
+----------------------------
+revision 1.207
+date: 2002/03/22 04:29:30; author: ianmacd; state: Exp; lines: +3 -1
+
+- one-liners for vi, vim, emacs and wine
+----------------------------
+revision 1.206
+date: 2002/03/22 04:18:54; author: ianmacd; state: Exp; lines: +4 -3
+
+- only ee & display can handle .ico files
+- realplay can also handle .smi and .smil files
+----------------------------
+revision 1.205
+date: 2002/03/19 16:19:58; author: ianmacd; state: Exp; lines: +3 -2
+
+- timidity and playmidi complete on .mid and .midi files
+----------------------------
+revision 1.204
+date: 2002/03/18 18:12:00; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020318
+----------------------------
+revision 1.203
+date: 2002/03/18 18:10:57; author: ianmacd; state: Exp; lines: +2 -2
+
+- gv ggv now also complete on compressed PDF files
+----------------------------
+revision 1.202
+date: 2002/03/16 20:49:44; author: ianmacd; state: Exp; lines: +21 -12
+
+- add completion for -S|--search in dpkg completion
+----------------------------
+revision 1.201
+date: 2002/03/15 20:02:48; author: ianmacd; state: Exp; lines: +2 -2
+
+- add chage, write, talk and chfn to list of commands that complete on user
+----------------------------
+revision 1.200
+date: 2002/03/15 20:02:06; author: ianmacd; state: Exp; lines: +3 -2
+
+- _insmod(): the output of modinfo has changed in recent versions of modutils,
+ so alter the awk script to also deal with the case of the new output
+----------------------------
+revision 1.199
+date: 2002/03/15 17:39:18; author: ianmacd; state: Exp; lines: +5 -4
+
+- add .ico completion to ee, display, etc.
+----------------------------
+revision 1.198
+date: 2002/03/15 07:20:04; author: ianmacd; state: Exp; lines: +17 -4
+
+- _scp(): try to perform remote path completion when parameter contains a
+ colon. This is subject to usual bash trailing whitespace issue.
+----------------------------
+revision 1.197
+date: 2002/03/14 18:27:13; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20020314
+----------------------------
+revision 1.196
+date: 2002/03/13 07:29:52; author: ianmacd; state: Exp; lines: +2 -2
+
+- _man(): eval requires double backslash escaping of ls
+----------------------------
+revision 1.195
+date: 2002/03/11 19:36:44; author: ianmacd; state: Exp; lines: +4 -3
+
+- check that $BASH_COMPLETION_DIR is actually a directory
+- update release to 20020311
+----------------------------
+revision 1.194
+date: 2002/03/11 18:38:17; author: ianmacd; state: Exp; lines: +10 -6
+
+- use $BASH_COMPLETION_DIR to determine where loose completon scripts are
+----------------------------
+revision 1.193
+date: 2002/03/11 02:15:09; author: ianmacd; state: Exp; lines: +103 -1
+
+- add Debian Linux reportbug(1) and querybts(1) completion (submitted by
+ Chris Lawrence <lawrencc@debian.org>)
+----------------------------
+revision 1.192
+date: 2002/03/11 02:10:17; author: ianmacd; state: Exp; lines: +10 -4
+
+- _dpkg(): add dpkg-deb options and give dpkg-deb the same expansions as dpkg
+ (patch submitted by Chris Lawrence <lawrencc@debian.org>
+----------------------------
+revision 1.191
+date: 2002/03/08 19:50:24; author: ianmacd; state: Exp; lines: +8 -3
+
+- source files in /etc/bash_completion.d prior to sourcing ~/.bash_completion
+----------------------------
+revision 1.190
+date: 2002/03/08 19:46:15; author: ianmacd; state: Exp; lines: +5 -1
+
+- _cd(): trim leading './' from relative completions, since bash will see
+ './foo' and 'foo' as two distinct completions and return both, even though
+ the './' will be cropped when displaying them
+----------------------------
+revision 1.189
+date: 2002/03/08 18:26:41; author: ianmacd; state: Exp; lines: +2 -2
+
+- _java(): fixed reference to wrong local variable
+----------------------------
+revision 1.188
+date: 2002/03/08 18:21:30; author: ianmacd; state: Exp; lines: +8 -7
+
+- _dpkg(): -i|--install|--unpack|-A|--record-avail was not completing on
+ directories
+- _dpkg(): -s|--status|-p|--print-avail|-L|--listfiles ignored current
+ parameter and thus returned full list of installed packages
+----------------------------
+revision 1.187
+date: 2002/03/07 19:04:05; author: ianmacd; state: Exp; lines: +14 -15
+
+- some white space clean-up, removal of e-mail addresses and removal of
+ comment pertaining to an ssh completion bug that was fixed a while ago
+----------------------------
+revision 1.186
+date: 2002/03/07 19:00:48; author: ianmacd; state: Exp; lines: +123 -1
+
+- add _urpmi.media(), _urpmi(), _urpmi.update(), _urpmi.addmedia() and
+ _urpmi.removemedia() for Mandrake urpmi completion. These were submitted by
+ Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.185
+date: 2002/03/07 18:47:12; author: ianmacd; state: Exp; lines: +5 -2
+
+- add initial option support to _tar()
+----------------------------
+revision 1.184
+date: 2002/03/07 18:44:48; author: ianmacd; state: Exp; lines: +55 -1
+
+- add java completion submitted by Guillaume Rousse <rousse@ccr.jussieu.fr>,
+ with just a couple of modifications
+----------------------------
+revision 1.183
+date: 2002/03/07 18:35:32; author: ianmacd; state: Exp; lines: +31 -1
+
+- add jar(1) completion from Guillaume Rousse <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.182
+date: 2002/03/07 18:32:03; author: ianmacd; state: Exp; lines: +38 -12
+
+- ant completion replaced by function provided by
+ Guillaume Rousse <rousse@ccr.jussieu.fr>, with a few changes to trap
+ compgen errors and other minor issues
+----------------------------
+revision 1.181
+date: 2002/03/07 17:16:43; author: ianmacd; state: Exp; lines: +33 -21
+
+- _rpm(): handle query of uninstalled packages when options are not
+ concatenated, i.e. rpm -qp worked, but rpm -q -p did not. Further
+ complicated by fact that other options could be interspersed,
+ e.g. rpm -q -l -p -i, and that partial concatenation could be given,
+ e.g. rpm -q -ipl
+----------------------------
+revision 1.180
+date: 2002/03/06 20:24:06; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020306
+----------------------------
+revision 1.179
+date: 2002/03/06 18:38:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- _man(): Debian does not support man --path, so try setting path using
+ manpath and, if that fails, use man --path instead
+----------------------------
+revision 1.178
+date: 2002/03/06 00:23:30; author: ianmacd; state: Exp; lines: +5 -4
+
+- _export() and _configure() default to default bash completion if all else
+ fails
+- before sourcing ~/.bash_completion, check that the current file being
+ sourced is not this very file. Otherwise, we cause an infinite loop.
+----------------------------
+revision 1.177
+date: 2002/03/04 16:33:30; author: ianmacd; state: Exp; lines: +2 -2
+
+- release updated to 20020304
+----------------------------
+revision 1.176
+date: 2002/03/04 04:46:42; author: ianmacd; state: Exp; lines: +6 -2
+
+- _rpm(): perform path completion for --whatprovides if parameter contains a /
+----------------------------
+revision 1.175
+date: 2002/03/02 01:56:21; author: ianmacd; state: Exp; lines: +14 -10
+
+- make _man() work on Darwin systems (MacOS X)
+----------------------------
+revision 1.174
+date: 2002/03/02 01:13:23; author: ianmacd; state: Exp; lines: +127 -118
+
+- moved some functions around, so that all helper functions, completion
+ functions for built-ins, and completion functions for externals are grouped
+ together
+----------------------------
+revision 1.173
+date: 2002/03/01 23:41:42; author: ianmacd; state: Exp; lines: +13 -6
+
+- _longopt(): make vague attempt at path completion after the '=' in
+ --long-opt= options
+- _filedir(): don't bother to set $cur, since every function that calls
+ it will have already set it
+----------------------------
+revision 1.172
+date: 2002/03/01 19:29:34; author: ianmacd; state: Exp; lines: +14 -11
+
+- _cvs(): cvs import now traverses entire CVSROOT. Also cleaned up code a
+ little more
+----------------------------
+revision 1.171
+date: 2002/03/01 08:55:36; author: ianmacd; state: Exp; lines: +5 -5
+
+- _cvs(): assign to $changed() and $newremoved() as arrays, not scalars
+----------------------------
+revision 1.170
+date: 2002/03/01 07:58:23; author: ianmacd; state: Exp; lines: +39 -29
+
+- a few more changes to _cvs() from Kyle Wheeler <memoryhole@mac.com>
+ (e.g. cvs checkout now descends through the CVSROOT) and some code clean-up
+ to _cvs() by me
+----------------------------
+revision 1.169
+date: 2002/03/01 02:02:39; author: ianmacd; state: Exp; lines: +13 -5
+
+- expand _function() with typeset/declare completion
+----------------------------
+revision 1.168
+date: 2002/03/01 01:42:13; author: ianmacd; state: Exp; lines: +18 -16
+
+- large clean-up of sed and awk usage throughout code, where interpolating a
+ shell variable that contained a / would cause the sed or awk command to fail,
+ since it expected the / as its own delimiter. Use | instead.
+----------------------------
+revision 1.167
+date: 2002/02/28 23:37:10; author: ianmacd; state: Exp; lines: +3 -2
+
+- _cd() was not correctly completing on subdirs of $CDPATH (why is this
+ function so damn hard to get right? :-) )
+- _configure() suffered a sed error when completing on options of the type
+ --option=PATH
+----------------------------
+revision 1.166
+date: 2002/02/28 23:23:14; author: ianmacd; state: Exp; lines: +168 -10
+
+- Kyle Wheeler <memoryhole@mac.com> submitted a large _cvs() patch with many
+ improvements. I rewrote this and fixed a few bugs found on the way.
+----------------------------
+revision 1.165
+date: 2002/02/28 06:39:10; author: ianmacd; state: Exp; lines: +5 -2
+
+- minor typo corrected in _longopt()
+- stop eval error in _expand() when parameter ends with a \
+----------------------------
+revision 1.164
+date: 2002/02/27 22:36:10; author: ianmacd; state: Exp; lines: +4 -4
+
+- _man(): quote $manpath to avoid premature expansion and remove local
+ variable $i
+----------------------------
+revision 1.163
+date: 2002/02/27 16:59:49; author: ianmacd; state: Exp; lines: +2 -2
+
+- updated release to 20020227
+----------------------------
+revision 1.162
+date: 2002/02/27 16:48:20; author: ianmacd; state: Exp; lines: +18 -18
+
+- more code clean-up. Replace many instances of compgen -[df] by calls to
+ _filedir and removed a few more potential compgen error areas.
+----------------------------
+revision 1.161
+date: 2002/02/27 16:28:26; author: ianmacd; state: Exp; lines: +3 -3
+
+- _command(): call _filedir() when subcompletion commands return no matches
+----------------------------
+revision 1.160
+date: 2002/02/27 11:01:21; author: ianmacd; state: Exp; lines: +2 -2
+
+- _root_command() wasn't passing name of command that had called it to
+ _command()
+----------------------------
+revision 1.159
+date: 2002/02/27 10:34:17; author: ianmacd; state: Exp; lines: +2 -2
+
+- make psql completion perform default bash completion if all else fails
+----------------------------
+revision 1.158
+date: 2002/02/27 09:55:30; author: ianmacd; state: Exp; lines: +4 -8
+
+- simplify _root_command() and actually install it for use by sudo
+----------------------------
+revision 1.157
+date: 2002/02/27 07:47:09; author: ianmacd; state: Exp; lines: +43 -2
+
+- add dpkg completion, based largely on code submitted by Laurent Martelli
+ <laurent@bearteam.org>
+----------------------------
+revision 1.156
+date: 2002/02/27 02:18:08; author: ianmacd; state: Exp; lines: +14 -14
+
+- _make(): add long option completion
+- cleaned up _configure(), _longopt() and _gcc()
+----------------------------
+revision 1.155
+date: 2002/02/27 02:02:43; author: ianmacd; state: Exp; lines: +45 -39
+
+multiple potential causes of compgen errors removed
+----------------------------
+revision 1.154
+date: 2002/02/27 01:41:56; author: ianmacd; state: Exp; lines: +21 -27
+
+- minor bug fixes to _make()
+- multiple potential compgen error clean-ups
+----------------------------
+revision 1.153
+date: 2002/02/27 01:24:04; author: ianmacd; state: Exp; lines: +10 -25
+
+- _rpm(): removed some superfluous returns
+- _apt-cache(): renamed _apt_cache and caught some potential compgen errors
+- _apt-get(): renamed _apt_get and caught some potential compgen errors
+----------------------------
+revision 1.152
+date: 2002/02/27 01:14:52; author: ianmacd; state: Exp; lines: +61 -84
+
+- _rpm(): major clean-up, including removal of dashify()
+- _rpm(): fix bug that caused --prefix, --relocate and --root to not complete
+ on directories
+----------------------------
+revision 1.151
+date: 2002/02/27 00:35:39; author: ianmacd; state: Exp; lines: +3 -7
+
+- clean up superluous returns in _ipsec()
+----------------------------
+revision 1.150
+date: 2002/02/27 00:29:54; author: ianmacd; state: Exp; lines: +21 -28
+
+- _find(): code clean-up and removal of potential compgen errors
+----------------------------
+revision 1.149
+date: 2002/02/27 00:13:04; author: ianmacd; state: Exp; lines: +6 -6
+
+prevent compgen errors in _chown(), _chgrp and _man()
+fix [ ] test in _chown() and _chgrp() that should have been [[ ]] test
+----------------------------
+revision 1.148
+date: 2002/02/26 23:59:47; author: ianmacd; state: Exp; lines: +22 -26
+
+code clean-up
+prevent compgen error in _man()
+----------------------------
+revision 1.147
+date: 2002/02/26 23:21:39; author: ianmacd; state: Exp; lines: +11 -1
+
+sudo now calls _root_command(), which is a wrapper around _command(), but also
+ sets the PATH to include {,/usr{,/local}}/sbin
+----------------------------
+revision 1.146
+date: 2002/02/26 21:48:32; author: ianmacd; state: Exp; lines: +20 -2
+
+add cardctl completion
+----------------------------
+revision 1.145
+date: 2002/02/25 06:50:23; author: ianmacd; state: Exp; lines: +2 -2
+
+updated release to 20020225
+----------------------------
+revision 1.144
+date: 2002/02/24 20:52:22; author: ianmacd; state: Exp; lines: +5 -1
+
+_rpm(): fixed minor bug in --re{build,compile}/--clean/--rms{ource,pec} that
+ caused compgen error when passed parameter with hyphens
+----------------------------
+revision 1.143
+date: 2002/02/24 06:43:48; author: ianmacd; state: Exp; lines: +4 -2
+
+_psql(): try to get list of valid users from Postgres before resorting to
+ system user list
+----------------------------
+revision 1.142
+date: 2002/02/22 16:48:21; author: ianmacd; state: Exp; lines: +8 -3
+
+modified _filedir() and _longopt() to allow mkdir and rmdir to complete only
+ on directories
+----------------------------
+revision 1.141
+date: 2002/02/22 08:41:05; author: ianmacd; state: Exp; lines: +4 -5
+
+_cd(): sigh, completion on dirs and subdirs of entries in $CDPATH was broken
+ yet again, this time due to the space having been removed from local $IFS.
+ This is fixed now, but there's still a bug remaining, namely that completion
+ does not work correctly if dirs or subdirs of entries in $CDPATH contain
+ embedded spaces
+_longopt(): install completion for {mk,rm}dir as -o filenames, not dirnames
+----------------------------
+revision 1.140
+date: 2002/02/21 20:26:36; author: ianmacd; state: Exp; lines: +3 -1
+
+_tar(): prevent error if user tries to complete on first parameter using a
+ string like -x (compgen sees the -x as an option to itself)
+----------------------------
+revision 1.139
+date: 2002/02/20 19:09:45; author: ianmacd; state: Exp; lines: +2 -2
+
+_known_hosts(): fix bug where defaulting to standard hostname completion
+ would yield a compgen error
+----------------------------
+revision 1.138
+date: 2002/02/20 06:41:50; author: ianmacd; state: Exp; lines: +2 -2
+
+update release to 20020220
+----------------------------
+revision 1.137
+date: 2002/02/20 06:26:08; author: ianmacd; state: Exp; lines: +3 -3
+
+_longopt(): add irb to list of commands
+_longopt(): refine sed command that filters long options
+----------------------------
+revision 1.136
+date: 2002/02/20 03:56:08; author: ianmacd; state: Exp; lines: +2 -2
+
+_man(): manpath doesn't exist on Sorceror Linux, so use man --path instead
+----------------------------
+revision 1.135
+date: 2002/02/20 01:12:52; author: ianmacd; state: Exp; lines: +2 -2
+
+_function(): declare won't allow a function that starts with a '-', so use
+ type instead
+----------------------------
+revision 1.134
+date: 2002/02/19 22:49:13; author: ianmacd; state: Exp; lines: +4 -7
+
+_rpm(): some clean up
+----------------------------
+revision 1.133
+date: 2002/02/19 18:37:15; author: ianmacd; state: Exp; lines: +45 -27
+
+take signal completion from _killall() and put it in _signals()
+_killall() now calls _signals()
+new _kill() function for kill completion
+_killall() now only completes on signals if parameter starts with a '-'.
+ It would previously return process names AND signals for a blank parameter.
+----------------------------
+revision 1.132
+date: 2002/02/18 23:40:23; author: ianmacd; state: Exp; lines: +8 -4
+
+_man(): remove compgen -G glob in favour of compgen -f -X
+----------------------------
+revision 1.131
+date: 2002/02/18 19:21:14; author: ianmacd; state: Exp; lines: +23 -11
+
+_tar(): eradicate use of compgen -G in favour of compgen -f -X
+----------------------------
+revision 1.130
+date: 2002/02/18 19:07:37; author: ianmacd; state: Exp; lines: +9 -8
+
+_rpm(): more removal of compgen -G in favour of compgen -f -X
+----------------------------
+revision 1.129
+date: 2002/02/18 18:55:25; author: ianmacd; state: Exp; lines: +3 -13
+
+vastly simplify _rpm()'s local file_glob() function by removing compgen -G
+ glob in favour of a compgen -f -X construction
+----------------------------
+revision 1.128
+date: 2002/02/18 18:36:00; author: ianmacd; state: Exp; lines: +5 -3
+
+check that $modpath directory can be entered in _insmod()
+----------------------------
+revision 1.127
+date: 2002/02/18 18:26:54; author: ianmacd; state: Exp; lines: +12 -11
+
+only install route completion if running Linux
+check for existence of make before installing its completion
+----------------------------
+revision 1.126
+date: 2002/02/18 11:09:59; author: ianmacd; state: Exp; lines: +36 -41
+
+check for Linux before installing killall completion
+check for existence of cvs before installing its completion
+clean up _longopt()
+clean up _gcc()
+clean up _configure()
+----------------------------
+revision 1.125
+date: 2002/02/18 09:39:02; author: ianmacd; state: Exp; lines: +9 -11
+
+_configure_func() now calls _longopt(), rather than duplicating code
+----------------------------
+revision 1.124
+date: 2002/02/18 09:32:56; author: ianmacd; state: Exp; lines: +5 -31
+
+remove _redir_op() and _redir_test()
+----------------------------
+revision 1.123
+date: 2002/02/18 09:27:09; author: ianmacd; state: Exp; lines: +2 -2
+
+$prev wasn't local to _psql()
+----------------------------
+revision 1.122
+date: 2002/02/18 09:26:34; author: ianmacd; state: Exp; lines: +29 -12
+
+mkdir and rmdir now bound to _longopt(), default to dirnames
+a2ps, autoconf, automake, bc, gprof, ld, nm, objcopy, objdump, readelf, strip,
+ bison, cpio, diff, patch, enscript, cp, df, dir, du, ln, ls, mkfifo, mknod,
+ mv, rm, touch, vdir, xargs, awk, gperf, grep, gpg, grub, indent, less, m4,
+ sed, shar, date, env, seq, su, tee, uname, who, texindex, cat, csplit, cut,
+ expand, fmt, fold, head, md5sum, nl, od, paste, pr, ptx, sha1sum, sort,
+ split, tac, tail, tr, unexpand, uniq, wc, units and rsync now all have
+ GNU long option completion from _longopt()
+gpc completion added into _gcc()
+cat, less, more, ln and strip no longer bound to _filedir()
+----------------------------
+revision 1.121
+date: 2002/02/17 16:50:17; author: ianmacd; state: Exp; lines: +2 -2
+
+ee, xv, qiv and display also complete on .xpm files
+----------------------------
+revision 1.120
+date: 2002/02/16 01:13:00; author: ianmacd; state: Exp; lines: +36 -21
+
+break part of _gcc() into _longopt() and use this for ldd, wget, bash, id and
+ info completion, as demonstrated by Manu Rouat <emmanuel.rouat@wanadoo.fr>
+----------------------------
+revision 1.119
+date: 2002/02/15 23:53:58; author: ianmacd; state: Exp; lines: +57 -1
+
+completion for gcc and back-ends (g++, c++, g77, and gcj) from
+ Phil Edwards <phil@jaj.com>
+----------------------------
+revision 1.118
+date: 2002/02/15 07:18:22; author: ianmacd; state: Exp; lines: +2 -2
+
+update release to 20020215
+----------------------------
+revision 1.117
+date: 2002/02/15 00:44:21; author: ianmacd; state: Exp; lines: +2 -2
+
+mplayer also completes on .wmv files
+----------------------------
+revision 1.116
+date: 2002/02/14 23:39:04; author: ianmacd; state: Exp; lines: +15 -16
+
+_man(): use manpath instead of /etc/man{,path}.config to find list of paths
+ to search. This approach honours $MANPATH
+_man(): fixed bug that caused a spurious ':' to be returned as a possible
+ completion for all manual sections
+----------------------------
+revision 1.115
+date: 2002/02/14 21:11:31; author: ianmacd; state: Exp; lines: +9 -14
+
+_rpm(): add --nodeps and --nodirtokens to possible completions for rpm -b*
+ and rpm -t*
+_rpm(): add --rmsource, --rmspec, --sign & --nodirtokens to possible
+ completions for rpm --rebuild and rpm --recompile
+_rpm(): rpm --recompile and --rebuild now offer compatible long options as
+ possible completions, even when current parameter does not start with a '-'
+_rpm(): rpm --clean, --rmsource and --rmspec now offer compatible long options
+ as possible completions, even when current parameter does not start with a '-'
+----------------------------
+revision 1.114
+date: 2002/02/14 20:07:42; author: ianmacd; state: Exp; lines: +8 -5
+
+_rpm(): default to directory completion as a last resort in more cases
+----------------------------
+revision 1.113
+date: 2002/02/14 17:49:43; author: ianmacd; state: Exp; lines: +7 -4
+
+_man(): check for /etc/manpath.config as well as /etc/man.config, since
+ Debian uses the former
+----------------------------
+revision 1.112
+date: 2002/02/13 19:25:22; author: ianmacd; state: Exp; lines: +2 -4
+
+user name completion for passwd was accidentally later replaced by group
+ name completion (duh)
+----------------------------
+revision 1.111
+date: 2002/02/13 19:23:52; author: ianmacd; state: Exp; lines: +4 -5
+
+add rsh, rlogin & ftp to commands that use _known_hosts()
+----------------------------
+revision 1.110
+date: 2002/02/13 19:20:59; author: ianmacd; state: Exp; lines: +29 -1
+
+beginnings of psql completion
+----------------------------
+revision 1.109
+date: 2002/02/13 18:33:29; author: ianmacd; state: Exp; lines: +2 -2
+
+mplayer also completes on .mov files
+----------------------------
+revision 1.108
+date: 2002/02/13 17:02:57; author: ianmacd; state: Exp; lines: +8 -6
+
+update release to 20020213
+----------------------------
+revision 1.107
+date: 2002/02/13 16:54:03; author: ianmacd; state: Exp; lines: +2 -2
+
+add line continuation character to _tcpdump(), or compgen will eat up all of
+ the memory on the system
+----------------------------
+revision 1.106
+date: 2002/02/13 16:46:15; author: ianmacd; state: Exp; lines: +4 -7
+
+breaking completion definitions that use -X over multiple lines broke them,
+ when later reassigning them to _filedir_xspec()
+----------------------------
+revision 1.105
+date: 2002/02/12 18:36:17; author: ianmacd; state: Exp; lines: +2 -2
+
+updated release to 20020212
+----------------------------
+revision 1.104
+date: 2002/02/12 17:05:22; author: ianmacd; state: Exp; lines: +8 -12
+
+clean up _man() a little
+----------------------------
+revision 1.103
+date: 2002/02/11 23:28:47; author: ianmacd; state: Exp; lines: +36 -3
+
+beginnings of gdb completion
+type now simply completes on commands (complete -c) rather than using
+ _command()
+----------------------------
+revision 1.102
+date: 2002/02/11 06:06:19; author: ianmacd; state: Exp; lines: +5 -4
+
+in _apt-cache(), return package list for --show, --showpkg, --depends
+ and --dotty
+----------------------------
+revision 1.101
+date: 2002/02/11 03:14:08; author: ianmacd; state: Exp; lines: +6 -7
+
+_scp() now suffixes a ':' on hostnames
+----------------------------
+revision 1.100
+date: 2002/02/11 02:49:26; author: ianmacd; state: Exp; lines: +22 -4
+
+add bash export completion
+change $cword reference to $cur in alias completion
+remove local from list of built-ins that complete on variables, since local
+ can't be used interactively
+----------------------------
+revision 1.99
+date: 2002/02/11 00:11:03; author: ianmacd; state: Exp; lines: +35 -1
+
+alias and function completion based on code submitted by
+ ulf.bartelt@t-online.de <Ulf Bartelt>
+----------------------------
+revision 1.98
+date: 2002/02/10 21:45:46; author: ianmacd; state: Exp; lines: +18 -1
+
+ncftp bookmark completion from Markus Dobel <mdobel@kawo2.rwth-aachen.de>
+----------------------------
+revision 1.97
+date: 2002/02/10 21:32:39; author: ianmacd; state: Exp; lines: +3 -2
+
+add qiv and display to list of programs that complete on image files
+xfig completes on .fig files
+----------------------------
+revision 1.96
+date: 2002/02/09 08:30:49; author: ianmacd; state: Exp; lines: +2 -2
+
+update release to 20020209
+----------------------------
+revision 1.95
+date: 2002/02/08 18:16:44; author: ianmacd; state: Exp; lines: +4 -3
+
+fixed minor quoting bug in _filedir() and _filedir_xspec() that caused paths
+ with embedded spaces to still not be correctly completed in some cases
+----------------------------
+revision 1.94
+date: 2002/02/08 17:49:05; author: ianmacd; state: Exp; lines: +17 -18
+
+_man(): some systems (e.g. Mandrake) have bzipped man pages
+_man(): remove code duplication
+more file types for ee and xv
+----------------------------
+revision 1.93
+date: 2002/02/06 19:02:53; author: ianmacd; state: Exp; lines: +2 -2
+
+updated release to 20020206
+----------------------------
+revision 1.92
+date: 2002/02/06 18:41:06; author: ianmacd; state: Exp; lines: +3 -3
+
+make -name, -lname, -iname & -ilname complete on files in _find() and
+ change default completion from -o default to -o filenames
+----------------------------
+revision 1.91
+date: 2002/02/06 17:05:12; author: ianmacd; state: Exp; lines: +3 -2
+
+make xdvi also complete on .Z, .gz and .bz2 files
+----------------------------
+revision 1.90
+date: 2002/02/06 16:54:09; author: ianmacd; state: Exp; lines: +15 -15
+
+change instances of -X '!*.+(foo|bar)' to -X '!*.@(foo|bar) in the various
+ one-liners, so that e.g. baz would complete on .foo or .bar, but not .foobar
+----------------------------
+revision 1.89
+date: 2002/02/06 05:02:46; author: ianmacd; state: Exp; lines: +9 -6
+
+added a bunch of one-liners from patch by Matthias Klose <doko@cs.tu-berlin.de>
+----------------------------
+revision 1.88
+date: 2002/02/06 02:51:20; author: ianmacd; state: Exp; lines: +2 -2
+
+add --pkgid, --hdrid, --fileid & --tid query options to _rpm() for rpm 4.0.4
+----------------------------
+revision 1.87
+date: 2002/02/05 16:55:30; author: ianmacd; state: Exp; lines: +3 -3
+
+unzip also completes on .pk3 (Quake map) files
+xmms, gqmpeg & freeamp also complete on .pls files
+----------------------------
+revision 1.86
+date: 2002/02/04 19:11:42; author: ianmacd; state: Exp; lines: +3 -2
+
+in _rpm(), consult /var/log/rpmpkgs for package list only if it is newer
+ than /var/lib/rpm/Packages
+----------------------------
+revision 1.85
+date: 2002/02/04 19:07:33; author: ianmacd; state: Exp; lines: +5 -5
+
+make scp work with files with embedded spaces (grr...)
+----------------------------
+revision 1.84
+date: 2002/02/04 03:15:42; author: ianmacd; state: Exp; lines: +2 -2
+
+updated release to 20020204
+----------------------------
+revision 1.83
+date: 2002/02/04 03:12:10; author: ianmacd; state: Exp; lines: +62 -1
+
+screen completion added - _screen()
+beginnings of openssl completion added - _openssl()
+----------------------------
+revision 1.82
+date: 2002/02/03 22:01:43; author: ianmacd; state: Exp; lines: +13 -2
+
+make --clean --rmsource and --rmspec work together in _rpm()
+----------------------------
+revision 1.81
+date: 2002/01/31 18:03:19; author: ianmacd; state: Exp; lines: +3 -3
+
+not all awks are created equal, so use sub() instead of gensub() in _killall()
+----------------------------
+revision 1.80
+date: 2002/01/31 17:01:43; author: ianmacd; state: Exp; lines: +2 -2
+
+in _zip(), $xspec needs to be quoted to stop it from acting as a shell glob,
+ rather than a parameter to compgen
+----------------------------
+revision 1.79
+date: 2002/01/31 01:35:52; author: ianmacd; state: Exp; lines: +2 -2
+
+unzip now also handles .exe files
+----------------------------
+revision 1.78
+date: 2002/01/30 19:48:45; author: ianmacd; state: Exp; lines: +19 -12
+
+fix _find() so that if first command line parameter does not begin with -,
+ directory completion is performed. Previously 'find h<Tab>' would result
+ in 'find -help'.
+----------------------------
+revision 1.77
+date: 2002/01/30 05:08:47; author: ianmacd; state: Exp; lines: +2 -2
+
+update release to 20020130
+----------------------------
+revision 1.76
+date: 2002/01/30 05:04:28; author: ianmacd; state: Exp; lines: +3 -3
+
+--clean can be used stand-alone in _rpm()
+----------------------------
+revision 1.75
+date: 2002/01/29 23:06:26; author: ianmacd; state: Exp; lines: +16 -10
+
+make _ifupdown() detect a Debian Linux system and act accordingly
+in _man(), check that /etc/man.config is readable, not just that it exists
+in _rpm(), check that /var/log/rpmpkgs is readable, not just that it exists
+----------------------------
+revision 1.74
+date: 2002/01/29 21:33:49; author: ianmacd; state: Exp; lines: +8 -3
+
+define $BASH_COMPLETION to hold location of completion script. This is a
+ read-only variable used by _filedir_xspec(). Why doesn't bash have a
+ built-in variable to return the path of the file currently being sourced?
+----------------------------
+revision 1.73
+date: 2002/01/29 20:30:00; author: ianmacd; state: Exp; lines: +2 -2
+
+apparently, it should be aviplay, not avifile
+----------------------------
+revision 1.72
+date: 2002/01/29 18:31:22; author: ianmacd; state: Exp; lines: +4 -1
+
+call _expand() from a couple more places in _rpm()
+----------------------------
+revision 1.71
+date: 2002/01/24 21:20:31; author: ianmacd; state: Exp; lines: +2 -2
+
+make _filedir_xspec() use the basename of commands when looking for matching
+ exclusion specs (acroread <Tab> worked, whereas /opt/bin/acroread <Tab>
+ did not)
+----------------------------
+revision 1.70
+date: 2002/01/24 05:03:26; author: ianmacd; state: Exp; lines: +11 -6
+
+release updated to 20020124
+call _expand() from some of the completion routines()
+find now performs default completion, rather than dirnames, if nothing else
+ is returned
+----------------------------
+revision 1.69
+date: 2002/01/24 00:41:00; author: ianmacd; state: Exp; lines: +3 -3
+
+_rpm() now performs tilde expansion when file globbing
+removed commented out gzip and bzip2 one-liners
+----------------------------
+revision 1.68
+date: 2002/01/24 00:36:30; author: ianmacd; state: Exp; lines: +17 -6
+
+renamed _file_and_dir() _filedir_xspec()
+created _filedir(), which is used by cat, less, more, ln and strip, so that
+ tilde expansion can be performed, prior to pathname expansion
+----------------------------
+revision 1.67
+date: 2002/01/24 00:13:21; author: ianmacd; state: Exp; lines: +41 -11
+
+_zip() added for gzip and bzip2, so that they complete on .gz2 and .bz2 files
+ when invoked with the -d flag.
+_expand() created for doing tilde expansion on path names. It returns the
+ number of elements in the COMPREPLY array. _zip(), _cd() and
+ _file_and_dir() now call this.
+fixed minor bug in _file_and_dir() that was removing the '-' from the front of
+ its parameter
+----------------------------
+revision 1.66
+date: 2002/01/23 21:35:17; author: ianmacd; state: Exp; lines: +5 -3
+
+by popular request, comment out compspecs for gzip and bzip2. Added a
+ conditional to installation section of _file_and_dir() to not bind commented
+ out compspecs to commands
+----------------------------
+revision 1.65
+date: 2002/01/23 18:24:46; author: ianmacd; state: Exp; lines: +5 -5
+
+add --rmspec handling to _rpm()
+----------------------------
+revision 1.64
+date: 2002/01/23 18:14:19; author: ianmacd; state: Exp; lines: +7 -8
+
+turn off command tracing when DEBUG is unset
+unzip also unpacks .jar files
+add ggv to commands that take PostScript files
+mplayer CAN'T use MP3 files
+_command() wasn't redirecting stderr, so would display a harmless error message
+ when in 'sudo x <Tab>', 'x' didn't have its own compspec
+in 'sudo x $1 $2 $n', _command() was calling x's own completion function and
+ passing the rest of the command line as a single parameter, rather than as
+ individual tokens. This is fixed, but there may be other breakage as a
+ result. Need to do more testing.
+----------------------------
+revision 1.63
+date: 2002/01/22 08:19:47; author: ianmacd; state: Exp; lines: +2 -2
+
+handle rpm -qip (and similar) as well as rpm -qpi
+----------------------------
+revision 1.62
+date: 2002/01/21 16:48:10; author: ianmacd; state: Exp; lines: +3 -1
+
+fix bug in 'sudo x <Tab>' where 'x' has no compspec of its own
+----------------------------
+revision 1.61
+date: 2002/01/21 16:29:54; author: ianmacd; state: Exp; lines: +3 -3
+
+errors caused by missing quotes fixed (duh!)
+----------------------------
+revision 1.60
+date: 2002/01/21 04:58:42; author: ianmacd; state: Exp; lines: +2 -20
+
+remove previous _command() completion function
+updated release to 20010121
+----------------------------
+revision 1.59
+date: 2002/01/18 16:54:22; author: ianmacd; state: Exp; lines: +49 -2
+
+completely rewrote _command(), so that commands like sudo and strace first
+ complete on a command, then complete according to that command's own
+ completion specification. E.g. sudo rpm <Tab> would further complete
+ according to _rpm(), as if it were being called directly
+iptables completion was being installed, even if it were not in user's PATH
+----------------------------
+revision 1.58
+date: 2002/01/16 08:18:11; author: ianmacd; state: Exp; lines: +7 -1
+
+added some one-liners for multimedia programs
+----------------------------
+revision 1.57
+date: 2002/01/16 08:14:14; author: ianmacd; state: Exp; lines: +10 -7
+
+_known_hosts(): finally thought of a way to correctly perform completion
+ when host specification is of the form user@host
+_known_hosts(): moved escaping of dots in $cur to within 'if' block that
+ requires it
+----------------------------
+revision 1.56
+date: 2002/01/16 03:16:56; author: ianmacd; state: Exp; lines: +2 -2
+
+_man() wasn't completing on filenames with a relative path
+----------------------------
+revision 1.55
+date: 2002/01/15 18:20:48; author: ianmacd; state: Exp; lines: +2 -2
+
+updated release to 20020115
+----------------------------
+revision 1.54
+date: 2002/01/14 21:38:22; author: ianmacd; state: Exp; lines: +33 -1
+
+mysqladmin completion
+----------------------------
+revision 1.53
+date: 2002/01/09 16:32:30; author: ianmacd; state: Exp; lines: +2 -2
+
+updated release to 20020109
+----------------------------
+revision 1.52
+date: 2002/01/08 05:49:06; author: ianmacd; state: Exp; lines: +35 -11
+
+added _chgrp() completion
+----------------------------
+revision 1.51
+date: 2002/01/08 01:33:08; author: ianmacd; state: Exp; lines: +19 -1
+
+added _ifupdown() for Red Hat Linux if{up,down} completion
+----------------------------
+revision 1.50
+date: 2002/01/08 01:26:49; author: ianmacd; state: Exp; lines: +45 -7
+
+improve _iptables() with some chain name completion
+----------------------------
+revision 1.49
+date: 2002/01/06 19:11:12; author: ianmacd; state: Exp; lines: +3 -2
+
+fix iptables - it no longer worked at all, because $prev wasn't set
+----------------------------
+revision 1.48
+date: 2002/01/06 04:21:04; author: ianmacd; state: Exp; lines: +2 -2
+
+_cd() was no longer completing relative to $CDPATH
+----------------------------
+revision 1.47
+date: 2002/01/05 21:04:01; author: ianmacd; state: Exp; lines: +3 -1
+
+add release date
+----------------------------
+revision 1.46
+date: 2002/01/05 20:48:59; author: ianmacd; state: Exp; lines: +6 -4
+
+fixed _cd() so that if $CDPATH is set and no completions are returned
+ relative to its paths, we still attempt directory completion relative to $PWD
+----------------------------
+revision 1.45
+date: 2002/01/05 20:42:41; author: ianmacd; state: Exp; lines: +9 -5
+
+make gv also complete on encapsulated PostScript files
+add jadetex and pdfjadetex to commands that complete on tex files
+improved tar completion to handle .tgz and .tar files
+inproved tar completion to perform file completion when c*f is the first
+ parameter
+----------------------------
+revision 1.44
+date: 2002/01/04 19:29:18; author: ianmacd; state: Exp; lines: +4 -4
+
+add 'conflicts' and 'obsoletes' query completions to _rpm()
+----------------------------
+revision 1.43
+date: 2002/01/04 05:34:21; author: ianmacd; state: Exp; lines: +7 -6
+
+make gv also complete on PDF files
+include --repackage for rpm -[ei]
+fix _cd so that it completes on directories with an embedded space
+fix _file_and_dir so that it completes on directories with an embedded space
+----------------------------
+revision 1.42
+date: 2002/01/03 01:17:44; author: ianmacd; state: Exp; lines: +2 -2
+
+no group completion for chgrp, since we ideally also want filename completion
+ on second and subsequent parameters
+----------------------------
+revision 1.41
+date: 2002/01/03 01:16:41; author: ianmacd; state: Exp; lines: +17 -15
+
+add group completion for chgrp
+change embedded tabs in the file to $'\t' syntax
+be a bit more elegant in determining location of showmount in _mount()
+condense awk|grep combo in _configure() to a single sed command
+be more intelligent about parsing for exclusion (-X) compspecs when
+ binding commands to _file_and_dir()
+----------------------------
+revision 1.40
+date: 2001/12/21 08:56:18; author: ianmacd; state: Exp; lines: +6 -4
+
+check for showmount in /sbin or /usr/sbin in _mount()
+----------------------------
+revision 1.39
+date: 2001/12/20 19:26:49; author: ianmacd; state: Exp; lines: +4 -3
+
+add a compspec for mpg123
+condense grep | head into a single sed command in _file_and_dir
+----------------------------
+revision 1.38
+date: 2001/12/20 17:12:44; author: ianmacd; state: Exp; lines: +16 -17
+
+avoid use of extra file descriptor and grep in _file_and_dir by using
+ parameter substitutions
+----------------------------
+revision 1.37
+date: 2001/12/20 08:52:12; author: ianmacd; state: Exp; lines: +44 -4
+
+added _file_and_dir as a meta-function for compspecs requiring the -X flag
+ This allows us to exclude files without excluding directories
+use IFS=$'\t' instead of IFS=$(echo -e "\t")
+----------------------------
+revision 1.36
+date: 2001/12/18 04:43:25; author: ianmacd; state: Exp; lines: +137 -137
+
+replace spaces with tabs
+----------------------------
+revision 1.35
+date: 2001/12/18 04:25:04; author: ianmacd; state: Exp; lines: +23 -3
+
+basic nslookup completion added
+----------------------------
+revision 1.34
+date: 2001/12/13 21:34:17; author: ianmacd; state: Exp; lines: +3 -7
+
+make ee and xv complete on more file-types
+----------------------------
+revision 1.33
+date: 2001/12/11 21:25:53; author: ianmacd; state: Exp; lines: +21 -2
+
+ant completion added
+----------------------------
+revision 1.32
+date: 2001/12/05 18:05:49; author: ianmacd; state: Exp; lines: +2 -2
+
+use type (built-in) instead of which (external) to determine whether a
+ particular command is available
+----------------------------
+revision 1.31
+date: 2001/12/05 17:32:24; author: ianmacd; state: Exp; lines: +17 -23
+
+- removed misleading comment on _man completion
+- use -g, not -u for group completion (duh!)
+- avoid unnecessary use of $COMPREPLY_SAVE in _ssh/_scp
+- use '-' as prefix (-P) to kill, not '%', and put it *before* command
+- default to filename completion on _scp
+- removed a couple of definitions of $prev that weren't actually used
+- source ~/.bash_completion if it exists
+----------------------------
+revision 1.30
+date: 2001/11/29 01:37:54; author: ianmacd; state: Exp; lines: +8 -24
+
+removed _gid_function and made other modifications to account for the fact
+ that group completion is now standard in bash 2.05a
+----------------------------
+revision 1.29
+date: 2001/11/26 19:19:59; author: ianmacd; state: Exp; lines: +5 -2
+
+make _known_hosts() escape meta-characters in paths before handing off to awk
+added missing ` in _service
+----------------------------
+revision 1.28
+date: 2001/11/20 21:35:19; author: ianmacd; state: Exp; lines: +2 -3
+
+$prev not needed in _scp
+----------------------------
+revision 1.27
+date: 2001/11/20 05:15:48; author: ianmacd; state: Exp; lines: +43 -22
+
+- default to _dirnames on _find
+- fixed bug in _known_hosts that caused keys to be printed from known_hosts2
+ files
+- made _ssh a little more intelligent
+- added _scp
+- made _cd expand ~ in directory specs
+- declared i as a local variable in many functions
+----------------------------
+revision 1.26
+date: 2001/11/05 00:11:48; author: ianmacd; state: Exp; lines: +11 -5
+
+_rpm now uses /var/log/rpmpkgs if available (in RHL 7.2), since this is much
+ faster than rpm -qa, at the expense of actuality
+_man completion now looks at section 'l' (local) of the manual
+----------------------------
+revision 1.25
+date: 2001/09/21 20:51:30; author: ianmacd; state: Exp; lines: +5 -3
+
+fixed bug in _cd that caused no completions to be returned if CDPATH was not
+set and user was not trying to complete on an absolute path
+----------------------------
+revision 1.24
+date: 2001/08/22 17:20:27; author: ianmacd; state: Exp; lines: +23 -23
+
+reverted to previous version of _rpm, since last time's fixes broke more things than
+ they fixed.
+----------------------------
+revision 1.23
+date: 2001/08/16 17:49:39; author: ianmacd; state: Exp; lines: +70 -17
+
+added _command completion function and extended Perforce completion, both written by
+ Frank Cusack (frank@google.com)
+----------------------------
+revision 1.22
+date: 2001/08/16 17:27:02; author: ianmacd; state: Exp; lines: +23 -23
+
+made rpm completion work when -p option to check uninstalled packages is not concatenated
+with other options (e.g. -ql -p instead of -qlp)
+----------------------------
+revision 1.21
+date: 2001/07/12 05:52:25; author: ianmacd; state: Exp; lines: +6 -6
+
+tune cd completion for standard dir completion when all else fails
+p4 completion completes on files after first parameter
+p4 completion now gives default completion if all else fails
+----------------------------
+revision 1.20
+date: 2001/07/09 02:55:01; author: ianmacd; state: Exp; lines: +41 -21
+
+corrected bug in have() support function - it returned false positives
+umount, rmmod, find, rpm, apt-get, apt-cache, make use '-o filenames'
+mount uses '-o default' to get default completion if all else fails
+added basic perforce completion
+----------------------------
+revision 1.19
+date: 2001/07/09 01:14:13; author: ianmacd; state: Exp; lines: +91 -12
+
+added have() function for checking for presence of binaries
+check for binaries before installing functions and completions
+use '-o' option to 'complete' for optimal completion behaviour
+basic tar(1), iptables(8), tcpdump(8) completion added
+----------------------------
+revision 1.18
+date: 2001/05/21 22:10:29; author: ianmacd; state: Exp; lines: +10 -121
+
+various clean-ups for bash 2.05 ('complete -o' means we can simplify a
+ bunch of default code)
+_cd function made active again
+meta default completion function removed (bash 2.05 has 'complete -o default')
+----------------------------
+revision 1.17
+date: 2001/03/22 00:33:02; author: ianmacd; state: Exp; lines: +2 -2
+
+fixed typo in rpm completion
+----------------------------
+revision 1.16
+date: 2001/03/05 20:12:48; author: ianmacd; state: Exp; lines: +207 -21
+
+don't try to do NFS mount completion if we don't seem to have showmount
+fix quoting issue in insmod completion
+add --specfile, --what{provides,requires} sections to RPM completion
+move -*g) case glob down to end of case, to avoid catching --checksig in RPM
+ completion
+check /etc/known_hosts2 & ~/.ssh/known_hosts2 for hosts in _known_hosts
+ completion
+fixed typo in service completion
+added preliminary _cd meta-function
+added some more meta-functions from sample completions supplied with bash 2.04
+ source
+----------------------------
+revision 1.15
+date: 2001/01/31 23:57:06; author: ianmacd; state: Exp; lines: +16 -1
+
+modprobe -r now completes a la insmod
+insmod/modprobe now complete on filenames if parameter contains a /
+----------------------------
+revision 1.14
+date: 2001/01/31 23:30:49; author: ianmacd; state: Exp; lines: +8 -7
+
+insmod completion was not completing module parameters correctly
+man completion now resorts to filename completion if no /etc/man.config
+----------------------------
+revision 1.13
+date: 2001/01/11 00:09:48; author: ianmacd; state: Exp; lines: +29 -1
+
+added Red Hat service completion
+----------------------------
+revision 1.12
+date: 2000/12/20 03:04:54; author: ianmacd; state: Exp; lines: +6 -2
+
+added --rmsource as stand-alone option to RPM completion
+----------------------------
+revision 1.11
+date: 2000/12/19 20:54:49; author: ianmacd; state: Exp; lines: +28 -11
+
+fixed bug in killall completion that caused swapped out processes to not be
+ completed
+added file_glob() function to rpm completion
+----------------------------
+revision 1.10
+date: 2000/11/20 21:41:43; author: ianmacd; state: Exp; lines: +76 -45
+
+rpm completion updated for extra options in rpm 4.x (added --eval, --pipe,
+ --rcfile, etc.)
+some minor bug fixes to rpm completion; code tidied in places
+added some outstanding long options to rpm completion (--install, --freshen,
+ --upgrade, --info, --list, --state, --docfiles, --queryformat, --verify etc.)
+added -g group completion
+----------------------------
+revision 1.9
+date: 2000/10/29 23:17:19; author: ianmacd; state: Exp; lines: +5 -5
+
+fixed RPM completion. Not all RPMs were found when completing -e, etc.
+----------------------------
+revision 1.8
+date: 2000/10/19 17:25:36; author: ianmacd; state: Exp; lines: +4 -20
+
+reverted cd, mkdir & pushd to standard -d directory completion
+----------------------------
+revision 1.7
+date: 2000/10/09 20:07:50; author: ianmacd; state: Exp; lines: +164 -16
+
+default to filename completion if all else fails on _mound() and _find()
+do filename completion in _man() if parameter contains a /
+add filename completion to list of _man completions if no manual section
+ specified
+added functionality to FreeS/WAN IPSec completion
+added Debian apt-get & apt-cache completion
+added more intelligent directory completion in new _directory function
+----------------------------
+revision 1.6
+date: 2000/09/25 23:38:11; author: ianmacd; state: Exp; lines: +118 -30
+
+added Makefile completion
+split _ssh function up into a _known_hosts function for use by other commands
+improved insmod completion with module paramter completion
+----------------------------
+revision 1.5
+date: 2000/09/11 20:46:39; author: ianmacd; state: Exp; lines: +66 -10
+
+fixed bug in man completion that caused pages with a dot in them
+ (e.g. lilo.conf) not to be found
+ssh completion enhanced with command completion after host has been given
+fixed bug in ssh completion that caused bad completions when completing on
+ a digit
+added route(8) completion
+----------------------------
+revision 1.4
+date: 2000/08/29 21:21:00; author: ianmacd; state: Exp; lines: +20 -11
+
+fixed bug in killall completion (processes with a path were not completed)
+added cipher completion to -c option of ssh
+----------------------------
+revision 1.3
+date: 2000/08/29 02:41:27; author: ianmacd; state: Exp; lines: +116 -63
+
+added ssh completion
+cleaned the code in some of the other functions
+----------------------------
+revision 1.2
+date: 2000/08/11 23:20:41; author: ianmacd; state: Exp; lines: +253 -1
+
+added cvs, rpm, chkconfig and chsh completion
+----------------------------
+revision 1.1
+date: 2000/08/09 00:17:29; author: ianmacd; state: Exp;
+
+initial check-in of bash 2.04 programmable completion stuff
+----------------------------
+revision 1.504.2.4
+date: 2003/01/02 18:41:37; author: ianmacd; state: Exp; lines: +2 -2
+
+- update release to 20030102-devel
+----------------------------
+revision 1.504.2.3
+date: 2003/01/02 02:33:32; author: ianmacd; state: Exp; lines: +2 -2
+
+- add minor vim fix from main branch
+----------------------------
+revision 1.504.2.2
+date: 2003/01/01 01:07:08; author: ianmacd; state: Exp; lines: +61 -90
+
+- large function clean-up by "Guillaume Rousse" <rousse@ccr.jussieu.fr>
+----------------------------
+revision 1.504.2.1
+date: 2003/01/01 01:05:35; author: ianmacd; state: Exp; lines: +160 -44
+
+- split for devel branch
+- rsync completion by "Guillaume Rousse" <rousse@ccr.jussieu.fr>
+=============================================================================
diff --git a/debian/bash_completion/README b/debian/bash_completion/README
new file mode 100644
index 0000000..93616af
--- /dev/null
+++ b/debian/bash_completion/README
@@ -0,0 +1,448 @@
+$Id: README,v 1.26 2006/02/25 14:41:11 ianmacd Exp $
+
+
+INSTALLATION
+------------
+
+The easiest way to install this software is to use a package, such as
+the RPM that I maintain for Red Hat Linux, the .deb package for
+Debian/GNU Linux or Ubuntu, etc.
+
+If that's not an option or you simply don't want to do this, put the
+bash_completion file somewhere on your system and source it from either
+/etc/bashrc or ~/.bashrc.
+
+Here's one possible way of doing that from /etc/bashrc:
+
+# Check for interactive shell.
+if [ -n "$PS1" ]; then
+ if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
+ if [ -r /etc/bash_completion ]; then
+ # Source completion code.
+ . /etc/bash_completion
+ fi
+ fi
+fi
+unset bash bminor bmajor
+
+This code checks that the version of bash that is parsing the code is
+later than 2.04 and, if so, sources the bash completion code.
+
+While this code may, at first, seem overly complex, the advantage of
+using it is that it will also parse correctly when interpreted by bash
+1.x. If you have bash 1.x and bash 2/3.x users on your system, you
+must avoid using constructs that were not valid under 1.x syntax.
+
+If your system has an /etc/profile.d directory, you might instead want
+to add a script called bash_completion.sh to that directory. Add the
+above code, preceded by the following:
+
+# Check for bash.
+[ -z "$BASH_VERSION" ] && return
+
+In this case, all *.sh scripts in /etc/profile.d are sourced from
+/etc/bashrc by Bourne-like shells, so you need the extra check for bash
+in order to avoid sourcing the rest of the script if a shell other than
+bash is running.
+
+For your convenience, a sample bash_completion.sh file is included in
+the package.
+
+If you're using MacOS X, /etc/bashrc is apparently not sourced at all.
+In that case, you should put the bash_completion file in /sw/etc and add
+the following code to ~/.bash_profile:
+
+if [ -f /sw/etc/bash_completion ]; then
+ . /sw/etc/bash_completion
+fi
+
+If you are putting the bash completion source file somewhere other
+than /etc/bash_completion, you should ensure that $BASH_COMPLETION is
+set to point to it before you source it. Your ~/.bashrc file is a good
+place to do this.
+
+
+TROUBLESHOOTING
+---------------
+
+If you get errors about 'complete' or 'compgen' not accepting the -g
+flag, you are probably running bash 2.05 and should either apply the
+group completion patch, download a prepatched bash binary of 2.05, or
+upgrade to 2.05a or later.
+
+If you find that some commands, such as 'cd /usr<Tab>', end with a
+trailing space instead of appending a /, you are probably running the
+base version of bash 2.05, which suffers from a bug that causes the
+'-o filenames' option to the complete built-in to be ignored. You can
+fix this by applying the following official patch from the bash
+maintainer:
+
+ ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-006
+
+If you get errors about 'complete' not accepting the -o flag, you are
+probably running bash 2.04. In this case, you should upgrade to bash
+2.05a or later. However, I have endeavoured to make the code detect
+this version of bash and work around this issue, so please inform me
+if you still encounter this error.
+
+Copies of the patches and prepatched versions of bash are available
+from:
+
+ http://www.caliban.org/bash/
+
+If you find that a given function is producing errors under certain
+circumstances when you attempt completion, try running 'set -v' or
+'set -x' prior to attempting the completion again. This will produce
+useful debugging output that will aid me in fixing the problem if you
+are unable to do so yourself. Turn off the trace output by running
+either 'set +v' or 'set +x'.
+
+
+KNOWN PROBLEMS
+--------------
+
+I.
+
+There seems to be some issue with using the bash built-in cd within
+Makefiles. When invoked as /bin/sh within Makefiles, bash seems to
+have a problem changing directory via the cd command. A work-around
+for this is to define SHELL=/bin/bash within your Makefile. This is
+believed to be a bug in bash.
+
+II.
+
+The have() function is used to conserve memory by only installing
+completion functions for those programs that are actually present on
+your system. The current method of determining whether or not a given
+binary is present is whether or not it can be found along a certain
+path of directories. The path that is currently searched is:
+
+ $PATH:/sbin:/usr/sbin:/usr/local/sbin
+
+where $PATH is your user path at the time the bash completion file is
+sourced.
+
+III.
+
+Many of the completion functions assume GNU versions of the various
+text utilities that they call (e.g. grep, sed and awk). Your mileage
+may vary.
+
+IV.
+
+If you are seeing 'unbound variable' warnings from bash when hitting
+<Tab>, this is because you have either 'set -u' or 'set -o nounset'
+somewhere in your start-up files. This causes bash to flag the use of
+any uninitialised shell variables as an error.
+
+Whilst I try to avoid references to uninitialised variables in the
+code, there seem to be at least some cases where bash issues this
+warning even though the variable in question has been initialised.
+
+One place this appears to occur is within the _muttconffiles() helper
+function used by mutt completion, where the function calls itself
+recursively. This seems to confuse bash and it issues spurious
+warnings if 'nounset' is set.
+
+
+FAQ
+---
+
+Q. The bash completion code inhibits some commands from completing on
+ files with extensions that are legitimate in my environment. Do I
+ have to disable completion for that command in order to complete on
+ the files that I need to?
+
+A. No. Use M-/ to (in the words of the man page) attempt file name
+ completion on the text to the left of the cursor. This will
+ circumvent any file type restrictions put in place by the bash
+ completion code.
+
+Q. How can I insert my own local completions without having to
+ reinsert them every time you issue a new release?
+
+A. Put them in ~/.bash_completion, which is parsed at the end of the
+ main completion script. See also the next question.
+
+Q. I author/maintain package X and would like to maintain my own
+ completion code for this package. Where should I put it to be sure
+ that interactive bash shells will find it and source it?
+
+ Put it in the directory pointed to by $BASH_COMPLETION_DIR, which
+ is defined at the beginning of the main completion script. Any
+ scripts placed in this directory will be sourced by interactive
+ bash shells. Usually, this is /etc/bash_completion.d.
+
+Q. I use CVS in combination with passwordless ssh access to my remote
+ repository. How can I have the cvs command complete on remotely
+ checked-out files where relevant?
+
+A. Define $COMP_CVS_REMOTE. Setting this to anything will result in
+ the behaviour you would like.
+
+Q. When I'm running a ./configure script and completion returns a list
+ of long options to me, some of these take a parameter,
+ e.g. --this-option=DESCRIPTION.
+
+ Running ./configure --help lists these descriptions, but everything
+ after the '=' is stripped when returning completions, so I don't
+ know what kind of data is expected as a given option's parameter.
+
+ Is there a way of getting ./configure completion to return the
+ entire option string, so that I can see what kind of data is
+ required and then simply delete the descriptive text and add my own
+ data?
+
+A. Define $COMP_CONFIGURE_HINTS. Setting this to anything will result
+ in the behaviour you would like.
+
+Q. When doing tar completion on a file within a tar file like this:
+
+ tar tzvf foo.tar.gz <Tab>
+
+ the pathnames contained in the tar file are not displayed
+ correctly. The slashes are removed and everything looks like it's
+ in a single directory. Why is this?
+
+A. It's a choice I had to make. bash's programmable completion is
+ limited in how it handles the list of possible completions it
+ returns.
+
+ Because the paths returned from within the tar file are likely not
+ existing paths on the file system, '-o dirnames' must be passed to
+ the complete built-in to make it treat them as such. However, then
+ bash will append a space when completing on directories during
+ pathname completion to the tar files themselves.
+
+ It's more important to have proper completion of paths to tar files
+ than it is to have completion for their contents, so this sacrifice
+ was made and '-o filenames' is used with complete instead.
+
+ If you would rather have correct path completion for tar file
+ contents, define $COMP_TAR_INTERNAL_PATHS *before* sourcing
+ bash_completion.
+
+Q. When completing on a symlink to a directory, bash does not append
+ the trailing / and I have to hit <Tab> again. I don't like this.
+
+A. This has nothing to do with bash_completion. It's the default for
+ completing symlinks to directories in bash 2.05a, and was added
+ because sometimes you want to operate on the symlink itself, rather
+ than what it points to.
+
+ In bash 2.05b and later, you can get the pre-2.05a behaviour back
+ by putting 'set mark-symlinked-directories on' in your /etc/inputrc
+ or ~/.inputrc file.
+
+Q. Completion goes awry when I try to complete on something that contains
+ a colon.
+
+A. This is actually a 'feature' of bash. bash recognises a colon as
+ starting a new completion token, which is often what you want when
+ completing something like a PATH variable:
+
+ $ export PATH=/bin:/sbin:/usr<Tab>
+
+ Without the special treatment of the colon, the above wouldn't work
+ without programmable completion, so it has long been a feature of
+ the shell.
+
+ Unfortunately, you don't want the colon to be treated as a special
+ case when doing something like:
+
+ $ man File::B<Tab>
+
+ Here, the colons make bash think that it's completing the a new
+ token that begins with 'B'.
+
+ Unfortunately, there's no way to turn this off. The only thing you
+ can do is escape the colons with a backslash.
+
+Q. Where did urpmi completion go?
+
+A. Guillaume Rousse <rousse@ccr.jussieu.fr> now maintains it separately as
+ part of the urpmi RPM package.
+
+ CVS: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/urpmi/
+ Web: http://urpmi.org/
+
+Q. Why is rpm completion so slow with -q?
+
+A. Probably because the database is being queried every time and this uses a
+ lot of memory.
+
+ You can make this faster by pregenerating the list of installed packages on
+ the system. Make sure you have a readable file called /var/log/rpmpkgs.
+ It's generated by /etc/cron.daily/rpm on modern Red Hat and Mandrake
+ Linux systems.
+
+ If you don't have such a cron job, make one:
+
+ #!/bin/sh
+
+ rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \
+ | sort > /var/log/rpmpkgs
+
+ rpm completion will use this flat text file instead of the RPM database,
+ unless it detects that the database has changed since the file was created,
+ in which case it will still use the database to ensure accuracy.
+
+Q. Can tab completion be made even easier?
+
+A. The readline(3) library offers a few settings that can make tab
+ completion easier (or at least different) to use.
+
+ For example, try putting the following in either /etc/inputrc or
+ ~/.inputrc:
+
+ set show-all-if-ambiguous on
+
+ This will allow single tab completion as opposed to requiring a
+ double tab. This makes things much more pleasant, in my opinion.
+
+ set visible-stats on
+
+ This will suffix each returned file completion with a character
+ denoting its type, in a similar way to ls(1) with -F or --classify.
+
+ set page-completions off
+
+ This turns off the use of the internal pager when returning long
+ completion lists.
+
+Q. This code is rubbish/not bad/pretty good/the best thing since
+ sliced bread. How can I show my appreciation?
+
+A. If you're a registered Freshmeat user, take a moment to rate the
+ project at:
+
+ http://freshmeat.net/rate/19041/
+
+ Of course, writing to me and letting me know how you feel also works.
+ Patches and new completion routines are most welcome, too.
+
+Q. How can I stay abreast of new releases?
+
+A. If you're a registered Freshmeat user, you can subscribe to new release
+ announcements at:
+
+ http://freshmeat.net/subscribe/19041/
+
+Q. Is bash the be-all-and-end-all of completion as far as shells go?
+
+A. Absolutely not. zsh has an extremely sophisticated completion system
+ that offers many features absent from the bash implementation. Its
+ users often cannot resist pointing this out. More information can
+ be found at:
+
+ http://www.zsh.org/
+
+
+CONTRIBUTING
+------------
+
+Contributions to the bash completion project are more than
+welcome. Fixes, clean-ups and improvements of existing code are much
+appreciated, as are completion functions for new commands.
+
+If you wish to contribute code, please bare the following coding
+guidelines in mind:
+
+- Do not use Perl, Ruby, Python etc. to do text processing unless the
+ command for which you are writing the completion code implies the
+ presence of one of those languages.
+
+ For example, if you were writing completion code for perldoc(1), the
+ use of Perl to achieve your goal would be acceptable. irb(1)
+ completion would similarly make the use of Ruby acceptable.
+
+ Even so, please consider alternatives to these large and slow to
+ start interpreters. Use lightweight programs such as grep(1), awk(1)
+ and sed(1).
+
+- Use the full power of bash 2.x. Programmable completion has only
+ been available since bash 2.04, so you may as well use all the
+ features of that version of bash to optimise your code. However, be
+ careful when using features added since 2.04, since not everyone
+ will be able to use them. Be ESPECIALLY careful of using features
+ exclusive to 3.x, as many people are still using 2.x.
+
+ For example, here strings (<<<) were not added until 2.05b, so don't
+ use them for the time being.
+
+ Similarly, 3.0 added the use of the regex operator '=~', commonly
+ found in Perl and Ruby. Whilst this is very useful, it's not yet
+ safe to assume its ubiquity.
+
+ On the other hand, extended globs were added in bash 2.02 and often
+ enable you to avoid the use of external programs, which are
+ expensive to fork and execute, so do make full use of those:
+
+ ?(pattern-list) - match zero or one occurences of patterns
+ *(pattern-list) - match zero or more occurences of patterns
+ +(pattern-list) - match one or more occurences of patterns
+ @(pattern-list) - match exactly one of the given patterns
+ !(pattern-list) - match anything except one of the given patterns
+
+- Following on from the last point, be sparing with the use of
+ external processes whenever you can. Completion functions need to be
+ fast, so sacrificing some code legibility for speed is acceptable.
+
+ For example, judicious use of sed(1) can save you from having to
+ call grep(1) and pipe the output to cut(1), which saves a fork(2)
+ and exec(3).
+
+ Sometimes you don't even need sed(1) or other external programs at
+ all, though. Use of constructs such as ${parameter#word},
+ ${parameter%word} and ${parameter/pattern/string} can provide you a
+ lot of power without having to leave the shell.
+
+ For example, if $foo contains the path to an executable, ${foo##*/}
+ will give you the basename of the program, without having to call
+ basename(1). Similarly, ${foo%/*} will give you the dirname, without
+ having to call dirname(1).
+
+ As another example,
+
+ bar=$( echo $foo | sed -e 's/bar/baz/g' )
+
+ can be replaced by:
+
+ bar=${foo//bar/baz}
+
+ These forms of parameter substitutions can also be used on arrays,
+ which makes them very powerful (if a little slow).
+
+- Do not write to the file-system under any circumstances. This can
+ create race conditions, is inefficient, violates the principle of
+ least surprise and lacks robustness.
+
+- Send your patches as unified diffs. You can make these with
+ 'diff -u'.
+
+- Send small, incremental diffs that affect a single function. Don't
+ cram massive, unrelated patches into a single diff.
+
+- If your code was written for a particular platform, try to make it
+ portable to other platforms, so that everyone may enjoy it. If your
+ code works only with the version of a binary on a particular
+ platform, ensure that it will not be loaded on other platforms that
+ have a command with the same name.
+
+ In particular, do not use GNU extensions to commands like sed and
+ awk if you can write your code another way. If you really must use
+ them, however, do feel free to do so.
+
+- Read the existing source code for examples of how to solve
+ particular problems. Read the bash man page for details of all the
+ programming tools available to you within the shell.
+
+- Please test your code thoroughly before sending it to me. I don't
+ have access to all the commands for which I am sent completion
+ functions, so I am unable to test them all personally. If your code
+ is accepted into the distribution, a lot of people will try it out,
+ so try to do a thorough job of eradicating all the bugs before you
+ send it to me.
+
+--
+Ian Macdonald <ian@caliban.org>
diff --git a/debian/bash_completion/TODO b/debian/bash_completion/TODO
new file mode 100644
index 0000000..7e213dd
--- /dev/null
+++ b/debian/bash_completion/TODO
@@ -0,0 +1,55 @@
+$Id: TODO,v 1.1 2006/03/01 16:19:26 ianmacd Exp $
+
+bash completion needs to be rewritten from the ground up.
+---------------------------------------------------------
+
+bash completion really needs to be rewritten from the ground up, using all of
+the features available in bash 3.1 and without regard for compatibility with
+the 2.x line.
+
+At that time, it should be split into multiple files for easier source
+management. Whether or not it is actually installed on the destination
+computer as separate files is a matter for future debate.
+
+If it were installed as tens or even hundreds of files, each of which had to
+be opened to decide whether it should be sourced in its entirety, that could
+prove very expensive on some systems.
+
+Alternatively, a master file could decide which of the individual completion
+files should be sourced. In that way, we wouldn't need to open extra files
+just to ascertain that the commands for those functions aren't on the system,
+anyway.
+
+A further alternative is that a build process be created, which would
+concatenate the various files into a single completion file, similar to what
+we have now. This option is my least favourite, because a system with a lot of
+packages installed currently has to deal with sourcing over 200 kB of bash
+code for each invocation of an interactive shell.
+
+An even better alternative would be if bash supported dynamic loading of shell
+functions (in the manner of zsh), but I don't believe there are any plans to
+add this feature.
+
+
+bash completion needs a better development environment.
+-------------------------------------------------------
+
+Currently, the bash completion project is managed by a single person: me. This
+is how it has been since its inception back in the first half of 2000.
+
+This way of working is now showing signs of severe strain. For quite some time
+already, I have been unable to devote enough time to the project and, as a
+result, it has suffered. In particular, releases in the past twelve months
+have been few and far between. The 20060301 release is the first in more than
+six months.
+
+Whilst there have been good reasons for my inability to devote more time to
+the project, it shouldn't actually matter whether or not I am available. For
+that reason, I am going to look at transferring the project to public CVS some
+time in 2006. Patches will then no longer find that I am a single point of
+failure, but will instead find their way into the code base via a small team
+of core developers.
+
+--
+Ian Macdonald
+Amsterdam, March 2006
diff --git a/debian/bash_completion/bash_completion b/debian/bash_completion/bash_completion
new file mode 100644
index 0000000..feda26d
--- /dev/null
+++ b/debian/bash_completion/bash_completion
@@ -0,0 +1,9299 @@
+# bash_completion - programmable completion functions for bash 3.x
+# (backwards compatible with bash 2.05b)
+#
+# $Id: bash_completion,v 1.872 2006/03/01 16:20:18 ianmacd Exp $
+#
+# Copyright (C) Ian Macdonald <ian@caliban.org>
+#
+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# The latest version of this software can be obtained here:
+#
+# http://www.caliban.org/bash/index.shtml#completion
+#
+# RELEASE: 20060301
+
+[ -n "${BASH_COMPLETION_DEBUG:-}" ] && set -v || set +v
+
+# Alter the following to reflect the location of this file.
+#
+{
+ # These declarations must go within braces in order to be able to silence
+ # readonly variable errors.
+ BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}"
+ BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}"
+} 2>/dev/null || :
+readonly BASH_COMPLETION BASH_COMPLETION_DIR
+
+# Set a couple of useful vars
+#
+UNAME=$( uname -s )
+# strip OS type and version under Cygwin (e.g. CYGWIN_NT-5.1 => Cygwin)
+UNAME=${UNAME/CYGWIN_*/Cygwin}
+RELEASE=$( uname -r )
+
+# features supported by bash 2.05 and higher
+if [ ${BASH_VERSINFO[0]} -eq 2 ] && [[ ${BASH_VERSINFO[1]} > 04 ]] ||
+ [ ${BASH_VERSINFO[0]} -gt 2 ]; then
+ declare -r bash205=$BASH_VERSION 2>/dev/null || :
+ default="-o default"
+ dirnames="-o dirnames"
+ filenames="-o filenames"
+fi
+# features supported by bash 2.05b and higher
+if [ ${BASH_VERSINFO[0]} -eq 2 ] && [[ ${BASH_VERSINFO[1]} = "05b" ]] ||
+ [ ${BASH_VERSINFO[0]} -gt 2 ]; then
+ declare -r bash205b=$BASH_VERSION 2>/dev/null || :
+ nospace="-o nospace"
+fi
+# features supported by bash 3.0 and higher
+if [ ${BASH_VERSINFO[0]} -gt 2 ]; then
+ declare -r bash3=$BASH_VERSION 2>/dev/null || :
+ bashdefault="-o bashdefault"
+ plusdirs="-o plusdirs"
+fi
+
+# Turn on extended globbing and programmable completion
+shopt -s extglob progcomp
+
+# A lot of the following one-liners were taken directly from the
+# completion examples provided with the bash 2.04 source distribution
+
+# Make directory commands see only directories
+complete -d pushd
+
+# The following section lists completions that are redefined later
+# Do NOT break these over multiple lines.
+#
+# START exclude -- do NOT remove this line
+complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat bzcmp bzdiff bzegrep bzfgrep bzgrep
+complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott)' unzip zipinfo
+complete -f -X '*.Z' compress znew
+complete -f -X '!*.@(Z|gz|tgz|Gz|dz)' gunzip zcmp zdiff zcat zegrep zfgrep zgrep zless zmore
+complete -f -X '!*.Z' uncompress
+complete -f -X '!*.@(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)' ee display
+complete -f -X '!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|GIF|JPG|JP?(E)G|TIF?(F)|PNG|P[BGP]M|BMP|X[BP]M|RLE|RGB|PCX|FITS|PM)' xv qiv
+complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv kghostview
+complete -f -X '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi
+complete -f -X '!*.@(dvi|DVI)' dvips dviselect dvitype kdvi dvipdf advi
+complete -f -X '!*.@(pdf|PDF)' acroread gpdf xpdf kpdf
+complete -f -X '!*.@(@(?(e)ps|?(E)PS)?(.gz|.GZ)|pdf|PDF|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)' evince
+complete -f -X '!*.@(?(e)ps|?(E)PS)' ps2pdf
+complete -f -X '!*.texi*' makeinfo texi2html
+complete -f -X '!*.@(?(la)tex|?(LA)TEX|texi|TEXI|dtx|DTX|ins|INS)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi
+complete -f -X '!*.@(mp3|MP3)' mpg123 mpg321 madplay
+complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG)' xine aaxine fbxine kaffeine
+complete -f -X '!*.@(avi|asf|wmv)' aviplay
+complete -f -X '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay
+complete -f -X '!*.@(mpg|mpeg|avi|mov|qt)' xanim
+complete -f -X '!*.@(ogg|OGG|m3u|flac|spx)' ogg123
+complete -f -X '!*.@(mp3|MP3|ogg|OGG|pls|m3u)' gqmpeg freeamp
+complete -f -X '!*.fig' xfig
+complete -f -X '!*.@(mid?(i)|MID?(I))' playmidi
+complete -f -X '!*.@(mid?(i)|MID?(I)|rmi|RMI|rcp|RCP|[gr]36|[GR]36|g18|G18|mod|MOD|xm|XM|it|IT|x3m|X3M)' timidity
+complete -f -X '*.@(o|so|so.!(conf)|a|t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))|rpm|zip|ZIP|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview
+complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' emacs
+complete -f -X '!*.@(exe|EXE|com|COM|scr|SCR|exe.so)' wine
+complete -f -X '!*.@(zip|ZIP|z|Z|gz|GZ|tgz|TGZ)' bzme
+complete -f -X '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon curl dillo elinks amaya
+complete -f -X '!*.@(sxw|stw|sxg|sgl|doc|dot|rtf|txt|htm|html|odt|ott|odm)' oowriter
+complete -f -X '!*.@(sxi|sti|pps|ppt|pot|odp|otp)' ooimpress
+complete -f -X '!*.@(sxc|stc|xls|xlw|xlt|csv|ods|ots)' oocalc
+complete -f -X '!*.@(sxd|std|sda|sdd|odg|otg)' oodraw
+complete -f -X '!*.@(sxm|smf|mml|odf)' oomath
+complete -f -X '!*.odb' oobase
+complete -f -X '!*.rpm' rpm2cpio
+# FINISH exclude -- do not remove this line
+
+# start of section containing compspecs that can be handled within bash
+
+# user commands see only users
+complete -u su usermod userdel passwd chage write chfn groups slay w
+
+# group commands see only groups
+[ -n "$bash205" ] && complete -g groupmod groupdel newgrp 2>/dev/null
+
+# bg completes with stopped jobs
+complete -A stopped -P '%' bg
+
+# other job commands
+complete -j -P '%' fg jobs disown
+
+# readonly and unset complete with shell variables
+complete -v readonly unset
+
+# set completes with set options
+complete -A setopt set
+
+# shopt completes with shopt options
+complete -A shopt shopt
+
+# helptopics
+complete -A helptopic help
+
+# unalias completes with aliases
+complete -a unalias
+
+# bind completes with readline bindings (make this more intelligent)
+complete -A binding bind
+
+# type and which complete on commands
+complete -c command type which
+
+# builtin completes on builtins
+complete -b builtin
+
+# start of section containing completion functions called by other functions
+
+# This function checks whether we have a given program on the system.
+# No need for bulky functions in memory if we don't.
+#
+have()
+{
+ unset -v have
+ PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
+ have="yes"
+}
+
+# use GNU sed if we have it, since its extensions are still used in our code
+#
+[ $UNAME != Linux ] && have gsed && alias sed=gsed
+
+# This function checks whether a given readline variable
+# is `on'.
+#
+_rl_enabled()
+{
+ [[ "$( bind -v )" = *$1+([[:space:]])on* ]]
+}
+
+
+# This function performs file and directory completion. It's better than
+# simply using 'compgen -f', because it honours spaces in filenames.
+# If passed -d, it completes only on directories. If passed anything else,
+# it's assumed to be a file glob to complete on.
+#
+_filedir()
+{
+ local IFS=$'\t\n' xspec #glob
+
+ _expand || return 0
+
+ #glob=$(set +o|grep noglob) # save glob setting.
+ #set -f # disable pathname expansion (globbing)
+
+ if [ "${1:-}" = -d ]; then
+ COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -d -- $cur ) )
+ #eval "$glob" # restore glob setting.
+ return 0
+ fi
+
+ xspec=${1:+"!*.$1"} # set only if glob passed in as $1
+ COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -f -X "$xspec" -- "$cur" ) \
+ $( compgen -d -- "$cur" ) )
+ #eval "$glob" # restore glob setting.
+}
+
+# This function completes on signal names
+#
+_signals()
+{
+ local i
+
+ # standard signal completion is rather braindead, so we need
+ # to hack around to get what we want here, which is to
+ # complete on a dash, followed by the signal name minus
+ # the SIG prefix
+ COMPREPLY=( $( compgen -A signal SIG${cur#-} ))
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=-${COMPREPLY[i]#SIG}
+ done
+}
+
+# This function completes on configured network interfaces
+#
+_configured_interfaces()
+{
+ if [ -f /etc/debian_version ]; then
+ # Debian system
+ COMPREPLY=( $( sed -ne 's|^iface \([^ ]\+\).*$|\1|p' \
+ /etc/network/interfaces ) )
+ elif [ -f /etc/SuSE-release ]; then
+ # SuSE system
+ COMPREPLY=( $( command ls \
+ /etc/sysconfig/network/ifcfg-* | \
+ sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) )
+ elif [ -f /etc/pld-release ]; then
+ # PLD Linux
+ COMPREPLY=( $( command ls -B \
+ /etc/sysconfig/interfaces | \
+ sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) )
+ else
+ # Assume Red Hat
+ COMPREPLY=( $( command ls \
+ /etc/sysconfig/network-scripts/ifcfg-* | \
+ sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) )
+ fi
+}
+
+# This function completes on all available network interfaces
+# -a: restrict to active interfaces only
+# -w: restrict to wireless interfaces only
+#
+_available_interfaces()
+{
+ local cmd
+
+ if [ "${1:-}" = -w ]; then
+ cmd="iwconfig"
+ elif [ "${1:-}" = -a ]; then
+ cmd="ifconfig"
+ else
+ cmd="ifconfig -a"
+ fi
+
+ COMPREPLY=( $( eval $cmd 2>/dev/null | \
+ sed -ne 's|^\('$cur'[^[:space:][:punct:]]\{1,\}\).*$|\1|p') )
+}
+
+# This function expands tildes in pathnames
+#
+_expand()
+{
+ [ "$cur" != "${cur%\\}" ] && cur="$cur\\"
+
+ # expand ~username type directory specifications
+ if [[ "$cur" == \~*/* ]]; then
+ eval cur=$cur
+
+ elif [[ "$cur" == \~* ]]; then
+ cur=${cur#\~}
+ COMPREPLY=( $( compgen -P '~' -u $cur ) )
+ return ${#COMPREPLY[@]}
+ fi
+}
+
+# This function completes on process IDs.
+# AIX and Solaris ps prefers X/Open syntax.
+[ $UNAME = SunOS -o $UNAME = AIX ] &&
+_pids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- $cur ))
+} ||
+_pids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps axo pid | sed 1d )' -- $cur ) )
+}
+
+# This function completes on process group IDs.
+# AIX and SunOS prefer X/Open, all else should be BSD.
+[ $UNAME = SunOS -o $UNAME = AIX ] &&
+_pgids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- $cur ))
+} ||
+_pgids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur ))
+}
+
+# This function completes on user IDs
+#
+_uids()
+{
+ if type getent &>/dev/null; then
+ COMPREPLY=( $( getent passwd | \
+ awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) )
+ elif type perl &>/dev/null; then
+ COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"' )' -- $cur ) )
+ else
+ # make do with /etc/passwd
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\
+ /etc/passwd ) )
+ fi
+}
+
+# This function completes on group IDs
+#
+_gids()
+{
+ if type getent &>/dev/null; then
+ COMPREPLY=( $( getent group | \
+ awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) )
+ elif type perl &>/dev/null; then
+ COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"' )' -- $cur ) )
+ else
+ # make do with /etc/group
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\
+ /etc/group ) )
+ fi
+}
+
+# This function completes on services
+#
+_services()
+{
+ local sysvdir famdir
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d
+ famdir=/etc/xinetd.d
+ COMPREPLY=( $( builtin echo $sysvdir/!(*.rpmsave|*.rpmorig|*~|functions)) )
+
+ if [ -d $famdir ]; then
+ COMPREPLY=( ${COMPREPLY[@]} $( builtin echo $famdir/!(*.rpmsave|*.rpmorig|*~)) )
+ fi
+
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- $cur ) )
+}
+
+# This function complete on modules
+#
+_modules()
+{
+ local modpath
+ modpath=/lib/modules/$1
+ COMPREPLY=( $( command ls -R $modpath | \
+ sed -ne 's/^\('$cur'.*\)\.k\?o\(\|.gz\)$/\1/p') )
+}
+
+# this function complete on user:group format
+#
+_usergroup()
+{
+ local IFS=$'\n'
+ cur=${cur//\\\\ / }
+ if [[ $cur = *@(\\:|.)* ]] && [ -n "$bash205" ]; then
+ user=${cur%%*([^:.])}
+ COMPREPLY=( $(compgen -P ${user/\\\\} -g -- ${cur##*[.:]}) )
+ elif [[ $cur = *:* ]] && [ -n "$bash205" ]; then
+ COMPREPLY=( $( compgen -g -- ${cur##*[.:]} ) )
+ else
+ COMPREPLY=( $( compgen -S : -u -- $cur ) )
+ fi
+}
+
+# this function count the number of mandatory args
+#
+_count_args()
+{
+ args=1
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" != -* ]]; then
+ args=$(($args+1))
+ fi
+ done
+}
+
+# start of section containing completion functions for bash built-ins
+
+# bash alias completion
+#
+_alias()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[$COMP_CWORD]}
+
+ case "$COMP_LINE" in
+ *[^=])
+ COMPREPLY=( $( compgen -A alias -S '=' -- $cur ) )
+ ;;
+ *=)
+ COMPREPLY=( "$( alias ${cur%=} 2>/dev/null | \
+ sed -e 's|^alias '$cur'\(.*\)$|\1|' )" )
+ ;;
+ esac
+}
+complete -F _alias $nospace alias
+
+# bash export completion
+#
+_export()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[$COMP_CWORD]}
+
+ case "$COMP_LINE" in
+ *=\$*)
+ COMPREPLY=( $( compgen -v -P '$' -- ${cur#*=\$} ) )
+ ;;
+ *[^=])
+ COMPREPLY=( $( compgen -v -S '=' -- $cur ) )
+ ;;
+ *=)
+ COMPREPLY=( "$( eval echo -n \"$`echo ${cur%=}`\" |
+ ( echo -n \'
+ sed -e 's/'\''/'\''\\\'\'''\''/g'
+ echo -n \' ) )" )
+ ;;
+ esac
+}
+complete -F _export $default $nospace export
+
+# bash shell function completion
+#
+_function()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $1 == @(declare|typeset) ]]; then
+ if [ "$prev" = -f ]; then
+ COMPREPLY=( $( compgen -A function -- $cur ) )
+ elif [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- \
+ $cur ) )
+ fi
+ elif [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -A function -- $cur ) )
+ else
+ COMPREPLY=( "() $( type -- ${COMP_WORDS[1]} | sed -e 1,2d )" )
+ fi
+}
+complete -F _function function declare typeset
+
+# bash complete completion
+#
+_complete()
+{
+ local cur prev options
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -o)
+ options="default dirnames filenames"
+ [ -n "$bash205b" ] && options="$options nospace"
+ [ -n "$bash3" ] && options="$options bashdefault plusdirs"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ return 0
+ ;;
+
+ -A)
+ COMPREPLY=( $( compgen -W 'alias arrayvar binding \
+ builtin command directory disabled enabled \
+ export file function group helptopic hostname \
+ job keyword running service setopt shopt \
+ signal stopped user variable' -- $cur ) )
+ return 0
+ ;;
+
+ -C)
+ COMPREPLY=( $( compgen -A command -- $cur ) )
+ return 0
+ ;;
+ -F)
+ COMPREPLY=( $( compgen -A function -- $cur ) )
+ return 0
+ ;;
+ -@(p|r))
+ COMPREPLY=( $( complete -p | sed -e 's|.* ||' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ options="-a -b -c -d -e -f -g -j -k -s -v -u -A -G -W -P -S -X -F -C"
+ [ -n "$bash205" ] && options="$options -o"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -A command -- $cur ) )
+ fi
+}
+complete -F _complete complete
+
+# start of section containing completion functions for external programs
+
+# a little help for FreeBSD ports users
+[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list \
+ extract patch configure build install reinstall \
+ deinstall clean clean-depends kernel buildworld' make
+
+# This completes on a list of all available service scripts for the
+# 'service' command and/or the SysV init.d directory, followed by
+# that script's available commands
+#
+{ have service || [ -d /etc/init.d/ ]; } &&
+_service()
+{
+ local cur sysvdir
+
+ COMPREPLY=()
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # don't complete for things like killall, ssh and mysql if it's
+ # the standalone command, rather than the init script
+ [[ ${COMP_WORDS[0]} != @(*init.d/!(functions|~)|service) ]] && return 0
+
+ # don't complete past 2nd token
+ [ $COMP_CWORD -gt 2 ] && return 0
+
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+ || sysvdir=/etc/init.d
+
+ if [[ $COMP_CWORD -eq 1 ]] && [[ $prev == "service" ]]; then
+ _services
+ else
+ COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \
+ s/^.*Usage.*{\(.*\)}.*$/\1/p" \
+ $sysvdir/${prev##*/} 2>/dev/null`' -- $cur ) )
+ fi
+
+ return 0
+} &&
+complete -F _service service
+[ -d /etc/init.d/ ] && complete -F _service $default \
+ $(for i in /etc/init.d/*; do echo ${i##*/}; done)
+
+# chown(1) completion
+#
+_chown()
+{
+ local cur
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # options completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
+ --dereference --no-dereference --from= --silent --quiet \
+ --reference= --recursive --verbose --help --version' -- $cur ) )
+ else
+ _count_args
+
+ case $args in
+ 1)
+ _usergroup
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+ fi
+}
+complete -F _chown $filenames chown
+
+# chgrp(1) completion
+#
+_chgrp()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ cur=${cur//\\\\/}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # options completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
+ --dereference --no-dereference --silent --quiet \
+ --reference= --recursive --verbose --help --version' -- $cur ) )
+ return 0
+ fi
+
+ # first parameter on line or first since an option?
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \
+ [[ "$prev" == -* ]] && [ -n "$bash205" ]; then
+ local IFS=$'\n'
+ COMPREPLY=( $( compgen -g $cur 2>/dev/null ) )
+ else
+ _filedir || return 0
+ fi
+
+ return 0
+}
+complete -F _chgrp $filenames chgrp
+
+# umount(8) completion. This relies on the mount point being the third
+# space-delimited field in the output of mount(8)
+#
+_umount()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) )
+
+ return 0
+}
+complete -F _umount $dirnames umount
+
+# mount(8) completion. This will pull a list of possible mounts out of
+# /etc/{,v}fstab, unless the word being completed contains a ':', which
+# would indicate the specification of an NFS server. In that case, we
+# query the server for a list of all available exports and complete on
+# that instead.
+#
+_mount()
+{ local cur i sm host
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ [[ "$cur" == \\ ]] && cur="/"
+
+ for i in {,/usr}/{,s}bin/showmount; do [ -x $i ] && sm=$i && break; done
+
+ if [ -n "$sm" ] && [[ "$cur" == *:* ]]; then
+ COMPREPLY=( $( $sm -e ${cur%%:*} | sed 1d | \
+ grep ^${cur#*:} | awk '{print $1}' ) )
+ elif [[ "$cur" == //* ]]; then
+ host=${cur#//}
+ host=${host%%/*}
+ if [ -n "$host" ]; then
+ COMPREPLY=( $( compgen -W "$( echo $( smbclient -d 0 -NL $host 2>/dev/null|
+ sed -ne '/^['"$'\t '"']*Sharename/,/^$/p' |
+ sed -ne '3,$s|^[^A-Za-z]*\([^'"$'\t '"']*\).*$|//'$host'/\1|p' ) )" -- "$cur" ) )
+ fi
+ elif [ -r /etc/vfstab ]; then
+ # Solaris
+ COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' \
+ /etc/vfstab | grep "^$cur" ) )
+ elif [ ! -e /etc/fstab ]; then
+ # probably Cygwin
+ COMPREPLY=( $( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' \
+ | grep "^$cur" ) )
+ else
+ # probably Linux
+ COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' \
+ /etc/fstab | grep "^$cur" ) )
+ fi
+
+ return 0
+}
+complete -F _mount $default $filenames mount
+
+# Linux rmmod(8) completion. This completes on a list of all currently
+# installed kernel modules.
+#
+have rmmod && {
+_rmmod()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( /sbin/lsmod | \
+ awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' 2>/dev/null ))
+ return 0
+}
+complete -F _rmmod rmmod
+
+# Linux insmod(8), modprobe(8) and modinfo(8) completion. This completes on a
+# list of all available modules for the version of the kernel currently
+# running.
+#
+_insmod()
+{
+ local cur prev modpath
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # behave like lsmod for modprobe -r
+ if [ $1 = "modprobe" ] &&
+ [ "${COMP_WORDS[1]}" = "-r" ]; then
+ COMPREPLY=( $( /sbin/lsmod | \
+ awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' ) )
+ return 0
+ fi
+
+ # do filename completion if we're giving a path to a module
+ if [[ "$cur" == */* ]]; then
+ _filedir '@(?(k)o?(.gz))'
+ return 0
+ fi
+
+ if [ $COMP_CWORD -gt 1 ] &&
+ [[ "${COMP_WORDS[COMP_CWORD-1]}" != -* ]]; then
+ # do module parameter completion
+ COMPREPLY=( $( /sbin/modinfo -p ${COMP_WORDS[1]} 2>/dev/null | \
+ awk '{if ($1 ~ /^parm:/ && $2 ~ /^'$cur'/) { print $2 } \
+ else if ($1 !~ /:/ && $1 ~ /^'$cur'/) { print $1 }}' ) )
+ else
+ _modules $(uname -r)
+ fi
+
+ return 0
+}
+complete -F _insmod $filenames insmod modprobe modinfo
+}
+
+# man(1) completion
+#
+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \
+ -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \
+ -o $UNAME = OpenBSD ] &&
+_man()
+{
+ local cur prev sect manpath UNAME
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _expand || return 0
+
+ # default completion if parameter contains /
+ if [[ "$cur" == */* ]]; then
+ _filedir
+ return 0
+ fi
+
+ UNAME=$( uname -s )
+ # strip OS type and version under Cygwin
+ UNAME=${UNAME/CYGWIN_*/Cygwin}
+ if [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = FreeBSD \
+ -o $UNAME = Cygwin ]; then
+ manpath=$( manpath 2>/dev/null || command man --path )
+ else
+ manpath=$MANPATH
+ fi
+
+ if [ -z "$manpath" ]; then
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ return 0
+ fi
+
+ # determine manual section to search
+ [[ "$prev" == [0-9ln] ]] && sect=$prev || sect='*'
+
+ manpath=$manpath:
+ if [ -n "$cur" ]; then
+ manpath="${manpath//://*man$sect/$cur* } ${manpath//://*cat$sect/$cur* }"
+ else
+ manpath="${manpath//://*man$sect/ } ${manpath//://*cat$sect/ }"
+ fi
+
+ # redirect stderr for when path doesn't exist
+ COMPREPLY=( $( eval command ls "$manpath" 2>/dev/null ) )
+ # weed out directory path names and paths to man pages
+ COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
+ # strip suffix from man pages
+ COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) )
+
+ [[ "$prev" != [0-9ln] ]] && _filedir '[0-9ln]'
+
+ return 0
+}
+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \
+ -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \
+ -o $UNAME = OpenBSD ] && \
+complete -F _man $filenames man apropos whatis
+
+# renice(8) completion
+#
+_renice()
+{
+ local command cur curopt i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ command=$1
+
+ i=0
+ # walk back through command line and find last option
+ while [ $i -le $COMP_CWORD -a ${#COMPREPLY[@]} -eq 0 ]; do
+ curopt=${COMP_WORDS[COMP_CWORD-$i]}
+ case "$curopt" in
+ -u)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ ;;
+ -g)
+ _pgids
+ ;;
+ -p|$command)
+ _pids
+ ;;
+ esac
+ i=$(( ++i ))
+ done
+}
+complete -F _renice renice
+
+# kill(1) completion
+#
+_kill()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
+ # return list of available signals
+ _signals
+ else
+ # return list of available PIDs
+ _pids
+ fi
+}
+complete -F _kill kill
+
+# Linux and FreeBSD killall(1) completion.
+#
+[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
+_killall()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
+ _signals
+ else
+ COMPREPLY=( $( compgen -W '$( command ps axo command | \
+ sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \
+ sed -e "s/.*\///" )' -- $cur ) )
+ fi
+
+ return 0
+}
+[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall pkill
+
+# Linux and FreeBSD pgrep(1) completion.
+#
+[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
+_pgrep()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -W '$( command ps axo command | \
+ sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \
+ sed -e "s/.*\///" )' -- $cur ) )
+
+ return 0
+}
+[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _pgrep pgrep
+# Linux pidof(8) completion.
+[ $UNAME = Linux ] && complete -F _pgrep pidof
+
+# GNU find(1) completion. This makes heavy use of ksh style extended
+# globs and contains Linux specific code for completing the parameter
+# to the -fstype option.
+#
+_find()
+{
+ local cur prev i exprfound onlyonce
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(max|min)depth)
+ COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- $cur ) )
+ return 0
+ ;;
+ -?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name)
+ _filedir
+ return 0
+ ;;
+ -fstype)
+ # this is highly non-portable
+ [ -e /proc/filesystems ] &&
+ COMPREPLY=( $( cut -d$'\t' -f 2 /proc/filesystems | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ -gid)
+ _gids
+ return 0
+ ;;
+ -group)
+ if [ -n "$bash205" ]; then
+ COMPREPLY=( $( compgen -g -- $cur 2>/dev/null) )
+ fi
+ return 0
+ ;;
+ -?(x)type)
+ COMPREPLY=( $( compgen -W 'b c d p f l s' -- $cur ) )
+ return 0
+ ;;
+ -uid)
+ _uids
+ return 0
+ ;;
+ -user)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ return 0
+ ;;
+ -exec|-ok)
+ COMP_WORDS=(COMP_WORDS[0] $cur)
+ COMP_CWORD=1
+ _command
+ return 0
+ ;;
+ -[acm]min|-[acm]time|-?(i)?(l)name|-inum|-?(i)path|-?(i)regex| \
+ -links|-perm|-size|-used|-printf)
+ # do nothing, just wait for a parameter to be given
+ return 0
+ ;;
+ esac
+
+ _expand || return 0
+
+ # set exprfound to 1 if there is already an expression present
+ for i in ${COMP_WORDS[@]}; do
+ [[ "$i" = [-\(\),\!]* ]] && exprfound=1 && break
+ done
+
+ # handle case where first parameter is not a dash option
+ if [ "$exprfound" != 1 ] && [[ "$cur" != [-\(\),\!]* ]]; then
+ _filedir -d
+ return 0
+ fi
+
+ # complete using basic options
+ COMPREPLY=( $( compgen -W '-daystart -depth -follow -help -maxdepth \
+ -mindepth -mount -noleaf -version -xdev -amin -anewer \
+ -atime -cmin -cnewer -ctime -empty -false -fstype \
+ -gid -group -ilname -iname -inum -ipath -iregex \
+ -links -lname -mmin -mtime -name -newer -nouser \
+ -nogroup -perm -regex -size -true -type -uid -used \
+ -user -xtype -exec -fls -fprint -fprint0 -fprintf -ok \
+ -print -print0 -printf -prune -ls' -- $cur ) )
+
+ # this removes any options from the list of completions that have
+ # already been specified somewhere on the command line, as long as
+ # these options can only be used once (in a word, "options", in
+ # opposition to "tests" and "actions", as in the find(1) manpage).
+ onlyonce=' -daystart -depth -follow -help -maxdepth -mindepth -mount \
+ -noleaf -version -xdev '
+ COMPREPLY=( $( echo "${COMP_WORDS[@]}" | \
+ (while read -d ' ' i; do
+ [ "$i" == "" ] ||
+ [ "${onlyonce/ ${i%% *} / }" == "$onlyonce" ] &&
+ continue
+ # flatten array with spaces on either side,
+ # otherwise we cannot grep on word boundaries of
+ # first and last word
+ COMPREPLY=" ${COMPREPLY[@]} "
+ # remove word from list of completions
+ COMPREPLY=( ${COMPREPLY/ ${i%% *} / } )
+ done
+ echo ${COMPREPLY[@]})
+ ) )
+
+ _filedir
+
+ return 0
+}
+complete -F _find $filenames find
+
+# Linux iwconfig(8) completion
+#
+[ $UNAME = Linux ] && have iwconfig &&
+_iwconfig()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ mode)
+ COMPREPLY=( $( compgen -W 'managed ad-hoc master \
+ repeater secondary monitor' -- $cur ) )
+ return 0
+ ;;
+ essid)
+ COMPREPLY=( $( compgen -W 'on off any' -- $cur ) )
+ if [ -n "${COMP_IWLIST_SCAN:-}" ]; then
+ COMPREPLY=( ${COMPREPLY[@]:-} \
+ $( iwlist ${COMP_WORDS[1]} scan | \
+ awk -F '"' '/ESSID/ {print $2}' | \
+ grep "^$cur" ))
+ fi
+ return 0
+ ;;
+ nwid)
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+ return 0
+ ;;
+ channel)
+ COMPREPLY=( $( iwlist ${COMP_WORDS[1]} channel | \
+ awk '/^[[:space:]]*Channel/ {print $2}' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+
+ freq)
+ COMPREPLY=( $( iwlist ${COMP_WORDS[1]} channel | \
+ awk '/^[[:space:]]*Channel/ {print $4"G"}' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ ap)
+ COMPREPLY=( $( compgen -W 'on off any' -- $cur ) )
+ if [ -n "${COMP_IWLIST_SCAN:-}" ]; then
+ COMPREPLY=( ${COMPREPLY[@]:-} \
+ $( iwlist ${COMP_WORDS[1]} scan | \
+ awk -F ': ' '/Address/ {print $2}' | \
+ grep "^$cur" ) )
+ fi
+ return 0
+ ;;
+ rate)
+ COMPREPLY=( $( compgen -W 'auto fixed' -- $cur ) )
+ COMPREPLY=( ${COMPREPLY[@]:-} \
+ $( iwlist ${COMP_WORDS[1]} rate | \
+ awk '/^[[:space:]]*[0-9]/ {print $1"M"}' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ rts)
+ COMPREPLY=( $( compgen -W 'auto fixed off' -- $cur ) )
+ return 0
+ ;;
+ frag)
+ COMPREPLY=( $( compgen -W 'auto fixed off' -- $cur ) )
+ return 0
+ ;;
+ key)
+ COMPREPLY=( $( compgen -W 'off on open restricted' -- $cur ) )
+ return 0
+ ;;
+ enc)
+ COMPREPLY=( $( compgen -W 'off on open restricted' -- $cur ) )
+ return 0
+ ;;
+ power)
+ COMPREPLY=( $( compgen -W 'period timeout off on' -- $cur ) )
+ return 0
+ ;;
+ txpower)
+ COMPREPLY=( $( compgen -W 'off on auto' -- $cur ) )
+ return 0
+ ;;
+ retry)
+ COMPREPLY=( $( compgen -W 'limit lifetime' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W 'essid nwid mode freq channel sens mode \
+ ap nick rate rts frag enc key power txpower commit' -- $cur ) )
+ fi
+
+} &&
+complete -F _iwconfig iwconfig
+
+# Linux iwlist(8) completion
+#
+[ $UNAME = Linux ] && have iwlist &&
+_iwlist()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W 'scan scanning freq frequency \
+ channel rate bit bitrate key enc encryption power \
+ txpower retry ap accesspoint peers event' -- $cur ) )
+ fi
+} &&
+complete -F _iwlist iwlist
+
+# Linux iwspy(8) completion
+#
+[ $UNAME = Linux ] && have iwspy &&
+_iwspy()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W 'setthr getthr off' -- $cur ) )
+ fi
+} &&
+complete -F _iwspy iwspy
+
+# Linux iwpriv(8) completion
+#
+[ $UNAME = Linux ] && have iwpriv &&
+_iwpriv()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ roam)
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+ return 0
+ ;;
+ port)
+ COMPREPLY=( $( compgen -W 'ad-hoc managed' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W '--all roam port' -- $cur ) )
+ fi
+} &&
+complete -F _iwpriv iwpriv
+
+# RedHat & Debian GNU/Linux if{up,down} completion
+#
+[ $UNAME = Linux ] && { have ifup || have ifdown; } &&
+_ifupdown()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ _configured_interfaces
+ fi
+
+ return 0
+} &&
+complete -F _ifupdown ifup ifdown
+[ $UNAME = Linux ] && have ifstatus && complete -F _ifupdown ifstatus
+
+# Linux ipsec(8) completion (for FreeS/WAN)
+#
+[ $UNAME = Linux ] && have ipsec &&
+_ipsec()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look \
+ manual pluto ranbits rsasigkey \
+ setup showdefaults showhostkey spi \
+ spigrp tncfg whack' -- $cur ) )
+ return 0
+ fi
+
+ case ${COMP_WORDS[1]} in
+ auto)
+ COMPREPLY=( $( compgen -W '--asynchronous --up --add --delete \
+ --replace --down --route --unroute \
+ --ready --status --rereadsecrets' \
+ -- $cur ) )
+ ;;
+ manual)
+ COMPREPLY=( $( compgen -W '--up --down --route --unroute \
+ --union' -- $cur ) )
+ ;;
+ ranbits)
+ COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \
+ -- $cur ) )
+ ;;
+ setup)
+ COMPREPLY=( $( compgen -W '--start --stop --restart' -- $cur ) )
+ ;;
+
+ *)
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _ipsec ipsec
+
+# Postfix completion.
+#
+have postfix && {
+# postfix(1)
+#
+_postfix()
+{
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -D -v)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+ if [[ $prev == '-D' ]]; then
+ COMPREPLY=( $( compgen -W 'start' -- "${COMP_WORDS[COMP_CWORD]}" ) )
+ return 0
+ fi
+ COMPREPLY=( $( compgen -W 'start stop reload abort flush check' -- \
+ "${COMP_WORDS[COMP_CWORD]}" ) )
+}
+complete -F _postfix postfix
+
+# postalias(1) and postmap(1)
+#
+_postmap()
+{
+ local cur prev len idx
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-N -f -i -n -o -p -r -v -w -c -d -q)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+ if [[ $prev == -[dq] ]]; then
+ return 0
+ fi
+
+ if [[ "$cur" == *:* ]]; then
+ COMPREPLY=( $( compgen -f -- ${cur#*:} ) )
+ else
+ len=${#cur}
+ idx=0
+ for pval in $( /usr/sbin/postconf -m ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]="$pval:"
+ idx=$(($idx+1))
+ fi
+ done
+ if [[ $idx -eq 0 ]]; then
+ COMPREPLY=( $( compgen -f -- "$cur" ) )
+ fi
+ fi
+ return 0
+}
+complete -F _postmap postmap postalias
+
+# postcat(1)
+#
+_postcat()
+{
+ local cur prev pval len idx qfile
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -q -v)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+
+ qfile=0
+ for idx in ${COMP_WORDS[@]}; do
+ [[ "$idx" = -q ]] && qfile=1 && break
+ done
+ if [[ $qfile == 1 ]]; then
+ len=${#cur}
+ idx=0
+ for pval in $( mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ else
+ _filedir
+ return 0
+ fi
+}
+complete -F _postcat postcat
+
+# postconf(1)
+#
+_postconf()
+{
+ local cur prev pval len idx eqext
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -d -e -h -m -l -n -v)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+ if [[ $prev == '-e' ]]; then
+ cur=${cur#[\"\']}
+ eqext='='
+ fi
+ len=${#cur}
+ idx=0
+ for pval in $( /usr/sbin/postconf | cut -d ' ' -f 1 ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]="$pval$eqext"
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+}
+complete -F _postconf postconf
+
+# postsuper(1)
+#
+_postsuper()
+{
+ local cur prev pval len idx
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -d -h -H -p -r -s -v)
+ return 0
+ fi
+ case $prev in
+ -[dr])
+ len=${#cur}
+ idx=0
+ for pval in $( echo ALL; mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ ;;
+ -h)
+ len=${#cur}
+ idx=0
+ for pval in $( echo ALL; mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* ].*$//; /!$/d' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ ;;
+ -H)
+ len=${#cur}
+ idx=0
+ for pval in $( echo ALL; mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ ;;
+ esac
+ COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- $cur ) )
+ return 0
+}
+complete -F _postsuper postsuper
+}
+
+# cvs(1) completion
+#
+have cvs && {
+set_prefix()
+{
+ [ -z ${prefix:-} ] || prefix=${cur%/*}/
+ [ -r ${prefix:-}CVS/Entries ] || prefix=""
+}
+
+get_entries()
+{
+ local IFS=$'\n'
+ [ -r ${prefix:-}CVS/Entries ] && \
+ entries=$(cut -d/ -f2 -s ${prefix:-}CVS/Entries)
+}
+
+get_modules()
+{
+ if [ -n "$prefix" ]; then
+ COMPREPLY=( $( command ls -d ${cvsroot}/${prefix}/!(CVSROOT) ) )
+ else
+ COMPREPLY=( $( command ls -d ${cvsroot}/!(CVSROOT) ) )
+ fi
+}
+
+_cvs()
+{
+ local cur count mode i cvsroot cvsroots pwd
+ local -a flags miss files entries changed newremoved
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ count=0
+ for i in ${COMP_WORDS[@]}; do
+ [ $count -eq $COMP_CWORD ] && break
+ # Last parameter was the CVSROOT, now go back to mode selection
+ if [ "${COMP_WORDS[((count))]}" == "$cvsroot" -a "$mode" == "cvsroot" ]; then
+ mode=""
+ fi
+ if [ -z "$mode" ]; then
+ case $i in
+ -d)
+ mode=cvsroot
+ cvsroot=${COMP_WORDS[((count+1))]}
+ ;;
+ @(ad?(d)|new))
+ mode=add
+ ;;
+ @(adm?(in)|rcs))
+ mode=admin
+ ;;
+ ann?(notate))
+ mode=annotate
+ ;;
+ @(checkout|co|get))
+ mode=checkout
+ ;;
+ @(com?(mit)|ci))
+ mode=commit
+ ;;
+ di?(f?(f)))
+ mode=diff
+ ;;
+ ex?(p?(ort)))
+ mode=export
+ ;;
+ ?(un)edit)
+ mode=$i
+ ;;
+ hi?(s?(tory)))
+ mode=history
+ ;;
+ im?(p?(ort)))
+ mode=import
+ ;;
+ re?(l?(ease)))
+ mode=release
+ ;;
+ ?(r)log)
+ mode=log
+ ;;
+ @(rdiff|patch))
+ mode=rdiff
+ ;;
+ @(remove|rm|delete))
+ mode=remove
+ ;;
+ @(rtag|rfreeze))
+ mode=rtag
+ ;;
+ st?(at?(us)))
+ mode=status
+ ;;
+ @(tag|freeze))
+ mode=tag
+ ;;
+ up?(d?(ate)))
+ mode=update
+ ;;
+ *)
+ ;;
+ esac
+ elif [[ "$i" = -* ]]; then
+ flags=( ${flags[@]:-} $i )
+ fi
+ count=$((++count))
+ done
+
+ case "$mode" in
+ add)
+ if [[ "$cur" != -* ]]; then
+ set_prefix
+ if [ $COMP_CWORD -gt 1 -a -r ${prefix:-}CVS/Entries ]; then
+ get_entries
+ [ -z "$cur" ] && \
+ files=$( command ls -Ad !(CVS) ) || \
+ files=$( command ls -d ${cur}* 2>/dev/null )
+ for i in ${entries[@]:-}; do
+ files=( ${files[@]/#$i//} )
+ done
+ COMPREPLY=( $( compgen -W '${files[@]}' -- \
+ $cur ) )
+ fi
+ else
+ COMPREPLY=( $( compgen -W '-k -m' -- $cur ) )
+ fi
+ ;;
+ admin)
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -a -A -e -b -c -k -l -u \
+ -L -U -m -M -n -N -o -q -I \
+ -s -t -t- -T -V -x -z' -- \
+ $cur ) )
+ fi
+ ;;
+ annotate)
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-D -F -f -l -R -r' -- $cur ) )
+ else
+ get_entries
+ COMPREPLY=( $( compgen -W '${entries[@]}' -- $cur ) )
+ fi
+ ;;
+ checkout)
+ if [[ "$cur" != -* ]]; then
+ [ -z "$cvsroot" ] && cvsroot=$CVSROOT
+ COMPREPLY=( $( cvs -d "$cvsroot" co -c 2> /dev/null | \
+ awk '{print $1}' ) )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-A -N -P -R -c -f -l -n -p \
+ -s -r -D -d -k -j' -- $cur ) )
+ fi
+ ;;
+ commit)
+ set_prefix
+
+ if [[ "$cur" != -* ]] && [ -r ${prefix:-}CVS/Entries ]; then
+ # if $COMP_CVS_REMOTE is not null, 'cvs commit' will
+ # complete on remotely checked-out files (requires
+ # passwordless access to the remote repository
+ if [ -n "${COMP_CVS_REMOTE:-}" ]; then
+ # this is the least computationally intensive
+ # way found so far, but other changes
+ # (something other than changed/removed/new)
+ # may be missing
+ changed=( $( cvs -q diff --brief 2>&1 | \
+ sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) )
+ newremoved=( $( cvs -q diff --brief 2>&1 | \
+ sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) )
+ COMPREPLY=( $( compgen -W '${changed[@]:-} \
+ ${newremoved[@]:-}' -- $cur ) )
+ else
+ _filedir
+ fi
+ else
+ COMPREPLY=( $( compgen -W '-n -R -l -f -F -m -r' -- \
+ $cur ) )
+ fi
+ ;;
+ cvsroot)
+ if [ -r ~/.cvspass ]; then
+ # Ugly escaping because of bash treating ':' specially
+ cvsroots=$( sed 's/^[^ ]* //; s/:/\\:/g' ~/.cvspass )
+ COMPREPLY=( $( compgen -W '$cvsroots' -- $cur ) )
+ fi
+ ;;
+ export)
+ if [[ "$cur" != -* ]]; then
+ [ -z "$cvsroot" ] && cvsroot=$CVSROOT
+ COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-N -f -l -R -n \
+ -r -D -d -k' -- $cur ) )
+ fi
+ ;;
+ diff)
+ if [[ "$cur" == -* ]]; then
+ _longopt diff
+ else
+ get_entries
+ COMPREPLY=( $( compgen -W '${entries[@]:-}' -- $cur ) )
+ fi
+ ;;
+ remove)
+ if [[ "$cur" != -* ]]; then
+ set_prefix
+ if [ $COMP_CWORD -gt 1 -a -r ${prefix:-}CVS/Entries ]; then
+ get_entries
+ # find out what files are missing
+ for i in ${entries[@]}; do
+ [ ! -r "$i" ] && miss=( ${miss[@]:-} $i )
+ done
+ COMPREPLY=( $(compgen -W '${miss[@]:-}' -- $cur) )
+ fi
+ else
+ COMPREPLY=( $( compgen -W '-f -l -R' -- $cur ) )
+ fi
+ ;;
+ import)
+ if [[ "$cur" != -* ]]; then
+ # starts with same algorithm as checkout
+ [ -z "$cvsroot" ] && cvsroot=$CVSROOT
+ prefix=${cur%/*}
+ if [ -r ${cvsroot}/${prefix} ]; then
+ get_modules
+ COMPREPLY=( ${COMPREPLY[@]#$cvsroot} )
+ COMPREPLY=( ${COMPREPLY[@]#\/} )
+ fi
+ pwd=$( pwd )
+ pwd=${pwd##*/}
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- \
+ $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-d -k -I -b -m -W' -- $cur ))
+ fi
+ ;;
+ update)
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-A -P -C -d -f -l -R -p \
+ -k -r -D -j -I -W' -- \
+ $cur ) )
+ fi
+ ;;
+ "")
+ COMPREPLY=( $( compgen -W 'add admin annotate checkout ci co \
+ commit diff delete edit export \
+ freeze get history import log new \
+ patch rcs rdiff release remove \
+ rfreeze rlog rm rtag stat status \
+ tag unedit up update -H -Q -q -b \
+ -d -e -f -l -n -t -r -v -w -x -z \
+ --help --version' -- $cur ) )
+ ;;
+ *)
+ ;;
+ esac
+
+ return 0
+}
+complete -F _cvs $default cvs
+}
+
+have rpm && {
+# helper functions for rpm completion
+#
+_rpm_installed_packages()
+{
+ local ver nodig nosig
+
+ if [ -r /var/log/rpmpkgs -a \
+ /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
+ # using RHL 7.2 or later - this is quicker than querying the DB
+ COMPREPLY=( $( sed -ne \
+ 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \
+ /var/log/rpmpkgs ) )
+ else
+ nodig=""
+ nosig=""
+ ver=$(rpm --version)
+ ver=${ver##* }
+
+ if [[ "$ver" > "4.0.4" ]]; then
+ nodig="--nodigest"
+ fi
+ if [[ "$ver" > "4.0.99" ]]; then
+ nosig="--nosignature"
+ fi
+
+ COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \
+ 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) )
+ fi
+}
+
+_rpm_groups()
+{
+ local IFS=$'\t'
+ # remove trailing backslash, or grep will complain
+ cur=${cur%"\\"}
+ COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat '%{group}\n' | \
+ grep "^$cur" ) )
+ # backslash escape spaces and translate newlines to tabs
+ COMPREPLY=( $( echo ${COMPREPLY[@]} | sed 's/ /\\ /g' | tr '\n' '\t' ) )
+}
+
+# rpm(8) completion
+#
+_rpm()
+{
+ local cur prev ver nodig nosig
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ nodig=""
+ nosig=""
+ ver=$(rpm --version); ver=${ver##* }
+
+ if [[ "$ver" > "4.0.4" ]]; then
+ nodig="--nodigest"
+ fi
+ if [[ "$ver" > "4.0.99" ]]; then
+ nosig="--nosignature"
+ fi
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ # first parameter on line
+ case "$cur" in
+ -b*)
+ COMPREPLY=( $( compgen -W '-ba -bb -bc -bi -bl -bp -bs'\
+ -- $cur ) )
+ ;;
+ -t*)
+ COMPREPLY=( $( compgen -W '-ta -tb -tc -ti -tl -tp -ts'\
+ -- $cur ) )
+ ;;
+ --*)
+ COMPREPLY=( $( compgen -W '--help --version --initdb \
+ --checksig --recompile --rebuild --resign --addsign \
+ --rebuilddb --showrc --setperms --setugids --tarbuild \
+ --eval --install --upgrade --query --freshen --erase \
+ --verify --querytags --rmsource --rmspec --clean \
+ --import' -- $cur ) )
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W '-b -e -F -i -q -t -U -V' \
+ -- $cur ) )
+ ;;
+ esac
+
+ return 0
+ fi
+
+ case "$prev" in
+ --@(@(db|exclude)path|prefix|relocate|root))
+ _filedir -d
+ return 0
+ ;;
+ --eval)
+ # get a list of macros
+ COMPREPLY=( $( sed -ne 's|^\(%'${cur#\%}'[^ '$'\t'']*\).*$|\1|p' \
+ /usr/lib/rpm/macros ) )
+ return 0
+ ;;
+ --pipe)
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ return 0
+ ;;
+ --rcfile)
+ _filedir
+ return 0
+ ;;
+ --specfile)
+ # complete on .spec files
+ _filedir spec
+ return 0
+ ;;
+ --whatprovides)
+ if [[ "$cur" == */* ]]; then
+ _filedir
+ else
+ # complete on capabilities
+ COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat \
+ '%{providename}\n' | grep "^$cur" ) )
+ fi
+ return 0
+ ;;
+ --whatrequires)
+ # complete on capabilities
+ COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat \
+ '%{requirename}\n' | grep "^$cur" ) )
+ return 0
+ ;;
+ esac
+
+ case "${COMP_WORDS[1]}" in
+ -@([iFU]*|-install|-freshen|-upgrade))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--percent --force --test \
+ --replacepkgs --replacefiles --root --excludedocs \
+ --includedocs --noscripts --rcfile --ignorearch \
+ --dbpath --prefix --ignoreos --nodeps --allfiles \
+ --ftpproxy --ftpport --justdb --httpproxy --httpport \
+ --noorder --relocate --badreloc --notriggers \
+ --excludepath --ignoresize --oldpackage --define \
+ --eval --pipe --queryformat --repackage --nosuggests \
+ --nodigest --nosignature' -- $cur ) )
+ else
+ _filedir 'rpm'
+ fi
+ ;;
+ -@(e|-erase))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--allmatches --noscripts \
+ --notriggers --nodeps --test --repackage' -- $cur ) )
+ else
+ _rpm_installed_packages
+ fi
+ ;;
+ -@(q*|-query))
+ # check whether we're doing file completion
+ if [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--scripts --root \
+ --rcfile --requires --ftpport --ftpproxy \
+ --httpproxy --httpport --provides --triggers \
+ --dump --changelog --dbpath \
+ --last --filesbypkg \
+ --info --list --state \
+ --docfiles --configfiles --queryformat \
+ --conflicts --obsoletes \
+ --nodigest --nosignature \
+ --triggerscripts' -- $cur ) )
+ else
+ _filedir
+ fi
+ elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then
+ _rpm_groups
+ elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then
+ # uninstalled package completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--scripts --root \
+ --rcfile --whatprovides --whatrequires \
+ --requires --triggeredby --ftpport --ftpproxy \
+ --httpproxy --httpport --provides --triggers \
+ --dump --changelog --dbpath --filesbypkg \
+ --define --eval --pipe --showrc --info --list \
+ --state --docfiles --configfiles --queryformat\
+ --conflicts --obsoletes --nodigest \
+ --nosignature' -- $cur ) )
+ else
+ _filedir 'rpm'
+ fi
+ else
+ # installed package completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--scripts --root \
+ --rcfile --whatprovides --whatrequires \
+ --requires --triggeredby --ftpport --ftpproxy \
+ --httpproxy --httpport --provides --triggers \
+ --dump --changelog --dbpath --specfile \
+ --querybynumber --last --filesbypkg --define \
+ --eval --pipe --showrc --info --list --state \
+ --docfiles --configfiles --queryformat \
+ --conflicts --obsoletes --pkgid --hdrid \
+ --fileid --tid --nodigest --nosignature \
+ --triggerscripts' -- $cur ) )
+ elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then
+ _rpm_installed_packages
+ fi
+ fi
+ ;;
+ -@(K*|-checksig))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5 \
+ --nodigest --nosignature' -- $cur ) )
+ else
+ _filedir 'rpm'
+ fi
+ ;;
+ -@([Vy]*|-verify))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--root --rcfile --dbpath \
+ --nodeps --nogroup --nolinkto --nomode --nomtime \
+ --nordev --nouser --nofiles --noscripts --nomd5 \
+ --querytags --specfile --whatrequires --whatprovides \
+ --nodigest --nosignature' -- $cur ) )
+ # check whether we're doing file completion
+ elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
+ _filedir
+ elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then
+ _rpm_groups
+ elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then
+ _filedir 'rpm'
+ else
+ _rpm_installed_packages
+ fi
+ ;;
+ -[bt]*)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--short-circuit --timecheck \
+ --clean --rmsource --rmspec --test --sign --buildroot \
+ --target -- buildarch --buildos --nobuild --nodeps \
+ --nodirtokens' -- $cur ) )
+ elif [[ ${COMP_WORDS[1]} == -b* ]]; then
+ _filedir 'spec'
+ else
+ _filedir '@(tgz|tar.@(gz|bz2))'
+ fi
+ ;;
+ --re@(build|compile))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--nodeps --rmsource \
+ --rmspec --sign --nodirtokens --target' -- $cur ) )
+ else
+ _filedir '?(no)src.rpm'
+ fi
+ ;;
+ --tarbuild)
+ _filedir '@(tgz|tar.@(gz|bz2))'
+ ;;
+ --@(re|add)sign)
+ _filedir 'rpm'
+ ;;
+ --set@(perms|gids))
+ _rpm_installed_packages
+ ;;
+ --@(clean|rms@(ource|pec)))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--clean --rmsource \
+ --rmspec' -- $cur ) )
+ else
+ _filedir 'spec'
+ fi
+ ;;
+ --@(import|dbpath|root))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--import --dbpath --root' \
+ -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ esac
+
+ return 0
+}
+complete -F _rpm $filenames rpm rpmbuild
+}
+
+# Debian apt-get(8) completion.
+#
+have apt-get &&
+_apt_get()
+{
+ local cur prev special i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|remove|source|build-dep) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+
+ if [ -n "$special" ]; then
+ case $special in
+ remove)
+ if [ -f /etc/debian_version ]; then
+ # Debian system
+ COMPREPLY=( $( _comp_dpkg_installed_packages \
+ $cur ) )
+ else
+ # assume RPM based
+ _rpm_installed_packages
+ fi
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+
+ esac
+ fi
+
+ case "$prev" in
+ -@(c|-config-file))
+ _filedir
+ return 0
+ ;;
+
+ -@(t|-target-release|-default-release))
+ COMPREPLY=( $( apt-cache policy | \
+ grep "release.o=Debian,a=$cur" | \
+ sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null) )
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+
+ COMPREPLY=( $( compgen -W '-d -f -h -v -m -q -s -y \
+ -u -t -b -c -o --download-only --fix-broken \
+ --help --version --ignore-missing \
+ --fix-missing --no-download --quiet --simulate \
+ --just-print --dry-run --recon --no-act --yes \
+ --assume-yes --show-upgraded --only-source \
+ --compile --build --ignore-hold \
+ --target-release --no-upgrade --force-yes \
+ --print-uris --purge --reinstall \
+ --list-cleanup --default-release \
+ --trivial-only --no-remove --diff-only \
+ --tar-only --config-file --option' -- $cur ) )
+ else
+
+ COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \
+ dist-upgrade install remove source build-dep \
+ check clean autoclean' -- $cur ) )
+
+ fi
+
+
+ return 0
+} &&
+complete -F _apt_get $filenames apt-get
+
+# Debian apt-cache(8) completion.
+#
+have apt-cache &&
+_apt_cache()
+{
+ local cur prev special i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ if [ "$cur" != show ]; then
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(add|depends|dotty|policy|rdepends|madison|show?(pkg|src|)) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+ fi
+
+
+ if [ -n "$special" ]; then
+ case $special in
+ add)
+ _filedir
+ return 0
+ ;;
+
+ *)
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+
+ esac
+ fi
+
+
+ case "$prev" in
+ -@(c|p|s|-config-file|-@(pkg|src)-cache))
+ _filedir
+ return 0
+ ;;
+ search)
+ if [[ "$cur" != -* ]]; then
+ return 0
+ fi
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+
+ COMPREPLY=( $( compgen -W '-h -v -p -s -q -i -f -a -g -c \
+ -o --help --version --pkg-cache --src-cache \
+ --quiet --important --full --all-versions \
+ --no-all-versions --generate --no-generate \
+ --names-only --all-names --recurse \
+ --config-file --option' -- $cur ) )
+ else
+
+ COMPREPLY=( $( compgen -W 'add gencaches show showpkg showsrc \
+ stats dump dumpavail unmet search search \
+ depends rdepends pkgnames dotty xvcg \
+ policy madison' -- $cur ) )
+
+ fi
+
+
+ return 0
+} &&
+complete -F _apt_cache $filenames apt-cache
+
+
+# Debian aptitude(1) completion
+#
+have aptitude && {
+have grep-status && {
+_comp_dpkg_hold_packages()
+{
+ grep-status -P -e "^$1" -a -FStatus 'hold' -n -s Package
+}
+} || {
+_comp_dpkg_hold_packages()
+{
+ grep -B 2 'hold' /var/lib/dpkg/status | grep "Package: $1" \
+ | cut -d\ -f2
+}
+}
+
+_aptitude()
+{
+ local cur dashoptions prev special i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ dashoptions='-S -u -i -h --help --version -s --simulate -d \
+ --download-only -P --prompt -y --assume-yes -F \
+ --display-format -O --sort -w --width -f -r -g \
+ --with-recommends --with-suggests -R -G \
+ --without-recommends --without-suggests -t \
+ --target-release -V --show-versions -D --show-deps\
+ -Z -v --verbose'
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|reinstall|hold|unhold|markauto|unmarkauto|dist-upgrade|download|show|forbid-version|purge|remove|changelog) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ #exclude some mutually exclusive options
+ [[ ${COMP_WORDS[i]} == '-u' ]] && dashoptions=${dashoptions/-i}
+ [[ ${COMP_WORDS[i]} == '-i' ]] && dashoptions=${dashoptions/-u}
+ done
+
+ if [[ -n "$special" ]]; then
+ case $special in
+ @(install|hold|markauto|unmarkauto|dist-upgrade|download|show|changelog))
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+ @(purge|remove|reinstall|forbid-version))
+ COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+ return 0
+ ;;
+ unhold)
+ COMPREPLY=( $( _comp_dpkg_hold_packages $cur ) )
+ return 0
+ ;;
+
+ esac
+ fi
+
+ case $prev in
+ # don't complete anything if these options are found
+ @(autoclean|clean|forget-new|search|upgrade|update))
+ return 0
+ ;;
+
+ -S)
+ _filedir
+ return 0
+ ;;
+
+ -@(t|-target-release|-default-release))
+ COMPREPLY=( $( apt-cache policy | \
+ grep "release.o=Debian,a=$cur" | \
+ sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null ) )
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W "$dashoptions" -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'update upgrade forget-new clean \
+ autoclean install reinstall remove \
+ hold unhold purge markauto unmarkauto \
+ dist-upgrade download search show \
+ forbid-version changelog' -- $cur ) )
+ fi
+
+
+ return 0
+}
+complete -F _aptitude $default aptitude
+}
+
+# Debian apt-build(1) completion.
+#
+have apt-build &&
+_apt_build()
+{
+ local cur prev special i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|remove|source|info|clean) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+
+ if [ -n "$special" ]; then
+ case $special in
+ @(install|source|info))
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+ remove)
+ COMPREPLY=( $( _comp_dpkg_installed_packages \
+ $cur ) )
+ return 0
+ ;;
+ *)
+ return 0
+ ;;
+ esac
+ fi
+
+ case "$prev" in
+
+ --@(patch|build-dir|repository-dir))
+ _filedir
+ return 0
+ ;;
+
+ -@(h|-help))
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --show-upgraded -u --build-dir \
+ --repository-dir --build-only \
+ --build-command --reinstall --rebuild \
+ --remove-builddep --no-wrapper --purge \
+ --patch --patch-strip -p --yes -y \
+ --version -v --no-source' -- $cur ) )
+
+ else
+ COMPREPLY=( $( compgen -W 'update upgrade install remove \
+ source dist-upgrade world clean info \
+ clean-build update-repository ' -- $cur ) )
+ fi
+
+
+ return 0
+} &&
+complete -F _apt_build $filenames apt-build
+
+# chsh(1) completion
+#
+_chsh()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ "$prev" = "-s" ]; then
+ if [ -f /etc/debian_version ]; then
+ COMPREPLY=( $( </etc/shells ) )
+ else
+ COMPREPLY=( $( chsh -l | grep "^$cur" ) )
+ fi
+ else
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ fi
+
+ return 0
+}
+complete -F _chsh chsh
+
+# chkconfig(8) completion
+#
+have chkconfig &&
+_chkconfig()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ @([1-6]|--@(list|add|del)))
+ _services
+ return 0
+ ;;
+ --level)
+ COMPREPLY=( $( compgen -W '1 2 3 4 5 6' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--list --add --del --level' -- $cur ) )
+ else
+ if [ $COMP_CWORD -eq 2 -o $COMP_CWORD -eq 4 ]; then
+ COMPREPLY=( $( compgen -W 'on off reset' -- $cur ) )
+ else
+ _services
+ fi
+ fi
+} &&
+complete -F _chkconfig chkconfig
+
+# This function provides simple user@host completion
+#
+_user_at_host() {
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ $cur == *@* ]]; then
+ _known_hosts
+ else
+ COMPREPLY=( $( compgen -u -- "$cur" ) )
+ fi
+
+ return 0
+}
+shopt -u hostcomplete && complete -F _user_at_host $nospace talk ytalk finger
+
+# This function performs host completion based on ssh's known_hosts files,
+# defaulting to standard host completion if they don't exist.
+#
+_known_hosts()
+{
+ local cur curd ocur user suffix aliases global_kh user_kh hosts i host
+ local -a kh khd config
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ ocur=$cur
+
+ [ "$1" = -a ] || [ "$2" = -a ] && aliases='yes'
+ [ "$1" = -c ] || [ "$2" = -c ] && suffix=':'
+ [[ $cur == *@* ]] && user=${cur%@*}@ && cur=${cur#*@}
+ kh=()
+
+ # ssh config files
+ [ -r /etc/ssh/ssh_config ] &&
+ config=( ${config[@]} /etc/ssh/ssh_config )
+ [ -r ~/.ssh/config ] &&
+ config=( ${config[@]} ~/.ssh/config )
+ [ -r ~/.ssh2/config ] &&
+ config=( ${config[@]} ~/.ssh2/config )
+
+ if [ ${#config[@]} -gt 0 ]; then
+ # expand path (if present) to global known hosts file
+ global_kh=$( eval echo $( sed -ne 's/^[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' ${config[@]} ) )
+ # expand path (if present) to user known hosts file
+ user_kh=$( eval echo $( sed -ne 's/^[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' ${config[@]} ) )
+ fi
+
+ # choose which global known hosts file to use
+ if [ -r "$global_kh" ]; then
+ kh=( "$global_kh" )
+ else
+ [ -r /etc/ssh/ssh_known_hosts ] &&
+ kh=( ${kh[@]} /etc/ssh/ssh_known_hosts )
+ [ -r /etc/ssh/ssh_known_hosts2 ] &&
+ kh=( ${kh[@]} /etc/ssh/ssh_known_hosts2 )
+ [ -r /etc/known_hosts ] &&
+ kh=( ${kh[@]} /etc/known_hosts )
+ [ -r /etc/known_hosts2 ] &&
+ kh=( ${kh[@]} /etc/known_hosts2 )
+ [ -d /etc/ssh2/knownhosts ] &&
+ khd=( ${khd[@]} /etc/ssh2/knownhosts/*pub )
+ fi
+
+ # choose which user known hosts file to use
+ if [ -r "$user_kh" ]; then
+ kh=( ${kh[@]} "$user_kh" )
+ else
+ [ -r ~/.ssh/known_hosts ] &&
+ kh=( ${kh[@]} ~/.ssh/known_hosts )
+ [ -r ~/.ssh/known_hosts2 ] &&
+ kh=( ${kh[@]} ~/.ssh/known_hosts2 )
+ [ -d ~/.ssh2/hostkeys ] &&
+ khd=( ${khd[@]} ~/.ssh2/hostkeys/*pub )
+ fi
+
+ # If we have known_hosts files to use
+ if [ ${#kh[@]} -gt 0 -o ${#khd[@]} -gt 0 ]; then
+ # Escape slashes and dots in paths for awk
+ cur=${cur//\//\\\/}
+ cur=${cur//\./\\\.}
+ curd=$cur
+
+ if [[ "$cur" == [0-9]*.* ]]; then
+ # Digits followed by a dot - just search for that
+ cur="^$cur.*"
+ elif [[ "$cur" == [0-9]* ]]; then
+ # Digits followed by no dot - search for digits followed
+ # by a dot
+ cur="^$cur.*\."
+ elif [ -z "$cur" ]; then
+ # A blank - search for a dot or an alpha character
+ cur="[a-z.]"
+ else
+ cur="^$cur"
+ fi
+
+ if [ ${#kh[@]} -gt 0 ]; then
+
+ # FS needs to look for a comma separated list
+ COMPREPLY=( $( awk 'BEGIN {FS=","}
+ {for (i=1; i<=2; ++i) { \
+ gsub(" .*$", "", $i); \
+ if ($i ~ /'$cur'/) {print $i} \
+ }}' ${kh[@]} 2>/dev/null ) )
+ fi
+ if [ ${#khd[@]} -gt 0 ]; then
+ # Needs to look for files called
+ # .../.ssh2/key_22_<hostname>.pub
+ # dont fork any processes, because in a cluster environment,
+ # there can be hundreds of hostkeys
+ for i in ${khd[@]} ; do
+ if [[ "$i" == *key_22_$curd*.pub ]] && [ -r "$i" ] ; then
+ host=${i/#*key_22_/}
+ host=${host/%.pub/}
+ COMPREPLY=( ${COMPREPLY[@]} $host )
+ fi
+ done
+ fi
+ # append any available aliases from config files
+ if [ ${#config[@]} -gt 0 ] && [ -n "$aliases" ]; then
+ hosts=$( compgen -W "$( sed -ne 's/^[Hh][Oo][Ss][Tt]['"$'\t '"']*\([^*?]*\)$/\1/p' ${config[@]} )" -- $ocur )
+ COMPREPLY=( ${COMPREPLY[@]} $hosts )
+ fi
+
+ # apply suffix
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=$user${COMPREPLY[i]}$suffix
+ done
+ else
+ # Just do normal hostname completion
+ COMPREPLY=( $( compgen -A hostname -S "$suffix" -- $cur ) )
+ fi
+
+ return 0
+}
+complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \
+ ping fping telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr
+
+# ssh(1) completion
+#
+have ssh && {
+_ssh()
+{
+ local cur prev
+ local -a config
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -*c)
+ COMPREPLY=( $( compgen -W 'blowfish 3des 3des-cbc blowfish-cbc \
+ arcfour cast128-cbc' -- $cur ) )
+ ;;
+ -*i)
+ _filedir
+ ;;
+ -*l)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ ;;
+ *)
+ _known_hosts -a
+
+ [ $COMP_CWORD -eq 1 ] || \
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -c -- $cur ) )
+ esac
+
+ return 0
+}
+shopt -u hostcomplete && complete -F _ssh ssh slogin sftp xhost autossh
+
+# scp(1) completion
+#
+_scp()
+{
+ local cur userhost path
+
+ local IFS=$'\t\n'
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _expand || return 0
+
+ if [[ "$cur" == *:* ]]; then
+ # remove backslash escape from :
+ cur=${cur/\\:/:}
+ userhost=${cur%%?(\\):*}
+ path=${cur#*:}
+ # unescape spaces
+ path=${path//\\\\\\\\ / }
+ if [ -z "$path" ]; then
+ # default to home dir of specified user on remote host
+ path=$(ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null)
+ fi
+ # escape spaces; remove executables, aliases, pipes and sockets;
+ # add space at end of file names
+ COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \
+ command ls -aF1d "$path*" 2>/dev/null | \
+ sed -e 's/[][(){}<>",:;^&!$&=?`|\ ]/\\\\\\&/g' \
+ -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
+ return 0
+ fi
+
+ [[ "$cur" == */* ]] || _known_hosts -c -a
+ COMPREPLY=( ${COMPREPLY[@]} $( command ls -aF1d $cur* \
+ 2>/dev/null | sed \
+ -e 's/[][(){}<>",:;^&!$&=?`|\ ]/\\&/g' \
+ -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
+ return 0
+}
+complete -F _scp $nospace scp
+}
+
+# rsync(1) completion
+#
+have rsync &&
+_rsync()
+{
+ local cur prev shell i userhost path
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _expand || return 0
+
+ case "$prev" in
+ --@(config|password-file|include-from|exclude-from))
+ _filedir
+ return 0
+ ;;
+ -@(T|-temp-dir|-compare-dest))
+ _filedir -d
+ return 0
+ ;;
+ -@(e|-rsh))
+ COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-v -q -c -a -r -R -b -u -l -L -H \
+ -p -o -g -D -t -S -n -W -x -B -e -C -I -T -P \
+ -z -h -4 -6 --verbose --quiet --checksum \
+ --archive --recursive --relative --backup \
+ --backup-dir --suffix= --update --links \
+ --copy-links --copy-unsafe-links --safe-links \
+ --hard-links --perms --owner --group --devices\
+ --times --sparse --dry-run --whole-file \
+ --no-whole-file --one-file-system \
+ --block-size= --rsh= --rsync-path= \
+ --cvs-exclude --existing --ignore-existing \
+ --delete --delete-excluded --delete-after \
+ --ignore-errors --max-delete= --partial \
+ --force --numeric-ids --timeout= \
+ --ignore-times --size-only --modify-window= \
+ --temp-dir= --compare-dest= --compress \
+ --exclude= --exclude-from= --include= \
+ --include-from= --version --daemon --no-detach\
+ --address= --config= --port= --blocking-io \
+ --no-blocking-io --stats --progress \
+ --log-format= --password-file= --bwlimit= \
+ --write-batch= --read-batch= --help' -- $cur ))
+ ;;
+ *:*)
+ # find which remote shell is used
+ shell=rsh
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -@(e|-rsh) ]]; then
+ shell=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ if [[ "$shell" == ssh ]]; then
+ # remove backslash escape from :
+ cur=${cur/\\:/:}
+ userhost=${cur%%?(\\):*}
+ path=${cur#*:}
+ # unescape spaces
+ path=${path//\\\\\\\\ / }
+ if [ -z "$path" ]; then
+ # default to home dir of specified
+ # user on remote host
+ path=$(ssh -o 'Batchmode yes' \
+ $userhost pwd 2>/dev/null)
+ fi
+ # escape spaces; remove executables, aliases, pipes
+ # and sockets; add space at end of file names
+ COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \
+ command ls -aF1d "$path*" 2>/dev/null | \
+ sed -e 's/ /\\\\\\\ /g' -e 's/[*@|=]$//g' \
+ -e 's/[^\/]$/& /g' ) )
+ fi
+ ;;
+ *)
+ _known_hosts -c -a
+ _filedir
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _rsync $nospace $filenames rsync
+
+# Linux route(8) completion
+#
+[ $UNAME = Linux ] &&
+_route()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ "$prev" = dev ]; then
+ COMPREPLY=( $( ifconfig -a | sed -ne 's|^\('$cur'[^ ]*\).*$|\1|p' ))
+ return 0
+ fi
+
+ COMPREPLY=( $( compgen -W 'add del -host -net netmask metric mss \
+ window irtt reject mod dyn reinstate dev \
+ default gw' -- $cur ) )
+
+ COMPREPLY=( $( echo " ${COMP_WORDS[@]}" | \
+ (while read -d ' ' i; do
+ [ "$i" == "" ] && continue
+ # flatten array with spaces on either side,
+ # otherwise we cannot grep on word
+ # boundaries of first and last word
+ COMPREPLY=" ${COMPREPLY[@]} "
+ # remove word from list of completions
+ COMPREPLY=( ${COMPREPLY/ $i / } )
+ done
+ echo ${COMPREPLY[@]})
+ ) )
+ return 0
+}
+[ $UNAME = Linux ] && complete -F _route route
+
+# GNU make(1) completion
+#
+have make || have gmake || have gnumake || have pmake &&
+_make()
+{
+ local file makef makef_dir="." makef_inc cur prev i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case $prev in
+ -@(f|o|W))
+ _filedir
+ return 0
+ ;;
+ -@(I|C))
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(file|makefile))
+ _filedir
+ return 0
+ ;;
+ --@(directory|include-dir))
+ _filedir -d
+ return 0
+ ;;
+ esac
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-b -m -B -C -d -e -f -h -i -I\
+ -j -l -k -n -o -p -q -r -R - s -S -t -v -w -W \
+ --always-make --directory= --debug \
+ --environment-overrides --file= --makefile= --help \
+ --ignore-errors --include-dir= --jobs --load-average \
+ --max-load --keep-going --just-print --dry-run \
+ --recon --old-file= --assume-old= --print-data-base \
+ --question --no-builtin-rules --no-builtin-variables \
+ --silent --quiet --no-keep-goind --stop --touch \
+ --version --print-directory --no-print-directory \
+ --what-if= --new-file= --assume-new= \
+ --warn-undefined-variables' -- $cur ) )
+ else
+ # before we check for makefiles, see if a path was specified
+ # with -C
+ for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -C ]]; then
+ # eval for tilde expansion
+ eval makef_dir=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ # make reads `GNUmakefile', then `makefile', then `Makefile'
+ if [ -f ${makef_dir}/GNUmakefile ]; then
+ makef=${makef_dir}/GNUmakefile
+ elif [ -f ${makef_dir}/makefile ]; then
+ makef=${makef_dir}/makefile
+ elif [ -f ${makef_dir}/Makefile ]; then
+ makef=${makef_dir}/Makefile
+ else
+ makef=${makef_dir}/*.mk # local convention
+ fi
+
+ # before we scan for targets, see if a Makefile name was
+ # specified with -f
+ for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -f ]]; then
+ # eval for tilde expansion
+ eval makef=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ [ ! -f $makef ] && return 0
+
+ # deal with included Makefiles
+ makef_inc=$( grep -E '^-?include' $makef | sed -e "s,^.* ,"$makef_dir"/," )
+
+ for file in $makef_inc; do
+ [ -f $file ] && makef="$makef $file"
+ done
+
+ COMPREPLY=( $( awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
+ {split($1,A,/ /);for(i in A)print A[i]}' \
+ $makef 2>/dev/null | command grep "^$cur" ))
+ fi
+} &&
+complete -f -F _make $filenames make gmake gnumake pmake
+
+# GNU tar(1) completion
+#
+_tar()
+{
+ local cur ext regex tar untar
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'c t x u r d A' -- $cur ) )
+ return 0
+ fi
+
+ case "${COMP_WORDS[1]}" in
+ ?(-)c*f)
+ _filedir
+ return 0
+ ;;
+ +([^IZzjy])f)
+ ext='t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))'
+ regex='t\(ar\(\.\(Z\|gz\|bz2\?\)\)\?\|gz\|bz2\?\)'
+ ;;
+ *[Zz]*f)
+ ext='t?(ar.)@(gz|Z)'
+ regex='t\(ar\.\)\?\(gz\|Z\)'
+ ;;
+ *[Ijy]*f)
+ ext='t?(ar.)bz?(2)'
+ regex='t\(ar\.\)\?bz2\?'
+ ;;
+ *)
+ _filedir
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$COMP_LINE" == *$ext' ' ]]; then
+ # complete on files in tar file
+ #
+ # get name of tar file from command line
+ tar=$( echo "$COMP_LINE" | \
+ sed -e 's/^.* \([^ ]*'$regex'\) .*$/\1/' )
+ # devise how to untar and list it
+ untar=t${COMP_WORDS[1]//[^Izjyf]/}
+
+ COMPREPLY=( $( compgen -W "$( echo $( tar $untar $tar \
+ 2>/dev/null ) )" -- "$cur" ) )
+ return 0
+ fi
+
+ # file completion on relevant files
+ _filedir $ext
+
+ return 0
+}
+[ -n "${COMP_TAR_INTERNAL_PATHS:-}" ] && complete -F _tar $dirnames tar ||
+ complete -F _tar $filenames tar
+
+# jar(1) completion
+#
+have jar &&
+_jar()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD = 1 ]; then
+ COMPREPLY=( $( compgen -W 'c t x u' -- $cur ) )
+ return 0
+ fi
+
+ case "${COMP_WORDS[1]}" in
+ *c*f)
+ _filedir
+ ;;
+ *f)
+ _filedir '?(e|j|w)ar'
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+} &&
+complete -F _jar $filenames jar
+
+# Linux iptables(8) completion
+#
+have iptables &&
+_iptables()
+{
+ local cur prev table chain
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ chain='s/^Chain \([^ ]\+\).*$/\1/p'
+
+ if [[ $COMP_LINE == *-t\ *filter* ]]; then
+ table="-t filter"
+ elif [[ $COMP_LINE == *-t\ *nat* ]]; then
+ table="-t nat"
+ elif [[ $COMP_LINE == *-t\ *mangle* ]]; then
+ table="-t mangle"
+ fi
+
+ case "$prev" in
+ -*[AIDRPFXLZ])
+ COMPREPLY=( $( compgen -W '`iptables $table -nL | \
+ sed -ne "s/^Chain \([^ ]\+\).*$/\1/p"`' -- $cur ) )
+ ;;
+ -*t)
+ COMPREPLY=( $( compgen -W 'nat filter mangle' -- $cur ) )
+ ;;
+ -j)
+ if [ "$table" = "-t filter" -o "$table" = "" ]; then
+ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
+ `iptables $table -nL | sed -ne "$chain" \
+ -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \
+ $cur ) )
+ elif [ "$table" = "-t nat" ]; then
+ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
+ MIRROR SNAT DNAT MASQUERADE `iptables $table -nL | \
+ sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`' \
+ -- $cur ) )
+ elif [ "$table" = "-t mangle" ]; then
+ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
+ MARK TOS `iptables $table -nL | sed -ne "$chain" \
+ -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \
+ $cur ) )
+ fi
+ ;;
+ *)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -o -s -d -p -f -m --append \
+ --delete --insert --replace --list --flush --zero --new \
+ --delete-chain --policy --rename-chain --proto --source \
+ --destination --in-interface --jump --match --numeric \
+ --out-interface --table --verbose --line-numbers --exact \
+ --fragment --modprobe= --set-counters --version' -- "$cur") )
+ fi
+ ;;
+ esac
+
+} &&
+complete -F _iptables iptables
+
+# tcpdump(8) completion
+#
+have tcpdump &&
+_tcpdump()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(r|w|F))
+ _filedir
+ return 0
+ ;;
+ -i)
+ _available_interfaces -a
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -d -e -f -l -n -N -O -p \
+ -q -R -S -t -u -v -x -C -F -i -m -r -s -T -w \
+ -E' -- $cur ) )
+ fi
+
+} &&
+complete -F _tcpdump tcpdump
+
+# autorpm(8) completion
+#
+have autorpm &&
+_autorpm()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -W '--notty --debug --help --version \
+ auto add fullinfo info help install list \
+ remove set' -- $cur ) )
+
+} &&
+complete -F _autorpm autorpm
+
+# This meta-cd function observes the CDPATH variable, so that cd additionally
+# completes on directories under those specified in CDPATH.
+#
+_cd()
+{
+ local IFS=$'\t\n' cur=${COMP_WORDS[COMP_CWORD]} i j k
+
+ # try to allow variable completion
+ if [[ "$cur" == ?(\\)\$* ]]; then
+ COMPREPLY=( $( compgen -v -P '$' -- "${cur#?(\\)$}" ) )
+ return 0
+ fi
+
+ # Use standard dir completion if no CDPATH or parameter starts with /,
+ # ./ or ../
+ if [ -z "${CDPATH:-}" ] || [[ "$cur" == ?(.)?(.)/* ]]; then
+ _filedir -d
+ return 0
+ fi
+
+ local -r mark_dirs=$(_rl_enabled mark-directories && echo y)
+ local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)
+
+ # we have a CDPATH, so loop on its contents
+ for i in ${CDPATH//:/$'\t'}; do
+ # create an array of matched subdirs
+ k=${#COMPREPLY[@]}
+ for j in $( compgen -d $i/$cur ); do
+ if [[ ( $mark_symdirs && -h $j || $mark_dirs && ! -h $j ) && ! -d ${j#$i/} ]]; then
+ j="${j}/"
+ fi
+ COMPREPLY[k++]=${j#$i/}
+ done
+ done
+
+ _filedir -d
+
+ if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
+ i=${COMPREPLY[0]}
+ if [ "$i" == "$cur" ] && [[ $i != "*/" ]]; then
+ COMPREPLY[0]="${i}/"
+ fi
+ fi
+
+ return 0
+}
+if shopt -q cdable_vars; then
+ complete -v -F _cd $nospace $filenames cd
+else
+ complete -F _cd $nospace $filenames cd
+fi
+
+# A meta-command completion function for commands like sudo(8), which need to
+# first complete on a command, then complete according to that command's own
+# completion definition - currently not quite foolproof (e.g. mount and umount
+# don't work properly), but still quite useful.
+#
+_command()
+{
+ local cur func cline cspec noglob cmd done i \
+ _COMMAND_FUNC _COMMAND_FUNC_ARGS
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ # If the the first arguments following our meta-command-invoker are
+ # switches, get rid of them. Most definitely not foolproof.
+ done=
+ while [ -z $done ] ; do
+ cmd=${COMP_WORDS[1]}
+ if [[ "$cmd" == -* ]] ; then
+ for (( i=1 ; i<=COMP_CWORD ; i++)) ; do
+ COMP_WORDS[i]=${COMP_WORDS[i+1]}
+ done
+ COMP_CWORD=$(($COMP_CWORD-1))
+ else
+ done=1
+ fi
+ done
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ elif complete -p $cmd &>/dev/null; then
+ cspec=$( complete -p $cmd )
+ if [ "${cspec#* -F }" != "$cspec" ]; then
+ # complete -F <function>
+ #
+ # COMP_CWORD and COMP_WORDS() are not read-only,
+ # so we can set them before handing off to regular
+ # completion routine
+
+ # set current token number to 1 less than now
+ COMP_CWORD=$(( $COMP_CWORD - 1 ))
+
+ # get function name
+ func=${cspec#*-F }
+ func=${func%% *}
+ # get current command line minus initial command
+ cline="${COMP_LINE#*( )$1 }"
+ # save noglob state
+ shopt -qo noglob; noglob=$?
+ # turn on noglob, as things like 'sudo ls *<Tab>'
+ # don't work otherwise
+ shopt -so noglob
+ # split current command line tokens into array
+ COMP_WORDS=( $cline )
+ # reset noglob if necessary
+ [ $noglob -eq 1 ] && shopt -uo noglob
+ $func $cline
+ # This is needed in case user finished entering
+ # command and pressed tab (e.g. sudo ls <Tab>)
+ COMP_CWORD=$(( $COMP_CWORD > 0 ? $COMP_CWORD : 1 ))
+ cur=${COMP_WORDS[COMP_CWORD]}
+ _COMMAND_FUNC=$func
+ _COMMAND_FUNC_ARGS=( $cmd $2 $3 )
+ COMP_LINE=$cline
+ COMP_POINT=$(( ${COMP_POINT} - ${#1} - 1 ))
+ $func $cmd $2 $3
+ # remove any \: generated by a command that doesn't
+ # default to filenames or dirnames (e.g. sudo chown)
+ if [ "${cspec#*-o }" != "$cspec" ]; then
+ cspec=${cspec#*-o }
+ cspec=${cspec%% *}
+ if [[ "$cspec" != @(dir|file)names ]]; then
+ COMPREPLY=("${COMPREPLY[@]//\\\\:/:}")
+ fi
+ fi
+ elif [ -n "$cspec" ]; then
+ cspec=${cspec#complete};
+ cspec=${cspec%%$cmd};
+ COMPREPLY=( $( eval compgen "$cspec" -- "$cur" ) );
+ fi
+ fi
+
+ [ ${#COMPREPLY[@]} -eq 0 ] && _filedir
+}
+complete -F _command $filenames nohup exec nice eval strace time ltrace then \
+ else do vsound command xargs
+
+_root_command()
+{
+ PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command $1 $2 $3
+}
+complete -F _root_command $filenames sudo fakeroot really
+
+# ant(1) completion
+#
+have ant && {
+_ant()
+{
+ local cur prev buildfile i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -buildfile|-f)
+ _filedir 'xml'
+ return 0
+ ;;
+ -logfile)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-help -projecthelp -version -quiet \
+ -verbose -debug -emacs -logfile -logger \
+ -listener -buildfile -f -D -find' -- $cur ) )
+ else
+ # available targets completion
+ # find which buildfile to use
+ buildfile=build.xml
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -buildfile ]]; then
+ buildfile=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ [ ! -f $buildfile ] && return 0
+
+ # parse buildfile for targets
+ COMPREPLY=( $( awk -F'"' '/<target name="/ {print $2}' \
+ $buildfile | grep "^$cur" )
+ $( awk -F"'" "/<target name='/ "'{print $2}' \
+ $buildfile | grep "^$cur" )
+ $( awk -F'"' '/<target [^n]/ {if ($1 ~ /name=/) { print $2 } else if ($3 ~ /name=/) {print $4} else if ($5 ~ /name=/) {print $6}}' \
+ $buildfile | grep "^$cur" ) )
+ fi
+}
+have complete-ant-cmd.pl && \
+ complete -C complete-ant-cmd.pl -F _ant $filenames ant || \
+ complete -F _ant $filenames ant
+}
+
+have nslookup &&
+_nslookup()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]#-}
+
+ COMPREPLY=( $( compgen -P '-' -W 'all class= debug d2 domain= \
+ srchlist= defname search port= querytype= \
+ type= recurse retry root timeout vc \
+ ignoretc' -- $cur ) )
+} &&
+complete -F _nslookup nslookup
+
+# mysqladmin(1) completion
+#
+have mysqladmin &&
+_mysqladmin()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -u)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
+ -v -V -w' -- $cur ) )
+
+ COMPREPLY=( ${COMPREPLY[@]} \
+ $( compgen -W 'create drop extended-status flush-hosts \
+ flush-logs flush-status flush-tables \
+ flush-threads flush-privileges kill \
+ password ping processlist reload refresh \
+ shutdown status variables version' \
+ -- $cur ) )
+} &&
+complete -F _mysqladmin mysqladmin
+
+# gzip(1) completion
+#
+have gzip &&
+_gzip()
+{
+ local cur prev xspec IFS=$'\t\n'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d -f \
+ -h -l -L -n -N -q -r -S -t -v -V \
+ -1 -2 -3 -4 -5 -6 -7 -8 -9 \
+ --stdout --decompress --force --help --list \
+ --license --no-name --name --quiet --recursive \
+ --suffix --test --verbose --version --fast \
+ --best' -- $cur ) )
+ return 0
+ fi
+
+ xspec="*.?(t)gz"
+ if [[ "$prev" == --* ]]; then
+ [[ "$prev" == --decompress || \
+ "$prev" == --list || \
+ "$prev" == --test ]] && xspec="!"$xspec
+ [[ "$prev" == --force ]] && xspec=
+ elif [[ "$prev" == -* ]]; then
+ [[ "$prev" == -*[dlt]* ]] && xspec="!"$xspec
+ [[ "$prev" == -*f* ]] && xspec=
+ elif [ "$prev" = '>' ]; then
+ xspec=
+ fi
+
+ _expand || return 0
+
+ COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \
+ $( compgen -d -- $cur ) )
+} &&
+complete -F _gzip $filenames gzip
+
+# bzip2(1) completion
+#
+have bzip2 &&
+_bzip2()
+{
+ local cur prev xspec IFS=$'\t\n'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d -f -h -k -L -q -s \
+ -t -v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \
+ --help --decompress --compress --keep --force \
+ --test --stdout --quiet --verbose --license \
+ --version --small --fast --best' -- $cur ) )
+ return 0
+ fi
+
+ xspec="*.bz2"
+ if [[ "$prev" == --* ]]; then
+ [[ "$prev" == --decompress || \
+ "$prev" == --list || \
+ "$prev" == --test ]] && xspec="!"$xspec
+ [[ "$prev" == --compress ]] && xspec=
+ elif [[ "$prev" == -* ]]; then
+ [[ "$prev" == -*[dt]* ]] && xspec="!"$xspec
+ [[ "$prev" == -*z* ]] && xspec=
+ fi
+
+ _expand || return 0
+
+ COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \
+ $( compgen -d -- $cur ) )
+} &&
+complete -F _bzip2 $filenames bzip2
+
+# openssl(1) completion
+#
+have openssl && {
+_openssl_sections()
+{
+ local config
+
+ config=/etc/ssl/openssl.cnf
+ [ ! -f $config ] && config=/usr/share/ssl/openssl.cnf
+ for (( i=2; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -config ]]; then
+ config=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ [ ! -f $config ] && return 0
+
+ COMPREPLY=( $( awk '/\[.*\]/ {print $2} ' $config | grep "^$cur" ) )
+}
+
+_openssl()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'asn1parse ca ciphers crl crl2pkcs7 \
+ dgst dh dhparam dsa dsaparam enc errstr gendh gendsa \
+ genrsa nseq passwd pkcs12 pkcs7 pkcs8 rand req rsa \
+ rsautl s_client s_server s_time sess_id smime speed \
+ spkac verify version x509 md2 md4 md5 mdc2 rmd160 sha \
+ sha1 base64 bf bf-cbc bf-cfb bf-ecb bf-ofb cast \
+ cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb des \
+ des-cbc des-cfb des-ecb des-ede des-ede-cbc \
+ des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc \
+ des-ede3-cfb des-ede3-ofb des-ofb des3 desx rc2 \
+ rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb \
+ rc4 rc4-40' -- $cur ) )
+ else
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case ${COMP_WORDS[1]} in
+ asn1parse)
+ case $prev in
+ -inform)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|oid))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -in -out -noout -offset \
+ -length -i -oid -strparse' -- $cur ) )
+ fi
+ ;;
+ ca)
+ case $prev in
+ -@(config|revoke|cert|in|out|spkac|ss_cert))
+ _filedir
+ return 0
+ ;;
+ -outdir)
+ _filedir -d
+ return 0
+ ;;
+ -@(name|crlexts|extensions))
+ _openssl_sections
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-verbose -config -name \
+ -gencrl -revoke -crldays -crlhours -crlexts \
+ -startdate -enddate -days -md -policy -keyfile \
+ -key -passin -cert -in -out -notext -outdir \
+ -infiles -spkac -ss_cert -preserveDN -batch \
+ -msie_hack -extensions' -- $cur ) )
+ fi
+ ;;
+ ciphers)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-v -ssl2 -ssl3 -tls1' -- $cur ) )
+ fi
+ ;;
+ crl)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|CAfile))
+ _filedir
+ return 0
+ ;;
+ -CAPath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -text -in -out -noout \
+ -hash -issuer -lastupdate -nextupdate -CAfile -CApath' -- $cur ) )
+ fi
+ ;;
+ crl2pkcs7)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -print_certs' -- $cur ) )
+ fi
+ ;;
+ dgst)
+ case $prev in
+ -@(out|sign|verify|prvrify|signature))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-md5 -md4 -md2 -sha1 -sha -mdc2 -ripemd160 -dss1 \
+ -c -d -hex -binary -out -sign -verify -prverify -signature' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ dsa)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -passin -out -passout -des -des3 -idea -text -noout \
+ -modulus -pubin -pubout' -- $cur ) )
+ fi
+ ;;
+ dsaparam)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -noout \
+ -text -C -rand -genkey' -- $cur ) )
+ fi
+ ;;
+ enc)
+ case $prev in
+ -@(in|out|kfile))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-ciphername -in -out -pass \
+ -e -d -a -A -k -kfile -S -K -iv -p -P -bufsize -debug' -- $cur ) )
+ fi
+ ;;
+ dhparam)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -dsaparam -noout \
+ -text -C -2 -5 -rand' -- $cur ) )
+ fi
+ ;;
+ gendsa)
+ case $prev in
+ -@(out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-out -des -des3 -idea -rand' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ genrsa)
+ case $prev in
+ -@(out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-out -passout -des -des3 -idea -f4 -3 -rand' -- $cur ) )
+ fi
+ ;;
+ pkcs7)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -print_certs -text -noout' -- $cur ) )
+ fi
+ ;;
+ rand)
+ case $prev in
+ -@(out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-out -rand -base64' -- $cur ) )
+ fi
+ ;;
+ req)
+ case "$prev" in
+ -@(in|out|key)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+
+ -@(in|out|rand|key|keyout|config))
+ _filedir
+ return 0
+ ;;
+ -extensions)
+ _openssl_sections
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in \
+ -passin -out -passout -text -noout -verify \
+ -modulus -new -rand -newkey -newkey -nodes \
+ -key -keyform -keyout -md5 -sha1 -md2 -mdc2 \
+ -config -x509 -days -asn1-kludge -newhdr \
+ -extensions -reqexts section' -- $cur ) )
+ fi
+ ;;
+ rsa)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER NET PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -passin -out -passout \
+ -sgckey -des -des3 -idea -text -noout -modulus -check -pubin \
+ -pubout -engine' -- $cur ) )
+ fi
+ ;;
+ rsautl)
+ case $prev in
+ -@(in|out|inkey))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-in -out -inkey -pubin -certin -sign -verify \
+ -encrypt -decrypt -pkcs -ssl -raw -hexdump -asn1parse' -- $cur ) )
+ fi
+ ;;
+ s_client)
+ case $prev in
+ -connect)
+ _known_hosts
+ return 0
+ ;;
+ -@(cert|key|CAfile|rand))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-connect -verify -cert -key -CApath -CAfile \
+ -reconnect -pause -showcerts -debug -msg -nbio_test -state -nbio \
+ -crlf -ign_eof -quiet -ssl2 -ssl3 -tls1 -no_ssl2 -no_ssl3 -no_tls1 \
+ -bugs -cipher -starttls -engine -rand' -- $cur ) )
+ fi
+ ;;
+ s_server)
+ case $prev in
+ -@(cert|key|dcert|dkey|dhparam|CAfile|rand))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-accept -context -verify -Verify -cert -key \
+ -dcert -dkey -dhparam -nbio -nbio_test -crlf -debug -msg -state -CApath \
+ -CAfile -nocert -cipher -quiet -no_tmp_rsa -ssl2 -ssl3 -tls1 -no_ssl2 \
+ -no_ssl3 -no_tls1 -no_dhe -bugs -hack -www -WWW -HTTP -engine -id_prefix \
+ -rand' -- $cur ) )
+ fi
+ ;;
+ s_time)
+ case $prev in
+ -connect)
+ _known_hosts
+ return 0
+ ;;
+ -@(cert|key|CAfile))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-connect -www -cert -key -CApath -CAfile -reuse \
+ -new -verify -nbio -time -ssl2 -ssl3 -bugs -cipher' -- $cur ) )
+ fi
+ ;;
+
+ sess_id)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -text -noout \
+ -context ID' -- $cur ) )
+ fi
+ ;;
+ smime)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'SMIME DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|certfile|signer|recip|inkey|content|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-encrypt -decrypt -sign -verify -pk7out -des -des3 \
+ -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256 -in -certfile -signer \
+ -recip -inform -passin -inkey -out -outform -content -to -from -subject \
+ -text -rand' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ speed)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-engine' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'md2 mdc2 md5 hmac sha1 rmd160 idea-cbc \
+ rc2-cbc rc5-cbc bf-cbc des-cbc des-ede3 rc4 rsa512 rsa1024 rsa2048 \
+ rsa4096 dsa512 dsa1024 dsa2048 idea rc2 des rsa blowfish' -- $cur ) )
+ fi
+ ;;
+ verify)
+ case $prev in
+ -@(CAfile|untrusted))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-CApath -CAfile -purpose -untrusted -help -issuer_checks \
+ -verbose -certificates' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ x509)
+ case "$prev" in
+ -@(in|out|CA|CAkey|CAserial|extfile))
+ _filedir
+ return 0
+ ;;
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM NET' -- $cur ) )
+ return 0
+ ;;
+ -@(key|CA|CAkey)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -extensions)
+ _openssl_sections
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform \
+ -keyform -CAform -CAkeyform -in -out \
+ -serial -hash -subject -issuer -nameopt \
+ -email -startdate -enddate -purpose \
+ -dates -modulus -fingerprint -alias \
+ -noout -trustout -clrtrust -clrreject \
+ -addtrust -addreject -setalias -days \
+ -set_serial -signkey -x509toreq -req \
+ -CA -CAkey -CAcreateserial -CAserial \
+ -text -C -md2 -md5 -sha1 -mdc2 -clrext \
+ -extfile -extensions -engine' -- $cur ) )
+ fi
+ ;;
+ @(md5|md4|md2|sha1|sha|mdc2|ripemd160))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ esac
+ fi
+
+ return 0
+}
+complete -F _openssl $default openssl
+}
+
+# screen(1) completion
+#
+have screen &&
+_screen()
+{
+ local cur prev preprev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ "$COMP_CWORD" -ge 2 ] && preprev=${COMP_WORDS[COMP_CWORD-2]}
+
+ if [ "$preprev" = "-d" -o "$preprev" = "-D" -a "$prev" = "-r" -o \
+ "$prev" = "-R" ]; then
+ # list all
+ COMPREPLY=( $( command screen -ls | \
+ sed -ne 's|^['$'\t'']\+\('$cur'[0-9]\+\.[^'$'\t'']\+\).*$|\1|p' ) )
+ else
+ case "$prev" in
+ -[rR])
+ # list detached
+ COMPREPLY=( $( command screen -ls | \
+ sed -ne 's|^['$'\t'']\+\('$cur'[0-9]\+\.[^'$'\t'']\+\).*Detached.*$|\1|p' ) )
+ ;;
+ -[dDx])
+ # list attached
+ COMPREPLY=( $( command screen -ls | \
+ sed -ne 's|^['$'\t'']\+\('$cur'[0-9]\+\.[^'$'\t'']\+\).*Attached.*$|\1|p' ) )
+ ;;
+ -s)
+ # shells
+ COMPREPLY=( $( grep ^${cur:-[^#]} /etc/shells ) )
+ ;;
+ *)
+ ;;
+ esac
+ fi
+
+ return 0
+} &&
+complete -F _screen $default screen
+
+# lftp(1) bookmark completion
+#
+have lftp &&
+_lftp()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ] && [ -f ~/.lftp/bookmarks ]; then
+ COMPREPLY=( $( compgen -W '$( sed -ne "s/^\(.*\)'$'\t''.*$/\1/p" \
+ ~/.lftp/bookmarks )' -- $cur ) )
+ fi
+
+ return 0
+} &&
+complete -F _lftp $default lftp
+
+# ncftp(1) bookmark completion
+#
+have ncftp &&
+_ncftp()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
+ COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
+ ~/.ncftp/bookmarks )' -- $cur ) )
+ fi
+
+ return 0
+} &&
+complete -F _ncftp $default ncftp
+
+# gdb(1) completion
+#
+have gdb &&
+_gdb()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ elif [ $COMP_CWORD -eq 2 ]; then
+ prev=${prev##*/}
+ COMPREPLY=( $( compgen -fW "$( command ps axo comm,pid | \
+ awk '{if ($1 ~ /^'"$prev"'/) print $2}' ) )" \
+ -- "$cur" ) )
+ fi
+} &&
+complete -F _gdb $filenames gdb
+
+# Postgresql completion
+#
+have psql && {
+_pg_databases()
+{
+ COMPREPLY=( $( psql -l 2>/dev/null | \
+ sed -e '1,/^-/d' -e '/^(/,$d' | \
+ awk '{print $1}' | grep "^$cur" ) )
+}
+
+_pg_users()
+{
+ COMPREPLY=( $( psql -qtc 'select usename from pg_user' template1 2>/dev/null | \
+ grep "^ $cur" ) )
+ [ ${#COMPREPLY[@]} -eq 0 ] && COMPREPLY=( $( compgen -u -- $cur ) )
+}
+
+# createdb(1) completion
+#
+_createdb()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(h|-host=))
+ _known_hosts
+ return 0
+ ;;
+ -@(U|-username=))
+ _pg_users
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \
+ --location= --template= --encoding= --host= --port= \
+ --username= --password --echo --quiet --help' -- $cur ))
+ else
+ _pg_databases
+ fi
+}
+complete -F _createdb $default createdb
+
+# dropdb(1) completion
+#
+_dropdb()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(h|-host=))
+ _known_hosts
+ return 0
+ ;;
+ -@(U|-username=))
+ _pg_users
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h -p -U -W -e -q \
+ --host= --port= --username= --password \
+ --interactive --echo --quiet --help' -- $cur ) )
+ else
+ _pg_databases
+ fi
+}
+complete -F _dropdb $default dropdb
+
+# psql(1) completion
+#
+_psql()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -h|--host)
+ _known_hosts
+ return 0
+ ;;
+ -U|--username)
+ _pg_users
+ return 0
+ ;;
+ -d|--dbname)
+ _pg_databases
+ return 0
+ ;;
+ -@(o|f)|--output|--file)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # return list of available options
+ COMPREPLY=( $( compgen -W '-a --echo-all -A --no-align \
+ -c --command -d --dbname -e --echo-queries \
+ -E --echo-hidden -f --file -F --filed-separator \
+ -h --host -H --html -l --list -n -o --output \
+ -p --port -P --pset -q -R --record-separator \
+ -s --single-step -S --single-line -t --tuples-only \
+ -T --table-attr -U --username -v --variable \
+ -V --version -W --password -x --expanded -X --nopsqlrc \
+ -? --help ' -- $cur ) )
+ else
+ # return list of available databases
+ _pg_databases
+ fi
+}
+complete -F _psql $default psql
+}
+
+_longopt()
+{
+ local cur opt
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == --*=* ]]; then
+ opt=${cur%%=*}
+ # cut backslash that gets inserted before '=' sign
+ opt=${opt%\\*}
+ cur=${cur#*=}
+ _filedir
+ COMPREPLY=( $( compgen -P "$opt=" -W '${COMPREPLY[@]}' -- $cur))
+ return 0
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \
+ -e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | \
+ command grep "^$cur" | sort -u ) )
+ elif [[ "$1" == @(mk|rm)dir ]]; then
+ _filedir -d
+ else
+ _filedir
+ fi
+}
+# makeinfo and texi2dvi are defined elsewhere.
+for i in a2ps autoconf automake bc gprof ld nm objcopy objdump readelf strip \
+ bison cpio diff patch enscript cp df dir du ln ls mkfifo mknod mv rm \
+ touch vdir awk gperf grep grub indent less m4 sed shar date \
+ tee who texindex cat csplit cut expand fmt fold head \
+ md5sum nl od paste pr ptx sha1sum sort split tac tail tr unexpand \
+ uniq wc ldd bash id irb mkdir rmdir; do
+ have $i && complete -F _longopt $filenames $i
+done
+
+# These commands use filenames, so '-o filenames' is not needed.
+for i in env netstat seq uname units wget; do
+ have $i && complete -F _longopt $default $i
+done
+unset i
+
+# gcc(1) completion
+#
+# The only unusual feature is that we don't parse "gcc --help -v" output
+# directly, because that would include the options of all the other backend
+# tools (linker, assembler, preprocessor, etc) without any indication that
+# you cannot feed such options to the gcc driver directly. (For example, the
+# linker takes a -z option, but you must type -Wl,-z for gcc.) Instead, we
+# ask the driver ("g++") for the name of the compiler ("cc1"), and parse the
+# --help output of the compiler.
+#
+have gcc &&
+_gcc()
+{
+ local cur cc backend
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _expand || return 0
+
+ case "$1" in
+ gcj)
+ backend=jc1
+ ;;
+ gpc)
+ backend=gpc1
+ ;;
+ *77)
+ backend=f771
+ ;;
+ *)
+ backend=cc1 # (near-)universal backend
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ cc=$( $1 -print-prog-name=$backend )
+ # sink stderr:
+ # for C/C++/ObjectiveC it's useless
+ # for FORTRAN/Java it's an error
+ COMPREPLY=( $( $cc --help 2>/dev/null | tr '\t' ' ' | \
+ sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \
+ command grep "^$cur" | sort -u ) )
+ else
+ _filedir
+ fi
+} &&
+complete $filenames -F _gcc gcc g++ c++ g77 gcj gpc
+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Cygwin ] && \
+[ -n "${have:-}" ] && complete $filenames -F _gcc cc
+
+# Linux cardctl(8) completion
+#
+have cardctl &&
+_cardctl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'status config ident suspend \
+ resume reset eject insert scheme' \
+ -- $cur ) )
+ fi
+} &&
+complete -F _cardctl cardctl
+
+# This function is required by _dpkg() and _dpkg-reconfigure()
+#
+have dpkg && {
+have grep-status && {
+_comp_dpkg_installed_packages()
+{
+ grep-status -P -e "^$1" -a -FStatus 'install ok installed' -n -s Package
+}
+} || {
+_comp_dpkg_installed_packages()
+{
+ grep -A 2 "Package: $1" /var/lib/dpkg/status | \
+ grep -B 2 'ok installed' | grep "Package: $1" | cut -d\ -f2
+}
+}
+
+# Debian dpkg(8) completion
+#
+_dpkg()
+{
+ local cur prev i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ i=$COMP_CWORD
+
+ _expand || return 0
+
+ # find the last option flag
+ if [[ $cur != -* ]]; then
+ while [[ $prev != -* && $i != 1 ]]; do
+ i=$((i-1))
+ prev=${COMP_WORDS[i-1]}
+ done
+ fi
+
+ case "$prev" in
+ -@(c|i|A|I|f|e|x|X|-@(install|unpack|record-avail|contents|info| \
+ fsys-tarfile|field|control|extract)))
+ _filedir '?(u)deb'
+ return 0
+ ;;
+ -@(b|-build))
+ _filedir -d
+ return 0
+ ;;
+ -@(s|p|l|-@(status|print-avail|list)))
+ COMPREPLY=( $( apt-cache pkgnames $cur 2>/dev/null ) )
+ return 0
+ ;;
+ -@(S|-search))
+ _filedir
+ return 0
+ ;;
+ -@(r|L|P|-@(remove|purge|listfiles)))
+ COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+ return 0
+ ;;
+ *)
+
+ COMPREPLY=( $( compgen -W '-i --install --unpack -A --record-avail \
+ --configure -r --remove -P --purge --get-selections \
+ --set-selections --update-avail --merge-avail \
+ --clear-avail --command-fd --forget-old-unavail -s \
+ --status -p --print-avail -L --listfiles -l --list \
+ -S --search -C --audit --print-architecture \
+ --print-gnu-build-architecture \
+ --print-installation-architecture \
+ --compare-versions --help --version --force-help \
+ --force-all --force-auto-select --force-downgrade \
+ --force-configure-any --force-hold --force-bad-path \
+ --force-not-root --force-overwrite \
+ --force-overwrite-diverted --force-bad-verify \
+ --force-depends-version --force-depends \
+ --force-confnew --force-confold --force-confdef \
+ --force-confmiss --force-conflicts --force-architecture\
+ --force-overwrite-dir --force-remove-reinstreq \
+ --force-remove-essential -Dh \
+ --debug=help --licence --admindir= --root= --instdir= \
+ -O --selected-only -E --skip-same-version \
+ -G --refuse-downgrade -B --auto-deconfigure \
+ --no-debsig --no-act -D --debug= --status-fd \
+ -b --build -I --info -f --field -c --contents \
+ -x --extract -X --vextract --fsys-tarfile -e --control \
+ --ignore-depends= --abort-after' -- $cur ) )
+ ;;
+ esac
+
+
+}
+complete -F _dpkg $filenames dpkg dpkg-deb
+}
+
+# Debian GNU dpkg-reconfigure(8) completion
+#
+have dpkg-reconfigure &&
+_dpkg_reconfigure()
+{
+ local cur prev opt
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ case "$prev" in
+ -@(f|-frontend))
+ opt=( $( echo /usr/share/perl5/Debconf/FrontEnd/* ) )
+ opt=( ${opt[@]##*/} )
+ opt=( ${opt[@]%.pm} )
+ COMPREPLY=( $( compgen -W '${opt[@]}' -- $cur ) )
+ return 0
+ ;;
+ -@(p|-priority))
+ COMPREPLY=( $( compgen -W 'low medium high critical' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-f --frontend -p --priority -a --all \
+ -u --unseen-only -h --help -s --showold \
+ --force --terse' -- $cur ) )
+ else
+ COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+ fi
+} &&
+complete -F _dpkg_reconfigure $default dpkg-reconfigure
+
+# Debian dpkg-source completion
+#
+have dpkg-source &&
+_dpkg_source()
+{
+ local cur prev options work i action packopts unpackopts
+
+ packopts="-c -l -F -V -T -D -U -W -E -sa -i -I -sk -sp -su -sr -ss -sn -sA -sK -sP -sU -sR"
+ unpackopts="-sp -sn -su"
+ options=`echo "-x -b $packopts $unpackopts" | xargs echo | sort -u | xargs echo`
+
+ COMPREPLY=()
+ if [ "$1" != "dpkg-source" ]; then
+ exit 1
+ fi
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ action="options"
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[$i]} == "-x" ]]; then
+ action=unpack
+ elif [[ ${COMP_WORDS[$i]} == "-b" ]]; then
+ action=pack
+ elif [[ ${COMP_WORDS[$i]} == "-h" ]]; then
+ action=help
+ fi
+ done
+ # if currently seeing a complete option, return just itself.
+ for i in $options; do
+ if [ "$cur" = "$i" ]; then
+ COMPREPLY=( "$cur" )
+ return 0
+ fi
+ done
+ case "$action" in
+ "unpack")
+ if [ "$cur" = "-" -o "$cur" = "-s" ]; then
+ COMPREPLY=( $unpackots )
+ return 0
+ fi
+ case "$prev" in
+ "-x")
+ COMPREPLY=( $( compgen -d -- "$cur" ) \
+ $( compgen -f -X '!*.dsc' -- "$cur" ) )
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $unpackopts $(compgen -d -f -- "$cur" ) )
+ return 0
+ ;;
+ esac
+ return 0
+ ;;
+ "pack")
+ if [ "$cur" = "-" ]; then
+ COMPREPLY=( $packopts )
+ return 0
+ fi
+ if [ "$cur" = "-s" ]; then
+ COMPREPLY=( "-sa" "-sk" "-sp" "-su" "-sr" "-ss" "-sn" \
+ "-sA" "-sK" "-sP" "-sU" "-sR" )
+ return 0
+ fi
+ case "$prev" in
+ "-b")
+ COMPREPLY=( $( compgen -d -- "$cur" ) )
+ return 0
+ ;;
+ "-c"|"-l"|"-T"|"-i"|"-I")
+ # -c: get controlfile
+ # -l: get per-version info from this file
+ # -T: read variables here, not debian/substvars
+ # -i: <regexp> filter out files to ignore diffs of.
+ # -I: filter out files when building tarballs.
+ # return directory names and file names
+ COMPREPLY=( $( compgen -d -f ) )
+ return 0
+ ;;
+ "-F")
+ # -F: force change log format
+ COMPREPLY=( $( ( cd /usr/lib/dpkg/parsechangelog; compgen -f "$cur" ) ) )
+ return 0
+ ;;
+ "-V"|"-D")
+ # -V: set a substitution variable
+ # we don't know anything about possible variables or values
+ # so we don't try to suggest any completion.
+ COMPREPLY=()
+ return 0
+ ;;
+ "-D")
+ # -D: override or add a .dsc field and value
+ # if $cur doesn't contain a = yet, suggest variable names
+ if echo -- "$cur" | grep -q "="; then
+ # $cur contains a "="
+ COMPREPLY=()
+ return 0
+ else
+ COMPREPLY=( Format Source Version Binary Maintainer Uploader Architecture Standards-Version Build-Depends Files )
+ return 0
+ fi
+ ;;
+ "-U")
+ # -U: remove a field
+ # Suggest possible fieldnames
+ COMPREPLY=( Format Source Version Binary Maintainer Uploader Architecture Standards-Version Build-Depends Files )
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $packopts )
+ return 0
+ ;;
+ esac
+ return 0
+ ;;
+ *)
+ # if seeing a partial option, return possible completions.
+ if [ "$cur" = "-s" ]; then
+ COMPREPLY=( "-sa" "-sk" "-sp" "-su" "-sr" "-ss" "-sn" \
+ "-sA" "-sK" "-sP" "-sU" "-sR" )
+ return 0
+ fi
+ # else return all possible options.
+ COMPREPLY=( $options )
+ return 0
+ ;;
+ esac
+} &&
+complete -F _dpkg_source dpkg-source
+
+# Debian Linux dselect(8) completion.
+#
+have dselect &&
+_dselect()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --admindir)
+ _filedir -d
+ return 0
+ ;;
+
+ -@(D|debug))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
+ --license --expert --debug' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'access update select install config \
+ remove quit' -- $cur ) )
+ fi
+
+
+ return 0
+} &&
+complete -F _dselect $filenames dselect
+
+# Java completion
+#
+
+# available path elements completion
+have java && {
+_java_path()
+{
+ cur=${cur##*:}
+ _filedir '@(jar|zip)'
+}
+
+# exact classpath determination
+_java_find_classpath()
+{
+ local i
+
+ # search first in current options
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -@(cp|classpath) ]]; then
+ classpath=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ # default to environment
+ [ -z "$classpath" ] && classpath=$CLASSPATH
+
+ # default to current directory
+ [ -z "$classpath" ] && classpath=.
+}
+
+# exact sourcepath determination
+_java_find_sourcepath()
+{
+ local i
+
+ # search first in current options
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -sourcepath ]]; then
+ sourcepath=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ # default to classpath
+ [ -z "$sourcepath" ] && _java_find_classpath
+ sourcepath=$classpath
+}
+
+# available classes completion
+_java_classes()
+{
+ local classpath i
+
+ # find which classpath to use
+ _java_find_classpath
+
+ # convert package syntax to path syntax
+ cur=${cur//.//}
+ # parse each classpath element for classes
+ for i in ${classpath//:/ }; do
+ if [ -r $i ] && [[ "$i" == *.@(jar|zip) ]]; then
+ if type zipinfo &> /dev/null; then
+ COMPREPLY=( ${COMPREPLY[@]} $( zipinfo -1 \
+ "$i" | grep "^$cur" | grep '\.class$' | \
+ grep -v "\\$" ) )
+ else
+ COMPREPLY=( ${COMPREPLY[@]} $( jar tf "$i" \
+ "$cur" | grep "\.class$" | grep -v "\\$" ) )
+ fi
+
+ elif [ -d $i ]; then
+ i=${i%/}
+ COMPREPLY=( ${COMPREPLY[@]} $( find "$i" -type f \
+ -path "$i/$cur*.class" 2>/dev/null | \
+ grep -v "\\$" | sed -e "s|^$i/||" ) )
+ fi
+ done
+
+ # remove class extension
+ COMPREPLY=( ${COMPREPLY[@]%.class} )
+ # convert path syntax to package syntax
+ COMPREPLY=( ${COMPREPLY[@]//\//.} )
+}
+
+# available packages completion
+_java_packages()
+{
+ local sourcepath i
+
+ # find wich sourcepath to use
+ _java_find_sourcepath
+
+ # convert package syntax to path syntax
+ cur=${cur//.//}
+ # parse each sourcepath element for packages
+ for i in ${sourcepath//:/ }; do
+ if [ -d $i ]; then
+ COMPREPLY=( ${COMPREPLY[@]} $( command ls -F -d \
+ $i/$cur* 2>/dev/null | sed -e 's|^'$i'/||' ) )
+ fi
+ done
+ # keep only packages
+ COMPREPLY=( $( echo ${COMPREPLY[@]} | tr " " "\n" | grep "/$" ) )
+ # remove packages extension
+ COMPREPLY=( ${COMPREPLY[@]%/} )
+ # convert path syntax to package syntax
+ cur=${COMPREPLY[@]//\//.}
+}
+
+# java completion
+#
+_java()
+{
+ local cur prev i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for ((i=1; i < $COMP_CWORD; i++)); do
+ case ${COMP_WORDS[$i]} in
+ -cp|-classpath)
+ ((i++)) # skip the classpath string.
+ ;;
+ -*)
+ # this is an option, not a class/jarfile name.
+ ;;
+ *)
+ # once we've seen a class, just do filename completion
+ _filedir
+ return 0
+ ;;
+ esac
+ done
+
+ case $prev in
+ -@(cp|classpath))
+ _java_path
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-client -hotspot -server -classic \
+ -cp -classpath -D -verbose -verbose:class \
+ -verbose:gc -version:jni -version \
+ -showversion -? -help -X -jar \
+ -ea -enableassertions -da -disableassertions \
+ -esa -enablesystemassertions \
+ -dsa -disablesystemassertions ' -- $cur ) )
+ else
+ if [[ "$prev" == -jar ]]; then
+ # jar file completion
+ _filedir jar
+ else
+ # classes completion
+ _java_classes
+ fi
+ fi
+}
+complete -F _java $filenames java
+}
+
+# javadoc completion
+#
+have javadoc &&
+_javadoc()
+{
+ COMPREPLY=()
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -@(overview|helpfile|stylesheetfile))
+ _filedir
+ return 0
+ ;;
+ -d)
+ _filedir -d
+ return 0
+ ;;
+ -@(classpath|bootclasspath|docletpath|sourcepath|extdirs))
+ _java_path
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-overview -public -protected \
+ -package -private -help -doclet -docletpath \
+ -sourcepath -classpath -exclude -subpackages \
+ -breakiterator -bootclasspath -source -extdirs \
+ -verbose -locale -encoding -J -d -use -version \
+ -author -docfilessubdirs -splitindex \
+ -windowtitle -doctitle -header -footer -bottom \
+ -link -linkoffline -excludedocfilessubdir \
+ -group -nocomment -nodeprecated -noqualifier \
+ -nosince -nodeprecatedlist -notree -noindex \
+ -nohelp -nonavbar -quiet -serialwarn -tag \
+ -taglet -tagletpath -charset -helpfile \
+ -linksource -stylesheetfile -docencoding' -- \
+ $cur ) )
+ else
+ # source files completion
+ _filedir java
+ # packages completion
+ _java_packages
+ fi
+} &&
+complete -F _javadoc $filenames javadoc
+
+# javac completion
+#
+have javac &&
+_javac()
+{
+ COMPREPLY=()
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -d)
+ _filedir -d
+ return 0
+ ;;
+ -@(classpath|bootclasspath|sourcepath|extdirs))
+ _java_path
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-g -g:none -g:lines -g:vars\
+ -g:source -O -nowarn -verbose -deprecation -classpath\
+ -sourcepath -bootclasspath -extdirs -d -encoding -source\
+ -target -help' -- $cur ) )
+ else
+ # source files completion
+ _filedir java
+ fi
+} &&
+complete -F _javac $filenames javac
+
+# PINE address-book completion
+#
+have pine &&
+_pineaddr()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -W '$( awk "{print \$1}" ~/.addressbook 2>/dev/null)' \
+ -- $cur ) )
+} &&
+complete -F _pineaddr $default pine
+
+# mutt completion
+#
+# Mutt doesn't have an "addressbook" like Pine, but it has aliases and
+# a "query" function to retrieve addresses, so that's what we use here.
+have mutt || have muttng && {
+_muttaddr()
+{
+ _muttaliases
+ _muttquery
+ return 0
+}
+
+_muttconffiles()
+{
+ local file sofar
+ local -a newconffiles
+
+ sofar=" $1 "
+ shift
+ while [[ "$1" ]]; do
+ newconffiles=( $(sed -rn 's|^source[[:space:]]+([^[:space:]]+).*$|\1|p' $(eval echo $1) ) )
+ for file in ${newconffiles[@]}; do
+ [[ ! "$file" ]] || [[ "${sofar/ ${file} / }" != "$sofar" ]] &&
+ continue
+ sofar="$sofar $file"
+ sofar=" $(eval _muttconffiles \"$sofar\" $file) "
+ done
+ shift
+ done
+ echo $sofar
+}
+
+_muttaliases()
+{
+ local cur muttrc
+ local -a conffiles aliases
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ [ -f ~/.${muttcmd}/${muttcmd}rc ] && muttrc="~/.${muttcmd}/${muttcmd}rc"
+ [ -f ~/.${muttcmd}rc ] && muttrc="~/.${muttcmd}rc"
+ [ -z "$muttrc" ] && return 0
+
+ conffiles=( $(eval _muttconffiles $muttrc $muttrc) )
+ aliases=( $( sed -rn 's|^alias[[:space:]]+([^[:space:]]+).*$|\1|p' \
+ $(eval echo ${conffiles[@]}) ) )
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -W "${aliases[*]}" -- $cur ) )
+
+ return 0
+}
+
+_muttquery()
+{
+ local cur querycmd
+ local -a queryresults
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ querycmd="$( $muttcmd -Q query_command | sed -r 's|^query_command=\"(.*)\"$|\1|; s|%s|'$cur'|' )"
+ if [ -z "$cur" -o -z "$querycmd" ]; then
+ queryresults=()
+ else
+ queryresults=( $( $querycmd | \
+ sed -nr '2,$s|^([^[:space:]]+).*|\1|p' ) )
+ fi
+
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -W "${queryresults[*]}" \
+ -- $cur ) )
+
+ return 0
+}
+
+_muttfiledir()
+{
+ local cur folder spoolfile
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # This is currently not working so well. Perhaps this function should
+ # just call _filedir() for the moment.
+ if [[ $cur == [=+]* ]]; then
+ folder="$( $muttcmd -Q folder | sed -r 's|^folder=\"(.*)\"$|\1|' )"
+ : folder:=~/Mail
+
+ # Match any file in $folder beginning with $cur
+ # (minus the leading '=' sign).
+ COMPREPLY=( $( compgen -f -- "$folder/${cur:1}" ) )
+ COMPREPLY=( ${COMPREPLY[@]#$folder/} )
+ return 0
+ elif [ "$cur" == !* ]; then
+ spoolfile="$( $muttcmd -Q spoolfile | sed -r 's|^spoolfile=\"(.*)\"$|\1|' )"
+ [ ! -z "$spoolfile" ] && eval cur="${cur/^!/$spoolfile}";
+ fi
+ _filedir
+
+ return 0
+}
+
+_mutt()
+{
+ local cur prev
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ COMPREPLY=()
+
+ [ ${COMP_WORDS[0]} == muttng ] && muttcmd="muttng" || muttcmd="mutt"
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-A -a -b -c -e -f -F -H -i -m -n \
+ -p -Q -R -s -v -x -y -z -Z -h' \
+ -- $cur ) )
+ return 0
+ ;;
+ *)
+ case "$prev" in
+ -@(a|f|F|H|i))
+ _muttfiledir
+ return 0
+ ;;
+ -A)
+ _muttaliases
+ return 0
+ ;;
+ -@(e|m|Q|s|h|p|R|v|y|z|Z))
+ return 0
+ ;;
+ *)
+ _muttaddr
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+
+}
+complete -F _mutt $default $filenames mutt muttng
+}
+
+_configure_func()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # if $COMP_CONFIGURE_HINTS is not null, then completions of the form
+ # --option=SETTING will include 'SETTING' as a contextual hint
+ [[ "$cur" != -* ]] && return 0
+
+ if [ -n "$COMP_CONFIGURE_HINTS" ]; then
+ COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' | grep ^$cur ) )
+
+ else
+ COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,=].*//g' | grep ^$cur ) )
+ fi
+}
+complete -F _configure_func $default configure
+
+# Debian reportbug(1) completion
+#
+have reportbug &&
+_reportbug()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -f|--filename|-i|--include|--mta|-o|--output)
+ _filedir
+ return 0
+ ;;
+ -B|--bts)
+ COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
+ $cur ))
+ return 0
+ ;;
+ -e|--editor|--mua)
+ COMP_WORDS=(COMP_WORDS[0] $cur)
+ COMP_CWORD=1
+ _command
+ return 0
+ ;;
+ --mode)
+ COMPREPLY=( $( compgen -W "novice standard expert" -- $cur ) )
+ return 0
+ ;;
+ -S|--severity)
+ COMPREPLY=( $( compgen -W "grave serious important normal \
+ minor wishlist" -- $cur ) )
+ return 0
+ ;;
+ -u|--ui|--interface)
+ COMPREPLY=( $( compgen -W "newt text gnome" -- $cur ) )
+ return 0
+ ;;
+ -t|--type)
+ COMPREPLY=( $( compgen -W "gnats debbugs" -- $cur ) )
+ return 0
+ ;;
+ -T|--tags)
+ COMPREPLY=( $( compgen -W "none patch security upstream sid \
+ woody potato sarge fixed" -- $cur ))
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=($( compgen -W '-h --help -v --version -a --af -b \
+ --no-query-bts --query-bts -B --bts -c --configure \
+ --no-config-files --check-available -d --debug \
+ --no-check-available -e --editor --email -f \
+ --filename -g --gnupg -H --header -i --include -j \
+ --justification -l --ldap --no-ldap -L --list-cc -m \
+ --maintonly --mode --mua --mta --mutt -n --mh --nmh \
+ -o --output -p --print -P --pgp --proxy --http_proxy\
+ -q --quiet -Q --query-only --realname --report-quiet \
+ --reply-to --replyto -s --subject -S --severity \
+ --smtphost -t --type -T --tags --template -V -x \
+ --no-cc --package-version -z --no-compress \
+ --ui --interface -u \
+ wnpp boot-floppies kernel-image' -- $cur ) \
+ $( apt-cache pkgnames -- $cur 2> /dev/null ) )
+ _filedir
+ return 0
+} &&
+complete -F _reportbug $filenames reportbug
+
+# Debian querybts(1) completion
+#
+have querybts &&
+_querybts()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -B|--bts)
+ COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
+ $cur ))
+ return 0
+ ;;
+ -u|--ui|--interface)
+ COMPREPLY=($( compgen -W "newt text gnome" -- $cur ))
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=($( compgen -W '-h --help -v --version -A --archive \
+ -B --bts -l --ldap --no-ldap --proxy= --http_proxy= \
+ -s --source -w --web -u --ui --interface \
+ wnpp boot-floppies' -- $cur ) \
+ $( apt-cache pkgnames -- $cur 2> /dev/null ) )
+} &&
+complete -F _querybts $filenames querybts
+
+# update-alternatives completion
+#
+have update-alternatives && {
+installed_alternatives()
+{
+ local admindir
+ # find the admin dir
+ for i in alternatives dpkg/alternatives rpm/alternatives; do
+ [ -d /var/lib/$i ] && admindir=/var/lib/$i && break
+ done
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == --admindir ]]; then
+ admindir=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ COMPREPLY=( $( command ls $admindir | grep "^$cur" ) )
+}
+
+_update_alternatives()
+{
+ local cur prev mode args i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --@(altdir|admindir))
+ _filedir -d
+ return 0
+ ;;
+ --@(help|version))
+ return 0
+ ;;
+ esac
+
+ # find wich mode to use and how many real args used so far
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == --@(install|remove|auto|display|config) ]]; then
+ mode=${COMP_WORDS[i]}
+ args=$(($COMP_CWORD - i))
+ break
+ fi
+ done
+
+ case $mode in
+ --install)
+ case $args in
+ 1)
+ _filedir
+ ;;
+ 2)
+ installed_alternatives
+ ;;
+ 3)
+ _filedir
+ ;;
+ esac
+ ;;
+ --remove)
+ case $args in
+ 1)
+ installed_alternatives
+ ;;
+ 2)
+ _filedir
+ ;;
+ esac
+ ;;
+ --auto)
+ installed_alternatives
+ ;;
+ --display)
+ installed_alternatives
+ ;;
+ --config)
+ installed_alternatives
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W '--verbose --quiet --help --version \
+ --altdir --admindir' -- $cur ) \
+ $( compgen -W '--install --remove --auto --display \
+ --config' -- $cur ) )
+ esac
+}
+complete -F _update_alternatives update-alternatives
+}
+
+# Python completion
+#
+have python &&
+_python()
+{
+ local prev cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]##*/}
+
+ case "$prev" in
+ -Q)
+ COMPREPLY=( $( compgen -W "old new warn warnall" -- $cur ) )
+ return 0
+ ;;
+ -W)
+ COMPREPLY=( $( compgen -W "ignore default all module once error" -- $cur ) )
+ return 0
+ ;;
+ -c)
+ _filedir '@(py|pyc|pyo)'
+ return 0
+ ;;
+ !(python|-?))
+ [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
+ ;;
+ esac
+
+
+ # if '-c' is already given, complete all kind of files.
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -c ]]; then
+ _filedir
+ fi
+ done
+
+
+ if [[ "$cur" != -* ]]; then
+ _filedir '@(py|pyc|pyo)'
+ else
+ COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \
+ -U -v -V -W -x -c" -- $cur ) )
+ fi
+
+
+
+ return 0
+} &&
+complete -F _python $filenames python
+
+# Perl completion
+#
+have perl &&
+{
+_perlmodules()
+{
+ COMPREPLY=( $( compgen -P "$prefix" -W "$( perl -e 'sub mods { my ($base,$dir)=@_; return if $base !~ /^\Q$ENV{cur}/; chdir($dir) or return; for (glob(q[*.pm])) {s/\.pm$//; print qq[$base$_\n]}; mods(/^(?:[.\d]+|$Config{archname}-$Config{osname}|auto)$/ ? undef : qq[${base}${_}\\\\:\\\\:],qq[$dir/$_]) for grep {-d} glob(q[*]); } mods(undef,$_) for @INC;' )" -- $cur ) )
+}
+
+_perl()
+{
+ local cur prev prefix temp
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ prefix=""
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -?* ]]; then
+ temp=$cur
+ prev=${temp:0:2}
+ cur=${temp:2}
+ prefix=$prev
+ fi
+
+ # only handle module completion for now
+ case "$prev" in
+ -m|-M)
+ _perlmodules
+ return 0
+ ;;
+ esac
+
+ # handle case where first parameter is not a dash option
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]]; then
+ _filedir
+ return 0
+ fi
+
+ # complete using basic options
+ 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 ) )
+ return 0
+}
+complete -F _perl $filenames perl
+
+_perldoc()
+{
+ local cur prev prefix temp
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ prefix=""
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -?* ]]; then
+ temp=$cur
+ prev=${temp:0:2}
+ cur=${temp:2}
+ prefix=$prev
+ fi
+
+ # complete builtin perl functions
+ case $prev in
+ -f)
+ COMPREPLY=( $( compgen -W 'chomp chop chr crypt hex index lc \
+ lcfirst length oct ord pack q qq reverse rindex sprintf \
+ substr tr uc ucfirst y m pos quotemeta s split study qr abs \
+ atan2 cos exp hex int log oct rand sin sqrt srand pop push \
+ shift splice unshift grep join map qw reverse sort unpack \
+ delete each exists keys values binmode close closedir \
+ dbmclose dbmopen die eof fileno flock format getc print \
+ printf read readdir rewinddir seek seekdir select syscall \
+ sysread sysseek syswrite tell telldir truncate warn write \
+ pack read syscall sysread syswrite unpack vec -X chdir chmod \
+ chown chroot fcntl glob ioctl link lstat mkdir open opendir \
+ readlink rename rmdir stat symlink umask unlink utime caller \
+ continue do dump eval exit goto last next redo return \
+ sub wantarray caller import local my our package use defined \
+ formline reset scalar undef \
+ alarm exec fork getpgrp getppid getpriority kill pipe qx \
+ setpgrp setpriority sleep system times wait waitpid \
+ import no package require use bless dbmclose dbmopen package \
+ ref tie tied untie use accept bind connect getpeername \
+ getsockname getsockopt listen recv send setsockopt shutdown \
+ socket socketpair msgctl msgget msgrcv msgsnd semctl semget \
+ semop shmctl shmget shmread shmwrite endgrent endhostent \
+ endnetent endpwent getgrent getgrgid getgrnam getlogin \
+ getpwent getpwnam getpwuid setgrent setpwent endprotoent \
+ endservent gethostbyaddr gethostbyname gethostent \
+ getnetbyaddr getnetbyname getnetent getprotobyname \
+ getprotobynumber getprotoent getservbyname getservbyport \
+ getservent sethostent setnetent setprotoent setservent \
+ gmtime localtime time times' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case $cur in
+ -*)
+ COMPREPLY=( $( compgen -W '-h -v -t -u -m -l -F -X -f -q' -- $cur ))
+ return 0
+ ;;
+ */*)
+ return 0
+ ;;
+ *)
+ _perlmodules
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -W '$( PAGER=cat man perl 2>/dev/null | sed -ne "/perl.*Perl overview/,/perlwin32/s/^[^a-z0-9]*\([a-z0-9]*\).*$/\1/p")' -- $cur ) )
+
+ return 0
+ ;;
+ esac
+}
+complete -F _perldoc $default perldoc
+}
+
+# rcs(1) completion
+#
+have rcs &&
+_rcs()
+{
+ local cur prev file dir i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ file=${cur##*/}
+ dir=${cur%/*}
+
+ # deal with relative directory
+ [ "$file" = "$dir" ] && dir=.
+
+ COMPREPLY=( $( compgen -f "$dir/RCS/$file" ) )
+
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ file=${COMPREPLY[$i]##*/}
+ dir=${COMPREPLY[$i]%RCS/*}
+ COMPREPLY[$i]=$dir$file
+ done
+
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -G "$dir/$file*,v" ) )
+
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[$i]=${COMPREPLY[$i]%,v}
+ done
+
+ # default to files if nothing returned and we're checking in.
+ # otherwise, default to directories
+ [ ${#COMPREPLY[@]} -eq 0 -a $1 = ci ] && _filedir || _filedir -d
+} &&
+complete -F _rcs $filenames ci co rlog rcs rcsdiff
+
+# lilo(8) completion
+#
+have lilo && {
+_lilo_labels()
+{
+ COMPREPLY=( $( awk -F'=' '/label/ {print $2}' \
+ /etc/lilo.conf | sed -e 's/"//g' | grep "^$cur" ) )
+}
+
+_lilo()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -@(C|i|m|s|S))
+ _filedir
+ return 0
+ ;;
+ -r)
+ _filedir -d
+ return 0
+ ;;
+ -@(I|D|R))
+ # label completion
+ _lilo_labels
+ return 0
+ ;;
+ -@(A|b|M|u|U))
+ # device completion
+ cur=${cur:=/dev/}
+ _filedir
+ return 0
+ ;;
+ -T)
+ # topic completion
+ COMPREPLY=( $( compgen -W 'help ChRul EBDA geom geom= \
+ table= video' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-A -b -c -C -d -f -g -i -I -l -L -m \
+ -M -p -P -q -r -R -s -S -t -T -u -U -v -V -w -x -z' -- \
+ $cur ) )
+ fi
+}
+complete -F _lilo lilo
+}
+
+# links completion
+#
+have links &&
+_links()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ --*)
+ COMPREPLY=( $( compgen -W '--help' -- $cur ) )
+ ;;
+ -*)
+ COMPREPLY=( $( compgen -W '-async-dns -max-connections \
+ -max-connections-to-host -retries \
+ -receive-timeout -unrestartable-receive-timeout\
+ -format-cache-size -memory-cache-size \
+ -http-proxy -ftp-proxy -download-dir \
+ -assume-codepage -anonymous -dump -no-connect \
+ -source -version -help' -- $cur ) )
+ ;;
+ *)
+ if [ -r ~/.links/links.his ]; then
+ COMPREPLY=( $( compgen -W '$( < ~/.links/links.his )' \
+ -- $cur ) )
+ fi
+ _filedir '@(htm|html)'
+ return 0
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _links $filenames links
+
+[ $UNAME = FreeBSD ] && {
+# FreeBSD package management tool completion
+#
+_pkg_delete()
+{
+ local cur pkgdir prev
+
+ pkgdir=${PKG_DBDIR:-/var/db/pkg}/
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ "$prev" = "-o" -o "$prev" = "-p" -o "$prev" = "-W" ] && return 0
+
+ COMPREPLY=( $( compgen -d $pkgdir$cur ) )
+ COMPREPLY=( ${COMPREPLY[@]#$pkgdir} )
+
+ return 0
+}
+complete -F _pkg_delete $dirnames pkg_delete pkg_info
+have pkg_deinstall && complete -F _pkg_delete $dirnames pkg_deinstall
+
+# FreeBSD kernel module commands
+#
+_kldload()
+{
+ local cur moddir
+
+ moddir=/modules/
+ [ -d $moddir ] || moddir=/boot/kernel/
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -f $moddir$cur ) )
+ COMPREPLY=( ${COMPREPLY[@]#$moddir} )
+ COMPREPLY=( ${COMPREPLY[@]%.ko} )
+
+ return 0
+}
+complete -F _kldload $filenames kldload
+
+_kldunload()
+{
+ local cur
+ cur=${COMP_WORDS[COMP_CWORD]}
+ COMPREPLY=( $(kldstat | sed -ne "s/^.*[ \t]\+\($cur[a-z_]\+\).ko$/\1/p") )
+}
+complete -F _kldunload $filenames kldunload
+}
+
+# FreeBSD portupgrade completion
+#
+have portupgrade &&
+_portupgrade()
+{
+ local cur pkgdir prev
+
+ pkgdir=${PKG_DBDIR:-/var/db/pkg}/
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0
+
+ COMPREPLY=( $( compgen -d $pkgdir$cur ) )
+ COMPREPLY=( ${COMPREPLY[@]#$pkgdir} )
+ COMPREPLY=( ${COMPREPLY[@]%-*} )
+
+ return 0
+} &&
+complete -F _portupgrade $dirnames portupgrade
+
+# FreeBSD portinstall completion
+#
+have portinstall &&
+_portinstall()
+{
+ local cur portsdir prev indexfile
+ local -a COMPREPLY2
+
+ portsdir=${PORTSDIR:-/usr/ports}/
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ # First try INDEX-5
+ indexfile=$portsdir/INDEX-5
+ # Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x
+ [ "${OSTYPE%.*}" = "freebsd5" -a -f $indexfile ] ||
+ indexfile=$portsdir/INDEX
+
+ [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0
+
+ COMPREPLY=( $( egrep "^$cur" < $indexfile | cut -d'|' -f1 ) )
+ COMPREPLY2=( $( egrep "^[^\|]+\|$portsdir$cur" < $indexfile | \
+ cut -d'|' -f2 ) )
+ COMPREPLY2=( ${COMPREPLY2[@]#$portsdir} )
+ COMPREPLY=( ${COMPREPLY[@]} ${COMPREPLY2[@]} )
+
+ return 0
+} &&
+complete -F _portinstall $dirnames portinstall
+
+# Slackware Linux removepkg completion
+#
+have removepkg && [ -f /etc/slackware-version ] &&
+_removepkg()
+{
+ local packages cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( (cd /var/log/packages; compgen -f -- "$cur") ) )
+} &&
+complete -F _removepkg $filenames removepkg &&
+ complete $dirnames -f -X '!*.tgz' installpkg upgradepkg explodepkg
+
+# look(1) completion
+#
+have look &&
+_look()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD = 1 ]; then
+ COMPREPLY=( $( compgen -W '$(look $cur)' ) )
+ fi
+} &&
+complete -F _look $default look
+
+# ypcat(1) and ypmatch(1) completion
+#
+have ypmatch &&
+_ypmatch()
+{
+ local cur map
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ [ $1 = ypcat ] && [ $COMP_CWORD -gt 1 ] && return 0
+ [ $1 = ypmatch ] && [ $COMP_CWORD -gt 2 ] && return 0
+
+ if [ $1 = ypmatch ] && [ $COMP_CWORD -eq 1 ] && \
+ [ ${#COMP_WORDS[@]} -eq 3 ]; then
+ map=${COMP_WORDS[2]}
+ COMPREPLY=( $( compgen -W '$( ypcat $map | \
+ cut -d':' -f 1 )' -- $cur) )
+ else
+ [ $1 = ypmatch ] && [ $COMP_CWORD -ne 2 ] && return 0
+ COMPREPLY=( $( compgen -W \
+ '$( echo $(ypcat -x | cut -d"\"" -f 2))' -- $cur))
+ fi
+
+ return 0
+} &&
+complete -F _ypmatch ypmatch ypcat
+
+# mplayer(1) completion
+#
+have mplayer && {
+_mplayer_options_list()
+{
+ cur=${cur%\\}
+ COMPREPLY=( $( $1 $2 help 2> /dev/null | \
+ sed -e '1,/^Available/d' | awk '{print $1}' | \
+ sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' | \
+ grep "^$cur" ) )
+}
+
+_mplayer()
+{
+ local cmd cur prev skinsdir IFS=$' \t\n' i j k=0
+
+ COMPREPLY=()
+ cmd=${COMP_WORDS[0]}
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(ac|afm|vc|vfm|ao|vo|vop|fstype))
+ _mplayer_options_list mplayer $prev
+ return 0
+ ;;
+ -@(oac|ovc|of))
+ _mplayer_options_list mencoder $prev
+ return 0
+ ;;
+ -audiofile)
+ _filedir '@(mp3|MP3|mpg|MPG|ogg|OGG|wav|WAV|mid|MID)'
+ return 0
+ ;;
+ -font)
+ _filedir '@(desc|ttf)'
+ return 0
+ ;;
+ -sub)
+ _filedir '@(srt|SRT|sub|SUB|txt|TXT|utf|UTF|rar|RAR|mpsub|smi|js)'
+ return 0
+ ;;
+ -vobsub)
+ _filedir '@(idx|IDX|ifo|IFO|sub|SUB)'
+ IFS=$'\t\n'
+ COMPREPLY=( $( for i in ${COMPREPLY[@]}; do
+ if [ -f $i -a -r $i ]; then
+ echo ${i%.*}
+ else
+ echo $i
+ fi
+ done ) )
+ IFS=$' \t\n'
+ return 0
+ ;;
+ -ifo)
+ _filedir '@(ifo|IFO)'
+ return 0
+ ;;
+ -cuefile)
+ _filedir '@(bin|BIN|cue|CUE)'
+ return 0
+ ;;
+ -skin)
+ # if you don't have installed mplayer in /usr/local you
+ # may want to set the MPLAYER_SKINS_DIR global variable
+ if [ -n "$MPLAYER_SKINS_DIR" ]; then
+ skinsdir=$MPLAYER_SKINS_DIR
+ else
+ skinsdir=/usr/local/share/mplayer/Skin
+ fi
+
+ IFS=$'\t\n'
+ for i in ~/.mplayer/Skin $skinsdir; do
+ if [ -d $i -a -r $i ]; then
+ for j in $( compgen -d $i/$cur ); do
+ COMPREPLY[$k]=${j#$i/}
+ k=$((++k))
+ done
+ fi
+ done
+ IFS=$' \t\n'
+ return 0
+ ;;
+ -@(mixer|@(cdrom|dvd)-device|dvdauth|fb|zrdev))
+ cur=${cur:=/dev/}
+ _filedir
+ return 0
+ ;;
+ -@(edl?(out)|lircconf|menu-cfg|playlist|csslib|dumpfile)| \
+ -@(subfile|vobsub|aofile|fbmodeconfig|include|o|dvdkey)| \
+ -passlogfile)
+ _filedir
+ return 0
+ ;;
+ -@(auto@(q|sync)|loop|menu-root|speed|sstep|aid|alang)| \
+ -@(?(@(audio|sub)-)demuxer|bandwidth|cache|chapter)| \
+ -@(dvd?(angle)|fps|frames|mc|passwd|user|sb|srate|ss|vcd)| \
+ -@(vi?(d|vo)|ffactor|sid|slang|spu@(align|aa|gauss))| \
+ -@(vobsubid|delay|bpp|brightness|contrast|dfbopts|display)| \
+ -@(fbmode|geometry|guiwid|hue|icelayer|screen[wh]|wid)| \
+ -@(monitor@(aspect|-@(dotclock|[hv]freq))|panscan|saturation)| \
+ -@(xineramascreen|zr@(crop|norm|quality|[xy]doff|[vh]dec))| \
+ -@(aspect|pp|x|y|xy|z|stereo|audio-@(density|delay|preload))| \
+ -@(endpos|osdlevel|ffourcc|sws|channels|skiplimit|format)| \
+ -@(ofps|aa@(driver|@(osd|sub)color)|vobsubout?(i@(ndex|d)))| \
+ -sub@(-bg-@(alpha|color)|cp|delay|fps|pos|align|width)| \
+ -sub@(font-@(blur|outline|autoscale|encoding|@(osd|text)-scale)))
+ return 0
+ ;;
+ -lavdopts)
+ COMPREPLY=( $( compgen -W 'ec er= bug= idct= gray' \
+ -- $cur ) )
+ return 0
+ ;;
+ -lavcopts)
+ COMPREPLY=( $( compgen -W 'vcodec= vqmin= vqscale= \
+ vqmax= mbqmin= mbqmax= vqdiff= \
+ vmax_b_frames= vme= vhq v4mv \
+ keyint= vb_strategy= vpass= \
+ aspect= vbitrate= vratetol= \
+ vrc_maxrate= vrc_minrate= \
+ vrc_buf_size= vb_qfactor= vi_qfactor= \
+ vb_qoffset= vi_qoffset= vqblur= \
+ vqcomp= vrc_eq= vrc_override= \
+ vrc_init_cplx= vqsquish= vlelim= \
+ vcelim= vstrict= vdpart vpsize= gray \
+ vfdct= idct= lumi_mask= dark_mask= \
+ tcplx_mask= scplx_mask= naq ildct \
+ format= pred qpel precmp= cmp= \
+ subcmp= predia= dia= trell last_pred= \
+ preme= subq= psnr mpeg_quant aic umv' \
+ -- $cur ) )
+ return 0
+ ;;
+ -ssf)
+ COMPREPLY=( $( compgen -W 'lgb= cgb= ls= cs= chs= \
+ cvs=' -- $cur ) )
+ return 0
+ ;;
+ -jpeg)
+ COMPREPLY=( $( compgen -W 'noprogressive progressive \
+ nobaseline baseline optimize= \
+ smooth= quality= outdir=' -- $cur ) )
+ return 0
+ ;;
+ -xvidopts)
+ COMPREPLY=( $( compgen -W 'dr2 nodr2' -- $cur ) )
+ return 0
+ ;;
+ -xvidencopts)
+ COMPREPLY=( $( compgen -W 'pass= bitrate= \
+ fixed_quant= me_quality= 4mv \
+ rc_reaction_delay_factor= \
+ rc_averaging_period= rc_buffer= \
+ quant_range= min_key_interval= \
+ max_key_interval= mpeg_quant \
+ mod_quant lumi_mask hintedme \
+ hintfile debug keyframe_boost= \
+ kfthreshold= kfreduction=' -- $cur ) )
+ return 0
+ ;;
+ -divx4opts)
+ COMPREPLY=( $( compgen -W 'br= key= deinterlace q= \
+ min_quant= max_quant= rc_period= \
+ rc_reaction_period= crispness= \
+ rc_reaction_ratio= pass= vbrpass= \
+ help' -- $cur ) )
+ return 0
+ ;;
+ -info)
+ COMPREPLY=( $( compgen -W 'name= artist= genre= \
+ subject= copyright= srcform= \
+ comment= help' -- $cur ) )
+ return 0
+ ;;
+ -lameopts)
+ COMPREPLY=( $( compgen -W 'vbr= abr cbr br= q= aq= \
+ ratio= vol= mode= padding= fast \
+ preset= help' -- $cur ) )
+ return 0
+ ;;
+ -rawaudio)
+ COMPREPLY=( $( compgen -W 'on channels= rate= \
+ samplesize= format=' -- $cur ) )
+ return 0
+ ;;
+ -rawvideo)
+ COMPREPLY=( $( compgen -W 'on fps= sqcif qcif cif \
+ 4cif pal ntsc w= h= y420 yv12 yuy2 \
+ y8 format= size=' -- $cur ) )
+ return 0
+ ;;
+ -aop)
+ COMPREPLY=( $( compgen -W 'list= delay= format= fout= \
+ volume= mul= softclip' -- $cur ) )
+ return 0
+ ;;
+ -dxr2)
+ COMPREPLY=( $( compgen -W 'ar-mode= iec958-encoded \
+ iec958-decoded mute ucode= 75ire bw \
+ color interlaced macrovision= norm= \
+ square-pixel ccir601-pixel cr-left= \
+ cr-right= cr-top= cr-bot= ck-rmin= \
+ ck-gmin= ck-bmin= ck-rmax= ck-gmax= \
+ ck-bmax= ck-r= ck-g= ck-b= \
+ ignore-cache= ol-osd= olh-cor= \
+ olw-cor= olx-cor= oly-cor= overlay \
+ overlay-ratio= update-cache' -- $cur ))
+ return 0
+ ;;
+ -tv)
+ COMPREPLY=( $( compgen -W 'on noaudio driver= device= \
+ input= freq= outfmt= width= height= \
+ buffersize= norm= channel= chanlist= \
+ audiorate= forceaudio alsa amode= \
+ forcechan= adevice= audioid= volume= \
+ bass= treble= balance= fps= \
+ channels= immediatemode=' -- $cur ) )
+ return 0
+ ;;
+ -mf)
+ COMPREPLY=( $( compgen -W 'on w= h= fps= type=' \
+ -- $cur ) )
+ return 0
+ ;;
+ -cdda)
+ COMPREPLY=( $( compgen -W 'speed= paranoia= \
+ generic-dev= sector-size= overlap= \
+ toc-bias toc-offset= skip noskip' \
+ -- $cur ) )
+ return 0
+ ;;
+ -input)
+ COMPREPLY=( $( compgen -W 'conf= ar-delay ar-rate \
+ keylist cmdlist js-dev file' -- $cur ) )
+ return 0
+ ;;
+ -af)
+ COMPREPLY=( $( compgen -W 'resample resample= \
+ channels channels= format format= \
+ volume volume= delay delay= pan \
+ pan= sub sub= surround surround=' \
+ -- $cur ) )
+ return 0
+ ;;
+ -af-adv)
+ COMPREPLY=( $( compgen -W 'force= list=' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-aid -alang -audio-demuxer \
+ -audiofile -cdrom-device -cache -cdda \
+ -channels -chapter -csslib -demuxer \
+ -dvd -dvd-device -dvdangle -dvdauth \
+ -dvdkey -dvdnav -forceidx -fps -frames \
+ -hr-mp3-seek -idx -mc -mf -ni -nobps \
+ -passwd -rawaudio -rtsp-stream-over-tcp\
+ -skipopening -sb -srate -ss -tv -user \
+ -vcd -vid -vivo -ifo -ffactor -font \
+ -noautosub -nooverlapsub -sid -slang \
+ -sub -subcc -subcp -sub-demuxer \
+ -subdelay -subfont-autoscale \
+ -subfont-blur -subfont-encoding \
+ -subfont-osd-scale -subfont-outline \
+ -subfont-text-scale -subfps -subfile \
+ -subpos -unicode -utf8 -vobsub \
+ -vobsubid -ac -afm -aspect -flip \
+ -lavdopts -noaspect -nosound -pp -ssf \
+ -stereo -sws -vc -vfm -vop -xvidopts\
+ -xy -zoom -bandwidth -cuefile \
+ -noextbased -rawvideo -overlapsub \
+ -sub-bg-alpha -sub-bg-color -subalign \
+ -subwidth -sub-no-text-pp -spualign \
+ -spuaa -spugauss -pphelp -verbose -v \
+ -noni -noidx -nohr-mp3-seek -extbased \
+ -bps -oldpp -nozoom -noflip -nounicode \
+ -noutf8' -- $cur ) )
+ # add mplayer specific options
+ [[ "$cmd" == @(?(g)mplayer) ]] && COMPREPLY=( ${COMPREPLY[@]} \
+ $(compgen -W '-autoq -autosync -benchmark \
+ -framedrop -h -help -hardframedrop \
+ -identify -input -lircconf -loop \
+ -nojoystick -nolirc -nortc -playlist \
+ -quiet -really-quiet -rnd -sdp -skin \
+ -slave -softsleep -speed -sstep \
+ -use-stdin -dumpaudio -dumpfile \
+ -dumpstream -dumpvideo -dumpmicrodvdsub\
+ -dumpmpsub -dumpsrtsub -dumpjacosub \
+ -dumpsami -dumpsub -osdlevel -af \
+ -af-adv -ao -aofile -aop -delay -mixer \
+ -nowaveheader -bpp -brightness \
+ -contrast -display -double -dr -dxr2 \
+ -fb -fbmode -fbmodeconfig -forcexv -fs \
+ -geometry -hue -icelayer -jpeg \
+ -monitor-dotclock -monitor-hfreq \
+ -monitor-vfreq -monitoraspect \
+ -nograbpointer -noslices -panscan \
+ -rootwin -saturation -screenw -screenh \
+ -stop-xscreensaver -vm -vo -vsync -wid \
+ -xineramascreen -z -zrbw -zrcrop \
+ -zrdev -zrfd -zrhelp -zrnorm -zrquality \
+ -zrvdec -zrhdec -zrxdoff -zrydoff -y \
+ -edl -edlout -enqueue -fixed-vo \
+ -menu -menu-root -menu-cfg -shuffle \
+ -format -aahelp -dfbopts -fstype \
+ -guiwid -nokeepaspect -x --help \
+ -aaosdcolor -aasubcolor -aadriver \
+ -aaextended -aaeight' -- $cur) )
+ # add mencoder specific options
+ [[ "$cmd" = mencoder ]] && COMPREPLY=( ${COMPREPLY[@]} \
+ $(compgen -W '-audio-density -audio-delay \
+ -audio-preload -divx4opts -endpos \
+ -ffourcc -include -info -lameopts \
+ -lavcopts -noskip -o -oac -ofps -ovc \
+ -passlogfile -skiplimit -vobsubout \
+ -vobsuboutindex -vobsuboutid \
+ -xvidencopts -of --verbose' -- $cur) )
+ ;;
+ *)
+ _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|flv|FLV)'
+ ;;
+ esac
+
+ return 0
+}
+complete $filenames -F _mplayer mplayer mencoder gmplayer kplayer
+}
+
+# KDE dcop completion
+#
+have dcop &&
+_dcop()
+{
+ local cur compstr
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ if [ -z $cur ]; then
+ compstr=${COMP_WORDS[*]}
+ else
+ compstr=$( command echo ${COMP_WORDS[*]} | sed "s/ $cur$//" )
+ fi
+ COMPREPLY=( $( compgen -W '$( command $compstr | sed s/\(.*\)// )' -- $cur ) )
+} &&
+complete -F _dcop dcop
+
+# wvdial(1) completion
+#
+have wvdial &&
+_wvdial()
+{
+ local cur prev config i IFS=$'\t\n'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ --config)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ case $cur in
+ -*)
+ COMPREPLY=( $( compgen -W '--config --chat \
+ --remotename --help --version --no-syslog' \
+ -- $cur ) )
+ ;;
+ *)
+ # start with global and personal config files
+ config="/etc/wvdial.conf"$'\t'"$HOME/.wvdialrc"
+ # replace with command line config file if present
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == "--config" ]]; then
+ config=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ # parse config files for sections and
+ # remove default section
+ COMPREPLY=( $( sed -ne \
+ "s|^\[Dialer \($cur.*\)\]$|\1|p" \
+ $config 2>/dev/null |grep -v '^Defaults$'))
+ # escape spaces
+ COMPREPLY=${COMPREPLY// /\\ }
+ ;;
+ esac
+
+} &&
+complete -F _wvdial wvdial
+
+# gpg(1) completion
+#
+have gpg &&
+_gpg()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(s|-sign|-clearsign|-decrypt-files|-load-extension))
+ _filedir
+ return 0
+ ;;
+ --@(export|@(?(l|nr|nrl)sign|edit)-key))
+ # return list of public keys
+ COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*\(<\([^>]*\)>\).*$@\1 \3@p')" -- "$cur" ))
+ return 0
+ ;;
+ -@(r|-recipient))
+ COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*<\([^>]*\)>.*$@\1@p')" -- "$cur" ))
+ if [ -e ~/.gnupg/gpg.conf ]; then
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -W "$( sed -ne 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' ~/.gnupg/gpg.conf )" -- "$cur") )
+ fi
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-s -b -e -f -c -d -a -r -u -Z -o -v\
+ -q -n -N $(gpg --dump-options)' -- $cur ) )
+ fi
+
+} &&
+complete -F _gpg $default gpg
+
+# iconv(1) completion
+#
+have iconv &&
+_iconv()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|t|-@(from|to)-code))
+ COMPREPLY=( $( compgen -W \
+ '$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) )
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list
+ --output -o --verbose' -- "$cur" ) )
+ return 0
+ fi
+} &&
+complete -F _iconv $default iconv
+
+# dict(1) completion
+#
+{ have dict || have rdict; } && {
+_dictdata()
+{
+ dict $host $port $1 2>/dev/null | sed -ne \
+ 's/^['$'\t '']['$'\t '']*\([^'$'\t '']*\).*$/\1/p'
+}
+
+_dict()
+{
+ local cur prev host port db dictfile
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ dictfile=/usr/share/dict/words
+
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ case "${COMP_WORDS[i]}" in
+ -@(h|--host))
+ host=${COMP_WORDS[i+1]}
+ [ -n "$host" ] && host="-h $host"
+ i=$((++i))
+ ;;
+ -@(p|-port))
+ port=${COMP_WORDS[i+1]}
+ [ -n "$port" ] && port="-p $port"
+ i=$((++i))
+ ;;
+ -@(d|-database))
+ db=${COMP_WORDS[i+1]}
+ [ -n "$db" ] && host="-d $db"
+ i=$((++i))
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --host -p --port -d --database \
+ -m --match -s --strategy -c --config -C \
+ --nocorrect -D --dbs -S --strats -H \
+ --serverhelp -i --info -I --serverinfo \
+ -a --noauth -u --user -k --key -V --version \
+ -L --license --help -v --verbose -r --raw \
+ -P --pager --debug --html --pipesize --client' \
+ -- "$cur" ) )
+ return 0
+ fi
+
+ case "$prev" in
+ -@(d|-database|i|info))
+ COMPREPLY=( $( compgen -W '$( _dictdata -D )' -- "$cur" ) )
+ return 0
+ ;;
+ -@(s|-strategy))
+ COMPREPLY=( $( compgen -W '$( _dictdata -S )' -- "$cur" ) )
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ [ -r $dictfile ] && \
+ COMPREPLY=( $( compgen -W '$( cat $dictfile )' -- "$cur" ) )
+}
+complete -F _dict $default dict rdict
+}
+
+# cdrecord(1) completion
+#
+have cdrecord &&
+_cdrecord()
+{
+ local cur prev i generic_options track_options track_mode
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # foo=bar style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ @(text|cue)file)
+ _filedir
+ return 0
+ ;;
+ blank)
+ COMPREPLY=( $( compgen -W 'help all fast \
+ track unreserve trtail unclose session' \
+ -- $cur ) )
+ return 0
+ ;;
+ driveropts)
+ COMPREPLY=( $( compgen -W 'burnfree noburnfree\
+ varirec= audiomaster forcespeed noforcespeed\
+ speedread nospeedread singlesession \
+ nosinglesession hidecdr nohidecdr tattooinfo\
+ tattoofile=' -- $cur ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ generic_options=(-version -v -V -d -silent -s -force -immed -dummy \
+ -dao -raw -raw96r -raw96p -raw16 -multi -msinfo -toc \
+ -atip -fix -nofix -waiti -load -lock -eject -format \
+ -setdropts -checkdrive -prcap -inq -scanbus -reset \
+ -abort -overburn -ignsize -useinfo -packet -noclose \
+ -text debug= kdebug= kd= minbuf= speed= blank= fs= \
+ dev= gracetime= timeout= driver= driveropts= \
+ defpregap= pktsize= mcn= textfile= cuefile=)
+ track_options=(-audio -swab -data -mode2 -xa -xa1 -xa2 -xamix -cdi \
+ -isosize -pad padsize= -nopad -shorttrack -noshorttrack\
+ pregap= -preemp -nopreemp -copy -nocopy -scms tcsize= \
+ isrc= index=)
+ # look if previous was either a file or a track option
+ track_mode=0
+ if [ $COMP_CWORD -gt 1 ]; then
+ if [ -f "$prev" ]; then
+ track_mode=1
+ else
+ for (( i=0; i < ${#track_options[@]}; i++ )); do
+ if [[ "${track_options[i]}" == "$prev" ]]; then
+ track_mode=1
+ break
+ fi
+ done
+ fi
+ fi
+
+ # files are always eligible completion
+ _filedir
+ # track options are always available
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -W '${track_options[@]}' -- $cur ) )
+ # general options are no more available after file or track option
+ if [ $track_mode -eq 0 ]; then
+ COMPREPLY=( ${COMPREPLY[@]} \
+ $( compgen -W '${generic_options[@]}' -- $cur ) )
+ fi
+
+} &&
+complete -F _cdrecord $filenames cdrecord
+
+# mkisofs(8) completion
+#
+have mkisofs &&
+_mkisofs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|abstract|biblio|check-session|copyright|log-file|root-info|prep-boot|*-list))
+ _filedir
+ return 0
+ ;;
+ -*-charset)
+ COMPREPLY=( $( mkisofs -input-charset help 2>&1 | \
+ tail +3 | grep "^$cur") )
+ return 0
+ ;;
+ -uid)
+ _uids
+ return 0
+ ;;
+ -gid)
+ _gids
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-abstract -A -allow-lowercase \
+ -allow-multidot -biblio -cache-inodes \
+ -no-cache-inodes -b -eltorito-alt-boot -B -G \
+ -hard-disk-boot -no-emul-boot -no-boot \
+ -boot-load-seg -boot-load-size \
+ -boot-info-table -C -c -check-oldname \
+ -check-session -copyright -d -D -dir-mode \
+ -dvd-video -f -file-mode -gid -gui \
+ -graft-points -hide -hide-list -hidden \
+ -hidden-list -hide-joliet -hide-joliet-list \
+ -hide-joliet-trans-tbl -hide-rr-moved \
+ -input-charset -output-charset -iso-level -J \
+ -joliet-long -jcharset -l -L -log-file -m \
+ -exclude-list -max-iso9660-filenames -M -N \
+ -new-dir-mode -nobak -no-bak -force-rr -no-rr \
+ -no-split-symlink-components \
+ -no-split-symlink-fields -o -pad -no-pad \
+ -path-list -P -p -print-size -quiet -R -r \
+ -relaxed-filenames -sort -split-output \
+ -stream-media-size -stream-file-name -sysid -T\
+ -table-name -ucs-level -udf -uid \
+ -use-fileversion -U -no-iso-translate -V \
+ -volset -volset-size -volset-seqno -v -x -z \
+ -hfs -apple -map -magic -hfs-creator \
+ -hfs-type -probe -no-desktop -mac-name \
+ -boot-hfs-file -part -auto -cluster-size \
+ -hide-hfs -hide-hfs-list -hfs-volid \
+ -icon-position -root-info -prep-boot \
+ -input-hfs-charset -output-hfs-charset \
+ -hfs-unlock -hfs-bless -hfs-parms --cap \
+ --netatalk --double --ethershare --ushare \
+ --exchange --sgi --xinet --macbin --single \
+ --dave --sfm --osx-double --osx-hfs' -- $cur ))
+ else
+ _filedir
+ fi
+
+} &&
+complete -F _mkisofs $filenames mkisofs
+
+# mc(1) completion
+#
+have mc &&
+_mc()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # -name value style option
+ case "$prev" in
+ -@(e|v|l|P))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(edit|view|ftplog|printwd))
+ _filedir
+ return 0
+ ;;
+ esac
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --stickchars -b --nocolor -c \
+ --color -C --colors= -d --nomouse -e --edit= -f \
+ --datadir -k --resetsoft -l --ftplog= -P --printwd= \
+ -s --slow -t --termcap -u --nosubshell -U --subshell \
+ -v --view= -V --version -x --xterm -h --help' -- $cur ) )
+ else
+ _filedir -d
+ fi
+} &&
+complete -F _mc $filenames mc
+
+# yum(8) completion
+#
+have yum && {
+_yum()
+{
+ local cur prev special
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|update|upgrade|remove|erase|deplist) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+
+ if [ -n "$special" ]; then
+ case $special in
+ install|deplist)
+ COMPREPLY=( $( compgen -W '$( yum -C list | cut -d" " -f1 )' -- $cur ) )
+ return 0
+ ;;
+ *)
+ _rpm_installed_packages
+ return 0
+ ;;
+ esac
+ fi
+
+ case $cur in
+ --*)
+ COMPREPLY=( $( compgen -W '--installroot --version --help --enablerepo --disablerepo --exclude --obsoletes --noplugins' -- $cur ) )
+ return 0
+ ;;
+ -*)
+ COMPREPLY=( $( compgen -W '-c -e -d -y -t -R -C -h' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case $prev in
+ list)
+ COMPREPLY=( $( compgen -W 'all available updates installed extras obsoletes recent' -- $cur ) )
+ ;;
+ clean)
+ COMPREPLY=( $( compgen -W 'packages headers metadata cache dbcache all' -- $cur ) )
+ ;;
+ localinstall)
+ _filedir rpm
+ ;;
+ -c)
+ _filedir
+ ;;
+ --installroot)
+ _filedir -d
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W 'install update check-update upgrade remove list \
+ search info provides clean groupinstall groupupdate \
+ grouplist deplist erase groupinfo groupremove \
+ localinstall localupdate makecache resolvedep \
+ shell whatprovides' -- $cur ) )
+ ;;
+ esac
+}
+complete -F _yum $filenames yum
+
+# yum-arch(8) completion
+#
+_yum_arch()
+{
+ local cur
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l -q' -- $cur ) )
+ ;;
+ *)
+ _filedir -d
+ ;;
+ esac
+
+ return 0
+
+}
+complete -F _yum_arch $filenames yum-arch
+}
+
+# ImageMagick completion
+#
+have convert && {
+_ImageMagick()
+{
+ local prev
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -channel)
+ COMPREPLY=( $( compgen -W 'Red Green Blue Opacity \
+ Matte Cyan Magenta Yellow Black' -- $cur ) )
+ return 0
+ ;;
+ -colormap)
+ COMPREPLY=( $( compgen -W 'shared private' -- $cur ) )
+ return 0
+ ;;
+ -colorspace)
+ COMPREPLY=( $( compgen -W 'GRAY OHTA RGB Transparent \
+ XYZ YCbCr YIQ YPbPr YUV CMYK' -- $cur ) )
+ return 0
+ ;;
+ -compose)
+ COMPREPLY=( $( compgen -W 'Over In Out Atop Xor Plus \
+ Minus Add Subtract Difference Multiply Bumpmap\
+ Copy CopyRed CopyGreen CopyBlue CopyOpacity' \
+ -- $cur ) )
+ return 0
+ ;;
+ -compress)
+ COMPREPLY=( $( compgen -W 'None BZip Fax Group4 JPEG \
+ Lossless LZW RLE Zip' -- $cur ) )
+ return 0
+ ;;
+ -dispose)
+ COMPREPLY=( $( compgen -W 'Undefined None Background \
+ Previous' -- $cur ) )
+ return 0
+ ;;
+ -encoding)
+ COMPREPLY=( $( compgen -W 'AdobeCustom AdobeExpert \
+ AdobeStandard AppleRoman BIG5 GB2312 Latin2 \
+ None SJIScode Symbol Unicode Wansung' -- $cur))
+ return 0
+ ;;
+ -endian)
+ COMPREPLY=( $( compgen -W 'MSB LSB' -- $cur ) )
+ return 0
+ ;;
+ -filter)
+ COMPREPLY=( $( compgen -W 'Point Box Triangle Hermite \
+ Hanning Hamming Blackman Gaussian Quadratic \
+ Cubic Catrom Mitchell Lanczos Bessel Sinc' \
+ -- $cur ) )
+ return 0
+ ;;
+ -format)
+ COMPREPLY=( $( convert -list format | \
+ awk '/ [r-][w-][+-] / {print $1}' | \
+ tr -d '*' | tr [:upper:] [:lower:] | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ -gravity)
+ COMPREPLY=( $( compgen -W 'Northwest North NorthEast \
+ West Center East SouthWest South SouthEast' \
+ -- $cur ) )
+ return 0
+ ;;
+ -intent)
+ COMPREPLY=( $( compgen -W 'Absolute Perceptual \
+ Relative Saturation' -- $cur ) )
+ return 0
+ ;;
+ -interlace)
+ COMPREPLY=( $( compgen -W 'None Line Plane Partition' \
+ -- $cur ) )
+ return 0
+ ;;
+ -limit)
+ COMPREPLY=( $( compgen -W 'Disk File Map Memory' \
+ -- $cur ) )
+ return 0
+ ;;
+ -list)
+ COMPREPLY=( $( compgen -W 'Delegate Format Magic \
+ Module Resource Type' -- $cur ) )
+ return 0
+ ;;
+ -map)
+ COMPREPLY=( $( compgen -W 'best default gray red \
+ green blue' -- $cur ) )
+ _filedir
+ return 0
+ ;;
+ -noise)
+ COMPREPLY=( $( compgen -W 'Uniform Gaussian \
+ Multiplicative \
+ Impulse Laplacian Poisson' -- $cur ) )
+ return 0
+ ;;
+ -preview)
+ COMPREPLY=( $( compgen -W 'Rotate Shear Roll Hue \
+ Saturation Brightness Gamma Spiff \
+ Dull Grayscale Quantize Despeckle \
+ ReduceNoise AddNoise Sharpen Blur \
+ Treshold EdgeDetect Spread Shade \
+ Raise Segment Solarize Swirl Implode \
+ Wave OilPaint CharcoalDrawing JPEG' \
+ -- $cur ) )
+ return 0
+ ;;
+ -@(mask|profile|texture|tile|write))
+ _filedir
+ return 0
+ ;;
+ -type)
+ COMPREPLY=( $( compgen -W 'Bilevel Grayscale Palette \
+ PaletteMatte TrueColor TrueColorMatte \
+ ColorSeparation ColorSeparationlMatte \
+ Optimize' -- $cur ) )
+ return 0
+ ;;
+ -units)
+ COMPREPLY=( $( compgen -W 'Undefined PixelsPerInch \
+ PixelsPerCentimeter' -- $cur ) )
+ return 0
+ ;;
+ -virtual-pixel)
+ COMPREPLY=( $( compgen -W 'Constant Edge mirror tile' \
+ -- $cur ) )
+ return 0
+ ;;
+ -visual)
+ COMPREPLY=( $( compgen -W 'StaticGray GrayScale \
+ StaticColor PseudoColor TrueColor \
+ DirectColor defaut visualid' -- $cur ))
+ return 0
+ ;;
+ esac
+}
+
+_convert()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-adjoin -affine -antialias -append \
+ -authenticate -average -background -black-threshold \
+ -blue-primary -blur -border -bordercolor -channel \
+ -charcoal -chop -clip -coalesce -colorize -colors \
+ -colorspace -comment -compress -contrast -convolve \
+ -crop -cycle -debug -deconstruct -delay -density \
+ -depth -despeckle -display -dispose -dither -draw \
+ -edge -emboss -encoding -endian -enhance -equalize \
+ -extract -fill -filter -flatten -flip -flop -font \
+ -frame -fuzz -gamma -gaussian -geometry \
+ -green-primary -gravity -help -implode -intent \
+ -interlace -label -lat -level -limit -list -log -loop \
+ -map -mask -matte -median -modulate -monochrome \
+ -morph -mosaic -negate -noop -noise -normalize \
+ -opaque -ordered-dither -page -paint -ping -pointsize \
+ -preview -profile -quality -raise -random-threshold \
+ -region -raise -red-primary -render -resize -resample \
+ -roll -rotate -sample -sampling-factor -scale -scene \
+ -seed -segment -shade -sharpen -shave -shear -size \
+ -solarize -spread -stroke -strokewidth -swirl \
+ -texture -threshold -thumbnail -tile -transform \
+ -transparent -treedepth -trim -type -undercolor \
+ -units -unsharp -verbose -version -view \
+ -virtual-pixel -wave -white-point -white-threshold \
+ -write' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+adjoin +append +compress \
+ +contrast +debug +dither +endian +gamma +label +map \
+ +mask +matte +negate +noise +page +raise +render \
+ +write' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _convert $filenames convert
+
+_mogrify()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-affine -antialias -authenticate \
+ -background -black-threshold -blue-primary -blur \
+ -border -bordercolor -channel -charcoal -chop \
+ -colorize -colors -colorspace -comment -compress \
+ -contrast -convolve -crop -cycle -debug -delay \
+ -density -depth -despeckle -display -dispose -dither \
+ -draw -edge -emboss -encoding -endian -enhance \
+ -equalize -extract -fill -filter -flip -flop -font \
+ -format -frame -fuzz -gamma -gaussian -geometry \
+ -green-primary -implode -interlace -help -label -lat \
+ -level -limit -list -log -loop -map -mask -matte \
+ -median -modulate -monochrome -negate -noop \
+ -normalize -opaque -page -paint -fill -ordered-dither \
+ -pointsize -profile -quality -raise -random-threshold \
+ -red-primary -region -resample -resize -roll -rotate \
+ -sample -sampling-factor -scale -scene -seed -segment \
+ -shade -sharpen -shear -size -solarize -spread \
+ -stroke -strokewidth -swirl -texture -threshold \
+ -thumbnail -tile -transform -transparent -treedepth \
+ -trim -type -undercolor -units -unsharp -verbose \
+ -version -view -virtual-pixel -wave -white-point \
+ -white-threshold' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
+ +endian +gamma +label +map +mask +matte +negate +page \
+ +raise' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _mogrify $filenames mogrify
+
+_display()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-authenticate -backdrop -border \
+ -colormap -colors -colorspace -comment -compress \
+ -contrast -crop -debug -delay -density -depth \
+ -despeckle -display -dispose -dither -edge -endian \
+ -enhance -extract -filter -flip -flop -frame -gamma \
+ -geometry -help -immutable -interlace -label -limit \
+ -log -map -matte -monochrome -negate -noop -page \
+ -quality -raise -remote -roll -rotate -sample \
+ -sampling-factor -scene -segment -sharpen -size \
+ -texture -treedepth -trim -update -verbose -version \
+ -virtual-pixel -window -window_group -write' -- $cur))
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
+ +endian +gamma +label +map +matte +negate +page \
+ +raise +write' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _display $filenames display
+
+_animate()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-authenticate -backdrop -colormap \
+ -colors -colorspace -crop -debug -delay -density \
+ -depth -display -dither -extract -gamma -geometry \
+ -help -interlace -limit -log -matte -map -monochrome \
+ -noop -pause -remote -rotate -sampling-factor -scene \
+ -size -treedepth -trim -verbose -version -visual \
+ -virtual-pixel -window' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _animate $filenames animate
+
+_identify()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-authenticate -debug -density \
+ -depth -extract -format -help -interlace -limit -list \
+ -log -size -sampling-factor -verbose -version \
+ -virtual-pixel' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+debug ' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _identify $filenames identify
+
+_montage()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-adjoin -affine -authenticate \
+ -blue-primary -blur -colors -colorspace -comment \
+ -compose -compress -crop -debug -density -depth \
+ -display -dispose -dither -draw -encoding -endian \
+ -extract -fill -filter -flip -flop -frame -gamma \
+ -geometry -gravity -green-primary -interlace -help \
+ -label -limit -log -matte -mode -monochrome -noop \
+ -page -pointsize -quality -red-primary -resize \
+ -rotate -sampling-factor -scene -shadow -size \
+ -stroke -texture -thumbnail -tile -transform \
+ -transparent -treedepth -trim -type -verbose \
+ -version -virtual-pixel -white-point' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \
+ +endian +gamma +label +matte +page' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _montage $filenames montage
+
+_composite()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-affine -authenticate \
+ -blue-primary -colors -colorspace -comment -compose \
+ -compress -debug -density -depth -displace -display \
+ -dispose -dissolve -dither -encoding -endian -extract \
+ -filter -font -geometry -gravity -green-primary -help \
+ -interlace -label -limit -log -matte -monochrome \
+ -negate -page -profile -quality -red-primary -rotate \
+ -resize -sampling-factor -scene -sharpen -size \
+ -stegano -stereo -thumbnail -tile -transform \
+ -treedepth -type -units -unsharp -verbose -version \
+ -virtual-pixel -watermark -white-point -write' \
+ -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \
+ +matte +negate +page +write' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _composite $filenames composite
+}
+
+# dd(1) completion
+#
+have dd &&
+_dd()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ if=*|of=*)
+ cur=${cur#*=}
+ _filedir
+ return 0
+ ;;
+ conv=*)
+ cur=${cur#*=}
+ COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \
+ lcase notrunc ucase swab noerror sync' \
+ -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ _expand || return 0
+
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) \
+ $( compgen -W 'bs cbs conv count ibs if obs of seek skip'\
+ -S '=' -- $cur ) )
+} &&
+complete -F _dd $nospace $filenames dd
+
+# CUPS cancel(1) completion
+#
+have cancel &&
+_cancel()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( lpstat | cut -d' ' -f1 | grep "^$cur" ) )
+} &&
+complete -F _cancel $filenames cancel
+
+# aspell(1) completion
+#
+have aspell && {
+_aspell_dictionary()
+{
+ local datadir
+ datadir=/usr/lib/aspell
+ COMPREPLY=( $( command ls $datadir/*.@(multi|alias) ) )
+ COMPREPLY=( ${COMPREPLY[@]%.@(multi|alias)} )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]#$datadir/}' -- $cur ) )
+}
+
+_aspell()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case "$prev" in
+ @(-c|-p|check))
+ _filedir
+ return 0
+ ;;
+ @(dump|create|merge))
+ COMPREPLY=( $( compgen -W 'master personal repl' -- $cur ) )
+ return 0
+ ;;
+ -d)
+ _aspell_dictionary
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(conf|personal|repl|per-conf))
+ _filedir
+ return 0
+ ;;
+ --@(conf-dir|data-dir|dict-dir|home-dir|local-data-dir|prefix))
+ _filedir -d
+ return 0
+ ;;
+ --master)
+ _aspell_dictionary
+ return 0
+ ;;
+ --mode)
+ COMPREPLY=( $( compgen -W 'none url email sgml tex' -- $cur ) )
+ return 0
+ ;;
+ --sug-mode)
+ COMPREPLY=( $( compgen -W 'ultra fast normal bad-speller' -- $cur ) )
+ return 0
+ ;;
+ --keymapping)
+ COMPREPLY=( $( compgen -W 'aspell ispell' -- $cur ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--conf= --conf-dir= --data-dir= --dict-dir= \
+ --encoding= --add-filter= --rem-filter= --mode= -e \
+ -H -t --add-extra-dicts= --rem-extra-dicts= \
+ --home-dir= -W --ignore= --ignore-accents \
+ --dont-ignore-accents --ignore-case --dont-ignore-case \
+ --ignore-repl --dont-ignore-repl --jargon= --keyboard= \
+ --lang= --language-tag= --local-data-dir= -d --master= \
+ --module= --add-module-search-order= \
+ --rem-module-search-order= --per-conf= -p --personal= \
+ --prefix= --repl= -C -B --run-together --dont-run-together \
+ --run-together-limit= --run-together-min= --save-repl \
+ --dont-save-repl --set-prefix --dont-set-prefix --size= \
+ --spelling= --strip-accents --dont-strip-accents \
+ --sug-mode= --add-word-list-path= --rem-word-list-path= \
+ -b -x --backup -b|-x --dont-backup --reverse --dont-reverse \
+ --time --dont-time --keymapping= --add-email-quote= \
+ --rem-email-quote= --email-margin= --add-tex-command= \
+ --rem-tex-command= --tex-check-comments \
+ --dont-tex-check-comments --add-tex-extension= \
+ --rem-tex-extension= --add-sgml-check= --rem-sgml-check= \
+ --add-sgml-extension= --rem-sgml-extension=' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-? help -c check -a pipe -l list \
+ config config soundslike filter -v version dump \
+ create merge' -- $cur ) )
+ fi
+
+}
+complete -F _aspell $default aspell
+}
+
+# xmms(1) completion
+#
+have xmms &&
+_xmms()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --help -r --rew -p --play \
+ -u --pause -s --stop -t --play-pause -f --fwd -e \
+ --enqueue -m --show-main-window -i --sm-client-id \
+ -v --version' -- $cur ) )
+ else
+ _filedir '@(mp[23]|MP[23]|ogg|OGG|wav|WAV|pls|m3u|xm|mod|s[3t]m|it|mtm|ult|flac)'
+
+ fi
+
+} &&
+complete -F _xmms $filenames xmms
+
+# info(1) completion
+#
+have info &&
+_info()
+{
+ local cur infopath UNAME
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _expand || return 0
+
+ # default completion if parameter contains /
+ if [[ "$cur" == */* ]]; then
+ _filedir
+ return 0
+ fi
+
+ infopath='/usr/share/info'
+
+ if [ "${INFOPATH: -1:1}" == ':' ]; then
+ infopath=${INFOPATH}${infopath}
+ elif [ ${INFOPATH:+set} ]; then
+ infopath=$INFOPATH
+ fi
+
+ infopath=$infopath:
+ if [ -n "$cur" ]; then
+ infopath="${infopath//://$cur* }"
+ else
+ infopath="${infopath//:// }"
+ fi
+
+ # redirect stderr for when path doesn't exist
+ COMPREPLY=( $( eval command ls "$infopath" 2>/dev/null ) )
+ # weed out directory path names and paths to info pages
+ COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
+ # weed out info dir file
+ for (( i=0 ; i < ${#COMPREPLY[@]} ; ++i )); do
+ if [ "${COMPREPLY[$i]}" == 'dir' ]; then
+ unset COMPREPLY[$i];
+ fi;
+ done
+ # strip suffix from info pages
+ COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) )
+
+ return 0
+} &&
+complete -F _info $filenames info
+
+# dhclient(1) completion
+#
+have dhclient && _dhclient()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(cf|lf|pf|sf))
+ _filedir
+ return 0
+ ;;
+ -s)
+ _known_hosts
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-p -d -q -1 -r -lf -pf \
+ -cf -sf -s -g -n -nw -w' -- $cur ) )
+ else
+ _available_interfaces
+ fi
+} &&
+complete -F _dhclient dhclient
+
+# lvm(8) completion
+#
+have lvm && {
+_volumegroups()
+{
+ COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \
+ sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- $cur ) )
+}
+
+_physicalvolumes()
+{
+ COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \
+ sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- $cur ) )
+}
+
+_logicalvolumes()
+{
+ COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \
+ sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- $cur ) )
+}
+
+_units()
+{
+ COMPREPLY=( $( compgen -W 'h s b k m g t H K M G T' -- $cur ) )
+}
+
+_sizes()
+{
+ COMPREPLY=( $( compgen -W 'k K m M g G t T' -- $cur ) )
+}
+
+_args()
+{
+ args=0
+ if [[ "${COMP_WORDS[0]}" == lvm ]]; then
+ offset=2
+ else
+ offset=1
+ fi
+ for (( i=$offset; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" != -* ]]; then
+ args=$(($args + 1))
+ fi
+ done
+}
+
+_lvmdiskscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h -? --help -l \
+ --lvmpartition -v --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _lvmdiskscan lvmdiskscan
+
+_pvscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -e \
+ --exported -n --novolumegroup -h -? \
+ --help --ignorelockingfailure -P \
+ --partial -s --short -u --uuid -v \
+ --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _pvscan pvscan
+
+_pvs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|O|-options|-sort))
+ COMPREPLY=( $( compgen -W 'pv_fmt pv_uuid \
+ pv_size pv_free pv_used pv_name \
+ pv_attr pv_pe_count \
+ pv_pe_alloc_count' -- $cur ) )
+ return 0
+ ;;
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--aligned -a --all -d --debug \
+ -h -? --help --ignorelockingfailure --noheadings \
+ --nosuffix -o --options -O --sort \
+ --separator --unbuffered --units \
+ -v --verbose --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvs pvs
+
+_pvdisplay()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
+ -v --verbose -d --debug -h --help --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvdisplay pvdisplay
+
+_pvchange()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|x|-autobackup|--allocatable))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all -A --autobackup \
+ -d --debug -h --help -t --test -u --uuid -x \
+ --allocatable -v --verbose --addtag --deltag \
+ --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvchange pvchange
+
+_pvcreate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --restorefile)
+ _filedir
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ --metadatacopies)
+ COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) )
+ return 0
+ ;;
+ --@(metadatasize|setphysicalvolumesize))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--restorefile -d --debug -f \
+ --force -h -? --help --labelsector -M --metadatatype \
+ --metadatacopies --metadatasize \
+ --setphysicalvolumesize -t --test -u --uuid uuid -v \
+ --verbose -y --yes --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvcreate pvcreate
+
+_pvmove()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(n|-name))
+ _logicalvolumes
+ return 0
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--abort -A --autobackup \
+ -b --background -d --debug -f --force -h -? \
+ --help -i --interval -t --test -v --verbose \
+ --version -n --name' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvmove pvmove
+
+_pvremove()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -f --force -h -? \
+ --help -y --yes -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvremove pvremove
+
+_vgscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help \
+ --ignorelockingfailure --mknodes -P \
+ --partial -v --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _vgscan vgscan
+
+_vgs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|O|-options|-sort))
+ COMPREPLY=( $( compgen -W 'vg_fmt vg_uuid vg_name \
+ vg_attr vg_size vg_free vg_sysid \
+ vg_extent_size vg_extent_count vg_free_count \
+ max_lv max_pv pv_count lv_count snap_count \
+ vg_seqno' -- $cur ) )
+ return 0
+ ;;
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--aligned -d --debug \
+ -h --help --ignorelockingfailure --noheadings \
+ --nosuffix -o --options -O --sort -P --partial \
+ --separator --unbuffered --units \
+ -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgs vgs
+
+_vgdisplay()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
+ -P --partial -A --activevolumegroups -v --verbose \
+ -d --debug -h --help --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgdisplay vgdisplay
+
+_vgchange()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(a|A|x|-available|-autobackup|-resizeable))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -P \
+ --partial -d --debug -h --help --ignorelockingfailure \
+ -t --test -u --uuid -v --verbose --version -a \
+ --available -x --resizeable -l --logicalvolume \
+ --addtag --deltag' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgchange vgchange
+
+_vgcreate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ -@(s|-physicalextentsize))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --addtag \
+ --alloc -d --debug -h --help -l --maxlogicalvolumes \
+ -M --metadatatype -p --maxphysicalvolumes -s \
+ --physicalextentsize -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgcreate vgcreate
+
+_vgremove()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgremove vgremove
+
+_vgrename()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
+ -? --help -t --test -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgrename vgrename
+
+_vgreduce()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all -A --autobackup -d \
+ --debug -h --help --removemissing -t --test -v \
+ --verbose --version' -- $cur ) )
+
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgreduce vgreduce
+
+_vgextend()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
+ -? --help -t --test -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgextend vgextend
+
+_vgport()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all -d --debug -h \
+ -? --help -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgport vgimport vgexport
+
+_vgck()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h \
+ -? --help -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgck vgck
+
+_vgconvert()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ --metadatacopies)
+ COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) )
+ return 0
+ ;;
+ --metadatasize)
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help --labelsector \
+ -M --metadatatype --metadatacopies --metadatasize \
+ -t --test -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgconvert vgconvert
+
+_vgcfgbackup()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|-file))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -f --file -h --help \
+ --ignorelockingfailure -P --partial -v --verbose \
+ --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgcfgbackup vgcfgbackup
+
+_vgcfgrestore()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|-file))
+ _filedir
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ -@(n|-name))
+ _volumegroups
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -f --file -l --list \
+ -h --help -M --Metadatatype -n --name -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgcfgrestore vgcfgrestore
+
+_vgmerge()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \
+ -h --help -l --list -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgmerge vgmerge
+
+_vgsplit()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \
+ -h --help -l --list -M --metadatatype -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 -o $args -eq 1 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgsplit vgsplit
+
+_vgmknodes()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help -v --verbose \
+ --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgmknodes vgmknodes
+
+_lvscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-b --blockdevice -d --debug \
+ -h -? --help --ignorelockingfailure -P \
+ --partial -v --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _lvscan lvscan
+
+_lvs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|O|-options|-sort))
+ COMPREPLY=( $( compgen -W 'lv_uuid lv_name \
+ lv_attr lv_minor lv_size seg_count \
+ origin snap_percent segtype stripes \
+ stripesize chunksize seg_start \
+ seg_size' -- $cur ) )
+ return 0
+ ;;
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--aligned -d --debug \
+ -h --help --ignorelockingfailure --noheadings \
+ --nosuffix -o --options -O --sort -P --partial \
+ --segments --separator --unbuffered --units \
+ -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvs lvs
+
+_lvdisplay()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
+ -P --partial -m --maps -v --verbose -d --debug -h \
+ --help --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvdisplay lvdisplay
+
+_lvchange()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(a|A|C|M|-available|-autobackup|-continguous|-persistent))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(p|-permission))
+ COMPREPLY=( $( compgen -W 'r rw' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -a --available \
+ --addtag --alloc -C --contiguous -d --debug --deltag \
+ -f --force -h --help --ignorelockingfailure -M \
+ --persistent --major major --minor minor -P --partial \
+ -p --permission -r --readahead --refresh -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvchange lvchange
+
+_lvcreate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|C|M|Z|-autobackup|-continguous|-persistent|-zero))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ -@(p|-permission))
+ COMPREPLY=( $( compgen -W 'r rw' -- $cur ) )
+ return 0
+ ;;
+ -@(n|-name))
+ _logicalvolumes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --addtag --alloc \
+ -C --contiguous -d --debug -h -? --help -i --stripes \
+ -I --stripesize -l --extents -L --size -M --persistent \
+ --major --minor -n --name -p --permission -r \
+ --readahead -t --test --type -v --verbose -Z --zero \
+ --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _lvcreate lvcreate
+
+_lvremove()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -f \
+ --force -h -? --help -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvremove lvremove
+
+_lvrename()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
+ -? --help -t --test -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvrename lvrename
+
+_lvreduce()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d \
+ --debug -f --force -h --help -l --extents \
+ -L --size -n --nofsck -r --resizefs -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvreduce lvreduce
+
+_lvresize()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \
+ --debug -h --help -i --stripes -I --stripesize \
+ -l --extents -L --size -n --nofsck -r --resizefs \
+ -t --test --type -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _logicalvolumes
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _lvresize lvresize
+
+_lvextend()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \
+ --debug -h --help -i --stripes -I --stripesize \
+ -l --extents -L --size -n --nofsck -r --resizefs \
+ -t --test --type -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _logicalvolumes
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _lvextend lvextend
+
+_lvm()
+{
+ local prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'dumpconfig help lvchange \
+ lvcreate lvdisplay lvextend lvmchange \
+ lvmdiskscan lvmsadc lvmsar lvreduce \
+ lvremove lvrename lvresize lvs lvscan \
+ pvchange pvcreate pvdata pvdisplay pvmove \
+ pvremove pvresize pvs pvscan vgcfgbackup \
+ vgcfgrestore vgchange vgck vgconvert \
+ vgcreate vgdisplay vgexport vgextend \
+ vgimport vgmerge vgmknodes vgreduce \
+ vgremove vgrename vgs vgscan vgsplit \
+ version' -- $cur ) )
+ else
+ case ${COMP_WORDS[1]} in
+ pvchange)
+ _pvchange
+ ;;
+ pvcreate)
+ _pvcreate
+ ;;
+ pvdisplay)
+ _pvdisplay
+ ;;
+ pvmove)
+ _pvmove
+ ;;
+ pvremove)
+ _pvremove
+ ;;
+ pvresize)
+ _pvresize
+ ;;
+ pvs)
+ _pvs
+ ;;
+ pvscan)
+ _pvscan
+ ;;
+ vgcfgbackup)
+ _vgcfgbackup
+ ;;
+ vgcfgrestore)
+ _vgcfgrestore
+ ;;
+ vgchange)
+ _vgchange
+ ;;
+ vgck)
+ _vgck
+ ;;
+ vgconvert)
+ _vgconvert
+ ;;
+ vgcreate)
+ _vgcreate
+ ;;
+ vgdisplay)
+ _vgdisplay
+ ;;
+ vgexport)
+ _vgexport
+ ;;
+ vgextend)
+ _vgextend
+ ;;
+ vgimport)
+ _vgimport
+ ;;
+ vgmerge)
+ _vgmerge
+ ;;
+ vgmknodes)
+ _vgmknodes
+ ;;
+ vgreduce)
+ _vgreduce
+ ;;
+ vgremove)
+ _vgremove
+ ;;
+ vgrename)
+ _vgrename
+ ;;
+ vgs)
+ _vgs
+ ;;
+ vgscan)
+ _vgscan
+ ;;
+ vgsplit)
+ _vgsplit
+ ;;
+ lvchange)
+ _lvchange
+ ;;
+ lvcreate)
+ _lvcreate
+ ;;
+ lvdisplay)
+ _lvdisplay
+ ;;
+ lvextend)
+ _lvextend
+ ;;
+ lvreduce)
+ _lvreduce
+ ;;
+ lvremove)
+ _lvremove
+ ;;
+ lvrename)
+ _lvrename
+ ;;
+ lvresize)
+ _lvresize
+ ;;
+ lvs)
+ _lvs
+ ;;
+ lvscan)
+ _lvscan
+ ;;
+ esac
+ fi
+}
+complete -F _lvm lvm
+}
+
+# mkinitrd(8) completion
+#
+have mkinitrd &&
+_mkinitrd()
+{
+ local cur args
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case "$prev" in
+ --preload)
+ _modules
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(with|builtin))
+ _modules
+ return 0
+ ;;
+ --@(fstab|dsdt))
+ _filedir
+ return 0
+ ;;
+ --tmpdir)
+ _filedir -d
+ return 0
+ ;;
+ esac
+ fi
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version -v -f --preload \
+ --with= --omit-scsi-modules --omit-raid-modules \
+ --images-version --fstab= --nocompress --builtin= \
+ --nopivot --noudev --allow-missing --tmpdir= \
+ --initrdfs= --dsdt= --lvm-version= --froce-usb' \
+ -- $cur ) )
+ else
+ _count_args
+
+ case $args in
+ 1)
+ _filedir
+ ;;
+ 2)
+ COMPREPLY=( $( command ls /lib/modules | grep "^$cur" ) )
+ ;;
+ esac
+ fi
+
+} &&
+complete -F _mkinitrd mkinitrd
+
+# pkgconfig(1) completion
+#
+have pkg-config &&
+_pkg_config()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ # return list of available options
+ COMPREPLY=( $( compgen -W '-version --modversion \
+ --atleast-pkgconfig-version= --libs --libs-only-l \
+ --libs-only-other --libs-only-L --cflags \
+ --cflags-only-I --cflags-only-othee --variable= \
+ --define-variable= --exists --uninstalled \
+ --atleast-version= --exact-version= --max-version= \
+ --list-all --debug --print-errors --silence-errors \
+ --errors-to-stdout -? --help --usage' -- $cur))
+ else
+ COMPREPLY=( $( pkg-config --list-all 2>/dev/null | \
+ awk '{print $1}' | grep "^$cur" ) )
+ fi
+} &&
+complete -F _pkg_config pkg-config
+
+
+# cpio(1) completion
+#
+have cpio && {
+_cpio_format()
+{
+ COMPREPLY=( $( compgen -W 'bin odc newc crc tar ustar hpbin hpodc' -- $cur ) )
+}
+
+_cpio()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case $prev in
+ -H)
+ _cpio_format
+ return 0
+ ;;
+ -@(E|F|I))
+ _filedir
+ return 0
+ ;;
+ -R)
+ _usergroup
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case $prev in
+ --format)
+ _cpio_format
+ return 0
+ ;;
+ --@(file|pattern-file))
+ _filedir
+ return 0
+ ;;
+ --owner)
+ _usergroup
+ return 0
+ ;;
+ --rsh-command)
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W '-o --create -i --extract -p --pass-through' -- $cur) )
+ else
+ case ${COMP_WORDS[1]} in
+ -@(o|-create))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-0 -a -c -v -A -B\
+ -L -V -C -H -M -O -F --file= --format=\
+ --message= --null --reset-access-time\
+ --verbose --dot --append --block-size=\
+ --dereference --io-size= --quiet\
+ --force-local --rsh-command= --help\
+ --version' -- $cur ) )
+ fi
+ ;;
+ -@(i|-extract))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-b -c -d -f -m -n -r\
+ -t -s -u -v -B -S -V -C -E -H -M -R -I\
+ -F --file= --make-directories\
+ --nonmatching\
+ --preserve-modification-time\
+ --numeric-uid-gid --rename -t --list\
+ --swap-bytes --swap --dot\
+ --unconditional --verbose --block-size=\
+ --swap-halfwords --io-size=\
+ --pattern-file= --format= --owner=\
+ --no-preserve-owner --message=\
+ --force-local --no-absolute-filenames\
+ --sparse --only-verify-crc --quiet\
+ --rsh-command= --help\
+ --version' -- $cur ) )
+ fi
+ ;;
+ -@(p|-pass-through))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-0 -a -d -l -m -u -v\
+ -L -V -R --null --reset-access-time\
+ --make-directories --link --quiet\
+ --preserve-modification-time\
+ --unconditional --verbose --dot\
+ --dereference --owner=\
+ --no-preserve-owner --sparse --help\
+ --version' -- $cur ) )
+ else
+ _filedir -d
+ fi
+ ;;
+ esac
+ fi
+}
+complete -F _cpio cpio
+}
+
+# id(1) completion
+#
+have id &&
+_id()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\
+ -r --real -u --user --help --version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -u $cur ) )
+ fi
+} &&
+complete -F _id id
+
+# getent(1) completion
+#
+have getent &&
+_getent()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ passwd)
+ COMPREPLY=( $( compgen -u $cur ) )
+ return 0
+ ;;
+ group)
+ COMPREPLY=( $( compgen -g $cur ) )
+ return 0
+ ;;
+ services)
+ COMPREPLY=( $( compgen -s $cur ) )
+ return 0
+ ;;
+ hosts)
+ COMPREPLY=( $( compgen -A hostname $cur ) )
+ return 0
+ ;;
+ protocols)
+ COMPREPLY=( $( getent protocols | awk '{print $1}' | grep "^$cur" ) )
+ return 0
+ ;;
+ networks)
+ COMPREPLY=( $( getent networks | awk '{print $1}' | grep "^$cur" ) )
+ return 0
+ ;;
+ esac
+
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks' -- $cur ) )
+ fi
+} &&
+complete -F _getent getent
+
+# ntpdate(1) completion
+#
+have ntpdate &&
+_ntpdate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -k)
+ _filedir
+ return 0
+ ;;
+ -U)
+ COMPREPLY=( $( compgen -u $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
+ -e -k -p -o -r -t' -- $cur ) )
+ else
+ _known_hosts
+ fi
+} &&
+complete -F _ntpdate ntpdate
+
+# smartctl(8) completion
+#
+have smartctl && {
+_smartctl_quietmode()
+{
+ COMPREPLY=( $( compgen -W 'errorsonly silent' -- $cur ) )
+}
+_smartctl_device()
+{
+ COMPREPLY=( $( compgen -W 'ata scsi 3ware' -- $cur ) )
+}
+_smartctl_tolerance()
+{
+ COMPREPLY=( $( compgen -W 'warn exit ignore' -- $cur ) )
+}
+_smartctl_badsum()
+{
+ COMPREPLY=( $( compgen -W 'normal conservative permissive verypermissive' -- $cur ) )
+}
+_smartctl_report()
+{
+ COMPREPLY=( $( compgen -W 'ioctl ataioctl scsiioctl' -- $cur ) )
+}
+_smartctl_feature()
+{
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+}
+_smartctl_log()
+{
+ COMPREPLY=( $( compgen -W 'error selftest selective directory' -- $cur ) )
+}
+_smartctl_vendorattribute()
+{
+ COMPREPLY=( $( compgen -W 'help 9,minutes 9,seconds 9,halfminutes \
+ 9,temp 192,emergencyretractcyclect 193,loadunload \
+ 194,10xCelsius 194,unknown 198,offlinescanuncsectorct \
+ 200,writeerrorcount 201,detectedtacount 220,temp' -- $cur ) )
+}
+_smartctl_firmwarebug()
+{
+ COMPREPLY=( $( compgen -W 'none samsung samsung2' -- $cur ) )
+}
+_smartctl_presets()
+{
+ COMPREPLY=( $( compgen -W 'use ignore show showall' -- $cur ) )
+}
+_smartctl_test()
+{
+ COMPREPLY=( $( compgen -W 'offline short long conveyance select afterselect,on afterselect,off pending' -- $cur ) )
+}
+
+_smartctl()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case "$prev" in
+ -q)
+ _smartctl_quietmode
+ ;;
+ -d)
+ _smartctl_device
+ return 0
+ ;;
+ -t)
+ _smartctl_tolerance
+ return 0
+ ;;
+ -b)
+ _smartctl_badsum
+ return 0
+ ;;
+ -r)
+ _smartctl_report
+ return 0
+ ;;
+ -s)
+ _smartctl_feature
+ return 0
+ ;;
+ -o)
+ _smartctl_feature
+ return 0
+ ;;
+ -S)
+ _smartctl_feature
+ return 0
+ ;;
+ -l)
+ _smartctl_log
+ return 0
+ ;;
+ -v)
+ _smartctl_vendorattribute
+ return 0
+ ;;
+ -F)
+ _smartctl_firmwarebug
+ return 0
+ ;;
+ -P)
+ _smartctl_presets
+ return 0
+ ;;
+ -t)
+ _smartctl_test
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --quietmode)
+ _smartctl_quietmode
+ return 0
+ ;;
+ --device)
+ _smartctl_device
+ return 0
+ ;;
+ --tolerance)
+ _smartctl_tolerance
+ return 0
+ ;;
+ --badsum)
+ _smartctl_badsum
+ return 0
+ ;;
+ --report)
+ _smartctl_report
+ return 0
+ ;;
+ --smart)
+ _smartctl_feature
+ return 0
+ ;;
+ --offlineauto)
+ _smartctl_feature
+ return 0
+ ;;
+ --saveauto)
+ _smartctl_feature
+ return 0
+ ;;
+ --log)
+ _smartctl_log
+ return 0
+ ;;
+ --vendorattribute)
+ _smartctl_vendorattribute
+ return 0
+ ;;
+ --firmwarebug)
+ _smartctl_firmwarebug
+ return 0
+ ;;
+ --presets)
+ _smartctl_presets
+ return 0
+ ;;
+ --test)
+ _smartctl_test
+ return 0
+ ;;
+ esac
+ fi
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --help --usage -V --version \
+ --copyright --license-i --info -a --all -q \
+ --quietmode= -d --device= -T --tolerance= -b --badsum= \
+ -r --report= -s --smart= -o --offlineauto= -S \
+ --saveauto= -H --health -c --capabilities -A \
+ --attributes -l --log= -v --vendorattribute= -F \
+ --firmwarebug= -P --presets= -t --test= -C \
+ --captive -X --abort' -- $cur ) )
+ else
+ cur=${cur:=/dev/}
+ _filedir
+ fi
+}
+complete -F _smartctl smartctl
+}
+
+# vncviewer(1) completion
+#
+have vncviewer &&
+_vncviewer()
+{
+ local cur prev
+ local -a config
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -via)
+ _known_hosts -a
+ ;;
+ *)
+ # ssh into the the server, find and ping the broadcast address, then
+ # sort and show the results.
+ COMPREPLY=( $( ssh -o 'Batchmode yes' $prev \
+ "ping -bnc 4 255.255.255.255" 2>/dev/null | \
+ awk -F ' ' '{print $4}' | \
+ sort -n | uniq | egrep '[0-9]+\.[0-9]+\.' 2>/dev/null ) )
+ esac
+
+ return 0
+} &&
+complete -F _vncviewer vncviewer
+
+# sysctl(8) completion
+#
+have sysctl &&
+_sysctl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -W "$(sysctl -N -a 2>/dev/null)" -- $cur ) )
+
+ return 0
+} &&
+complete -F _sysctl sysctl
+
+# update-rc.d(8) completion
+#
+# Copyright (C) 2004 Servilio Afre Puentes <servilio@gmail.com>
+#
+have update-rc.d &&
+_update_rc_d()
+{
+ local cur prev sysvdir services options valid_options
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+ || sysvdir=/etc/init.d
+
+ services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) )
+ services=( ${services[@]#$sysvdir/} )
+ options=( -f -n )
+
+ if [[ $COMP_CWORD -eq 1 || "$prev" == -* ]]; then
+ valid_options=( $( \
+ echo "${COMP_WORDS[@]} ${options[@]}" \
+ | tr " " "\n" \
+ | sed -ne "/$( echo "${options[@]}" | sed "s/ /\\|/g" )/p" \
+ | sort | uniq -u \
+ ) )
+ COMPREPLY=( $( compgen -W '${options[@]} ${services[@]}' \
+ -X '$( echo ${COMP_WORDS[@]} | tr " " "|" )' -- $cur ) )
+ elif [[ "$prev" == ?($( echo ${services[@]} | tr " " "|" )) ]]; then
+ COMPREPLY=( $( compgen -W 'remove defaults start stop' -- $cur ) )
+ elif [[ "$prev" == defaults && "$cur" == [0-9] ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
+ elif [[ "$prev" == defaults && "$cur" == [sk]?([0-9]) ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
+ elif [[ "$prev" == defaults && -z "$cur" ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 s k )
+ elif [[ "$prev" == ?(start|stop) ]]; then
+ if [[ "$cur" == [0-9] || -z "$cur" ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
+ elif [[ "$cur" == [0-9][0-9] ]]; then
+ COMPREPLY=( $cur )
+ else
+ COMPREPLY=()
+ fi
+ elif [[ "$prev" == ?([0-9][0-9]|[0-6S]) ]]; then
+ if [[ -z "$cur" ]]; then
+ if [[ $prev == [0-9][0-9] ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 S )
+ else
+ COMPREPLY=( 0 1 2 3 4 5 6 S . )
+ fi
+ elif [[ "$cur" == [0-6S.] ]]; then
+ COMPREPLY=( $cur )
+ else
+ COMPREPLY=()
+ fi
+ elif [[ "$prev" == "." ]]; then
+ COMPREPLY=( $(compgen -W "start stop" -- $cur) )
+ else
+ COMPREPLY=()
+ fi
+
+ return 0
+} &&
+complete -F _update_rc_d update-rc.d
+
+# invoke-rc.d(8) completion
+#
+# Copyright (C) 2004 Servilio Afre Puentes <servilio@gmail.com>
+#
+have invoke-rc.d &&
+_invoke_rc_d()
+{
+ local cur prev sysvdir services options valid_options
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+ || sysvdir=/etc/init.d
+
+ services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) )
+ services=( ${services[@]#$sysvdir/} )
+ options=( --help --quiet --force --try-anyway --disclose-deny --query --no-fallback )
+
+ if [[ ($COMP_CWORD -eq 1) || ("$prev" == --* ) ]]; then
+ valid_options=( $( \
+ echo ${COMP_WORDS[@]} ${options[@]} \
+ | tr " " "\n" \
+ | sed -ne "/$( echo ${options[@]} | sed "s/ /\\\\|/g" )/p" \
+ | sort | uniq -u \
+ ) )
+ COMPREPLY=( $( compgen -W '${valid_options[@]} ${services[@]}' -- \
+ $cur ) )
+ elif [ -x $sysvdir/$prev ]; then
+ COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \
+ s/^.*Usage:[ ]*[^ ]*[ ]*{*\([^}\"]*\).*$/\1/p" \
+ $sysvdir/$prev`' -- \
+ $cur ) )
+ else
+ COMPREPLY=()
+ fi
+
+ return 0
+} &&
+complete -F _invoke_rc_d invoke-rc.d
+
+# minicom(1) completion
+#
+have minicom &&
+_minicom()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -@(a|c))
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+ return 0
+ ;;
+ -@(S|C))
+ _filedir
+ return 0
+ ;;
+ -P)
+ COMPREPLY=( $( command ls /dev/tty* ) )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-s -o -m -M -z -l -L -w -a -t \
+ -c -S -d -p -C -T -8' -- $cur ) )
+ else
+ COMPREPLY=( $( command ls /etc/minicom/minirc.* 2>/dev/null | sed -e 's|/etc/minicom/minirc.||' | grep "^$cur" ) )
+ fi
+} &&
+complete -F _minicom minicom
+
+# svn completion
+#
+have svn &&
+{
+_svn()
+{
+ local cur prev commands options command
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ commands='add blame praise annotate ann cat checkout co cleanup commit \
+ ci copy cp delete del remove rm diff di export help ? h import \
+ info list ls lock log merge mkdir move mv rename ren \
+ propdel pdel pd propedit pedit pe propget pget pg \
+ proplist plist pl propset pset ps resolved revert \
+ status stat st switch sw unlock update up'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case $prev in
+ --config-dir)
+ _filedir -d
+ return 0;
+ ;;
+ -@(F|-file|-targets))
+ _filedir
+ return 0;
+ ;;
+ --encoding)
+ COMPREPLY=( $( compgen -W \
+ '$( iconv --list | sed -e "s@//@@;" )' \
+ -- "$cur" ) )
+ return 0;
+ ;;
+ --@(editor|diff|diff3)-cmd)
+ COMP_WORDS=(COMP_WORDS[0] $cur)
+ COMP_CWORD=1
+ _command
+ return 0;
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ add)
+ options='--auto-props --no-auto-props \
+ --force --targets --no-ignore \
+ --non-recursive -N -q --quiet'
+ ;;
+ @(blame|annotate|ann|praise))
+ options='-r --revisions --username \
+ --password --no-auth-cache \
+ --non-interactive -v \
+ --verbose --incremental --xml'
+ ;;
+ cat)
+ options='-r --revision --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(checkout|co))
+ options='-r --revision -q --quiet -N \
+ --non-recursive --username \
+ --password --no-auth-cache \
+ --non-interactive \
+ --ignore-externals'
+ ;;
+ cleanup)
+ options='--diff3-cmd'
+ ;;
+ @(commit|ci))
+ options='-m --message -F --file \
+ --encoding --force-log -q \
+ --quiet --non-recursive -N \
+ --targets --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive --no-unlock'
+ ;;
+ @(copy|cp))
+ options='-m --message -F --file \
+ --encoding --force-log -r \
+ --revision -q --quiet \
+ --editor-cmd -username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(delete|del|remove|rm))
+ options='--force -m --message -F \
+ --file --encoding --force-log \
+ -q --quiet --targets \
+ --editor-cmd -username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(diff|di))
+ options='-r --revision -x --extensions \
+ --diff-cmd --no-diff-deleted \
+ -N --non-recursive --username \
+ --password --no-auth-cache \
+ --non-interactive --force \
+ --old --new --notice-ancestry'
+ ;;
+ export)
+ options='-r --revision -q --quiet \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive -N \
+ --non-recursive --force \
+ --native-eol --ignore-externals'
+ ;;
+ import)
+ options='--auto-props --no-auto-props \
+ -m --message -F --file \
+ --encoding --force-log -q \
+ --quiet --non-recursive \
+ --no-ignore --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ info)
+ options='--username --password \
+ --no-auth-cache \
+ --non-interactive -r \
+ --revision --xml --targets \
+ -R --recursive --incremental'
+ ;;
+ @(list|ls))
+ options='-r --revision -v --verbose -R \
+ --recursive --username \
+ --password --no-auth-cache \
+ --non-interactive \
+ --incremental --xml'
+ ;;
+ lock)
+ options='-m --message -F --file \
+ --encoding --force-log \
+ --targets --force --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ log)
+ options='-r --revision -v --verbose \
+ --targets --username \
+ --password --no-auth-cache \
+ --non-interactive \
+ --stop-on-copy --incremental \
+ --xml -q --quiet --limit'
+ ;;
+ merge)
+ options='-r --revision -N \
+ --non-recursive -q --quiet \
+ --force --dry-run --diff3-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive \
+ --ignore-ancestry'
+ ;;
+ mkdir)
+ options='-m --message -F --file \
+ --encoding --force-log -q \
+ --quiet --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(move|mv|rename|ren))
+ options='-m --message -F --file \
+ --encoding --force-log -r \
+ --revision -q --quiet \
+ --force --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(propdel|pdel|pd))
+ options='-q --quiet -R --recursive -r \
+ --revision --revprop \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(propedit|pedit|pe))
+ options='-r --revision --revprop \
+ --encoding --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive --force'
+ ;;
+ @(propget|pget|pg))
+ options='-R --recursive -r --revision \
+ --revprop --strict --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(proplist|plist|pl))
+ options='-v --verbose -R --recursive \
+ -r --revision --revprop -q \
+ --quiet --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(propset|pset|ps))
+ options='-F --file -q --quiet \
+ --targets -R --recursive \
+ --revprop --encoding \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive -r \
+ --revision --force'
+ ;;
+ resolved)
+ options='--targets -R --recursive -q \
+ --quiet'
+ ;;
+ revert)
+ options='--targets -R --recursive -q \
+ --quiet'
+ ;;
+ @(status|stat|st))
+ options='-u --show-updates -v \
+ --verbose -N --non-recursive \
+ -q --quiet --username \
+ --password --no-auth-cache \
+ --non-interactive --no-ignore \
+ --ignore-externals \
+ --incremental --xml'
+ ;;
+ @(switch|sw))
+ options='--relocate -r --revision -N \
+ --non-recursive -q --quiet \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive --diff3-cmd'
+ ;;
+ unlock)
+ options='--targets --force --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(update|up))
+ options='-r --revision -N \
+ --non-recursive -q --quiet \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive \
+ --diff3-cmd --ignore-externals'
+ ;;
+ esac
+ options="$options --help -h --config-dir"
+
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ if [[ "$command" == @(help|h|\?) ]]; then
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ else
+ _filedir
+ fi
+ fi
+ fi
+
+ return 0
+}
+complete -F _svn $default svn
+
+_svnadmin()
+{
+ local cur prev commands options mode
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ commands='create deltify dump help ? hotcopy list-dblogs \
+ list-unused-dblogs load lslocks lstxns recover rmlocks \
+ rmtxns setlog verify'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case $prev in
+ --config-dir)
+ _filedir -d
+ return 0;
+ ;;
+ --fs-type)
+ COMPREPLY=( $( compgen -W 'fsfs bdb' -- $cur ) )
+ return 0;
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ create)
+ options='--bdb-txn-nosync \
+ --bdb-log-keep --config-dir \
+ --fs-type'
+ ;;
+ deltify)
+ options='-r --revision -q --quiet'
+ ;;
+ dump)
+ options='-r --revision --incremental \
+ -q --quiet --deltas'
+ ;;
+ hotcopy)
+ options='--clean-logs'
+ ;;
+ load)
+ options='--ignore-uuid --force-uuid \
+ --parent-dir -q --quiet \
+ --use-pre-commit-hook \
+ --use-post-commit-hook'
+ ;;
+ rmtxns)
+ options='-q --quiet'
+ ;;
+ setlog)
+ options='-r --revision --bypass-hooks'
+ ;;
+ esac
+
+ options="$options --help -h"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ if [[ "$command" == @(help|h|\?) ]]; then
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ else
+ _filedir
+ fi
+ fi
+ fi
+
+ return 0
+}
+complete -F _svnadmin $default svnadmin
+
+_svnlook()
+{
+ local cur prev commands options mode
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ commands='author cat changed date diff dirs-changed help ? h history \
+ info lock log propget pget pg proplist plist pl tree uuid \
+ youngest'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ @(author|cat|date|dirs-changed|info|log))
+ options='-r --revision -t \
+ --transaction'
+ ;;
+ changed)
+ options='-r --revision -t \
+ --transaction --copy-info'
+ ;;
+ diff)
+ options='-r --revision -t \
+ --transaction \
+ --no-diff-deleted \
+ --no-diff-added \
+ --diff-copy-from'
+ ;;
+ history)
+ options='-r --revision --show-ids'
+ ;;
+ prop@(get|list))
+ options='-r --revision -t \
+ --transaction --revprop'
+ ;;
+ tree)
+ options='-r --revision -t \
+ --transaction --show-ids \
+ --full-paths'
+ ;;
+ esac
+
+ options="$options --help -h"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ if [[ "$command" == @(help|h|\?) ]]; then
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ else
+ _filedir
+ fi
+ fi
+ fi
+
+ return 0
+}
+complete -F _svnlook $default svnlook
+}
+
+_filedir_xspec()
+{
+ local IFS cur xspec
+
+ IFS=$'\t\n'
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ _expand || return 0
+
+ # get first exclusion compspec that matches this command
+ xspec=$( sed -ne $'/^complete .*[ \t]'${1##*/}$'\([ \t]\|$\)/{p;q;}' \
+ $BASH_COMPLETION )
+ # prune to leave nothing but the -X spec
+ xspec=${xspec#*-X }
+ xspec=${xspec%% *}
+
+ COMPREPLY=( $( eval compgen -f -X "$xspec" -- \
+ \"${cur#[\`\"\']}\" 2>/dev/null ) \
+ $( compgen -d -- $cur ) )
+}
+list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
+ $BASH_COMPLETION | \
+ # read exclusion compspecs
+ (
+ while read line
+ do
+ # ignore compspecs that are commented out
+ if [ "${line#\#}" != "$line" ]; then continue; fi
+ line=${line%# START exclude*}
+ line=${line%# FINISH exclude*}
+ line=${line##*\'}
+ list=( ${list[@]:-} $line )
+ done
+ echo ${list[@]}
+ )
+ ) )
+# remove previous compspecs
+if [ ${#list[@]} -gt 0 ]; then
+ eval complete -r ${list[@]}
+ # install new compspecs
+ eval complete -F _filedir_xspec $filenames ${list[@]}
+fi
+unset list
+
+# source completion directory definitions
+if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
+ -x $BASH_COMPLETION_DIR ]; then
+ for i in $BASH_COMPLETION_DIR/*; do
+ [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|.rpm*) ]] &&
+ [ \( -f $i -o -h $i \) -a -r $i ] && . $i
+ done
+fi
+unset i
+
+# source user completion file
+[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \
+ && . ~/.bash_completion
+unset -f have
+unset UNAME RELEASE default dirnames filenames have nospace bashdefault \
+ plusdirs
+
+### Local Variables:
+### mode: shell-script
+### End:
diff --git a/debian/bash_completion/bash_completion.sh b/debian/bash_completion/bash_completion.sh
new file mode 100644
index 0000000..cb85219
--- /dev/null
+++ b/debian/bash_completion/bash_completion.sh
@@ -0,0 +1,18 @@
+# $Id: bash_completion.sh,v 1.2 2006/02/25 01:21:33 ianmacd Exp $
+
+# Check for bash (and that we haven't already been sourced).
+[ -z "$BASH_VERSION" -o -n "$BASH_COMPLETION" ] && return
+
+# Check for recent enough version of bash.
+bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
+
+# Check for interactive shell.
+if [ -n "$PS1" ]; then
+ if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
+ if [ -r /etc/bash_completion ]; then
+ # Source completion code.
+ . /etc/bash_completion
+ fi
+ fi
+fi
+unset bash bminor bmajor
diff --git a/debian/bash_completion/contrib/bitkeeper b/debian/bash_completion/contrib/bitkeeper
new file mode 100644
index 0000000..0e9adf8
--- /dev/null
+++ b/debian/bash_completion/contrib/bitkeeper
@@ -0,0 +1,21 @@
+# BitKeeper completion adapted from code by Bart Trojanowski <bart@jukie.net>
+#
+# $Id: bitkeeper,v 1.2 2002/06/12 22:03:23 ianmacd Exp $
+#
+
+_bk() {
+ local BKCMDS
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ BKCMDS="$( bk help topics | grep '^ bk' | cut -d ' ' -f 4 | \
+ xargs echo )"
+
+ COMPREPLY=( $( compgen -W "$BKCMDS" -- "$cur" ) )
+ _filedir
+
+ return 0
+}
+complete -F _bk bk
+
diff --git a/debian/bash_completion/contrib/bittorrent b/debian/bash_completion/contrib/bittorrent
new file mode 100644
index 0000000..539a3e0
--- /dev/null
+++ b/debian/bash_completion/contrib/bittorrent
@@ -0,0 +1,37 @@
+# btdownloadheadless(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: bittorrent,v 1.1 2004/10/14 08:53:25 ianmacd Exp $
+#
+_btdownload()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --@(responsefile|saveas))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--max_uploads --keepalive_interval \
+ --download_slice_size --request_backlog \
+ --max_message_length --ip --minport --maxport \
+ --responsefile --url --saveas --timeout \
+ --timeout_check_interval --max_slice_length \
+ --max_rate_period --bind --upload_rate_fudge \
+ --display_interval --rerequest_interval \
+ --min_peers --http_timeout --max_initiate \
+ --max_allow_in --check_hashes \
+ --max_upload_rate --snub_time --spew \
+ --rarest_first_cutoff --min_uploads \
+ --report_hash_failures' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _btdownload btdownloadheadless.py btdownloadcurses.py btdownloadgui.py
diff --git a/debian/bash_completion/contrib/cksfv b/debian/bash_completion/contrib/cksfv
new file mode 100644
index 0000000..3163f66
--- /dev/null
+++ b/debian/bash_completion/contrib/cksfv
@@ -0,0 +1,29 @@
+# cksfv completion by Chris <xris@forevermore.net>
+#
+# $Id: cksfv,v 1.3 2004/03/30 22:39:11 ianmacd Exp $
+
+_cksfv()
+{
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- $cur ) )
+ return 0
+ fi
+
+ case "${COMP_WORDS[$COMP_CWORD-1]}" in
+ -C)
+ _filedir -d
+ return 0
+ ;;
+ -f)
+ _filedir 'sfv'
+ return 0
+ ;;
+ esac
+
+ _filedir
+ return 0
+}
+complete -F _cksfv cksfv
diff --git a/debian/bash_completion/contrib/clisp b/debian/bash_completion/contrib/clisp
new file mode 100644
index 0000000..6eb42a1
--- /dev/null
+++ b/debian/bash_completion/contrib/clisp
@@ -0,0 +1,25 @@
+# bash brogrammable completion for various Common Lisp implementations by
+# Nikodemus Siivola <nikodemus@random-state.net>
+#
+# $Id: clisp,v 1.2 2004/03/30 23:05:45 ianmacd Exp $
+
+_clisp()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --help --version --license -B -K \
+ -M -m -L -N -E -q --quiet --silent -w -I -ansi \
+ -traditional -p -C -norc -i -c -l -o -x ' \
+ -- $cur ) )
+ else
+ _filedir
+ fi
+
+ return 0
+}
+complete -F _clisp -o default clisp
diff --git a/debian/bash_completion/contrib/dsniff b/debian/bash_completion/contrib/dsniff
new file mode 100644
index 0000000..09dc328
--- /dev/null
+++ b/debian/bash_completion/contrib/dsniff
@@ -0,0 +1,271 @@
+# dsniff util completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: dsniff,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+# arpspoof(8) completion
+#
+_arpspoof()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ -t)
+ _known_hosts
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -t' -- $cur ) )
+ else
+ _known_hosts
+ fi
+
+}
+complete -F _arpspoof arpspoof
+
+# dnsspoof(8) completion
+#
+_dnsspoof()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ -f)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -f' -- $cur ) )
+ fi
+
+}
+complete -F _dnsspoof dnsspoof
+
+# dsniff(8) completion
+#
+_dsniff()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(r|w|f))
+ _filedir
+ return 0
+ ;;
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d -m -n -i -s -f -t \
+ -r -w' -- $cur ) )
+ fi
+
+}
+complete -F _dsniff dsniff
+
+# filesnarf(8), mailsnarf(8) and msgsnarf (8) completion
+#
+_snarf()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -v' -- $cur ) )
+ fi
+
+}
+complete -F _snarf filesnarf mailsnarf msgsnarf
+
+# macof(8) completion
+#
+_macof()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- $cur ) )
+ fi
+
+}
+complete -F _macof macof
+
+# sshmitm(8) completion
+#
+_sshmitm()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d -I -p' -- $cur ) )
+ else
+ _known_hosts
+ fi
+
+}
+complete -F _sshmitm sshmitm
+
+# sshow(8) completion
+#
+_sshow()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d -i' -- $cur ) )
+ fi
+
+}
+complete -F _sshow sshow
+
+# tcpkill(8) completion
+#
+_tcpkill()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- $cur ) )
+ fi
+
+}
+complete -F _tcpkill tcpkill
+
+# tcpnice(8) completion
+#
+_tcpnice()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) )
+ fi
+
+}
+complete -F _tcpnice tcpnice
+
+# urlsnarf(8) completion
+#
+_urlsnarf()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -i)
+ _interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-n -i -v' -- $cur ) )
+ fi
+
+}
+complete -F _urlsnarf urlsnarf
+
+# webmitm(8) completion
+#
+_webmitm()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d' -- $cur ) )
+ else
+ _known_hosts
+ fi
+
+}
+complete -F _webmitm webmitm
diff --git a/debian/bash_completion/contrib/freeciv b/debian/bash_completion/contrib/freeciv
new file mode 100644
index 0000000..6f4b6c8
--- /dev/null
+++ b/debian/bash_completion/contrib/freeciv
@@ -0,0 +1,63 @@
+# civserver completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: freeciv,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+_civserver()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|g|l|r|-file|-log|-gamelog|-read))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d -f -g -h -i -l -m -M -p -q -r -v\
+ --debug --file --gamelog --help --info --log --meta \
+ --Metaserver --port --quitidle --read --version' \
+ -- $cur ) )
+ fi
+
+}
+complete -F _civserver civserver
+
+# civclient completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+_civclient()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(l|S|t|-log|-Sound|-tiles))
+ _filedir
+ return 0
+ ;;
+ -@(P|-Plugin))
+ COMPREPLY=( $( compgen -W 'none esd sdl' -- $cur ) )
+ return 0
+ ;;
+ -@(s|-server))
+ _known_hosts
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\
+ --autoconnect --debug --help --log --meta --name \
+ --port --Plugin --server --Sound --tiles --version' \
+ -- $cur ) )
+ fi
+
+}
+complete -F _civclient civclient
diff --git a/debian/bash_completion/contrib/gcl b/debian/bash_completion/contrib/gcl
new file mode 100644
index 0000000..9e1b011
--- /dev/null
+++ b/debian/bash_completion/contrib/gcl
@@ -0,0 +1,24 @@
+# bash programmable completion for various Common Lisp implementations by
+# Nikodemus Siivola <nikodemus@random-state.net>
+#
+# $Id: gcl,v 1.2 2004/03/30 23:05:45 ianmacd Exp $
+
+_gcl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-eval -load -f -batch -dir -libdir \
+ -compile -o-file -c-file -h-file -data-file -system-p '\
+ -- $cur ) )
+ else
+ _filedir
+ fi
+
+ return 0
+}
+complete -F _gcl -o default gcl
diff --git a/debian/bash_completion/contrib/gkrellm b/debian/bash_completion/contrib/gkrellm
new file mode 100644
index 0000000..1fe2d01
--- /dev/null
+++ b/debian/bash_completion/contrib/gkrellm
@@ -0,0 +1,36 @@
+# gkrellm(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: gkrellm,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+_gkrellm()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(t|-theme))
+ _filedir -d
+ return 0
+ ;;
+ -@(p|-plugin))
+ _filedir 'so'
+ return 0
+ ;;
+ -@(s|-server))
+ _known_hosts
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help -t --theme -s --server \
+ -g --geometry -wm -w --withdrawn -c --config -nc \
+ -f --force-host-config -demo -p --plugin -P \
+ --port' -- $cur ) )
+ fi
+
+}
+complete -F _gkrellm gkrellm
diff --git a/debian/bash_completion/contrib/gnatmake b/debian/bash_completion/contrib/gnatmake
new file mode 100644
index 0000000..cadf360
--- /dev/null
+++ b/debian/bash_completion/contrib/gnatmake
@@ -0,0 +1,31 @@
+# Gnatmake completion by Ralf_Schroth@t-online.de (Ralf Schroth)
+#
+# $Id: gnatmake,v 1.1 2002/08/19 16:57:44 ianmacd Exp $
+#
+_gnatmake()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ # relevant (and less relevant ;-) )options completion
+ COMPREPLY=( $( compgen -W '-a -c -f -i -j -k -m -M -n -o \
+ -q -s -v -z -aL -A -aO -aI -I -I- -L -nostdinc \
+ -nostdlib -cargs -bargs -largs -fstack-check \
+ -fno-inline -g -O1 -O0 -O2 -O3 -gnata -gnatA \
+ -gnatb -gnatc -gnatd -gnatD -gnate -gnatE \
+ -gnatf -gnatF -gnatg -gnatG -gnath -gnati \
+ -gnatk -gnatl -gnatL -gnatm -gnatn -gnato \
+ -gnatO -gnatp -gnatP -gnatq -gnatR -gnats \
+ -gnatt -gnatT -gnatu -gnatU -gnatv -gnatws \
+ -gnatwe -gnatwl -gnatwu -gnatW -gnatx -gnatX \
+ -gnaty -gnatz -gnatZ -gnat83' -- $cur ) )
+ else
+ # source file completion
+ _filedir '@(adb|ads)'
+
+ fi
+}
+complete -F _gnatmake -o filenames gnatmake
diff --git a/debian/bash_completion/contrib/harbour b/debian/bash_completion/contrib/harbour
new file mode 100644
index 0000000..ccb0b83
--- /dev/null
+++ b/debian/bash_completion/contrib/harbour
@@ -0,0 +1,8 @@
+# harbour completion by Dave Pearson <davep@davep.org>
+# http://www.harbour-project.org/
+#
+# $Id: harbour,v 1.3 2003/12/31 08:22:37 ianmacd Exp $
+
+complete -f -X '!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])' harbour gharbour hbpp
+complete -f -X '!*.[Hh][Rr][Bb]' hbrun
+
diff --git a/debian/bash_completion/contrib/hg b/debian/bash_completion/contrib/hg
new file mode 100644
index 0000000..a5d9262
--- /dev/null
+++ b/debian/bash_completion/contrib/hg
@@ -0,0 +1,134 @@
+# Mercurial completion by Alexis S. L. Carvalho <alexis@cecm.usp.br>
+#
+# See: http://www.selenic.com/pipermail/mercurial/2005-August/003378.html
+#
+# $Id: hg,v 1.1 2006/02/26 00:25:41 ianmacd Exp $
+#
+_hg_commands()
+{
+ local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
+ -e '/^global options:/Q' \
+ -e '/^ [^ ]/!d; s/[,:]//g;')"
+
+ # hide debug commands from users, but complete them if
+ # specifically asked for
+ if [[ "$cur" == de* ]]; then
+ commands="$commands debugcheckstate debugstate debugindex"
+ commands="$commands debugindexdot debugwalk"
+ fi
+ COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") )
+}
+
+_hg_paths()
+{
+ local paths="$(hg paths | sed -e 's/ = .*$//')"
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W "$paths" -- "$cur" ))
+}
+
+_hg_tags()
+{
+ local tags="$(hg tags | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//')"
+ COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$tags" -- "$cur") )
+}
+
+# this is "kind of" ugly...
+_hg_count_non_option()
+{
+ local i count=0
+ local filters="$1"
+
+ for (( i=1; $i<=$COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" != -* ]]; then
+ for f in $filters; do
+ if [[ ${COMP_WORDS[i-1]} == $f ]]; then
+ continue 2
+ fi
+ done
+ count=$(($count + 1))
+ fi
+ done
+
+ echo $(($count - 1))
+}
+
+_hg()
+{
+ local cur prev cmd opts i
+
+ COMPREPLY=()
+ cur="$2"
+ prev="$3"
+
+ # searching for the command
+ # (first non-option argument that doesn't follow -R/--repository)
+ for (( i=1; $i<=$COMP_CWORD; i++ )); do
+ if [[ ${COMP_WORDS[i]} != -* ]] \
+ && [ "${COMP_WORDS[i-1]}" != -R ] \
+ && [ "${COMP_WORDS[i-1]}" != --repository ]; then
+ cmd="${COMP_WORDS[i]}"
+ break
+ fi
+ done
+
+ if [[ "$cur" == -* ]]; then
+ opts="$(hg -v help | sed -e '1,/^global options/d; /^ -/!d')"
+
+ if [ -n "$cmd" ]; then
+ opts="$opts $(hg help "$cmd" | sed -e '/^ -/!d; s/ [^-][^ ]*//')"
+ fi
+
+ COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$opts" -- "$cur") )
+ return
+ fi
+
+ if [ "$prev" = -R ] || [ "$prev" = --repository ]; then
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
+ return
+ fi
+
+ if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then
+ _hg_commands
+ return
+ fi
+
+ if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" = --rev ]; then
+ _hg_tags
+ return
+ fi
+
+ case "$cmd" in
+ help)
+ _hg_commands
+ ;;
+ export|manifest|update|checkout|up|co)
+ _hg_tags
+ ;;
+ pull|push)
+ _hg_paths
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
+ ;;
+ paths)
+ _hg_paths
+ ;;
+ clone)
+ local count=$(_hg_count_non_option)
+ if [ $count = 1 ]; then
+ _hg_paths
+ fi
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
+ ;;
+ cat)
+ local count=$(_hg_count_non_option -o --output)
+ if [ $count = 2 ]; then
+ _hg_tags
+ else
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
+ fi
+ ;;
+ *)
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
+ ;;
+ esac
+
+}
+complete -o filenames -F _hg hg
diff --git a/debian/bash_completion/contrib/isql b/debian/bash_completion/contrib/isql
new file mode 100644
index 0000000..d4c21ab
--- /dev/null
+++ b/debian/bash_completion/contrib/isql
@@ -0,0 +1,12 @@
+# isql completion by Victor Bogado da Silva Lins <victor@bogado.net>
+#
+# $Id: isql,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+_isql()
+{
+ local cur
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( grep \\[$cur $ODBCINI | tr -d \\[\\] ) )
+}
+complete -F _isql isql
diff --git a/debian/bash_completion/contrib/larch b/debian/bash_completion/contrib/larch
new file mode 100644
index 0000000..60ab6e9
--- /dev/null
+++ b/debian/bash_completion/contrib/larch
@@ -0,0 +1,38 @@
+# larch(1) completion by Alex Shinn <foof@synthcode.com>
+#
+# $Id: larch,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+_larch()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ] || [[ "$prev" == -* ]]; then
+ COMPREPLY=( $( compgen -W ' \
+my-id my-default-archive register-archive whereis-archive archives \
+init-tree tree-root tree-version set-tree-version inventory tagging-method \
+tree-lint missing-tags add delete move explicit-default set-manifest \
+manifest check-manifest mkpatch dopatch patch-report empty-patch \
+make-archive make-category make-branch make-version categories \
+branches versions revisions cat-archive-log archive-cache-revision \
+archive-cached-revisions archive-uncache-revision category-readme \
+branch-readme version-readme make-log logs add-log log-ls cat-log \
+log-header-field changelog log-for-merge merge-points new-on-branch \
+import commit get get-patch lock-branch lock-revision push-mirror \
+build-config update-config replay-config record-config show-config \
+config-history update replay delta-patch star-merge tag prepare-branch \
+finish-branch join-branch whats-missing what-changed file-diffs pristines \
+lock-pristine my-revision-library library-find library-add library-remove \
+library-archives library-categories library-branches library-versions \
+library-revisions library-log library-file touched-files-prereqs \
+patch-set-web update-distributions distribution-name notify my-notifier \
+mail-new-categories mail-new-branches mail-new-versions mail-new-revisions \
+notify-library notify-browser push-new-revisions sendmail-mailx' $cur ))
+ fi
+
+ return 0
+}
+complete -F _larch -o default larch
diff --git a/debian/bash_completion/contrib/lilypond b/debian/bash_completion/contrib/lilypond
new file mode 100644
index 0000000..0e71904
--- /dev/null
+++ b/debian/bash_completion/contrib/lilypond
@@ -0,0 +1,5 @@
+# lilypond completion by Laurent Martelli <laurent@bearteam.org>
+#
+# $Id: lilypond,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+complete -f -X '!*.ly' lilypond ly2dvi
diff --git a/debian/bash_completion/contrib/lisp b/debian/bash_completion/contrib/lisp
new file mode 100644
index 0000000..f1afe8d
--- /dev/null
+++ b/debian/bash_completion/contrib/lisp
@@ -0,0 +1,25 @@
+# bash programmable completion for various Common Lisp implementations by
+# Nikodemus Siivola <nikodemus@random-state.net>
+#
+# $Id: lisp,v 1.2 2004/03/30 23:05:45 ianmacd Exp $
+
+_lisp()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-core -lib -batch -quit -edit -eval -init \
+ -dynamic-space-size -hinit -noinit -nositeinit -load \
+ -slave ' \
+ -- $cur ) )
+ else
+ _filedir
+ fi
+
+ return 0
+}
+complete -F _lisp -o default lisp
diff --git a/debian/bash_completion/contrib/mailman b/debian/bash_completion/contrib/mailman
new file mode 100644
index 0000000..0d92a01
--- /dev/null
+++ b/debian/bash_completion/contrib/mailman
@@ -0,0 +1,532 @@
+# Mailman completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: mailman,v 1.1 2004/03/30 23:05:34 ianmacd Exp $
+#
+_mailman_lists()
+{
+ COMPREPLY=( $( list_lists -b | grep "^$cur") )
+}
+
+_add_members()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(r|d|-regular-members-file=|-digest-members-file=))
+ _filedir
+ return 0
+ ;;
+ -@(w|a|-welcome-msg=|-admin-notify=))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--regular-members-file= -r \
+ --digest-members-file= -d --welcome-msg= -w \
+ --admin-notify= -a --help -h' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _add_members add_members
+
+_remove_members()
+{
+
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|-file=))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--file= -f --all -a \
+ --fromall --nouserack -n --noadminack -N \
+ --help -h' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _remove_members remove_members
+
+_find_member()
+{
+
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(l|x|-listname=|-exclude=))
+ _mailman_lists
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-l --listname= -x \
+ --exclude= --owners -w --help -h' -- $cur ) )
+ fi
+
+}
+complete -F _find_member find_member
+
+_clone_member()
+{
+
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(l|-listname=))
+ _mailman_lists
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-l --listname= --remove -r \
+ --admin -a --quiet -q --nomodify -n --help -h' -- $cur ) )
+ fi
+
+}
+complete -F _clone_member clone_member
+
+_sync_members()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(w|g|d|--welcome-msg=|-goodbye-msg|-digest=))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur) )
+ return 0
+ ;;
+ -@(d|-file))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--no-change -n --welcome-msg= -w \
+ --goodbye-msg= -g --digest= -d --notifyadmin= -a \
+ -f --file -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _sync_members sync_members
+
+_list_lists()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --advertised \
+ --virtual-host-overview= -V -b --bare \
+ -h --help' -- $cur ) )
+ fi
+
+}
+complete -F _list_lists list_lists
+
+_unshunt()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --help' -- $cur ) )
+ else
+ _filedir -d
+ fi
+
+}
+complete -F _unshunt unshunt
+
+_list_admins()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--all-vhost= -v \
+ --all -a -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _list_admins list_admins
+
+_list_owners()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-w --with-listnames \
+ -m --moderators -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _list_owners list_owners
+
+_list_members()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|-output))
+ _filedir
+ return 0
+ ;;
+ -@(d|-digest=))
+ COMPREPLY=( $( compgen -W 'mime plain' -- $cur) )
+ return 0
+ ;;
+ -@(n|-nomail=))
+ COMPREPLY=( $( compgen -W 'byadmin byuser bybounce unknown' -- $cur) )
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--output -o --regular -r \
+ --digest= -d --nomail= -n --fullnames -f \
+ --preserve -p -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _list_members list_members
+
+_change_pw()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(l|-listname=))
+ _mailman_lists
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all --domain= -d --listname= -l \
+ --password= -p --quiet -q -h --help' -- $cur ) )
+ fi
+
+}
+complete -F _change_pw change_pw
+
+_withlist()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-l --lock -i --interactive \
+ -r --run -a --all -q --quiet -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _withlist withlist
+
+_newlist()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-l --language -q --quiet -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _newlist newlist
+
+_rmlist()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--archives -a \
+ -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _rmlist rmlist
+
+_config_list()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(i|o|-inputfile|-outputfile))
+ _filedir
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--inputfile -i --outputfile -o \
+ --checkonly -c --verbose -v -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _config_list $filenames config_list
+
+_arch()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(w|g|d|--welcome-msg=|-goodbye-msg|-digest=))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur) )
+ return 0
+ ;;
+ -@(d|-file))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--wipe -s --start= -e --end= \
+ -q --quiet -h --help' -- $cur ) )
+ else
+ args=$COMP_CWORD
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -* ]]; then
+ args=$(($args-1))
+ fi
+ done
+ case $args in
+ 1)
+ _mailman_lists
+ ;;
+ 2)
+ _filedir
+ ;;
+ esac
+ fi
+
+}
+complete -F _arch $filenames arch
+
+_cleanarch()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-s --status -n --dry-run \
+ -q --quiet -h --help' -- $cur ) )
+ fi
+
+}
+complete -F _cleanarch cleanarch
+
+_inject()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(l|-listname=))
+ _mailman_lists
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-l --listname= -q --queue= \
+ -h --help' -- $cur ) )
+ else
+ _filedir
+ fi
+
+}
+complete -F _inject $filenames inject
+
+_dumpdb()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--marshal -m --pickle -p --noprint -n -h --help' -- $cur ) )
+ else
+ _filedir
+ fi
+
+}
+complete -F _dumpdb $filenames dumpdb
+
+_check_db()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--all -a --verbose -v \
+ -h --help' -- $cur ) )
+ else
+ _mailman_lists
+ fi
+
+}
+complete -F _check_db check_db
+
+_check_perms()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-f -v -h' -- $cur ) )
+ fi
+
+}
+complete -F _check_perms check_perms
+
+_genaliases()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-q --quiet -h --help' -- $cur ) )
+ fi
+
+}
+complete -F _genaliases genaliases
+
+_mmsitepass()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --listcreator -h --help' -- $cur ) )
+ fi
+
+}
+complete -F _mmsitepass mmsitepass
+
+_qrunner()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-r --runner= --once -o \
+ -l --list -v --verbose -s --subproc -h --help' -- $cur ) )
+ fi
+
+}
+complete -F _qrunner qrunner
+
+_mailmanctl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-n --no-restart -u --run-as-user \
+ -s --stale-lock-cleanup --quiet -q -h --help' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'start stop restart reopen' -- $cur ) )
+ fi
+
+}
+complete -F _mailmanctl mailmanctl
diff --git a/debian/bash_completion/contrib/mcrypt b/debian/bash_completion/contrib/mcrypt
new file mode 100644
index 0000000..8b4e1db
--- /dev/null
+++ b/debian/bash_completion/contrib/mcrypt
@@ -0,0 +1,79 @@
+# mcrypt(1) completion by Ariel Fermani <the_end@bbs.frc.utn.edu.ar>
+#
+# $Id: mcrypt,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+_mcrypt()
+{
+ local cur prev i decrypt
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(g|-openpgp-z))
+ COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' \
+ -- $cur ) )
+ return 0
+ ;;
+ -@(o|-keymode))
+ COMPREPLY=( $( mcrypt --list-keymodes 2> /dev/null |
+ grep "^$cur" ) )
+ return 0
+ ;;
+ -@(m|-mode))
+ COMPREPLY=( $( mcrypt --list 2> /dev/null |
+ sed -e 's/.*: //' -e 's/ $//' | sort |
+ uniq | tr " " "\n" | grep "^$cur" ) )
+ return 0
+ ;;
+ -@(a|-algorithm))
+ COMPREPLY=( $( mcrypt --list 2> /dev/null |
+ awk '{print $1}' | grep "^$cur" ) )
+ return 0
+ ;;
+ -@(h|-hash))
+ COMPREPLY=( $( mcrypt --list-hash 2> /dev/null |
+ sed 1d | grep "^$cur" ) )
+ return 0
+ ;;
+ -@(k|s|-@(key?(size))))
+ return 0
+ ;;
+ -@(f|c|-@(keyfile|config)))
+ _filedir
+ return 0
+ ;;
+ --@(algorithm|mode)s-directory)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-g --openpgp --openpgp-z -d \
+ --decrypt -s --keysize -o --keymode -f --keyfile \
+ -c --config -a --algorithm --algorithms-directory \
+ -m --mode --modes-directory -h --hash -k --key \
+ --noiv -b --bare -z --gzip -p --bzip2 --flush -l \
+ --doublecheck -u --unlink --nodelete -t --time -F \
+ --force --echo -r --random --list --list-keymodes \
+ --list-hash -V --verbose -q --quiet --help -v \
+ --version -L --license' -- $cur ) )
+ elif [[ ${COMP_WORDS[0]} == mdecrypt ]]; then
+ _filedir '@(nc)'
+ else
+ decrypt=0
+ for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -@(d|-decrypt) ]]; then
+ _filedir '@(nc)'
+ decrypt=1
+ break
+ fi
+ done
+ if [[ $decrypt -eq 0 ]]; then
+ _filedir
+ fi
+ fi
+}
+complete -o filenames -F _mcrypt mcrypt mdecrypt
diff --git a/debian/bash_completion/contrib/modules b/debian/bash_completion/contrib/modules
new file mode 100644
index 0000000..8b180b1
--- /dev/null
+++ b/debian/bash_completion/contrib/modules
@@ -0,0 +1,87 @@
+# module completion by Ted Stern <stern@cray.com>
+#
+# $Id: modules,v 1.2 2005/07/11 17:49:14 ianmacd Exp $
+#
+# Completion for Environment Modules `module' alias.
+#
+# See http://sourceforge.net/projects/modules/
+# http://modules.sourceforge.net/
+#
+# There are several versions of modules that are commonly used. Older
+# Cray UNICOS systems and many other sites use 2.2.2b. The latest GPL'd
+# version is 3.1.6. But the module alias is somewhat self-documenting
+# via the `module help' command, so use that to print the options.
+#
+# Programmable completion might be more difficult under tcsh since the
+# module command is an alias, and the `module avail' command returns
+# its output as stderr.
+#
+type module &>/dev/null && {
+
+_module_list ()
+{
+ local modules="$( echo $LOADEDMODULES | sed 's/:/ /g' | sort )"
+ compgen -W "$modules" -- $1
+}
+
+_module_path ()
+{
+ local modules="$( echo $MODULEPATH | sed 's/:/ /g' | sort )"
+ compgen -W "$modules" -- $1
+}
+
+_module_avail ()
+{
+ local modules="$( \
+ module avail 2>&1 | \
+ egrep -v '^(-|$)' | \
+ xargs printf '%s\n' | sort )"
+
+ compgen -W "$modules" -- $1
+}
+
+# A completion function for the module alias
+_module () {
+ local cur prev options
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ] ; then
+ # First parameter on line -- we expect it to be a mode selection
+
+ options="$( module help 2>&1 | egrep '^[[:space:]]*\+' | \
+ awk '{print $2}' | sed -e 's/|/ /g' | sort )"
+
+ COMPREPLY=( $(compgen -W "$options" -- $cur) )
+
+ elif [ $COMP_CWORD -eq 2 ] ; then
+
+ case "$prev" in
+ @(add|display|help|load|show|whatis))
+ COMPREPLY=( $(_module_avail $cur) )
+ ;;
+
+ @(rm|switch|swap|unload|update))
+ COMPREPLY=( $(_module_list $cur) )
+ ;;
+ unuse)
+ COMPREPLY=( $(_module_path $cur) )
+ ;;
+ esac
+ elif [ $COMP_CWORD -eq 3 ] ; then
+ case ${COMP_WORDS[1]} in
+ @(sw?(ap|itch)))
+ COMPREPLY=( $(_module_avail $cur) )
+ ;;
+ esac
+ fi
+ return 0
+}
+complete -o default -F _module module
+}
+# Local Variables:
+# mode:shell-script
+# sh-shell:bash
+# End:
diff --git a/debian/bash_completion/contrib/mtx b/debian/bash_completion/contrib/mtx
new file mode 100644
index 0000000..22b855d
--- /dev/null
+++ b/debian/bash_completion/contrib/mtx
@@ -0,0 +1,45 @@
+# mtx completion by Jon Middleton <jjm@ixtab.org.uk>
+#
+# $Id: mtx,v 1.1 2004/01/01 00:54:41 ianmacd Exp $
+
+_mtx()
+{
+ local cur prev options tapes drives
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ options="-f nobarcode invert noattach --version inquiry noattach \
+ inventory status load unload eepos first last next"
+
+ tapes=$(mtx status | \
+ awk '/Storage Element [0-9]+:Full/ { printf "%s ", $3 }')
+ tapes=${tapes//:Full}
+
+ drives=$(mtx status | \
+ awk '/Data Transfer Element [0-9]+:(Full|Empty)/ { printf "%s ", $4 }')
+ drives=${drives//:Full}
+ drives=${drives//:Empty}
+
+ if [ $COMP_CWORD -gt 1 ]; then
+ case $prev in
+ load)
+ COMPREPLY=( $( compgen -W "$tapes" -- $cur ) )
+ ;;
+ unload|first|last|next)
+ COMPREPLY=( $( compgen -W "$drives" -- $cur ) )
+ ;;
+ -f)
+ true
+ ;;
+ *)
+ true
+ ;;
+ esac
+ else
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ fi
+ return 0
+}
+complete -F _mtx mtx
diff --git a/debian/bash_completion/contrib/p4 b/debian/bash_completion/contrib/p4
new file mode 100644
index 0000000..d561722
--- /dev/null
+++ b/debian/bash_completion/contrib/p4
@@ -0,0 +1,54 @@
+# Perforce completion by Frank Cusack <frank@google.com>
+#
+# $Id: p4,v 1.3 2003/12/31 08:22:37 ianmacd Exp $
+
+_p4()
+{
+ local cur prev prev2 p4commands p4filetypes
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # rename isn't really a command
+ p4commands="$( p4 help commands | awk 'NF>3 {print $1}' )"
+ p4filetypes="ctext cxtext ktext kxtext ltext tempobj ubinary \
+ uresource uxbinary xbinary xltext xtempobj xtext \
+ text binary resource"
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W "$p4commands" -- $cur ) )
+ elif [ $COMP_CWORD -eq 2 ]; then
+ case "$prev" in
+ help)
+ COMPREPLY=( $( compgen -W "simple commands \
+ environment filetypes jobview revisions \
+ usage views $p4commands" -- $cur ) )
+ ;;
+ admin)
+ COMPREPLY=( $( compgen -W "checkpoint stop" -- $cur ) )
+ ;;
+ *)
+ ;;
+ esac
+ elif [ $COMP_CWORD -gt 2 ]; then
+ prev2=${COMP_WORDS[COMP_CWORD-2]}
+ case "$prev" in
+ -t)
+ case "$prev2" in
+ add|edit|reopen)
+ COMPREPLY=( $( compgen -W "$p4filetypes" \
+ -- $cur) )
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ fi
+
+ return 0
+}
+complete -F _p4 -o default p4 g4
diff --git a/debian/bash_completion/contrib/povray b/debian/bash_completion/contrib/povray
new file mode 100644
index 0000000..cea5482
--- /dev/null
+++ b/debian/bash_completion/contrib/povray
@@ -0,0 +1,58 @@
+# povray completion by "David Necas (Yeti)" <yeti@physics.muni.cz>
+#
+# $Id: povray,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
+
+_povray()
+{
+ local cur prev povcur pfx oext defoext
+ defoext=png # default output extension, if cannot be determined FIXME
+
+ COMPREPLY=()
+ povcur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _expand || return 0
+
+ case $povcur in
+ [-+]I*)
+ cur="${povcur#[-+]I}" # to confuse _filedir
+ pfx="${povcur%"$cur"}"
+ _filedir pov
+ COMPREPLY=( ${COMPREPLY[@]/#/$pfx} )
+ return 0
+ ;;
+ [-+]O*)
+ # guess what output file type user may want
+ case $( ( IFS=$'\n'; echo "${COMP_WORDS[*]}" | grep '^[-+]F' ) ) in
+ [-+]FN) oext=png ;;
+ [-+]FP) oext=ppm ;;
+ [-+]F[CT]) oext=tga ;;
+ *) oext=$defoext ;;
+ esac
+ # complete filename corresponding to previously specified +I
+ COMPREPLY=( $( ( IFS=$'\n'; echo "${COMP_WORDS[*]}" | grep '^[-+]I' ) ) )
+ COMPREPLY=( ${COMPREPLY[@]#[-+]I} )
+ COMPREPLY=( ${COMPREPLY[@]/%.pov/.$oext} )
+ cur="${povcur#[-+]O}" # to confuse _filedir
+ pfx="${povcur%"$cur"}"
+ _filedir $oext
+ COMPREPLY=( ${COMPREPLY[@]/#/$pfx} )
+ return 0
+ ;;
+ *.ini\[|*.ini\[*[^]]) # sections in .ini files
+ cur="${povcur#*\[}"
+ pfx="${povcur%\["$cur"}" # prefix == filename
+ [ -r "$pfx" ] || return 0
+ COMPREPLY=( $(sed -e 's/^[[:space:]]*\[\('"$cur"'[^]]*\]\).*$/\1/' -e 't' -e 'd' -- "$pfx") )
+ # to prevent [bar] expand to nothing. can be done more easily?
+ COMPREPLY=( "${COMPREPLY[@]/#/$pfx[}" )
+ return 0
+ ;;
+ *)
+ cur="$povcur"
+ _filedir '?(ini|pov)'
+ return 0
+ ;;
+ esac
+}
+complete -F _povray -o filenames povray xpovray spovray
diff --git a/debian/bash_completion/contrib/ri b/debian/bash_completion/contrib/ri
new file mode 100644
index 0000000..bbb1f3f
--- /dev/null
+++ b/debian/bash_completion/contrib/ri
@@ -0,0 +1,88 @@
+# ri completion for Ruby documentation by Ian Macdonald <ian@caliban.org>
+#
+# $Id: ri,v 1.8 2006/02/25 14:25:59 ianmacd Exp $
+#
+ri_get_methods()
+{
+ local regex
+
+ if [ "$ri_version" = integrated ]; then
+ if [ -z "$separator" ]; then
+ regex="(Instance|Class)"
+ elif [ "$separator" = "#" ]; then
+ regex=Instance
+ else
+ regex=Class
+ fi
+
+ COMPREPLY=( ${COMPREPLY[@]} \
+ "$( ri ${classes[@]} 2>/dev/null | \
+ ruby -ane 'if /^'"$regex"' methods:/.../^------------------|^$/ and \
+ /^ / then print $_.split(/, |,$/).grep(/^[^\[]*$/).join("\n"); \
+ end' | sort -u )" )
+ else
+ # older versions of ri didn't distinguish between class/module and
+ # instance methods
+ COMPREPLY=( ${COMPREPLY[@]} \
+ "$( ruby -W0 $ri_path ${classes[@]} | ruby -ane 'if /^-/.../^-/ and \
+ ! /^-/ and ! /^ +(class|module): / then \
+ print $_.split(/, |,$| +/).grep(/^[^\[]*$/).join("\n"); \
+ end' | sort -u )" )
+ fi
+ COMPREPLY=( $( compgen $prefix -W '${COMPREPLY[@]}' -- $method ) )
+}
+
+# needs at least Ruby 1.8.0 in order to use -W0
+_ri()
+{
+ local cur class method prefix ri_path ri_version separator IFS
+ local -a classes
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ ri_path=$(type -p ri)
+ # which version of ri are we using?
+ # -W0 is required here to stop warnings from older versions of ri
+ # from being captured when used with Ruby 1.8.1 and later
+ ri_version="$(ruby -W0 $ri_path -v 2>&1)" || ri_version=integrated
+ [ "$ri_version" != "${ri_version%200*}" ] && ri_version=integrated
+
+ # need to also split on commas
+ IFS=$', \n\t'
+ if [[ "$cur" == [A-Z]*[#.]* ]]; then
+ [[ "$cur" == *#* ]] && separator=# || separator=.
+ # we're completing on class and method
+ class=${cur%$separator*}
+ method=${cur#*$separator}
+ classes=( $class )
+ prefix="-P $class$separator"
+ ri_get_methods
+ return 0
+ fi
+
+ if [ "$ri_version" = integrated ]; then
+ # integrated ri from Ruby 1.9
+ classes=( $( ri -c | ruby -ne 'if /^\s*$/..$stdin.eof then \
+ if /, [A-Z]+/ then print; end; end' ) )
+ elif [ "$ri_version" = "ri 1.8a" ]; then
+ classes=( $( ruby -W0 $ri_path | \
+ ruby -ne 'if /^'"'"'ri'"'"' has/..$stdin.eof then \
+ if /^ .*[A-Z]/ then print; end; end' ))
+ else
+ classes=( $( ruby -W0 $ri_path | \
+ ruby -ne 'if /^I have/..$stdin.eof then \
+ if /^ .*[A-Z]/ then print; end; end' ))
+ fi
+
+ COMPREPLY=( $( compgen -W '${classes[@]}' -- $cur ) )
+ if [[ "$cur" == [A-Z]* ]]; then
+ # we're completing on class or module alone
+ return 0
+ fi
+
+ # we're completing on methods
+ method=$cur
+ ri_get_methods
+}
+complete -F _ri ri
diff --git a/debian/bash_completion/contrib/sbcl b/debian/bash_completion/contrib/sbcl
new file mode 100644
index 0000000..51ecddd
--- /dev/null
+++ b/debian/bash_completion/contrib/sbcl
@@ -0,0 +1,24 @@
+# bash programmable completion for various Common Lisp implementations by
+# Nikodemus Siivola <nikodemus@random-state.net>
+#
+# $Id: sbcl,v 1.2 2004/03/30 23:05:45 ianmacd Exp $
+
+_sbcl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--core --noinform --help --version \
+ --sysinit --userinit --eval --noprint --disable-debugger \
+ --end-runtime-options --end-toplevel-options ' -- $cur ) )
+ else
+ _filedir
+ fi
+
+ return 0
+}
+complete -F _sbcl -o default sbcl sbcl-mt
diff --git a/debian/bash_completion/contrib/sitecopy b/debian/bash_completion/contrib/sitecopy
new file mode 100644
index 0000000..09a49f5
--- /dev/null
+++ b/debian/bash_completion/contrib/sitecopy
@@ -0,0 +1,30 @@
+# sitecopy(1) completion
+# Copyright 2003 Eelco Lempsink <eelcolempsink@gmx.net>
+# License: GNU GPL v2 or later
+#
+# $Id: sitecopy,v 1.3 2005/01/03 02:44:22 ianmacd Exp $
+
+_sitecopy()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ --*)
+ COMPREPLY=( $( compgen -W "$(sitecopy -h | grep -e '--\w' | awk '{sub (/=(FILE|PATH)/, "", $2); print $2}')" -- $cur ) )
+ ;;
+ -*)
+ COMPREPLY=( $( compgen -W "$(sitecopy -h | grep -e '-\w' | awk '{sub (",", "", $1); print $1}')" -- $cur ) )
+ ;;
+ *)
+ if [ -r ~/.sitecopyrc ]; then
+ COMPREPLY=( $( compgen -W "$(grep '^["$'\t '"]*site' ~/.sitecopyrc | awk '{print $2}')" -- $cur ) )
+ fi
+ ;;
+ esac
+
+ return 0
+}
+complete -F _sitecopy -o default sitecopy
diff --git a/debian/bash_completion/contrib/snownews b/debian/bash_completion/contrib/snownews
new file mode 100644
index 0000000..8a1d1f4
--- /dev/null
+++ b/debian/bash_completion/contrib/snownews
@@ -0,0 +1,18 @@
+# snownews completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: snownews,v 1.2 2005/01/03 03:00:44 ianmacd Exp $
+
+_snownews()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ "$cur" == -* ]]; then
+ # return list of available options
+ COMPREPLY=( $( compgen -W '--update --help --version \
+ --disable-versioncheck -u -h -V' -- $cur))
+ fi
+}
+complete -F _snownews snownews
diff --git a/debian/bash_completion/contrib/svk b/debian/bash_completion/contrib/svk
new file mode 100644
index 0000000..70cd81f
--- /dev/null
+++ b/debian/bash_completion/contrib/svk
@@ -0,0 +1,262 @@
+# svk completion by Guillaume Rousse <guillomovitch@zarb.org>
+#
+# $Id: svk,v 1.1 2006/03/01 10:45:03 ianmacd Exp $
+
+_svk()
+{
+ local cur prev commands options command
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ commands='add admin annotate ann blame praise cat checkout co cleanup \
+ cmerge cm commit ci copy cp delete del remove rm depotmap \
+ depot describe desc diff di help h ? import info list ls log \
+ merge mirror mi mkdir move mv ren rename patch propdel pd pdel \
+ propedit pe pedit propget pg pget proplist pl plist propset ps \
+ pset pull push resolved revert smerge sm status st stat switch \
+ sw sync sy update up verify'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case $prev in
+ -@(F|-file|-targets))
+ _filedir
+ return 0;
+ ;;
+ --encoding)
+ COMPREPLY=( $( compgen -W \
+ '$( iconv --list | sed -e "s@//@@;" )' \
+ -- "$cur" ) )
+ return 0;
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ add)
+ options=' --non-recursive -N -q --quiet'
+ ;;
+ @(blame|annotate|ann|praise))
+ options='-r --revisions -x --cross'
+ ;;
+ cat)
+ options='-r --revision'
+ ;;
+ @(checkout|co))
+ options='-r --revision -q --quiet -N \
+ --non-recursive -l --list -d \
+ --detach --export --relocate \
+ --purge'
+ ;;
+ cleanup)
+ options='-a --all'
+ ;;
+ @(cmerge|cm))
+ options='-c --change -l --log -r \
+ --revision -a --auto \
+ --verbatim --no-ticket -m \
+ --message -F --file --template \ --encoding -P --patch -S \
+ --sign -C --check-only --direct'
+ ;;
+ @(commit|ci))
+ options='--import -m --message -F \
+ --file --encoding --template \
+ -P --patch -S --sign -C \
+ --check-only -N \
+ --non-recursive --direct'
+ ;;
+ @(copy|cp))
+ options='-r --revision -p --parent -q \
+ --quiet -m --message -F --file \
+ --template --encoding -P \
+ --patch -S --sign -C \
+ --check-only --direct'
+ ;;
+ @(delete|del|remove|rm))
+ options='-k --keep-local -m --message \
+ -F --file --encoding \
+ --template -P --patch -S \
+ --sign -C --check-only --direct'
+ ;;
+ @(depotmap|depot))
+ options='-i --init -l --list -d \
+ --detach --relocate'
+ ;;
+ @(diff|di))
+ options='-r --revision -s --summarize \
+ -b --verbose -N --non-recursive'
+ ;;
+ import)
+ options='-f --from-checkout -t \
+ --to-checkout -m --message -F \
+ --file --template --encoding \
+ -P --patch -S --sign -C \
+ --check-only -N \
+ --non-recursive --direct'
+ ;;
+ @(list|ls))
+ options='-r --revision -v --verbose -R \
+ --recursive -d --depth -f \
+ --full-path'
+ ;;
+ log)
+ options='-r --revision -l --limit -q \
+ --quiet -x --cross -v --verbose'
+ ;;
+ merge)
+ options='-r --revision -c --change -I \
+ --incremental -a --auto -l \
+ --log -s --sync -t --to -f \
+ --from --verbatim --no-ticket \
+ --track-rename -m --message \
+ -F --file --template \
+ --encoding -P --patch -S \
+ --sign -C --check-only --direct'
+ ;;
+ @(mirror|mi))
+ options='-l --list -d --detach \
+ --relocate --recover --unlock \
+ --upgrade'
+ ;;
+ mkdir)
+ options='-p --parent -m --message -F \
+ --file --template --encoding \
+ -P --patch -S --sign -C \
+ --check-only --direct'
+ ;;
+ @(move|mv|rename|ren))
+ options='-r --revision -p --parent -q \
+ --quiet -m --message -F --file \
+ --encoding --template -P \
+ --patch -S --sign -C \
+ --check-only --direct'
+ ;;
+ patch)
+ options='--depot'
+ ;;
+ @(propdel|propset|pdel|pset|pd|ps))
+ options='-R --recursive -r --revision \
+ --revprop -m --message -F \
+ --file --template --encoding \
+ -P --patch -S --sign -C \
+ --check-only -q --quiet \
+ --direct'
+ ;;
+ @(propedit|pedit|pe))
+ options='-R --recursive -r --revision \
+ --revprop -m --message -F \
+ --file --template --encoding \
+ -P --patch -S --sign -C \
+ --check-only --direct'
+ ;;
+ @(propget|pget|pg))
+ options='-R --recursive -r --revision \
+ --revprop --strict'
+ ;;
+ @(proplist|plist|pl))
+ options='-R --recursive -v --verbose \
+ -r --revision --revprop'
+ ;;
+ pull)
+ options='-a --all -l --lump'
+ ;;
+ push)
+ options='-f --from -l --lump -C \
+ --check -P --patch -S --sign \
+ --verbatim'
+ ;;
+ resolved)
+ options='-R --recursive'
+ ;;
+ revert)
+ options='-R --recursive -q --quiet'
+ ;;
+ @(smerge|sm))
+ options='-I --incremental -l --log -B \
+ --baseless -b --base -s --sync \
+ -t --to -f --from --verbatim \
+ --no-ticket --track-rename \
+ --host --remoterev -m \
+ --message -F --file --template \
+ --encoding -P --patch -S \
+ --sign -C --check-only --direct'
+ ;;
+ @(status|stat|st))
+ options='-q --quiet --no-ignore -N \
+ --non-recursive -v --verbose'
+ ;;
+ @(switch|sw))
+ options='-r --revision -d --detach -q \
+ --quiet'
+ ;;
+ @(sync|sy))
+ options='-a --all -s --skipto -t \
+ --torev'
+ ;;
+ @(update|up))
+ options='-r --revision -N \
+ --non-recursive -C \
+ --check-only -s --sync -m \
+ --merge -q --quiet'
+ ;;
+ esac
+ options="$options --help -h"
+
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ case $command in
+ @(help|h|\?))
+ COMPREPLY=( $( compgen -W "$commands \
+ environment commands intro" -- $cur ) )
+ ;;
+ admin)
+ COMPREPLY=( $( compgen -W 'help \
+ deltify dump hotcopy \
+ list-dblogs list-unused-dblogs \
+ load lstxns recover rmtxns \
+ setlog verify rmcache' \
+ -- $cur ) )
+ ;;
+ patch)
+ COMPREPLY=( $( compgen -W '--ls --list \
+ --cat --view --regen \
+ --regenerate --up --update \
+ --apply --rm --delete' \
+ -- $cur ) )
+ ;;
+ sync)
+ COMPREPLY=( $( compgen -W "$( svk \
+ mirror --list 2>/dev/null | \
+ awk '/^\//{print $1}' )" \
+ -- $cur ) )
+ ;;
+ @(co|checkout|push|pull))
+ if [[ "$cur" == //*/* ]]; then
+ path=${cur%/*}/
+ else
+ path=//
+ fi
+ COMPREPLY=( $( compgen -W "$( svk \
+ list $path 2>/dev/null | sed -e 's|\(.*\)|'$path'\1|')" -- $cur ) )
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+ fi
+ fi
+
+ return 0
+}
+complete -F _svk -o default svk
diff --git a/debian/bash_completion/contrib/unace b/debian/bash_completion/contrib/unace
new file mode 100644
index 0000000..59f0ca2
--- /dev/null
+++ b/debian/bash_completion/contrib/unace
@@ -0,0 +1,28 @@
+# unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: unace,v 1.3 2003/12/31 08:22:37 ianmacd Exp $
+
+_unace()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-c -c- -f -f- -o -o- -p -y -y-' -- $cur ) )
+ ;;
+ *)
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'e l t v x' -- $cur ) )
+ else
+ _filedir '@(ace|ACE)'
+ fi
+ ;;
+ esac
+
+ return 0
+
+}
+complete -F _unace -o filenames unace
diff --git a/debian/bash_completion/contrib/unrar b/debian/bash_completion/contrib/unrar
new file mode 100644
index 0000000..b47f1d3
--- /dev/null
+++ b/debian/bash_completion/contrib/unrar
@@ -0,0 +1,30 @@
+# unrar(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
+#
+# $Id: unrar,v 1.4 2004/07/05 23:37:47 ianmacd Exp $
+
+_unrar()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-ad -ap -av- -c- -cfg- -cl -cu \
+ -dh -ep -f -idp -ierr -inul -kb -o+ -o- -ow -p -p- -r -ta \
+ -tb -tn -to -u -v -ver -vp -x -x@ -y' -- $cur ) )
+ ;;
+ *)
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'e l lb lt p t v vb vt x' -- $cur ) )
+ else
+ _filedir '@(rar|RAR)'
+ fi
+ ;;
+ esac
+
+ return 0
+
+}
+complete -F _unrar -o filenames unrar