summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/FAQ35
-rw-r--r--debian/README140
-rw-r--r--debian/README.abs-guide26
-rw-r--r--debian/README.bash_completion17
-rw-r--r--debian/README.bashdb7
-rw-r--r--debian/README.commands189
-rw-r--r--debian/bash-builtins.718
-rw-r--r--debian/bash-doc.doc-base10
-rw-r--r--debian/bash-doc.postinst9
-rw-r--r--debian/bash-doc.prerm5
-rw-r--r--debian/bash-minimal.162
-rw-r--r--debian/bash-minimal.postinst9
-rw-r--r--debian/bash-minimal.postrm9
-rw-r--r--debian/bash-static.postinst9
-rw-r--r--debian/bash-static.postrm9
-rw-r--r--debian/bash.menu2
-rw-r--r--debian/bash.postinst22
-rw-r--r--debian/bash.postrm15
-rw-r--r--debian/bash.preinst.c144
-rw-r--r--debian/bash.prerm8
-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
-rw-r--r--debian/bashdb.copyright430
-rw-r--r--debian/bashdb.emacsen-install50
-rw-r--r--debian/bashdb.emacsen-remove16
-rw-r--r--debian/bashdb.emacsen-startup20
-rw-r--r--debian/bashdb.postinst7
-rw-r--r--debian/bashdb.prerm5
-rw-r--r--debian/changelog1734
-rw-r--r--debian/clear_console.150
-rw-r--r--debian/clear_console.c267
-rw-r--r--debian/compat1
-rw-r--r--debian/control85
-rw-r--r--debian/copyright389
-rw-r--r--debian/etc.bash.bashrc34
-rw-r--r--debian/etc.inputrc13
-rw-r--r--debian/etc.profile27
-rw-r--r--debian/inputrc.arrows30
-rw-r--r--debian/locale-gen30
-rw-r--r--debian/new/bash.postinst27
-rw-r--r--debian/new/bash.preinst.c229
-rw-r--r--debian/new/changelog-add4
-rwxr-xr-xdebian/patches/bash-default-editor.dpatch48
-rwxr-xr-xdebian/patches/bash-subst-param-length.dpatch32
-rwxr-xr-xdebian/patches/bash31-001.dpatch123
-rw-r--r--debian/patches/bash31-002-doc.dpatch145
-rwxr-xr-xdebian/patches/bash31-002.dpatch147
-rwxr-xr-xdebian/patches/bash31-003.dpatch64
-rwxr-xr-xdebian/patches/bash31-004.dpatch65
-rwxr-xr-xdebian/patches/bash31-005.dpatch71
-rwxr-xr-xdebian/patches/bash31-006.dpatch77
-rwxr-xr-xdebian/patches/bash31-007.dpatch140
-rwxr-xr-xdebian/patches/bash31-008.dpatch70
-rwxr-xr-xdebian/patches/bash31-009.dpatch85
-rwxr-xr-xdebian/patches/bash31-010.dpatch183
-rwxr-xr-xdebian/patches/bash31-011.dpatch66
-rwxr-xr-xdebian/patches/bash31-012.dpatch66
-rwxr-xr-xdebian/patches/bash31-013.dpatch63
-rwxr-xr-xdebian/patches/bash31-014.dpatch124
-rwxr-xr-xdebian/patches/bash31-015.dpatch125
-rwxr-xr-xdebian/patches/bash31-016.dpatch70
-rwxr-xr-xdebian/patches/bash31-017.dpatch150
-rwxr-xr-xdebian/patches/bashbug-editor.dpatch31
-rw-r--r--debian/patches/bashdb-updates.dpatch24
-rw-r--r--debian/patches/bashdb.dpatch56
-rw-r--r--debian/patches/command-not-found-doc.dpatch35
-rwxr-xr-xdebian/patches/command-not-found.dpatch66
-rwxr-xr-xdebian/patches/deb-bash-config.dpatch81
-rwxr-xr-xdebian/patches/deb-examples.dpatch30
-rwxr-xr-xdebian/patches/input-err.dpatch30
-rwxr-xr-xdebian/patches/login-shell.dpatch34
-rwxr-xr-xdebian/patches/man-arithmetic.dpatch32
-rwxr-xr-xdebian/patches/man-bashlogout.dpatch31
-rwxr-xr-xdebian/patches/man-bashrc.dpatch81
-rw-r--r--debian/patches/man-builtin.dpatch29
-rwxr-xr-xdebian/patches/man-fignore.dpatch33
-rw-r--r--debian/patches/man-net-redirections-doc.dpatch31
-rwxr-xr-xdebian/patches/man-net-redirections.dpatch31
-rwxr-xr-xdebian/patches/man-nocaseglob.dpatch32
-rw-r--r--debian/patches/man-substring-exp-doc.dpatch31
-rwxr-xr-xdebian/patches/man-substring-exp.dpatch31
-rwxr-xr-xdebian/patches/man-test.dpatch32
-rw-r--r--debian/patches/man-test2-doc.dpatch32
-rwxr-xr-xdebian/patches/man-test2.dpatch44
-rwxr-xr-xdebian/patches/man-typos.dpatch36
-rw-r--r--debian/patches/man-vx-opts.dpatch34
-rwxr-xr-xdebian/patches/pgrp-pipe.dpatch29
-rwxr-xr-xdebian/patches/po-sv.dpatch4206
-rwxr-xr-xdebian/patches/privmode.dpatch37
-rw-r--r--debian/patches/random.dpatch107
-rwxr-xr-xdebian/patches/rbash-manpage.dpatch29
-rwxr-xr-xdebian/patches/read-memleak.dpatch29
-rwxr-xr-xdebian/patches/readline51-001.dpatch94
-rw-r--r--debian/patches/rl-del-backspace-policy.dpatch48
-rw-r--r--debian/patches/rl-examples-bdb.dpatch30
-rw-r--r--debian/patches/rl-header.dpatch28
-rwxr-xr-xdebian/patches/rl-inputrc.dpatch102
-rw-r--r--debian/patches/rl-setenv.dpatch30
-rw-r--r--debian/patches/template.dpatch18
-rw-r--r--debian/patches/ulimit-doc.dpatch50
-rwxr-xr-xdebian/patches/ulimit.dpatch88
-rwxr-xr-xdebian/rules631
-rw-r--r--debian/skel.bash_logout7
-rw-r--r--debian/skel.bash_profile16
-rw-r--r--debian/skel.bashrc72
-rw-r--r--debian/watch2
139 files changed, 30103 insertions, 0 deletions
diff --git a/debian/FAQ b/debian/FAQ
new file mode 100644
index 0000000..a866068
--- /dev/null
+++ b/debian/FAQ
@@ -0,0 +1,35 @@
+[ The original document has a license, which doesn't allow inclusion of the
+ FAQ in the main section of the Debian packages and therefore isn't
+ distributed in the Debian packages for bash. Pleae get it from the upstream
+ location.
+]
+
+-----------
+This is the Bash FAQ, version 3.20, for Bash version 2.05b.
+
+This document contains a set of frequently-asked questions concerning
+Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
+interpreter with advanced features for both interactive use and shell
+programming.
+
+Another good source of basic information about shells is the collection
+of FAQ articles periodically posted to comp.unix.shell.
+
+Questions and comments concerning this document should be sent to
+chet@po.cwru.edu.
+
+This document is available for anonymous FTP with the URL
+
+ftp://ftp.cwru.edu/pub/bash/FAQ
+
+The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
+
+The original document has the following license:
+-----------
+This document is Copyright 1995-2002 by Chester Ramey.
+
+Permission is hereby granted, without written agreement and
+without license or royalty fees, to use, copy, and distribute
+this document for any purpose, provided that the above copyright
+notice appears in all copies of this document and that the
+contents of this document remain unaltered.
diff --git a/debian/README b/debian/README
new file mode 100644
index 0000000..9849f94
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,140 @@
+Bash Configuration for Debian
+-----------------------------
+
+A number of patches for the bash sources is applied for the Debian build
+of bash. See the details at the end of the file.
+
+The bash package was built using the following configuration options:
+
+ --with-curses \
+ --disable-net-redirections \
+ --enable-largefile \
+
+bash-static additionally configured with --enable-static-link, bash-minimal
+configured with --enable-minimal-config --enable-largefile.
+
+
+A kind of FAQ for bash on Debian GNU/{Linux,Hurd}
+-------------------------------------------------
+
+0. symlinked directory completion behavior
+
+ Starting with readline-4.2a, completion on symlinks that point
+ to directories does not append the slash. To restore the behaviour
+ found in readline-4.2, add to /etc/inputrc or ~/.inputrc:
+
+ set mark-symlinked-directories on
+
+1. How can I make /bin/sh point to something else?
+
+ Type
+
+ dpkg-divert --add /bin/sh
+
+ and then point it to whatever you want. Upgrades to bash won't upgrade
+ the /bin/sh symlink. To put /bin/sh under dpkg control again, type
+
+ dpkg-divert --remove /bin/sh
+
+
+2. How can I make bash 8-bit clean so I can type hi-bit characters
+ directly?
+
+ Remove the comments from the indicated lines in /etc/inputrc.
+ It doesn't ship this way because otherwise the Meta bindings will not work.
+
+3. How to get rid off annoying beeps for ambiguous completions?
+
+ Put in /etc/inputrc (or in your ~/.inputrc):
+
+ set show-all-if-ambiguous on
+
+ Other people prefer:
+
+ set bell-style none
+
+4. bash doesn't display prompts correctly.
+
+ When using colors in prompts (or escape characters), then make sure
+ those characters are surrounded by \[ and \]. For more information
+ look at the man page bash(1) and search for PROMPTING.
+
+5. What is /etc/bash.bashrc? It doesn't seem to be documented.
+
+ The Debian version of bash is compiled with a special option
+ (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc
+ for interactive non-login shells. So, on Debian systems,
+ /etc/bash.bashrc is to ~/.bashrc as /etc/profile is to
+ ~/.bash_profile.
+
+6. bash does not check $PATH if hash fails
+
+ bash hashes the location of recently executed commands. When a command
+ is moved to a new location in the PATH, the command is still in the PATH
+ but the hash table still records the old location.
+
+ For performance reasons bash does not remove the command from the hash
+ and relook it up in PATH.
+
+ Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'.
+
+7. Bourne-style shells have always accepted multiple directory name arguments
+ to cd. If the user doesn't like it, have him define a shell function:
+
+ cd()
+ {
+ case $# in
+ 0|1) ;;
+ *) echo "cd: too many arguments ; return 2 ;;
+ esac
+ builtin cd "$@"
+ }
+
+8. key bindings for ESC
+
+ Consider the following .inputrc:
+
+ set editing-mode vi
+
+ keymap vi
+ "\M-[D": backward-char
+ "\M-[C": forward-char
+ "\M-[A": previous-history
+ "\M-[B": next-history
+
+ And, just to be certain, set -o reports that vi is on.
+
+ However, ESC k does not send me to the previous line.
+
+ I'm guessing that this is a conflict between bash's concept of a meta
+ keymap and its concept of vi's command-mode character -- which is to
+ say that its data structures don't properly reflect its implementation.
+
+ Note that if I remove the meta prefix, leaving lines like:
+ "[A": previous-history
+
+ That vi command mode keys work fine, and I can use the arrow keys in vi
+ mode, *provided I'm already in command mode already*. In other words,
+ bash is doing something wrong here such that it doesn't see the escape
+ character at the begining of the key sequence even when in vi insert mode.
+
+ Comment from the upstream author: "This guy destroyed the key binding for
+ ESC, which effectively disabled vi command mode. It's not as simple as he
+ paints it to be -- the binding for ESC in the vi insertion keymap *must*
+ be a function because of the other things needed when switching
+ from insert mode to command mode.
+
+ If he wants to change something in vi's command mode, he needs
+ to use `set keymap vi-command' and enter key bindings without
+ the \M- prefix (as he discovered)."
+
+9. Why is bash configured with --disable-net-redirections?
+
+ It can produce completely unexpected results. This kind of
+ feature should not be part of a shell but a special. tool. And
+ that tool has existed for years already, it's called netcat.
+
+
+Patches Applied to the Bash Sources
+-----------------------------------
+
diff --git a/debian/README.abs-guide b/debian/README.abs-guide
new file mode 100644
index 0000000..7a69558
--- /dev/null
+++ b/debian/README.abs-guide
@@ -0,0 +1,26 @@
+[ This is just a pointer to a document, which you might find helpful]
+
+ Advanced Bash-Scripting Guide
+
+ A complete guide to shell scripting, using Bash
+
+ Mendel Cooper - Brindlesoft
+
+ thegrendel@theriver.com
+
+
+This tutorial assumes no previous knowledge of scripting or programming, but
+progresses rapidly toward an intermediate/advanced level of instruction
+(...all the while sneaking in little snippets of UNIX wisdom and lore). It
+serves as a textbook, a manual for self-study, and a reference and source
+of knowledge on shell scripting techniques. The exercises and heavily-
+commented examples invite active reader participation, under the premise that
+the only way to really learn scripting is to write scripts.
+
+The guide is availabe at http://tldp.org/LDP/abs/html/
+
+The latest update of this document, as an archived "tarball" including both
+the SGML source and rendered HTML, may be downloaded from the author's home
+site (http://personal.riverusers.com/~thegrendel/abs-guide-2.1.tar.bz2). See
+the change log for a revision history
+(http://personal.riverusers.com/~thegrendel/Change.log).
diff --git a/debian/README.bash_completion b/debian/README.bash_completion
new file mode 100644
index 0000000..e0a8e75
--- /dev/null
+++ b/debian/README.bash_completion
@@ -0,0 +1,17 @@
+ Programmable Completion
+ =======================
+
+[BUG REPORTING: Please direct all enhancement requests directly to the
+ bash_completion maintainer, the completion script won't be changed for
+ Debian specific enhancements. If you find a real bug, report it the usual
+ way. The bash_completion author can be reached at
+ http://freshmeat.net/projects/bashcompletion/
+
+ If you find a newer version on freshmeat, you can replace it, if you did
+ not change the Debian version.
+]
+
+To enable programmable completion for bash on Debian, uncomment the
+bash_completion lines in /etc/bash.bashrc to source /etc/bash_completion.
+/etc/bash_completion sources ~/.bash_completion, if it exists.
+
diff --git a/debian/README.bashdb b/debian/README.bashdb
new file mode 100644
index 0000000..de71180
--- /dev/null
+++ b/debian/README.bashdb
@@ -0,0 +1,7 @@
+bashdb for Debian
+-----------------
+
+The debugger enhanced bash binary is installed under the name
+/usr/bin/bash-bashdb.
+
+ -- Matthias Klose <doko@debian.org>, Sun, 10 Aug 2003 23:10:38 +0200
diff --git a/debian/README.commands b/debian/README.commands
new file mode 100644
index 0000000..8e2aaf6
--- /dev/null
+++ b/debian/README.commands
@@ -0,0 +1,189 @@
+ This is a jumping-off reference point for new users who may be
+ completely unfamiliar with Linux commands. It does not contain all
+ the information you need about using the Linux console, but instead
+ just gives you enough information to get started finding the
+ information you need.
+
+Linux Commands
+
+ To run a command, type the command at the prompt, followed by any
+ necessary options, and then press the Enter or Return key.
+
+ Most commands operate silently unless they are specifically asked to
+ say what they are doing. If there is no error message, the command
+ should have worked.
+
+ The operation of most commands can be changed by putting command
+ options immediately after the command name. There are several styles
+ of options used, and you have to check the documentation for each
+ command to know what options it can take, and what they do.
+
+ Linux commands are case-sensitive, and almost always are all
+ lower-case. ls is a valid command; LS is not.
+
+ In most cases you can use the tab key to ask the command shell to
+ auto-complete the command, directory or filename you have started
+ to type. If a unique completion exists, the shell will type it. If
+ not, you can press tab a second time to obtain a list of the
+ possible auto-completions.
+
+Commands for Reading Documentation
+
+ In the following command examples, the [ ] characters are not
+ typed, they mean that whatever is enclosed is optional. For
+ example, you can also start `info' without any subject at all.
+
+ When a given keyboard shortcut is preceded by ctrl- or alt- , that
+ means hold the control or alt key down, and type the given key
+ while holding it down (the same way you use the shift key). A
+ shorthand notation for ctrl- is ^ (^C means ctrl-C).
+
+ man subject
+ man shows the manual page on the command (use q or ctrl-C to
+ get out of it if it doesn't terminate at the end of the
+ text).
+
+ info [subject]
+ A lot of Debian Linux documentation is provided in info
+ format. This is similar to a hypertext format, in that you
+ can jump to other sections of the documentation by following
+ links embedded in the text. An info tutorial is available
+ within info, using ctrl-h followed by h.
+
+ help [subject]
+ Use help for on-line help about the shell's built-in commands.
+ help by itself prints a list of subjects for which you can
+ ask for help.
+
+ pager filename
+ pager displays a plain text file one screen at a time.
+ Additional screens can be displayed by pressing the space
+ bar, and previous screens can be displayed by pressing the b
+ key. When finished viewing the help, press q to return to
+ the prompt.
+
+ Using -h --help with | pager
+ Most commands offer very brief built-in help by typing the
+ command followed by
+
+ -h or --help
+
+ If the help scrolls up beyond the top of the screen before
+ you can read it, add
+
+ | pager
+
+ to the end of the command.
+
+ zmore document.gz
+ zmore is a document pager -- it displays the contents of
+ compressed documentation on your disk, one screenful at a
+ time. Compression is signified by filenames ending in .gz .
+
+ lynx [document] or lynx [directory] or lynx [url]
+ lynx is a text-based web browser. It can display documents
+ (plain-text, compressed, or html), directory listings, and
+ urls such as www.google.com. It does not display images.
+
+Commands for Navigating Directories
+
+ pwd
+ Displays your current working directory. The p stands for
+ print, which is a carryover from when unix was designed,
+ before the advent of computer screens. Interactive computer
+ responses were printed on paper by a connected electric
+ typewriter instead of being displayed electronically.
+
+ cd [directory]
+ Change your current directory to the named directory. If you
+ don't specify directory, you will be returned to your home
+ directory. The `root' directory is signified by / at the
+ beginning of the directory path ( / also separates directory
+ and file names within the path). Thus paths beginning with /
+ are `absolute' paths; cd will take you to an absolute path
+ no matter what your current directory is. Paths not
+ beginning with / specify paths relative to your
+ current directory. cd .. means change to the parent
+ directory of your current working directory.
+
+ ls [directory]
+ ls lists the contents of directory. If you don't specify a
+ directory name, the current working directory's list is
+ displayed.
+
+ find directory -name filename
+ find tells you where filename is in the tree starting at
+ directory. This command has many other useful options.
+
+Documentation Indices
+
+ The standard doc-linux-text package installs compressed text linux
+ HOWTOs in
+
+ /usr/share/doc/HOWTO/en-txt/
+
+ Particularly helpful HOWTOs for new users are
+
+ /usr/share/doc/HOWTO/en-txt/Unix-and-Internet-Fundamentals-HOWTO.gz
+ /usr/share/doc/HOWTO/en-txt/mini/INDEX.gz
+ /usr/share/doc/HOWTO/en-txt/Reading-List-HOWTO.gz
+ /usr/share/doc/HOWTO/en-txt/META-FAQ.gz
+
+ Individual package documentation is installed in
+
+ /usr/share/doc/<package-name>
+
+ New user website references include
+
+ http://www.debian.org/doc/FAQ
+ http://www.linuxdoc.org/LDP/gs/gs.html
+
+Recording User Sessions
+
+ script filename
+ Use script to record everything that appears on the screen
+ (until the next exit) in filename. This is useful if you
+ need to record what's going on in order to include it in
+ your message when you ask for help. Use exit, logout or
+ ctrl-D to stop the recording session.
+
+Turning Echo On/Off
+
+ To turn off echoing of characters to the screen, you can use
+ ctrl-S. ctrl-Q starts the echo again. If your terminal suddenly
+ seems to become unresponsive, try ctrl-Q; you may have accidentally
+ typed ctrl-S which activated echo-off.
+
+Virtual Consoles
+
+ By default, six virtual consoles are provided. If you want to
+ execute another command without interrupting the operation of a
+ command you previously started, you can switch to another virtual
+ console (similar to a separate window). This is very handy for
+ displaying the documentation for a command in one console while
+ actually trying the command in another. Switch consoles 1 through 6
+ by using alt-F1 through alt-F6.
+
+Logging Out
+
+ exit or logout
+
+ Use exit or logout to terminate your session and log
+ out. You should be returned to the log-in prompt.
+
+Turning Off the Computer
+
+ Turning the computer on and off is really a system administration
+ subject, but I include it here because it is something that every
+ user who is his own administrator needs to know.
+
+ halt or shutdown -t 0 -h now
+ This command shuts the computer down safely. You can also
+ use ctrl-alt-del if your system is set up for that. (If you
+ are in X, ctrl-alt-del will be intercepted by X. Get out of
+ X first by using ctrl-alt-backspace.)
+
+
+To display this file one screen at a time, type
+
+pager /usr/share/doc/doc-linux-text/README.commands
diff --git a/debian/bash-builtins.7 b/debian/bash-builtins.7
new file mode 100644
index 0000000..69220eb
--- /dev/null
+++ b/debian/bash-builtins.7
@@ -0,0 +1,18 @@
+.\" This is a hack to force bash builtins into the whatis database
+.\" and to get the list of builtins to come up with the man command.
+.TH BASH-BUILTINS 7 "2001 October 29" "GNU Bash-2.05a"
+.SH NAME
+bash-builtins \- bash built-in commands, see \fBbash\fR(1)
+.SH SYNOPSIS
+bash defines the following built-in commands:
+:, ., [, alias, bg, bind, break, builtin, case, cd, command, compgen, complete,
+continue, declare, dirs, disown, echo, enable, eval, exec, exit,
+export, fc, fg, getopts, hash, help, history, if, jobs, kill,
+let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set,
+shift, shopt, source, suspend, test, times, trap, type, typeset,
+ulimit, umask, unalias, unset, until, wait, while.
+.SH BASH BUILTIN COMMANDS
+.nr zZ 1
+.so man1/bash.1
+.SH SEE ALSO
+bash(1), sh(1)
diff --git a/debian/bash-doc.doc-base b/debian/bash-doc.doc-base
new file mode 100644
index 0000000..c392ba4
--- /dev/null
+++ b/debian/bash-doc.doc-base
@@ -0,0 +1,10 @@
+Document: bashref
+Title: Bash Reference Manual
+Author: Chet Ramey
+Abstract: Bash is an sh-compatible command language interpreter that executes
+ commands read from the standard input or from a file. Bash also
+ incorporates useful features from the Korn and C shells (ksh and csh).
+Section: Apps/Shells
+
+Format: pdf
+Files: /usr/share/doc/bash/bashref.pdf
diff --git a/debian/bash-doc.postinst b/debian/bash-doc.postinst
new file mode 100644
index 0000000..13af80d
--- /dev/null
+++ b/debian/bash-doc.postinst
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+if [ -f /usr/share/info/bashref.info.gz ]; then
+ install-info --quiet --section "Shells" "Shells" \
+ --description="GNU Bourne-Again SHell Features." \
+ /usr/share/info/bashref.info.gz
+fi
+
+#DEBHELPER#
diff --git a/debian/bash-doc.prerm b/debian/bash-doc.prerm
new file mode 100644
index 0000000..d5c1c42
--- /dev/null
+++ b/debian/bash-doc.prerm
@@ -0,0 +1,5 @@
+#! /bin/sh -e
+
+install-info --quiet --remove bashref
+
+#DEBHELPER#
diff --git a/debian/bash-minimal.1 b/debian/bash-minimal.1
new file mode 100644
index 0000000..16932f8
--- /dev/null
+++ b/debian/bash-minimal.1
@@ -0,0 +1,62 @@
+.TH BASH 1 "May 24, 2003" bash "Debian Free Documentation"
+.SH NAME
+bash-minimal \- A bash version configured with minimal features
+.SH SYNOPSIS
+bash [\fB\s-1options\s0\fR] ... [\fI\s-1file\s0\fR]
+
+.SH DESCRIPTION
+
+\fBbash-minimal\fR is configured using --enable-minimal-config, which
+produces a shell with minimal features, close to the historical Bourne
+shell. This means:
+.IP "\(bu" 4
+No alias expansion and the `alias' and `unalias' builtins.
+.IP "\(bu" 4
+No support for the alternate form of the `for' command that
+behaves like the C language `for' statement.
+.IP "\(bu" 4
+No support for one-dimensional array shell variables.
+.IP "\(bu" 4
+No support for `csh'-like history substitution.
+.IP "\(bu" 4
+No `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
+.IP "\(bu" 4
+No support for recognizing `time' as a reserved word and for
+displaying timing statistics for the pipeline following `time'. This
+allows pipelines as well as shell builtins and functions to be timed.
+.IP "\(bu" 4
+No support for the `[[' conditional command.
+.IP "\(bu" 4
+No support for a `csh'-like directory stack and the `pushd',
+`popd', and `dirs' builtins
+.IP "\(bu" 4
+No support for the `((...))' command.
+.IP "\(bu" 4
+No support for the extended pattern matching features.
+.IP "\(bu" 4
+No `help' builtin, which displays help on shell builtins and
+variables.
+.IP "\(bu" 4
+No command history and the `fc' and `history' builtin commands.
+.IP "\(bu" 4
+No job control features.
+.IP "\(bu" 4
+No special handling of filenames of the form `/dev/tcp/HOST/PORT' and
+`/dev/udp/HOST/PORT' when used in redirections.
+.IP "\(bu" 4
+No process substitution.
+.IP "\(bu" 4
+No interpretation of a number of backslash-escaped characters in the
+`$PS1', `$PS2', `$PS3', and `$PS4' prompt strings.
+.IP "\(bu" 4
+No programmable completion facilities.
+.IP "\(bu" 4
+No support for command-line editing and history with the Bash version
+of the Readline library.
+.IP "\(bu" 4
+No support for a "restricted shell". If this is enabled, Bash, when
+called as `rbash', enters a restricted mode.
+.IP "\(bu" 4
+No `select' builtin, which allows the generation of simple menus.
+.SH "SEE ALSO"
+.BR bash(1)
diff --git a/debian/bash-minimal.postinst b/debian/bash-minimal.postinst
new file mode 100644
index 0000000..f0a74f1
--- /dev/null
+++ b/debian/bash-minimal.postinst
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+if [ -x /usr/sbin/add-shell ]; then
+ /usr/sbin/add-shell /bin/bash-minimal
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/bash-minimal.postrm b/debian/bash-minimal.postrm
new file mode 100644
index 0000000..2431284
--- /dev/null
+++ b/debian/bash-minimal.postrm
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+if [ -x /usr/sbin/remove-shell ]; then
+ /usr/sbin/remove-shell /bin/bash-minimal
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/bash-static.postinst b/debian/bash-static.postinst
new file mode 100644
index 0000000..ebcea4f
--- /dev/null
+++ b/debian/bash-static.postinst
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+if [ -x /usr/sbin/add-shell ]; then
+ /usr/sbin/add-shell /bin/bash-static
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/bash-static.postrm b/debian/bash-static.postrm
new file mode 100644
index 0000000..a3600c7
--- /dev/null
+++ b/debian/bash-static.postrm
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+if [ -x /usr/sbin/remove-shell ]; then
+ /usr/sbin/remove-shell /bin/bash-static
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/bash.menu b/debian/bash.menu
new file mode 100644
index 0000000..d5ddb89
--- /dev/null
+++ b/debian/bash.menu
@@ -0,0 +1,2 @@
+?package(bash):needs="text" section="Apps/Shells" title="Bash" command="/bin/bash --login"
+?package(bash):needs="text" section="Apps/Shells" title="Sh" command="/bin/sh --login"
diff --git a/debian/bash.postinst b/debian/bash.postinst
new file mode 100644
index 0000000..3db17ee
--- /dev/null
+++ b/debian/bash.postinst
@@ -0,0 +1,22 @@
+#! /bin/bash -e
+
+# the symlink is in the package now. So this should never happen ...
+if [ ! -e /bin/sh ]; then
+ ln -s bash /bin/sh
+fi
+
+update-alternatives --install \
+ /usr/share/man/man7/builtins.7.gz \
+ builtins.7.gz \
+ /usr/share/man/man7/bash-builtins.7.gz \
+ 10 \
+ || true
+
+if [ -x /usr/sbin/add-shell ]; then
+ /usr/sbin/add-shell /bin/bash
+ /usr/sbin/add-shell /bin/rbash
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/bash.postrm b/debian/bash.postrm
new file mode 100644
index 0000000..cbfcc30
--- /dev/null
+++ b/debian/bash.postrm
@@ -0,0 +1,15 @@
+#! /bin/sh -e
+
+if [ "$1" = "purge" ]; then
+ rm -f /etc/bash_completion
+ rmdir --ignore-fail-on-non-empty /etc/bash_completion.d
+fi
+
+if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then
+ /usr/sbin/remove-shell /bin/bash
+ /usr/sbin/remove-shell /bin/rbash
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/bash.preinst.c b/debian/bash.preinst.c
new file mode 100644
index 0000000..ff22653
--- /dev/null
+++ b/debian/bash.preinst.c
@@ -0,0 +1,144 @@
+/* Copyright (c) 1999 Anthony Towns
+ * Copyright (c) 2000, 2002 Matthias Klose
+ *
+ * You may freely use, distribute, and modify this program.
+ */
+
+// Don't rely on /bin/sh and popen!
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+/* XXX: evil kludge, deal with arbitrary name lengths */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+int check_predepends(void)
+{
+ pid_t child;
+
+ switch(child = fork()) {
+ case -1:
+ /* fork failed */
+ return EXIT_FAILURE;
+
+ case 0:
+ /* i'm the child */
+ {
+ execl( "/usr/bin/dpkg", "/usr/bin/dpkg",
+ "--assert-support-predepends", NULL );
+ _exit(127);
+ }
+
+ default:
+ /* i'm the parent */
+ {
+ int status;
+ pid_t pid;
+ pid = wait(&status);
+ if (pid == child) {
+ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+ return EXIT_SUCCESS;
+ }
+ }
+ }
+ }
+ return EXIT_FAILURE;
+}
+
+char *check_diversion(void)
+{
+ pid_t child;
+ int pipedes[2];
+
+ if (pipe(pipedes))
+ return NULL;
+
+
+ switch(child = fork()) {
+ case -1:
+ /* fork failed */
+ close(pipedes[0]);
+ close(pipedes[1]);
+ return NULL;
+
+ case 0:
+ /* i'm the child */
+ {
+ if (dup2(pipedes[STDOUT_FILENO], STDOUT_FILENO) < 0)
+ _exit(127);
+ close(pipedes[STDIN_FILENO]);
+ close(pipedes[STDOUT_FILENO]);
+ execl( "/usr/sbin/dpkg-divert", "/usr/sbin/dpkg-divert",
+ "--list", "/bin/sh", NULL );
+ _exit(127);
+ }
+
+ default:
+ /* i'm the parent */
+ {
+ static char line[1024];
+ FILE *fd;
+
+ close (pipedes[STDOUT_FILENO]);
+ fcntl (pipedes[STDIN_FILENO], F_SETFD, FD_CLOEXEC);
+ fd = fdopen (pipedes[STDIN_FILENO], "r");
+
+ while (fgets(line, 1024, fd) != NULL) {
+ line[strlen(line)-1] = '\0';
+ break;
+ }
+ fclose(fd);
+ return line;
+ }
+ }
+ return NULL;
+}
+
+const char *msg =
+ "As bash for Debian is destined to provide a working /bin/sh (pointing to\n"
+ "/bin/bash) your link will be overwritten by a default link.\n\n"
+ "If you don't want further upgrades to overwrite your customization,\n"
+ "please read /usr/share/doc/bash/README.Debian for a more permanent solution.\n\n"
+ "[Press RETURN to continue]";
+
+int main(void) {
+ int targetlen;
+ char target[PATH_MAX+1], answer[1024];
+
+ if (check_predepends() != EXIT_SUCCESS) {
+ printf("\nPlease upgrade to a new version of dpkg\n\n");
+ return EXIT_FAILURE;
+ }
+ targetlen = readlink("/bin/sh", target, PATH_MAX);
+ if (targetlen == -1) {
+ // error reading link. Will be overwritten.
+ puts("The bash upgrade discovered that something is wrong with your /bin/sh link.");
+ puts(msg);
+ fgets(answer, 1024, stdin);
+ return EXIT_SUCCESS;
+ }
+ target[targetlen] = '\0';
+ if (strcmp(target, "bash") != 0 && strcmp(target, "/bin/bash") != 0) {
+ char *diversion = check_diversion();
+
+ if (diversion == NULL)
+ return EXIT_FAILURE;
+ // printf("diversion: /%s/\n", diversion);
+ if (strcmp(diversion, "") != 0)
+ // link is diverted
+ return EXIT_SUCCESS;
+ printf("The bash upgrade discovered that your /bin/sh link points to %s.\n", target);
+ puts(msg);
+ fgets(answer, 1024, stdin);
+ return EXIT_SUCCESS;
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/debian/bash.prerm b/debian/bash.prerm
new file mode 100644
index 0000000..abd2eb0
--- /dev/null
+++ b/debian/bash.prerm
@@ -0,0 +1,8 @@
+#! /bin/bash -e
+
+if [ $1 != "upgrade" ]; then
+ update-alternatives --remove builtins.7.gz \
+ /usr/share/man/man7/bash-builtins.7.gz
+fi
+
+#DEBHELPER#
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
diff --git a/debian/bashdb.copyright b/debian/bashdb.copyright
new file mode 100644
index 0000000..6b013cf
--- /dev/null
+++ b/debian/bashdb.copyright
@@ -0,0 +1,430 @@
+This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash,
+the Bourne Again SHell.
+
+This package was put together by Matthias Klose <doko@debian.org>, from
+the following sources:
+
+ bash: ftp.gnu.org:/pub/gnu/bash/bash-2.05b.tar.gz
+ bash_completion: http://freshmeat.net/projects/bashcompletion/
+ bashdb: http://bashdb.sf.net/
+ (CVS snapshot taken 20030908)
+
+Bash 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.
+
+Bash 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 with
+your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with
+the Debian GNU/Linux bash source package as the file COPYING. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite
+330, Boston, MA 02111-1307, USA.
+
+The Free Software Foundation has exempted Bash from the requirement of
+Paragraph 2c of the General Public License. This is to say, there is
+no requirement for Bash to print a notice when it is started
+interactively in the usual way. We made this exception because users
+and standards expect shells not to print such messages. This
+exception applies to any program that serves as a shell and that is
+based primarily on Bash as opposed to other GNU software.
+
+
+bash_completion 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.
+
+bashdb 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.
+
+The bashdb manual is licensed under the GFDL (attached here):
+
+ This file documents the BASH debugger BASH.
+
+ This is the 2.05b rebash-0.43 Edition, April 2002, of `Debugging
+ with BASHDB: the GNU Source-Level Debugger' for REBASH
+
+ Copyright (C) 2002,2003 Rocky Bernstein for the Free Software
+ Foundation.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+
+
+GNU Free Documentation License
+******************************
+
+ Version 1.1, March 2000
+ Copyright (C) 2000 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.
+
+
+ 0. PREAMBLE
+
+ The purpose of this License is to make a manual, textbook, or other
+ written document "free" in the sense of freedom: to assure everyone
+ the effective freedom to copy and redistribute it, with or without
+ modifying it, either commercially or noncommercially. Secondarily,
+ this License preserves for the author and publisher a way to get
+ credit for their work, while not being considered responsible for
+ modifications made by others.
+
+ This License is a kind of "copyleft", which means that derivative
+ works of the document must themselves be free in the same sense.
+ It complements the GNU General Public License, which is a copyleft
+ license designed for free software.
+
+ We have designed this License in order to use it for manuals for
+ free software, because free software needs free documentation: a
+ free program should come with manuals providing the same freedoms
+ that the software does. But this License is not limited to
+ software manuals; it can be used for any textual work, regardless
+ of subject matter or whether it is published as a printed book.
+ We recommend this License principally for works whose purpose is
+ instruction or reference.
+
+
+ 1. APPLICABILITY AND DEFINITIONS
+
+ This License applies to any manual or other work that contains a
+ notice placed by the copyright holder saying it can be distributed
+ under the terms of this License. The "Document", below, refers to
+ any such manual or work. Any member of the public is a licensee,
+ and is addressed as "you."
+
+ A "Modified Version" of the Document means any work containing the
+ Document or a portion of it, either copied verbatim, or with
+ modifications and/or translated into another language.
+
+ A "Secondary Section" is a named appendix or a front-matter
+ section of the Document that deals exclusively with the
+ relationship of the publishers or authors of the Document to the
+ Document's overall subject (or to related matters) and contains
+ nothing that could fall directly within that overall subject.
+ (For example, if the Document is in part a textbook of
+ mathematics, a Secondary Section may not explain any mathematics.)
+ The relationship could be a matter of historical connection with
+ the subject or with related matters, or of legal, commercial,
+ philosophical, ethical or political position regarding them.
+
+ The "Invariant Sections" are certain Secondary Sections whose
+ titles are designated, as being those of Invariant Sections, in
+ the notice that says that the Document is released under this
+ License.
+
+ The "Cover Texts" are certain short passages of text that are
+ listed, as Front-Cover Texts or Back-Cover Texts, in the notice
+ that says that the Document is released under this License.
+
+ A "Transparent" copy of the Document means a machine-readable copy,
+ represented in a format whose specification is available to the
+ general public, whose contents can be viewed and edited directly
+ and straightforwardly with generic text editors or (for images
+ composed of pixels) generic paint programs or (for drawings) some
+ widely available drawing editor, and that is suitable for input to
+ text formatters or for automatic translation to a variety of
+ formats suitable for input to text formatters. A copy made in an
+ otherwise Transparent file format whose markup has been designed
+ to thwart or discourage subsequent modification by readers is not
+ Transparent. A copy that is not "Transparent" is called "Opaque."
+
+ Examples of suitable formats for Transparent copies include plain
+ ASCII without markup, Texinfo input format, LaTeX input format,
+ SGML or XML using a publicly available DTD, and
+ standard-conforming simple HTML designed for human modification.
+ Opaque formats include PostScript, PDF, proprietary formats that
+ can be read and edited only by proprietary word processors, SGML
+ or XML for which the DTD and/or processing tools are not generally
+ available, and the machine-generated HTML produced by some word
+ processors for output purposes only.
+
+ The "Title Page" means, for a printed book, the title page itself,
+ plus such following pages as are needed to hold, legibly, the
+ material this License requires to appear in the title page. For
+ works in formats which do not have any title page as such, "Title
+ Page" means the text near the most prominent appearance of the
+ work's title, preceding the beginning of the body of the text.
+
+ 2. VERBATIM COPYING
+
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License, the
+ copyright notices, and the license notice saying this License
+ applies to the Document are reproduced in all copies, and that you
+ add no other conditions whatsoever to those of this License. You
+ may not use technical measures to obstruct or control the reading
+ or further copying of the copies you make or distribute. However,
+ you may accept compensation in exchange for copies. If you
+ distribute a large enough number of copies you must also follow
+ the conditions in section 3.
+
+ You may also lend copies, under the same conditions stated above,
+ and you may publicly display copies.
+
+ 3. COPYING IN QUANTITY
+
+ If you publish printed copies of the Document numbering more than
+ 100, and the Document's license notice requires Cover Texts, you
+ must enclose the copies in covers that carry, clearly and legibly,
+ all these Cover Texts: Front-Cover Texts on the front cover, and
+ Back-Cover Texts on the back cover. Both covers must also clearly
+ and legibly identify you as the publisher of these copies. The
+ front cover must present the full title with all words of the
+ title equally prominent and visible. You may add other material
+ on the covers in addition. Copying with changes limited to the
+ covers, as long as they preserve the title of the Document and
+ satisfy these conditions, can be treated as verbatim copying in
+ other respects.
+
+ If the required texts for either cover are too voluminous to fit
+ legibly, you should put the first ones listed (as many as fit
+ reasonably) on the actual cover, and continue the rest onto
+ adjacent pages.
+
+ If you publish or distribute Opaque copies of the Document
+ numbering more than 100, you must either include a
+ machine-readable Transparent copy along with each Opaque copy, or
+ state in or with each Opaque copy a publicly-accessible
+ computer-network location containing a complete Transparent copy
+ of the Document, free of added material, which the general
+ network-using public has access to download anonymously at no
+ charge using public-standard network protocols. If you use the
+ latter option, you must take reasonably prudent steps, when you
+ begin distribution of Opaque copies in quantity, to ensure that
+ this Transparent copy will remain thus accessible at the stated
+ location until at least one year after the last time you
+ distribute an Opaque copy (directly or through your agents or
+ retailers) of that edition to the public.
+
+ It is requested, but not required, that you contact the authors of
+ the Document well before redistributing any large number of
+ copies, to give them a chance to provide you with an updated
+ version of the Document.
+
+ 4. MODIFICATIONS
+
+ You may copy and distribute a Modified Version of the Document
+ under the conditions of sections 2 and 3 above, provided that you
+ release the Modified Version under precisely this License, with
+ the Modified Version filling the role of the Document, thus
+ licensing distribution and modification of the Modified Version to
+ whoever possesses a copy of it. In addition, you must do these
+ things in the Modified Version:
+
+ A. Use in the Title Page (and on the covers, if any) a title
+ distinct from that of the Document, and from those of previous
+ versions (which should, if there were any, be listed in the
+ History section of the Document). You may use the same title
+ as a previous version if the original publisher of that version
+ gives permission.
+ B. List on the Title Page, as authors, one or more persons or
+ entities responsible for authorship of the modifications in the
+ Modified Version, together with at least five of the principal
+ authors of the Document (all of its principal authors, if it
+ has less than five).
+ C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+ D. Preserve all the copyright notices of the Document.
+ E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+ F. Include, immediately after the copyright notices, a license
+ notice giving the public permission to use the Modified Version
+ under the terms of this License, in the form shown in the
+ Addendum below.
+ G. Preserve in that license notice the full lists of Invariant
+ Sections and required Cover Texts given in the Document's
+ license notice.
+ H. Include an unaltered copy of this License.
+ I. Preserve the section entitled "History", and its title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page.
+ If there is no section entitled "History" in the Document,
+ create one stating the title, year, authors, and publisher of
+ the Document as given on its Title Page, then add an item
+ describing the Modified Version as stated in the previous
+ sentence.
+ J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and
+ likewise the network locations given in the Document for
+ previous versions it was based on. These may be placed in the
+ "History" section. You may omit a network location for a work
+ that was published at least four years before the Document
+ itself, or if the original publisher of the version it refers
+ to gives permission.
+ K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+ L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+ M. Delete any section entitled "Endorsements." Such a section
+ may not be included in the Modified Version.
+ N. Do not retitle any existing section as "Endorsements" or to
+ conflict in title with any Invariant Section.
+
+ If the Modified Version includes new front-matter sections or
+ appendices that qualify as Secondary Sections and contain no
+ material copied from the Document, you may at your option
+ designate some or all of these sections as invariant. To do this,
+ add their titles to the list of Invariant Sections in the Modified
+ Version's license notice. These titles must be distinct from any
+ other section titles.
+
+ You may add a section entitled "Endorsements", provided it contains
+ nothing but endorsements of your Modified Version by various
+ parties-for example, statements of peer review or that the text has
+ been approved by an organization as the authoritative definition
+ of a standard.
+
+ You may add a passage of up to five words as a Front-Cover Text,
+ and a passage of up to 25 words as a Back-Cover Text, to the end
+ of the list of Cover Texts in the Modified Version. Only one
+ passage of Front-Cover Text and one of Back-Cover Text may be
+ added by (or through arrangements made by) any one entity. If the
+ Document already includes a cover text for the same cover,
+ previously added by you or by arrangement made by the same entity
+ you are acting on behalf of, you may not add another; but you may
+ replace the old one, on explicit permission from the previous
+ publisher that added the old one.
+
+ The author(s) and publisher(s) of the Document do not by this
+ License give permission to use their names for publicity for or to
+ assert or imply endorsement of any Modified Version.
+
+ 5. COMBINING DOCUMENTS
+
+ You may combine the Document with other documents released under
+ this License, under the terms defined in section 4 above for
+ modified versions, provided that you include in the combination
+ all of the Invariant Sections of all of the original documents,
+ unmodified, and list them all as Invariant Sections of your
+ combined work in its license notice.
+
+ The combined work need only contain one copy of this License, and
+ multiple identical Invariant Sections may be replaced with a single
+ copy. If there are multiple Invariant Sections with the same name
+ but different contents, make the title of each such section unique
+ by adding at the end of it, in parentheses, the name of the
+ original author or publisher of that section if known, or else a
+ unique number. Make the same adjustment to the section titles in
+ the list of Invariant Sections in the license notice of the
+ combined work.
+
+ In the combination, you must combine any sections entitled
+ "History" in the various original documents, forming one section
+ entitled "History"; likewise combine any sections entitled
+ "Acknowledgements", and any sections entitled "Dedications." You
+ must delete all sections entitled "Endorsements."
+
+ 6. COLLECTIONS OF DOCUMENTS
+
+ You may make a collection consisting of the Document and other
+ documents released under this License, and replace the individual
+ copies of this License in the various documents with a single copy
+ that is included in the collection, provided that you follow the
+ rules of this License for verbatim copying of each of the
+ documents in all other respects.
+
+ You may extract a single document from such a collection, and
+ distribute it individually under this License, provided you insert
+ a copy of this License into the extracted document, and follow
+ this License in all other respects regarding verbatim copying of
+ that document.
+
+ 7. AGGREGATION WITH INDEPENDENT WORKS
+
+ A compilation of the Document or its derivatives with other
+ separate and independent documents or works, in or on a volume of
+ a storage or distribution medium, does not as a whole count as a
+ Modified Version of the Document, provided no compilation
+ copyright is claimed for the compilation. Such a compilation is
+ called an "aggregate", and this License does not apply to the
+ other self-contained works thus compiled with the Document, on
+ account of their being thus compiled, if they are not themselves
+ derivative works of the Document.
+
+ If the Cover Text requirement of section 3 is applicable to these
+ copies of the Document, then if the Document is less than one
+ quarter of the entire aggregate, the Document's Cover Texts may be
+ placed on covers that surround only the Document within the
+ aggregate. Otherwise they must appear on covers around the whole
+ aggregate.
+
+ 8. TRANSLATION
+
+ Translation is considered a kind of modification, so you may
+ distribute translations of the Document under the terms of section
+ 4. Replacing Invariant Sections with translations requires special
+ permission from their copyright holders, but you may include
+ translations of some or all Invariant Sections in addition to the
+ original versions of these Invariant Sections. You may include a
+ translation of this License provided that you also include the
+ original English version of this License. In case of a
+ disagreement between the translation and the original English
+ version of this License, the original English version will prevail.
+
+ 9. TERMINATION
+
+ You may not copy, modify, sublicense, or distribute the Document
+ except as expressly provided for under this License. Any other
+ attempt to copy, modify, sublicense or distribute the Document 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.
+
+ 10. FUTURE REVISIONS OF THIS LICENSE
+
+ The Free Software Foundation may publish new, revised versions of
+ the GNU Free Documentation 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. See
+ http://www.gnu.org/copyleft/.
+
+ Each version of the License is given a distinguishing version
+ number. If the Document specifies that a particular numbered
+ version of this License "or any later version" applies to it, you
+ have the option of following the terms and conditions either of
+ that specified version or of any later version that has been
+ published (not as a draft) by the Free Software Foundation. If
+ the Document does not specify a version number of this License,
+ you may choose any version ever published (not as a draft) by the
+ Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+====================================================
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and license
+notices just after the title page:
+
+ Copyright (C) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License."
+
+ If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no Front-Cover
+Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
+LIST"; likewise for Back-Cover Texts.
+
+ If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License, to
+permit their use in free software.
diff --git a/debian/bashdb.emacsen-install b/debian/bashdb.emacsen-install
new file mode 100644
index 0000000..1b00b47
--- /dev/null
+++ b/debian/bashdb.emacsen-install
@@ -0,0 +1,50 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/bashdb
+
+# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+FLAVOR=$1
+PACKAGE=bashdb
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+# bashdb's gud.el doesn't support emacs20
+if [ ${FLAVOR} = emacs20 ]; then exit 0; fi
+
+FILES="bashdb.el gud.el"
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+# SITEFLAG="-no-site-file"
+#else
+# SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+ echo install/${PACKAGE}: install Info links for ${FLAVOR}
+ install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} \
+ /usr/share/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff --git a/debian/bashdb.emacsen-remove b/debian/bashdb.emacsen-remove
new file mode 100644
index 0000000..3a0ac72
--- /dev/null
+++ b/debian/bashdb.emacsen-remove
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/bashdb
+
+FLAVOR=$1
+PACKAGE=bashdb
+
+if [ ${FLAVOR} != emacs ]; then
+ if test -x /usr/sbin/install-info-altdir; then
+ echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+ install-info-altdir --quiet --remove --dirname=${FLAVOR} \
+ /usr/share/info/${PACKAGE}.info.gz
+ fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff --git a/debian/bashdb.emacsen-startup b/debian/bashdb.emacsen-startup
new file mode 100644
index 0000000..492c596
--- /dev/null
+++ b/debian/bashdb.emacsen-startup
@@ -0,0 +1,20 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Debian bashdb package
+;;
+;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd@debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>
+
+;; The bashdb package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...). The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(unless (eq flavor 'emacs20)
+ (let ((package-dir (concat "/usr/share/"
+ (symbol-name flavor)
+ "/site-lisp/bashdb")))
+ (when (file-directory-p package-dir)
+ (setq load-path (cons package-dir load-path))))
+ (autoload 'bashdb "bashdb" "Run the bash debugger." t))
diff --git a/debian/bashdb.postinst b/debian/bashdb.postinst
new file mode 100644
index 0000000..69fd9fa
--- /dev/null
+++ b/debian/bashdb.postinst
@@ -0,0 +1,7 @@
+#! /bin/sh -e
+
+install-info --quiet --section "Shells" "Shells" \
+ --description="Debugging with the BASH debugger" \
+ /usr/share/info/bashdb.info.gz
+
+#DEBHELPER#
diff --git a/debian/bashdb.prerm b/debian/bashdb.prerm
new file mode 100644
index 0000000..f7aeb17
--- /dev/null
+++ b/debian/bashdb.prerm
@@ -0,0 +1,5 @@
+#! /bin/sh -e
+
+install-info --quiet --remove bashdb
+
+#DEBHELPER#
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0dd230f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,1734 @@
+bash (3.1dfsg-8) unstable; urgency=high
+
+ * bash-doc: Install copyright file when building without the
+ gfdl'ed docs. Closes: #402471.
+
+ -- Matthias Klose <doko@debian.org> Mon, 11 Dec 2006 22:08:10 +0100
+
+bash (3.1dfsg-7) unstable; urgency=medium
+
+ * Restore the bash(1) manual page. Closes: #392989.
+
+ -- Matthias Klose <doko@debian.org> Sun, 22 Oct 2006 13:41:59 +0000
+
+bash (3.1dfsg-6) unstable; urgency=low
+
+ * Remove the texinfo documentation from the package. Closes: #357260.
+ * Remove the FAQ from the package.
+
+ -- Matthias Klose <doko@debian.org> Thu, 12 Oct 2006 22:35:46 +0200
+
+bash (3.1-5) unstable; urgency=low
+
+ * Work around the broken remove-shell, not checking for the existance
+ of /etc/shells (closes: #337097).
+ * Force rebuild of bashref.info (closes: #354303, #357258).
+ * Apply upstream patches 015, 016, 017, fixing
+ - a problem with the extended globbing code prevented dots from matching
+ filenames when used in some extended matching patterns.
+ - core dumps when attempting to perform globbing in directories with
+ very large numbers of files.
+ - Array expansion failure with an arithmetic syntax error when the
+ subscript appears within double quotes. Closes: #358831.
+ * Add copyrights for contributed files (Joost van Baal). Closes: #357607.
+ * bash_completion:
+ - Add apt-cache madison completion: Closes: #342073, #359021.
+ - Complete files with spaces for bzip2. Closes: #356218.
+ - Complete whatis and apropos like man. Closes: #352145.
+ - Ignore stderr in apt-cache completion. Closes: #367198.
+ - Add flv|FLV files completion for mplayer. Closes: #364509, #373904.
+ - Add dvi|DVI files completion for evince. Ubuntu #49880.
+ * Fix typos in man page. Closes: #360543.
+
+ [ Ian Jackson ]
+ * Make bash die if it cannot read its input file. Closes: #320036.
+ (This is not an ideal fix because, for example, the exit status is
+ still wrong - it should be 127, not 2. Also, the filename is not
+ printed. Unfortunately the code is badly tangled making this small
+ fix the most appropriate approach.)
+
+ -- Matthias Klose <doko@debian.org> Wed, 5 Jul 2006 06:56:54 +0200
+
+bash (3.1-4) unstable; urgency=low
+
+ * Update upstream patch 010, apply upstream patches 012, 013, 014.
+ * bash-default-editor.dpatch: Fix typo (closes: #356308).
+ * clear_console: Add FreeBSD support (Aurelian Jarno). Closes: #355336.
+ * clear_console: Only get rid of any history in the scrollback, if
+ not running in a pseudo tty (closes: #355815).
+ * bash_completion:
+ - Fix error in minicom completion (closes: #357241).
+
+ -- Matthias Klose <doko@debian.org> Thu, 23 Mar 2006 01:16:22 +0100
+
+bash (3.1-3) unstable; urgency=low
+
+ * Apply upstream patches 006, 007, 008, 009, 010 and 011.
+ * Define PGRP_PIPE to avoid race condition; monitor mode causes emacs as
+ $EDITOR to hang on kernel 2.6 (Jim Paris). Closes: #224543.
+ * Fix read memleak when reading from non-blocking fd (Tim Waugh).
+ * Recognize 'exec -l /bin/bash' as login shell (Tim Waugh).
+ * Fix parameter expansion: Array member length expansion fails with nested
+ index expression (Jan C. Nordholz). Closes: #345861.
+ * Add swedish translation of message strings. Closes: #349677.
+
+ Merge from Ubuntu:
+ * clear_console: New helper program to clear the console, including
+ the scrollback buffer.
+ * /etc/skel/.bash_logout: Install it again and use clear_console.
+ Ubuntu #29405. Closes: #331504.
+ * /etc/skel/.bashrc: Enable bash_completion.
+ Ubuntu #11414, #25096.
+ * bash_completion:
+ - Fix ssh completion to match lines starting with `Hostname' as well.
+ Closes: #343312.
+ * Add ulimit options -e and -r.
+
+ * Update bash_completion to 20060301:
+ - Completion for minicom(1), mtr(8), sysctl(8), smartctl(8), vncviewer(1),
+ invoke-rc.d, update-rc.d and dpkg-source has been added.
+ Closes: #323824, #327414.
+ - gdb completion of second parameter was broken when first parameter
+ contained white space.
+ - gdb completion wasn't completing second parameter correctly when it was
+ a file, rather than a PID.
+ - Ruby ri completion has been broken for some time. This is now fixed.
+ - Various fixes to work around change in how POSIX quoting is handled in
+ bash 3.1.
+ - subversion completion has been reimplemented from scratch and integrated
+ into the main file.
+ - iconv(1) completion has been improved.
+ - yum(8) completion has been updated for current version of yum.
+ - ant completion will now make use of complete-ant-cmd.pl, if available.
+ - cvs(1) completion has been improved with 'update' and 'stat' completion.
+ - 'aptitude show' now works in the same way as 'apt-cache show'.
+ - make(1) now also completes on file names.
+ - MPlayer will now also complete on .flac, .mpc and .3gp files.
+ Closes: #340452.
+ - wine will now also complete on .exe.so files.
+ - unzip will now also complete on oowriter's .ott files.
+ - xine et al will now complete on .mng files.
+ - The list of programs completing on .dvi files has been expanded.
+ - The range of files on which timidity and evince complete has been
+ expanded. Closes: #351848.
+ - mkisofs completion now defaults to treating results as file names.
+ - $DEBUG has been renamed $BASH_COMPLETION_DEBUG to avoid namespace clashes
+ with other software.
+ - man(1) completion now works correctly on OpenBSD.
+ - svk and Mercurial completion have been added to contribs. Closes: #324169.
+ - Many other small optimisations and fixes. Closes: #325056.
+
+ -- Matthias Klose <doko@debian.org> Sat, 4 Mar 2006 01:54:25 +0100
+
+bash (3.1-2) unstable; urgency=low
+
+ * Apply upstream patches 002 - 005.
+
+ -- Matthias Klose <doko@debian.org> Tue, 10 Jan 2006 00:19:25 +0100
+
+bash (3.1-0ubuntu3) dapper; urgency=low
+
+ * Document supported ulimit options.
+ * Fix parsing problems with compound assignments
+ * Fix readline callback interface.
+ * Fix ssh command completion (closes: #343312).
+
+ -- Matthias Klose <doko@ubuntu.com> Fri, 23 Dec 2005 11:31:36 +0100
+
+bash (3.1-0ubuntu2) dapper; urgency=low
+
+ * command-not-found handler: Print error message, when command not found.
+ Ubuntu #5120.
+ * fix ssh command completion.
+
+ -- Matthias Klose <doko@ubuntu.com> Sun, 11 Dec 2005 16:14:14 +0100
+
+bash (3.1-1) unstable; urgency=low
+
+ * New upstream version (final 3.1 release).
+ - Fixed a small memory leak in the programmable completion code.
+ Closes: #338822.
+ * Generate the locales needed for the testsuite, build-depend on locales.
+ * Improve check for existance of /dev/stdin during build. Closes: #333935.
+ * Fix bash_completion, sudo completion does not protect empty arguments.
+ Closes: #329148.
+ * /etc/bash.bashrc: Don't change the xterm title by default, keep the
+ default for /etc/skel/.bashrc. Closes: #313617, #314614.
+
+ -- Matthias Klose <doko@debian.org> Sat, 10 Dec 2005 00:56:28 +0100
+
+bash (3.0+3.1rc1-1) unstable; urgency=low
+
+ * New upstream version (3.1-rc1).
+ * Remove patches applied upstream: rl-del-backspace-policy, bad-interp.
+
+ -- Matthias Klose <doko@debian.org> Fri, 11 Nov 2005 12:59:32 +0000
+
+bash (3.0+3.1b1-1) unstable; urgency=low
+
+ * New upstream version (3.1-beta1).
+ * Remove bash's dependency on passwd, add one to debianutils (>= 2.15).
+
+ -- Matthias Klose <doko@debian.org> Thu, 13 Oct 2005 15:49:49 +0200
+
+bash (3.0+3.1a1-1) unstable; urgency=low
+
+ * New upstream version (3.1-alpha1).
+ - Fix "cd -P" hanging (closes: #316407).
+ - Fixed exit status code so that a suspended job returns 128+signal as its
+ exit status (preventing commands after it in `&&' lists from being
+ executed). Closes: #288319.
+ - The globbing code now uses malloc, with its better failure properties,
+ rather than alloca(). Closes: #238226.
+ - In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin
+ doesn't try to interpret any options at all, as POSIX requires.
+ Closes: #303649.
+ - Some changes to the display code to improve display and redisplay of
+ multibyte characters. Closes: #309654.
+ - Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
+ shell didn't exit. Closes: #310308.
+ - Fix segmentation fault if execve'd with NULL argv. Closes: #316206.
+ - Fix segfault, if free is called with already freed block argument.
+ Closes: #317324.
+ - Fix garbage in bash(1), section SIGNALS. Closes: #327035.
+ - Fixed vi-mode searching so that failure preserves the current line rather
+ than the last line in the history list. Closes: #297330.
+ - Fix segfault on variable assignment. Closes: #291840.
+ - Fixed parser to generate an error when the pipeline `argument'
+ to `!' or `time' is NULL. Closes: #273324, #342228.
+ - A bare `%' once again expands to the current job when used as a job
+ specifier, updated the help for `%'. Closes: #262095.
+ - Fix tilde expansion for some cases where it was performed
+ inappropriately. Closes: #263023.
+ - Replicate first character of $PS4, not only the first byte.
+ Closes: #288125.
+ - bashref.texi: Remove blank lines from contents. Closes: #307264.
+ * Remove patches applied upstream:
+ - bash30*, wcontinued, man-cdpath, update-multibyte-ifs, histtimeformat,
+ spelingm.
+ - rl-examples, rl-setenv, rl-display, rl-self-insert.
+ * Update patches:
+ - deb-bash-config, man-test, man-test2.
+ * bash(1): Fix /etc/bash.logout file name (closes: #289355).
+ * Document, that bash is configured using --disable-net-redirections.
+ Closes: #313538.
+ * Use `command -v editor`, as an editor, if available. Closes: #296603.
+
+ -- Matthias Klose <doko@debian.org> Fri, 9 Sep 2005 21:09:46 +0200
+
+bash (3.0-17) unstable; urgency=low
+
+ * Check that the device files /dev/std{in,out,err} are present at
+ build time. Closes: #327477.
+ * Remove html completion for w3m, users claim w3m to be a general viewer.
+ * /etc/bash.bashrc: Avoid stat on /etc/debian_chroot, if not necessary.
+ Closes: #303712.
+ * debian/patches/wcontinued.dpatch: Update, fixing hangs in
+ bash_completion (Junichi Uekawa). Closes: #318301.
+ * Build-depend on texinfo (>= 4.8). Closes: #316066.
+
+ -- Matthias Klose <doko@debian.org> Thu, 13 Oct 2005 11:24:21 +0000
+
+bash (3.0-16ubuntu3) breezy; urgency=low
+
+ * Don't install .bash_logout again, doesn't clear the buffer and
+ ps is not in required.
+
+ -- Matthias Klose <doko@ubuntu.com> Wed, 5 Oct 2005 13:29:22 +0200
+
+bash (3.0-16ubuntu2) breezy; urgency=low
+
+ * Fix segmentation fault due to gcc optimization and longjmp. Patch
+ by Jim Paris. Debian #331381.
+ * Don't overwrite PROMPT_COMMAND in /etc/bash.bashrc. Ubuntu #15122.
+ Closes #330889.
+ * Install skeleton .bash_logout to clear the screen, when logging out
+ from the console. Ubuntu #10149.
+
+ -- Matthias Klose <doko@ubuntu.com> Tue, 4 Oct 2005 18:01:26 +0200
+
+bash (3.0-16ubuntu1) breezy; urgency=low
+
+ * bash_completion changes:
+ - Add completion for evince.
+ - Fix completion for aptitude (Ubuntu 12549).
+ Closes: #293979, #325045, #327413.
+ - Add completion for *.flac files in mplayer (closes: #304778).
+ - Add completion for *.ott files for unzip and zipinfo (closes: #322481).
+ - Add html completion for w3m.
+
+ -- Matthias Klose <doko@ubuntu.com> Fri, 9 Sep 2005 20:33:31 +0200
+
+bash (3.0-16) unstable; urgency=low
+
+ * Update to bash_completion 20050721 (v1.827).
+ - Fix function name in aptitude completion (closes: #304624, #320390).
+ * In PROMPT_COMMAND, use ~ instead of the complete path.
+ * Adjust for dpkg-dev (>= 1.13.9). Closes: #313546.
+
+ -- Matthias Klose <doko@debian.org> Mon, 5 Sep 2005 18:37:19 +0200
+
+bash (3.0-15) unstable; urgency=low
+
+ * glibc-2.3.5 defines WCONTINUED, which is available only since
+ Linux 2.6.10. On older kernels waitpid() returns -1 with errno
+ set to EINVAL if WCONTINUED is supplied in options. Retry without
+ WCONTINUED set in that case.
+
+ -- Matthias Klose <doko@debian.org> Wed, 25 May 2005 12:38:09 +0000
+
+bash (3.0-14ubuntu1) breezy; urgency=low
+
+ * Configure the static build --without-bash-malloc.
+
+ -- Matthias Klose <doko@ubuntu.com> Sat, 21 May 2005 07:28:25 +0000
+
+bash (3.0-15) unstable; urgency=low
+
+ * Print out bad interpreter names with trailing ^M (DOS line endings).
+ Closes: #282762.
+
+ -- Matthias Klose <doko@debian.org> Sun, 23 Jan 2005 20:24:58 +0100
+
+bash (3.0-14) unstable; urgency=low
+
+ * Fix re-read-init-file (C-xC-r) not to read /etc/inputrc twice,
+ but /etc/inputrc and ~/.inputrc. Thanks to Vasco Pedro.
+ * Fix bug in readline's self-insert command (closes: #290103).
+ * Fix bash-builtins package description (closes: #290258).
+ * Add cross build support (closes: #283732).
+ * Update to bash_completion 20050121 (v1.786).
+ - Improve ssh2 known hosts completion. (closes: #282767).
+ - Pass over switches to metacommands like sudo, nice, exec, etc.
+ (closes: #289847)
+ - Trivial fix to allow python to be called with a path component without
+ bash displaying a bad subscript error. (closes: #290748)
+ - unzip should also work on .sxw files. (closes: #286738).
+ - Lots of commands that use _longopts() don't use filenames at all, so
+ these shouldn't be mapped with '-o filenames'. (closes: #283069, which
+ related only to wget).
+ - Make dd treat completions as filenames, which is bad for options, but
+ good for filename arguments to 'if' and 'of'. (closes: #287286).
+ - Fix lvresize errors when running as non-root (closes: #285604).
+
+ -- Matthias Klose <doko@debian.org> Sat, 22 Jan 2005 23:08:57 +0100
+
+bash (3.0-13) unstable; urgency=low
+
+ * Update to bash_completion 20050103 (v1.772).
+ * Fix segfault in the ``reverse-search-history'' feature of the readline
+ library, if the search string matches a previously entered command (ie
+ history) and must overflow the current screen width. Closes: #288940.
+
+ -- Matthias Klose <doko@debian.org> Wed, 12 Jan 2005 08:11:36 +0100
+
+bash (3.0-12) unstable; urgency=low
+
+ * debian/skel.bashrc: Quote dircolors invocation (closes: #285840).
+
+ -- Matthias Klose <doko@debian.org> Sun, 19 Dec 2004 17:48:17 +0100
+
+bash (3.0-11) unstable; urgency=low
+
+ * Adjustments to the skeleton files.
+ * Fix spelling errors in the docs (closes: #281842).
+
+ -- Matthias Klose <doko@debian.org> Wed, 17 Nov 2004 06:37:48 +0100
+
+bash (3.0-10) unstable; urgency=low
+
+ * Apply upstream patch 015-016.
+
+ -- Matthias Klose <doko@debian.org> Thu, 11 Nov 2004 07:15:34 +0100
+
+bash (3.0-9) unstable; urgency=low
+
+ * Apply upstream patch 001-014.
+ * Document handling of parameters of the test builtin (closes: #173273).
+
+ -- Matthias Klose <doko@debian.org> Fri, 29 Oct 2004 23:57:19 +0200
+
+bash (3.0-8) unstable; urgency=low
+
+ * Add a comment to /etc/bash.bashrc that the file is not read by
+ login shells (closes: #271413).
+ * Sync builtin CDPATH documentation with man page (closes: #259767).
+ * Document conditional file expressions acting on the target of
+ symbolic links as well (except -h, -L). Closes: #231267.
+ * Update to bash_completion 20041017 (v1.758).
+ - Unset `have' variable at end of sourcing (closes: #273809).
+ - Fix scp completion breakage when filenames contained an ampersand.
+ Closes: #262354.
+
+ -- Matthias Klose <doko@debian.org> Sun, 17 Oct 2004 09:31:03 +0200
+
+bash (3.0-7) unstable; urgency=low
+
+ * Apply upstream patches 001-013, remove patches collected from the net.
+ * Patch bash30-003 restores a measure of backwards compatibility for the
+ `trap signum' syntax (closes: #261948).
+ * Trim skeleton files.
+
+ -- Matthias Klose <doko@debian.org> Sun, 19 Sep 2004 09:06:36 +0200
+
+bash (3.0-6) unstable; urgency=low
+
+ * Fixed in bash-3.0:
+ - New option pipefail. If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit with a non-zero status,
+ or zero if all commands in the pipeline exit successfully. This option
+ is disabled by default. The two oldest outstanding bash reports are
+ gone (closes: #7047, #10494).
+ - "$( substitution strangeness (closes: #187983).
+ - timestamp support in history (closes: #161057).
+ * Various updates from the net:
+ - Fix a bug in array expansion.
+ - Fix a bug in brace expansion.
+ - Handle multibyte characters in IFS values.
+ - Fix a bug, when pipefail option is set.
+ - History saved-line handling (closes: #253766, #268922).
+ - Fix parameter expansion with UTF-8 and ${#var} or ${var: -1}.
+ * Apply patch to fix non POSIX function name and avoid use of global
+ variables (Stephen Gildea). Closes: #262105.
+ * Add command_not_found_handle in non POSIX interactive shells.
+ Closes: #243015.
+ * Check for /usr/sbin/remove-shell before using it (closes: #265982).
+ * bash-builtins: Install missing header files (closes: #265259).
+ * Clarify documentation about substring expansion (closes: #192831, #203767).
+ * Fix completion on ~/../``/<tab> (closes: #261142).
+ * Clarify documentation about case-insensitive pathname expansion.
+ Closes: #141292.
+ * Apply patch to fix the display of UTF-8 characters.
+ Closes: #224916, #257540.
+
+ -- Matthias Klose <doko@debian.org> Sat, 4 Sep 2004 10:21:23 +0200
+
+bash (3.0-5) unstable; urgency=medium
+
+ * Fix segfault and wrong behaviour running the firehol script.
+ Closes: #262438, #262642.
+ * Add history scrolling patch patch (closes: #263064).
+ * Strip bash binary, leftover from debugging (closes: #263451).
+ * `cd -' printing the directory in non-interactive mode, non-POSIX mode
+ is new behaviour, not a bug (closes: #262619).
+ * Address build failure calling the 'binary' target directly instead of
+ dpkg-buildpackage (closes: #263797).
+ * Remove kfreebsd-gnu hack to disable bash malloc (closes: #263005).
+
+ -- Matthias Klose <doko@debian.org> Fri, 6 Aug 2004 07:10:24 +0200
+
+bash (3.0-4) unstable; urgency=low
+
+ * Revert substitution patch trying to fix completion on ~/../``/<tab>.
+ Reopens: #261142. Closes: #261955, #262338, #262602.
+
+ -- Matthias Klose <doko@debian.org> Sun, 1 Aug 2004 12:36:57 +0200
+
+bash (3.0-3) unstable; urgency=high
+
+ * Revert the following upstream change (until sarge is released):
+ The historical behavior of `trap' that allows a missing `action' argument
+ to cause each specified signal's handling to be reset to its default is
+ now only supported when `trap' is given a single non-option argument.
+ Addresses: #261948.
+ * Fix line wrapping (closes: #261957).
+
+ -- Matthias Klose <doko@debian.org> Fri, 30 Jul 2004 16:17:22 +0200
+
+bash (3.0-2) unstable; urgency=medium
+
+ * Fix typo in bash-minimal's postinst. Closes: #260506.
+ * Fixed in bash-3.0:
+ - pwd builtin exiting with write error. Closes: #243872.
+
+ -- Matthias Klose <doko@debian.org> Thu, 29 Jul 2004 07:13:13 +0200
+
+bash (3.0-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Bugs fixed in this release (and the alpha/beta releases and release
+ candidates):
+ - Fixed a bug that caused the prompt to overwrite previous output when the
+ output doesn't contain a newline and the locale supports multibyte
+ characters. This same change fixes the problem of readline redisplay
+ slowing down dramatically as the line gets longer in multibyte locales.
+ Closed: #179883.
+ - The shell no longer seg faults if the expanded value of $PS4 is null
+ and `set -x' is enabled. Closes: #165533.
+ - Don't define a default DEFAULT_MAIL_DIRECTORY, because it can cause
+ a timeout on NFS mounts. Closes: #211426.
+ - Fixed a bad interaction between alias and completion. Closes: #186218.
+ - Fix initialization of local variables with "$@". Closes: #180290.
+ - Fixed segfault in "read -a foo <<< $(echo)". Closes: #167003.
+ - Fixed the history word tokenizer to handle <( and >( better when used as
+ part of bash. Closes: #165212.
+ - Fixed EINTR signal killing redirection. Closes: #164134.
+ - Fixed infinite loop with IFS="<non-ws-char>" and compgen -W.
+ Closes: #162952.
+ - Fixed the internal logout code so that shells that time out waiting for
+ input (using $TMOUT) run ~/.bash_logout. Closes: #152847.
+ - Speedups to the multibyte character redisplay code. Closes: #197965.
+ - Better error message on wrong kill arguments. Closes: #193570.
+ - Overwriting of prompt. Closes: #176968.
+ - The shell now reports on processes that dump core due to signals when
+ invoked as `-c command'. Closes: #211693.
+ - Fixed ferror beeing called w/o always first calling clearerr
+ results in spurious errors reported. Closes: #195116.
+ - Add missing trailing slash on directory completion. Closes: #178828.
+ - Fix different behaviour for builtin and external commands together
+ with arithmetic expansion. Closes: #173744.
+ - Fixed a bug that caused redirections accompanying a null command
+ to persist in the current shell. Closes: #173148.
+ - Fixed a bug that caused a leading `-' in the shell's name to cause it to
+ not be recognized as a restricted shell. Closes: #170298.
+ - Fix segfault in ill formed paramter expansion. Closes: #162773.
+ - Fixed a bug in brace expansion that caused a quoted `$' preceding an
+ open brace to inhibit brace expansion. Closes: #157954.
+ - Removed the attempts to avoid adding a slash at the end of a completed
+ executable name if there was a directory with the same name in the
+ current directory. Closes: #155134, #189006.
+ - Fix error message for circular alias expansions. Closes: #173588.
+ - Fixed a bug that caused some key bindings set in an inputrc to be ignored
+ at shell startup. Closes: #110969.
+ - Fix segfault on bad array subscripts. Closes: #232653.
+ - Fix "set completion-ignore-case on" breaking some tab completion.
+ Closes: #224303.
+ - Flag an error when a user uses "% DIGITS" instead of "%DIGITS", and
+ don't give him a different job instead. Closes: #173854.
+ - For 'cd filename' say 'not a directory', not 'no such file or directory'
+ when filename exists and is not a directory. Closes: #219958.
+ - Expansion results are the same for ${1:+"$@"} and "$@" if IFS is not
+ the default.
+ - The locale code does a better job of recomputing the various locale
+ variable values when LC_ALL is unset. Closes: #160932.
+ - Fix substitution error triggering an assertion. Closes: #251801.
+ * Documentation updated in this release (and the alpha/beta releases):
+ - Fix documentation about exit status of unset builtin. Closes: #183352.
+ - Clarify documentation for arguments of wait builtin. Closes: #174133.
+ - Document ${!prefix@} expansion. Closes: #168318.
+ - Fix documentation of GLOBIGNORE behaviour. Closes: #168267.
+ - Document the use of $EMACS. Closes: #174744.
+ - Improve documentation of the value of arithmetic expressions.
+ Closes: #168321.
+ - Make docs more explicit about variable indirection in shell parameter
+ expansion. Closes: #167002.
+ - Documentation for values of various assignments updated. Closes: #168331.
+ - In section "Shell Functions", add documentation for syntax,
+ which bash accepts. Closes: #172971.
+ - Fix documentation of the PATH variable. Closes: #155369.
+ - Document SHELL variable in section "Shell Variables". Closes: #249657.
+ - Remove reference to missing section in rbash(1). Closes: #249219.
+ * Fix another segfault in completion code. Closes: #261142.
+
+ -- Matthias Klose <doko@debian.org> Tue, 27 Jul 2004 21:23:42 +0200
+
+bash (2.05b-2-22) unstable; urgency=low
+
+ * Brown paperbag ... Fix typo in bash-minimal's postinst.
+
+ -- Matthias Klose <doko@debian.org> Tue, 20 Jul 2004 23:04:56 +0200
+
+bash (2.05b-2-21) unstable; urgency=low
+
+ * Remove the pre-dependency on passwd.
+ * Explicitely check for the existance of /usr/sbin/add-shell.
+ * Reassign #257744 to debootstrap to correctly handle the installation.
+
+ -- Matthias Klose <doko@debian.org> Mon, 19 Jul 2004 22:57:19 +0200
+
+bash (2.05b-2-20) unstable; urgency=medium
+
+ * Make passwd a pre-dependency (closes: #257744).
+
+ -- Matthias Klose <doko@debian.org> Sat, 17 Jul 2004 06:56:38 +0200
+
+bash (2.05b-2-19) unstable; urgency=low
+
+ * Build using gcc, not gcc-3.4 (closes: #259208).
+
+ -- Matthias Klose <doko@debian.org> Tue, 13 Jul 2004 21:25:28 +0200
+
+bash (2.05b-2-18) unstable; urgency=low
+
+ * Tighten dependency on passwd (closes: #257717).
+ * Update to bash_completion 20040711 (v1.737).
+ - Fix mutt folder completion (closes: #248635).
+ * Fix tab completion on relative path directories (closes: #189006).
+ * Modify lib/malloc/malloc.c to make it compile with gcc-3.4 (Andreas
+ Jochens). Closes: #258456.
+
+ -- Matthias Klose <doko@debian.org> Tue, 13 Jul 2004 06:15:46 +0200
+
+bash (2.05b-2-17) unstable; urgency=low
+
+ * Add dependencies on passwd (closes: #257630).
+
+ -- Matthias Klose <doko@debian.org> Sun, 4 Jul 2004 22:56:17 +0200
+
+bash (2.05b-2-16) unstable; urgency=low
+
+ * Handle shells using add-shell/remove-shell (closes: #254476).
+ * Update to bash_completion 20040704 (v1.731).
+ - Add autocompletion for dpkg -P, --purge (closes: #241042, #249934).
+ - Fix mutt folder completion (closes: #248635).
+ - Add autossh to ssh completions (closes: #252090).
+ - Emacs completion does not discard .tar* archives (closes: #252347).
+ - Add MS filename extensions to OpenOffice (closes: #252635).
+ - Add completion for tar.Z files (closes: #254896).
+ - Fix problems with sed-4.1 (closes: #256000).
+ - Fix dpkg completion with multiple arguments (closes: #257544).
+ * Fix formatting in bash(1). Closes: #248344.
+
+ -- Matthias Klose <doko@debian.org> Sun, 4 Jul 2004 16:07:24 +0200
+
+bash (2.05b-2-15) unstable; urgency=low
+
+ * Fix a bug that caused a leading `-' in the shell's name to cause it to
+ not be recognized as a restricted shell (closes: #170298).
+ * Fix option in menu file (closes: #162152).
+ * Backout patches/random patch (closes: #242111).
+ * Update to bash_completion 20040331 (v1.700).
+ * Update skeleton files and /etc/bash.bashrc to include the contents
+ of /etc/debian_chroot in the prompt, if the file exists.
+ * Add openoffice completions (closes: #244611).
+ * Remove ee (eeyes) completion (closes: #240668). eeyes isn't distributed
+ anymore.
+ * bash(1): Document ~/.bash_login and ~/.profile in FILES section.
+ Closes: #204766.
+ * Apply patch from http://www.savarese.org/posix/ to improve the mail
+ checking code so it won't check (and possibly cause an NFS file system
+ mount) until MAILPATH or MAIL is given a value. Closes: #211426.
+ * Add missing dependency in debian/rules (closes: #247413).
+
+ -- Matthias Klose <doko@debian.org> Sat, 8 May 2004 18:36:41 +0200
+
+bash (2.05b-2-14) unstable; urgency=low
+
+ * Add bash reference manual in PDF format (closes: #202849).
+ * Remove FAQ; the license doesn't allow modification (closes: #231157).
+ * debian/copyright: Name the copyright holders (closes: #233716).
+ * Update to bash_completion 20040214 (v1.690).
+ - Make xspec parsing immune to comments (closes: #226812).
+ - Another fix to sudo completion: "sudo completion is virtually
+ impossible to get right. It's just a question of choosing what
+ aspect of it is the least annoying to leave broken. :-("
+ Closes: #223094.
+ - xine can also complete on .asx files (closes: #231356).
+ - Speedup dpkg completion (closes: #232585).
+ - Fix chsh completion (closes: #232214).
+ * Disable the GNU/kFreeBSD kludge (--without-bash-malloc). Closes: #234137.
+
+ -- Matthias Klose <doko@debian.org> Sun, 22 Feb 2004 13:31:03 +0100
+
+bash (2.05b-2-13) unstable; urgency=medium
+
+ * Apply patch to speedup display of characters under multibyte locales.
+ Thanks to Denis Barbier. Closes: #197965.
+ * Update to bash_completion 20040101 (v1.672).
+ - Closes: #215030, #224981.
+ - Include completion for sitecopy in contrib directory (closes: #223294).
+ * Fix typo in man page (closes: #224477).
+ * Don't build bashdb anymore. Not ready for use. Closes: #224573, #224566.
+ * Document /etc/bash.bashrc in bash man page (closes: #216403).
+
+ -- Matthias Klose <doko@debian.org> Sat, 24 Jan 2004 21:20:25 +0100
+
+bash (2.05b-2-12) unstable; urgency=low
+
+ * Update to bash_completion 20031022 (v1.644).
+ * Fix "suspend" segfaults in non-interactive shells (closes: #217188).
+ * Rename bashdb's gud.el to gud-bashdb.el (closes: #220002).
+
+ -- Matthias Klose <doko@debian.org> Mon, 10 Nov 2003 23:53:35 +0100
+
+bash (2.05b-2-11) unstable; urgency=medium
+
+ * Tighten automake build dependency (closes: #215350).
+ * Add dependency line for bashdb (closes: #215634).
+ * /etc/skel/.bashrc: set xterm's title as we do for PS1 (closes: #176734).
+ * Remove build dependency on readline (closes: #215165).
+ * Update to bash_completion 20031007 (v1.630).
+
+ -- Matthias Klose <doko@debian.org> Tue, 14 Oct 2003 20:37:23 +0200
+
+bash (2.05b-2-10) unstable; urgency=low
+
+ * Update to bash_completion 20030911 (v1.624).
+
+ -- Matthias Klose <doko@debian.org> Mon, 22 Sep 2003 11:43:39 +0200
+
+bash (2.05b-2-9.1) unstable; urgency=low
+
+ * Added build dependency on texi2html (closes: #211151).
+ * Create site-lisp directory in bashdb target.
+
+ -- Herbert Xu <herbert@debian.org> Thu, 18 Sep 2003 18:39:51 +1000
+
+bash (2.05b-2-9) unstable; urgency=low
+
+ * Recompilation fixes segfaults in bash-static (closes: #205185).
+ * Build debugger enabled bash binary (bash-bashdb). Closes: #195877.
+ * Update to bash_completion 20030821 (v1.617). Closes: #203859, #205741.
+ * Adjust config.guess triplet for GNU/FreeBSD (closes: #194182).
+ * Fix package description (closes: #202344).
+
+ -- Matthias Klose <doko@debian.org> Mon, 8 Sep 2003 23:34:50 +0200
+
+bash (2.05b-2-8.1) unstable; urgency=low
+
+ * Fixed versioned dependency of bash-builtins (closes: #196421).
+ * Call dh_fixperms in bash-minimal.
+
+ -- Herbert Xu <herbert@debian.org> Sat, 7 Jun 2003 12:44:18 +1000
+
+bash (2.05b-2-8) unstable; urgency=low
+
+ * Apply upstream patches 005, 006, 007.
+ 006 addresses the LSB 1.3 test suite failures (closes: #184888).
+ 007 addresses ~ command working with UTF-8 locales (closes: #179946).
+ * Build a minimal shell in package bash-minimal (closes: #176164).
+ Sort of fix for reports complaining that /bin/sh does have
+ additional features compiled in (closes: #183185).
+ * Build a static shell in package bash-static (closes: #138089).
+ * Update to bash_completion 20030527 (v1.571) (closes: #167852, #171523,
+ #184738, #185711, #189535, #192282).
+ * /etc/skel.profile: Export MANPATH (commented out). Closes: #180717.
+ * Add menu entry for bash (closes: #187596).
+ *
+ * Install info docs as bashref.info, symlink to bash.info (closes: #174674).
+ * Fix segfault with builtin shift, no arguments and "shopt -s shift_verbose".
+ Closes: #159996.
+ * Update config.{sub,guess} (closes: #179737).
+ * Fix apt-cache search completion (closes: #184144).
+ * Configure --without-bash-malloc on GNU/FreeBSD (closes: #194182).
+
+ -- Matthias Klose <doko@debian.org> Thu, 29 May 2003 17:00:53 +0200
+
+bash (2.05b-7) unstable; urgency=medium
+
+ * Fix rbash man page (closes: #181248).
+ * On m68k-linux, bash is miscompiled using gcc-3.2 and gcc-snapshot.
+ Revert back to gcc-2.95.
+
+ -- Matthias Klose <doko@debian.org> Fri, 28 Feb 2003 00:54:22 +0100
+
+bash (2.05b-6) unstable; urgency=low
+
+ * First upload compiled using gcc-3.2 as the default compiler.
+ * Update to bash_completion 20030126 (v1.520) (closes: #168478, #145481,
+ #150628, #158039, #168700, #169232, #169586, #171161, #171420, #171523,
+ #173096, #177654).
+
+ -- Matthias Klose <doko@debian.org> Mon, 27 Jan 2003 21:08:19 +0100
+
+bash (2.05b-5) unstable; urgency=high
+
+ * Build-depend on bison-1.35 (closes: #167635).
+
+ -- Matthias Klose <doko@debian.org> Mon, 4 Nov 2002 09:30:39 +0100
+
+bash (2.05b-4) unstable; urgency=low
+
+ * Ignore *~ and *.bak files in /etc/bash_completion.d/ (closes: #161027).
+ * debian/patches/rl-mbutil.dpatch: Fix segfault in mbutil.c.
+ * Update to bash_completion 20021026 (v1.462) (closes: #161671, #162161,
+ #163096, #163097, #164890, #165937).
+ * Apply fix for debian/bash.preinst.c (closes: #162424).
+ * Avoid warning in s390 build (closes: #160731).
+ * /etc/skel.bashrc: Add commented example to set the `checkwinsize'
+ option (maybe closes: #161984).
+ * Install builtins manpage as bash-builtins(7), add an alternative
+ builtins(7) with priority 10 (closes: #166082).
+ * Fix typo in documentation of deprecated arithmethic expansion.
+ Closes: #161386.
+ * rl-8bit-init.dpatch: Apply (closes: #164809).
+ * README.Debian: Removed invalid entry about ssh (closes: #159754).
+
+ -- Matthias Klose <doko@debian.org> Tue, 24 Sep 2002 12:40:35 +0200
+
+bash (2.05b-3) unstable; urgency=low
+
+ * Apply upstream patch 003 (Fix completing executable names).
+ Closes: #155134, #159466.
+ * Apply upstream patch 004.
+ * Fix completion by TAB in quoted sequence(`...`) with Multibyte Locale.
+ Patch from Satoshi Koike (closes: #155436).
+ * Update to bash_completion 20020909 (v1.410) (closes: #154595, #155211,
+ #155706).
+ * Don't set umask in /etc/skel/.bash_profile (closes: #155973).
+ * Drop suggestion of grep-dctrl (closes: #156351).
+
+ -- Matthias Klose <doko@debian.org> Fri, 9 Aug 2002 05:30:24 +0200
+
+bash (2.05b-2) unstable; urgency=medium
+
+ * Apply upstream patches:
+ - Fix a command completion problem (closes: #154273).
+ - Fix a segfault (closes: #154123).
+ - Fix for repeating an edit in vi mode.
+ * Fix typo in /etc/skel/.bashrc (closes: #153856).
+ * Update to bash_completion 20020727 (v1.390) (closes: #148873, #153045).
+ * Install info docs in "Shells" section (closes: #154618).
+
+ -- Matthias Klose <doko@debian.org> Fri, 2 Aug 2002 19:24:28 +0200
+
+bash (2.05b-1) unstable; urgency=low
+
+ * New upstream version:
+ - Fixed a problem with process substitution that resulted in incorrect
+ behavior when the number of process substitutions in an individual
+ command approached 64 (closes: #149229).
+ - Added putenv, setenv, unsetenv to getenv replacement (closes: #149262).
+ - Fixed bug, where bash incorrectly reports failure to execute a script.
+ Closes: #126620, #140819.
+ - Fixes an `out of memmory in pipe' error (closes: #134004).
+ - Fixed a bug that could cause the -O expand_aliases invocation option
+ to not take effect (closes: #122362).
+ - New code to handle multibyte characters (obsoletes and closes: #25131,
+ #118724).
+ - Fixed the /= and %= arithmetic operators to catch division by zero.
+ Closes: #148950.
+ - Fixed abort in completion of absolute filenames (closes: #136625).
+ - Fixed "declare -f"'s handling of here-documents (closes: #127452).
+ - Documentation for `==' adds hint for POSIX compliance (closes: #137741).
+ - Not reproducible anymore with new upstream version. Upstream regards
+ these as fixed (closes: #142906, #143811, #144375).
+ - Fix bug in `compgen -W' (closes: #143518).
+ - Fix memory corruption error printing error message (closes: #145229).
+ - Unreproducible with the new upstream version (closes: #135062).
+ - Fixed a bug that caused a syntax error when a command was terminated by
+ EOF (closes: #147258).
+ - Fixed a problem which caused the display to be messed up when the last
+ line of a multi-line prompt (possibly containing invisible characters)
+ was longer than the screen width (closes: #137268).
+ - The `home' and `end' keys are now bound to beginning-of-line and
+ end-of-line, respectively, if the corresponding termcap capabilities
+ are present (closes: #89026, #89034, #98029, #107453, #107897, #116943,
+ #119491, #128687, #130029).
+ - Fixed a bug that could cause the -O expand_aliases invocation option
+ to not take effect (closes: 148505).
+ - Bash now correctly honors setting LANG to some value when LC_ALL does not
+ already have a value (closes: #145597).
+ - The `unset' builtin no longer returns a failure status when asked to
+ unset a previously-unset variable or function (closes: #98743).
+ - Changes to make reading and writing the history file a little faster, and
+ to cope with huge history files without calling abort(3) from xmalloc.
+ Closes: #61006.
+ * Fixed in earlier versions of bash:
+ - Fixed a bug that caused SIGINT to kill shell scripts after the script
+ called `wait' (closes: #14658).
+ - Handling of ANSI sequences in PS1 (closes: #60914).
+ - ctrl+z when running while-loop puts bash in broken state (closes: #98521).
+ * Fix build error (closes: #151681).
+ * bash suggests bash-doc (closes: #152353).
+ * /etc/skel/.bashrc: Only enable color support for ls, when $TERM != dumb.
+ Closes: #143361.
+ * Report is missing any information. Bug submitter didn't respond.
+ Closes: #130051.
+ * Close a report for a sefault in bash-2.03, which cannot be reproduced
+ anymore in newer versions (2.05) (closes: #58404).
+ * Add the README.commands document to the doc directory. Reassign #106170
+ to doc-linux-text.
+ * Update to bash_completion 20020716 (v1.383) (closes: #145938).
+
+ -- Matthias Klose <doko@debian.org> Fri, 19 Jul 2002 22:33:25 +0200
+
+bash (2.05a-12) unstable; urgency=low
+
+ * Update to bash_completion 20020528 (v1.335) (closes: #141970, #142015,
+ #142859, #144335, #146152, #146309, #146693).
+ Put the the contributed completion files into /usr/share/doc.
+ * Suggest grep-dctrl, which is called by the completion code. Added
+ note to README.bash_completion, that the completion code depends on it.
+ Closes: #146152.
+ * Mention bash_completion in the package description (closes: #146878).
+ * Fix brace expansion (Fix by Richard Kettlewell <rjk@greenend.org.uk>).
+ Forwarded. Closes: #144983.
+
+ -- Matthias Klose <doko@debian.org> Thu, 30 May 2002 23:50:40 +0200
+
+bash (2.05a-11) unstable; urgency=medium
+
+ * Don't mishandle negative pid in `kill' builtin (closes: #133927, #137742).
+ * builtins(1) doesn't document `for' (closes: #118755).
+ * Add /usr/share/bash_completion directory to source package specific
+ completion files.
+ * Update to bash_completion 20020408 (v1.264).
+ Closes: #133109, #139375, #139675, #134713, #141134.
+ * Add completion to /etc/skel/.bashrc (commented out). Closes: #138921.
+
+ -- Matthias Klose <doko@debian.org> Mon, 8 Apr 2002 20:51:41 +0200
+
+bash (2.05a-10) unstable; urgency=medium
+
+ * Init seed of random generator in subshells (patch from Miha Tomsic).
+ * Update to bash_completion 20020330 (v1.237).
+ Closes: #138673, #138707, #139110 and #139675.
+ * Strip bash(1) again (closes: #138902).
+
+ -- Matthias Klose <doko@debian.org> Sun, 31 Mar 2002 08:08:26 +0200
+
+bash (2.05a-9) unstable; urgency=low
+
+ * Fix bug reading /etc/bash_completion.d files.
+
+ -- Matthias Klose <doko@debian.org> Sat, 16 Mar 2002 00:54:28 +0100
+
+bash (2.05a-8) unstable; urgency=low
+
+ * A last bash_completion bug fix upload (updated to v1.195,
+ see changelog.bash_completion.gz for details).
+ All files in /etc/bash_completion.d are read before ~/.bash_completion
+ is read. Files containing a dot are ignored.
+ Included completion extensions (closes: #129661, #137725, #137732).
+
+ -- Matthias Klose <doko@debian.org> Tue, 12 Mar 2002 23:25:21 +0100
+
+bash (2.05a-7) unstable; urgency=low
+
+ * A bash_completion bug fix upload (updated to v1.180,
+ see changelog.bash_completion.gz for details). Really closes: #133825.
+
+ -- Matthias Klose <doko@debian.org> Thu, 7 Mar 2002 00:06:14 +0100
+
+bash (2.05a-6) unstable; urgency=medium
+
+ * Configure --without-bash-malloc. At least on hppa, this fixes an error,
+ which shows up when building gcc or kernels:
+ malloc: /build/buildd/bash-2.05a/unwind_prot.c:284: assertion botched
+ free: called with unallocated block argument
+ * A bash_completion bug fix upload (updated to v1.163,
+ see changelog.bash_completion.gz for details).
+ Closes: #133111, #133112, #133116, #133825, #134296.
+ * Updated service completion patch (Ian Macdonald).
+
+ -- Matthias Klose <doko@debian.org> Sat, 2 Mar 2002 00:27:22 +0100
+
+bash (2.05a-5) unstable; urgency=medium
+
+ * A bash_completion bug fix upload (updated to v1.93,
+ see changelog.bash_completion.gz for details).
+ Closes: #129106, #130167, #129033, #129228, #129451, #129884, #132309,
+ #132529, #132552, #132553.
+ Ian even added completion for Quake! Horrible ...
+ * Include service completion patch.
+ * README.bash_completion: Fix reference to /etc/bash.bashrc (closes: #129816).
+
+ -- Matthias Klose <doko@debian.org> Wed, 6 Feb 2002 22:22:09 +0100
+
+bash (2.05a-4) unstable; urgency=high
+
+ * Fix for causing a segmentation fault when some special shell variables
+ are declared as array (therefore urgency high).
+ * Apply patch for function prototypes (closes: #124004, #124362).
+ * Capitalize `POSIX' in package description (closes: #124439).
+ * Add (commented) setting of MANPATH to /etc/skel/.bash_profile
+ (closes: #123792).
+ * Update builtins(1) (closes: #125673).
+ * Taken from the current upstream sources: Make the symlinked directory
+ completion behavior introduced in readline-4.2a a user-settable option.
+ If `mark-symlinked-directories' is set to `on', the symlinked directory
+ completion behavior is disabled, and symlinks that point to directories
+ have a slash appended.
+ * Add a script for programmable bash completion (version 1.53) from
+ http://www.caliban.org/bash/index.shtml#completion. Add commented
+ code into /etc/bash.bashrc and (closes: #127645).
+ * Install the changelog _and_ the CHANGES file to the doc dir.
+ * bash(1): mention quoting when assigning to FIGNORE (closes: #115290).
+
+ -- Matthias Klose <doko@debian.org> Sat, 12 Jan 2002 16:00:08 +0100
+
+bash (2.05a-3) unstable; urgency=low
+
+ * Include version.h in /usr/include/bash (closes: #120069).
+ * Link statically with readline and history to speed up link time
+ (and was done in bash-2.03). Closes: #107160.
+ * Add comment to set HISTCONTROL in /etc/skel/.bashrc (closes: #118132).
+
+ -- Matthias Klose <doko@debian.org> Sat, 8 Dec 2001 12:29:28 +0100
+
+bash (2.05a-2) unstable; urgency=high
+
+ * Update config.{sub,guess} from ftp://ftp.gnu.org/pub/gnu/config/.
+
+ -- Matthias Klose <doko@debian.org> Fri, 16 Nov 2001 19:07:06 +0100
+
+bash (2.05a-1) unstable; urgency=medium
+
+ * New upstream release.
+ * This is mainly a bugfix and code cleanup release (as you can see
+ from the version number as well). Fixes 64bit issues and index
+ overflow errors. Fixes the following Debian reports:
+ - Segmentation fault in script from report (closes: #119250).
+ - Extensions to the printf command (closes: #72320).
+ - Accept an empty list of items in a for loop (as ash does).
+ Closes: #91983.
+ - A bug that caused redirections with (...) subshells to be performed in
+ the wrong order was fixed (closes: #97551).
+ - Correctly handle errors from pipelines in andor lists (closes: #102196).
+ - Subshells of login shells no longer source ~/.bash_logout when they exit
+ (closes: #117701).
+ - Don't pass unset shell variable in the environment (closes: #117673).
+ * Upstream integrates the following Debian patches:
+ - debian/patches/mailcheck.dpatch: check for mail in the maildir format.
+ - debian/patches/gnu-source.dpatch: define GNU_SOURCE and include
+ strsignal prototype.
+ - Don't include -I/usr/include in CFLAGS.
+ - debian/patches/print-cmd.dpatch: Fixed an unassigned variable problem
+ in the redirection printing code.
+ - debian/patches/64bit.dpatch: 64-bit uncleanliness.
+ * Unable to reproduce behaviour with beta1, rc1 and final version from
+ report (closes: #110483, #110484).
+ * Point to the bash-doc package for example startup files (closes: #117642).
+ * The man page is precises: comments start with a word beginning with a `#'.
+ With '\ #', the doesn't start a word. Closes: #115118.
+
+ -- Matthias Klose <doko@debian.org> Wed, 14 Nov 2001 22:13:21 +0100
+
+bash (2.05a-0rc1) unstable; urgency=low
+
+ * New upstream (bugfix) release (release candidate).
+ * Add README.abs-guide, a pointer to the `Advanced Bash Scripting Guide'.
+
+ -- Matthias Klose <doko@debian.org> Fri, 2 Nov 2001 10:59:11 +0100
+
+bash (2.05a-0beta1) unstable; urgency=low
+
+ * New upstream (bugfix) release.
+ * Configured with --enable-largefile.
+ * Bugs fixed in this version. Closes: #72320, #91983, #97551, #102196,
+ #105231, #110483, #110484.
+ * Remove debian/patches/mailcheck.dpatch, included upstream.
+ * Closes: #61006. Logging history commands in the history cannot work.
+ * Not a bug (closes: #100743, #110604).
+
+ -- Matthias Klose <doko@debian.org> Thu, 11 Oct 2001 23:05:20 +0200
+
+bash (2.05-10) unstable; urgency=medium
+
+ * Rebuild with released libreadline library (closes: #113182).
+
+ -- Matthias Klose <doko@debian.org> Sun, 23 Sep 2001 01:16:48 +0200
+
+bash (2.05-9) unstable; urgency=medium
+
+ * Remove files left from test build (closes: #110307, #109807).
+ * Apply patches from reports (closes: #110275, #110276).
+ * Fix include of rbash man page (closes: #113111).
+
+ -- Matthias Klose <doko@debian.org> Sat, 22 Sep 2001 11:26:44 +0200
+
+bash (2.05-8) unstable; urgency=low
+
+ * Apply patch (Eric Gillespie) to define GNU_SOURCE and include
+ strsignal prototype (closes: #109807).
+ * Fix include of builtins man page (closes: #109917).
+
+ -- Matthias Klose <doko@debian.org> Sun, 26 Aug 2001 08:35:47 +0200
+
+bash (2.05-7) unstable; urgency=high
+
+ * Remove config.{cache,status} from source package (#107679).
+ (high urgency for hurd).
+ * /etc/skel/.bashrc: Fix dircolors invocation (closes: #107373).
+ Add commented code to set xterm's title to the prompt.
+
+ -- Matthias Klose <doko@debian.org> Mon, 6 Aug 2001 23:33:41 +0200
+
+bash (2.05-6) unstable; urgency=low
+
+ * Apply upstream patches p5, p6.
+ * Include missing header files in builtins package (closes: #105302).
+ * Don't list names of built-in commands in NAME section of builtins(1).
+ (closes: #99532).
+ * Document deprecated syntax of arithmetic evaluation (closes: #94266,
+ #95502).
+ * README.Debian: Document unsetting of SSH_CLIENT (closes: #88032).
+
+ -- Matthias Klose <doko@debian.org> Sat, 21 Jul 2001 18:41:10 +0200
+
+bash (2.05-5) unstable; urgency=low
+
+ * The behavior of range specificiers within bracket matching expressions
+ in the pattern matcher (e.g., [A-Z]) depends on the current locale,
+ specifically the value of the LC_COLLATE environment variable.
+ See /usr/share/doc/COMPAT.gz, 14. Closes #95285.
+ * Tagging reports as 'wontfix' and closing reports:
+ - exit status of pipes (#7047, #10494).
+ - completion behaviour on ':' (#78991).
+ - */text* completion (#21645).
+ * Documentation of command hashing is documented (#76135).
+
+ -- Matthias Klose <doko@debian.org> Thu, 26 Apr 2001 09:03:37 +0200
+
+bash (2.05-4) unstable; urgency=low
+
+ * Apply upstream patches p1-p4 (closes #92455).
+ * Fixed in bash-2.05-alpha1: closes #47588.
+
+ -- Matthias Klose <doko@debian.org> Wed, 25 Apr 2001 19:32:36 +0200
+
+bash (2.05-3) unstable; urgency=low
+
+ * Add 'Replaces: bash-doc (<= 2.05-1)' (closes: #93799).
+
+ -- Matthias Klose <doko@debian.org> Fri, 13 Apr 2001 01:15:19 +0200
+
+bash (2.05-2) unstable; urgency=medium
+
+ * Tighten build dependency (fixes #93509). Only an issue for upgrades
+ from bash-2.05-0, therefore urgency=medium.
+ * Remove changelog from bash package (also in bash-doc). Reported as
+ #93446, #93454, #93455.
+ * Fixed in bash-2.04, wrong example in report (#33822).
+ * Documented behaviour (ulimit, #72898).
+ * Use of redirection for #92324.
+ * sed, awk, ... builtins should be provided by the specific package.
+ there are other ways to make system scripts faster (ash, perl,
+ python, ...) (#61648).
+ * Unable to reproduce #34977 submitted for version 2.02.1, bug submitter
+ didn't respond to inquiries. Closing ...
+ * http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/html_single/Text-Terminal-HOWTO.html
+ as explanation for C-s behaviour (#68387, not sure why I missed this
+ for so long).
+ * Part one of the report is Posix.2 behaviour; part 2 (cd-ing relatively
+ from a subdirectory into a specified root-level directory) already
+ fixed in bash-2.04. #65316.
+ * Closing #13645. "The `-l' option should never have been documented, and it
+ was a mistake to include it in the first place -- it screws up the grammar.
+ Old Bourne shells and test commands had it because there was no other
+ way to find the length of a variable's value. Since bash has
+ ${#variable}, there's no need for it. POSIX.2 says, in the rationale,
+ that implementation is irregular and that the shell supports it directly
+ * Unable to reproduce #19211 submitted for version 2.01 in current
+ versions (2.04, 2.05).
+ * Close #2301, safe creation of temp files is documented in bash(1):
+ "If the redirection operator is >, and the noclobber option to the set
+ builtin has been enabled, the redirection will fail if the file whose
+ name results from the expansion of word exists and is a regular file.
+ If the redirection operator is >|, or the redirection operator is > and
+ the noclobber option to the set builtin command is not enabled, the
+ redirection is attempted even if the file named by word exists."
+ * Fixed upstream in 2.05: #84743.
+ * #76596: Bourne-style shells have always accepted multiple directory name
+ arguments to cd. If the user doesn't like it, have him define a shell
+ function (see README.Debian).
+ * bash already has enabled the system wide /etc/bash.bashrc (#82117).
+ * #88223: Starting bash with --posix, or -o posix, or as `sh', does make
+ the entire bash session posix-compliant (with the caveats noted in the
+ info manual). Posix-compliant does not mean `behaves exactly like
+ historical versions of sh', nor does it mean `does only what is in
+ the standard and nothing more'.
+
+ Posix says nothing about brace expansion, so whether or not bash does
+ brace expansion in posix mode has no bearing on posix compliance.
+
+ If you don't want brace expansion, use `set +o braceexpand' or
+ `set +B' or start bash with the `+B' option.
+
+ * Lower temporarily severity of #92455, so that this version can move
+ to testing. This bug exists in 2.04 as well, so we don't make things
+ worse.
+ * Apply upstream patch 1.
+
+ -- Matthias Klose <doko@debian.org> Mon, 9 Apr 2001 23:29:24 +0200
+
+bash (2.05-1) unstable; urgency=low
+
+ * New upstream release.
+ * /etc/skel/.bashrc: fix alias (#92440).
+
+ -- Matthias Klose <doko@debian.org> Mon, 9 Apr 2001 18:24:10 +0200
+
+bash (2.05-0beta2) unstable; urgency=low
+
+ * New upstream release 2.05-beta2.
+ * Fixed upstream: #85234.
+
+ -- Matthias Klose <doko@debian.org> Thu, 29 Mar 2001 23:57:12 +0200
+
+bash (2.05-0beta1) unstable; urgency=low
+
+ * New upstream release 2.05-beta1.
+ * Fixed upstream: #66891, #67519, #68931, #72898, #75104, #75315, #75957,
+ #76603, #84906.
+ Reverted behaviour: #60375, #75540.
+ * /etc/skel/.bash_logout: Removed. Submitted bug report to util-linux.
+ Fixes #63025, #72327, #83609.
+ * Depend on makeinfo (fixes #87688).
+
+ -- Matthias Klose <doko@debian.org> Tue, 6 Feb 2001 18:46:40 +0100
+
+bash (2.05-0alpha) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Matthias Klose <doko@debian.org> Sun, 26 Nov 2000 17:32:16 +0100
+
+bash (2.04-9) unstable; urgency=low
+
+ * Fix build bug.
+
+ -- Matthias Klose <doko@debian.org> Mon, 20 Nov 2000 23:35:03 +0100
+
+bash (2.04-8) unstable; urgency=low
+
+ * debian/control: Add bison to Build-Depends (fixes #73667).
+ * debian/rules: Add config.h to bash-builtins package (fixes #69802).
+ Strip bash binary (fixes #71252).
+
+ -- Matthias Klose <doko@debian.org> Sat, 18 Nov 2000 14:01:54 +0100
+
+bash (2.04-7) unstable; urgency=low
+
+ * debian/skel.bash_logout: Fix to clear all ttys (fixes #67772).
+ * debian/skel.bash_profile: Fix to include expanded ~/bin in path
+ (fixes #67714).
+ * Fix builtins.1 include (fixes #67094, #70007, #71848).
+ * debian/README.Debian: Document that bash is compiled with
+ -DSYS_BASHRC (fixes #66939).
+ * Fix hsuser doc (fixes #69392).
+
+ -- Matthias Klose <doko@debian.org> Mon, 2 Oct 2000 01:26:45 +0200
+
+bash (2.04-6) unstable; urgency=low
+
+ * debian/skel.bash_profile: Clarify where to look for for example files
+ (package bash-doc). Fixes #64311.
+ * debian/README.Debian: Explain, why bash is configured without
+ '--enable-net-redirections' (fixes #66352).
+
+ -- Matthias Klose <doko@debian.org> Wed, 28 Jun 2000 19:47:25 +0200
+
+bash (2.04-5) unstable; urgency=low
+
+ * debian/patches/alpha-unwind.dpatch: Patch from "Mikolaj J. Habryn"
+ <fe78734e@eris.rcpt.to>. Should fix #62170, #62690, #65053.
+ * debian/rules: Configure with --disable-net-redirections (as suggested
+ in #65172). The patch submitted in the report can be found in
+ debian/patches/tcp-udp-service-names.dpatch.
+ * debian/patches/getcwd-error: Fix error message for two levels of
+ unreadable directories (#64659).
+
+ -- Matthias Klose <doko@debian.org> Mon, 5 Jun 2000 05:59:59 +0200
+
+bash (2.04-4) unstable; urgency=low
+
+ * debian/patches/p[5-7].dpatch: Upstream patches.
+
+ -- Matthias Klose <doko@debian.org> Wed, 3 May 2000 01:05:23 +0200
+
+bash (2.04-3) unstable; urgency=low
+
+ * debian/patches/p[1-4].dpatch: Upstream patches.
+ * debian/bash.preinst.c: s/MAX_PATH/PATH_MAX/g (fixes #62323).
+
+ -- Matthias Klose <doko@debian.org> Wed, 26 Apr 2000 19:53:16 +0200
+
+bash (2.04-2) unstable; urgency=low
+
+ * debian/patches/pattern-operator.dpatch: Fix pattern operator bug.
+ * debian/README.Debian: Add FAQ how to get rid off beeps for ambiguous
+ completions (fixes #59550).
+
+ -- Matthias Klose <doko@debian.org> Sat, 8 Apr 2000 22:06:34 +0200
+
+bash (2.04-1) unstable; urgency=low
+
+ * Final release.
+ * Don't strip bash (debugging #58404 ...).
+
+ -- Matthias Klose <doko@debian.org> Mon, 20 Mar 2000 19:37:44 +0100
+
+bash (2.04-0beta5db1) unstable; urgency=low
+
+ * New upstream version, beta 5, Debian build 1.
+ * Remove six dpatch files with patches now integrated upstream.
+ * Bugs fixed with this upstream version: #5703, #15165, #21363, #21901,
+ #33900, #36652, #38804, #41916, #47179, #47990, #50353, #56209, #57544.
+ * Compiled with NON_INTERACTIVE_LOGIN_SHELLS to run the startup files when
+ not in posix mode. Fixes #11938, #14287, #25245.
+ * Still in this version: #27090.
+ * The `-l' option to test is not included by intent (fixes #13645).
+ Comment from upstream: "The `-l' option should never have been documented,
+ and it was a mistake to include it in the first place -- it screws up the
+ grammar. Old Bourne shells and test commands had it because there was no
+ other way to find the length of a variable's value. Since bash has
+ ${#variable}, there's no need for it. POSIX.2 says, in the rationale,
+ that implementation is irregular and that the shell supports it directly.
+ * Report #26720: perl -e 'print ":;" x 100000' > foo; . ./foo dumps core.
+ Comment from upstream: This is not a bash bug; it is a process resource
+ problem. The default resource limit for stack size is 8M on my version of
+ Linux. The call tree created by the parser for the script (100000 calls
+ to `:') is 99999 nodes deep, and requires that many recursive calls to the
+ command execution routines. This overflows the stack, and bash segfaults.
+ I couldn't reproduce it anywhere but Linux, because the machines I tested
+ on all have reasonable default stack sizes. Raising the limit to 16M is
+ sufficient to cause the script to run successfully (I didn't try anything
+ between 8M and 16M).
+ * Report #30460: redirection is different from standard: bash --posix
+ $ mkdir foo; cd foo; echo anything goes > "this file"
+ $ for f in *; do tr ay \ o < $f | cat; done
+ sh: $f: ambiguous redirect
+ This is POSIX.2 behaviour.
+ * debian/bash.preinst.c: Check if /bin/sh points to something other than
+ bash and is not diverted and point to README.Debian how to divert
+ a file (fixes #34717, #45656).
+ * debian/patches/random.dpatch: Fix bug in patch (closes #38804).
+ * debian/README.Debian: Commented behaviour from report #50853.
+
+ -- Matthias Klose <doko@debian.org> Thu, 24 Feb 2000 19:34:10 +0100
+
+bash (2.03-6) frozen unstable; urgency=medium
+
+ * debian/bash.preinst.c: Evil kludge, deal with arbitrary name lengths
+ (fixes #54876).
+ * Apply NMU (fixes #55887).
+ * debian/rules: Install debian/bash.conffiles (fixes #57963, #58541).
+
+ -- Matthias Klose <doko@debian.org> Sun, 20 Feb 2000 19:50:48 +0100
+
+bash (2.03-5.1) unstable; urgency=low
+
+ * debian/patches/job-control-segfault.dpatch: Patch from Eric Weigel
+ <ericw@bestnet.org>. Closes: #55887
+
+ -- Adam Heath <doogie@debian.org> Sat, 22 Jan 2000 15:10:50 -0600
+
+bash (2.03-5) unstable; urgency=low
+
+ * Update rl.ctrl-char patch from Dan Jacobowitz.
+ Fixes #54805, #54639, #54612.
+ * Add autoconf to Build-Depends (finally, Roman ...)
+
+ -- Matthias Klose <doko@debian.org> Tue, 11 Jan 2000 20:50:31 +0100
+
+bash (2.03-4) unstable; urgency=low
+
+ * debian/control: Fix build dependencies (fixes #52777).
+ * debian/rules: Cleanup.
+ * debian/patches/rl-ctrl-char.dpatch: Don't assume char is signed by
+ default (fixes #53252).
+ * Build with libncurses5-dev (fixes #54165).
+ * Fix changelog symlink in bash-doc package (fixes #54240).
+ * debian/README.Debian: Add paragraph for writing prompts.
+ * debian/README.Debian: Add paragraph about hashing of moved commands
+ (and closing #36877).
+ * Install more verbose skeleton files (closes #39728).
+ * The `-l' option to test is not included by intent (fixes #13645).
+ Comment from upstream: "The `-l' option should never have been documented,
+ and it was a mistake to include it in the first place -- it screws up the
+ grammar. Old Bourne shells and test commands had it because there was no
+ other way to find the length of a variable's value. Since bash has
+ ${#variable}, there's no need for it. POSIX.2 says, in the rationale,
+ that implementation is irregular and that the shell supports it directly.
+ * Report #26720: perl -e 'print ":;" x 100000' > foo; . ./foo dumps core.
+ Comment from upstream: This is not a bash bug; it is a process resource
+ problem. The default resource limit for stack size is 8M on my version of
+ Linux. The call tree created by the parser for the script (100000 calls
+ to `:') is 99999 nodes deep, and requires that many recursive calls to the
+ command execution routines. This overflows the stack, and bash segfaults.
+ I couldn't reproduce it anywhere but Linux, because the machines I tested
+ on all have reasonable default stack sizes. Raising the limit to 16M is
+ sufficient to cause the script to run successfully (I didn't try anything
+ between 8M and 16M).
+ * Report #30460: redirection is different from standard: bash --posix
+ $ mkdir foo; cd foo; echo anything goes > "this file"
+ $ for f in *; do tr ay \ o < $f | cat; done
+ sh: $f: ambiguous redirect
+ This is POSIX.2 behaviour.
+ * debian/bash.preinst.c: Check if /bin/sh points to something other than
+ bash and is not diverted and point to README.Debian how to divert
+ a file (fixes #34717, #45656).
+
+ -- Matthias Klose <doko@debian.org> Fri, 7 Jan 2000 07:19:00 +0100
+
+bash (2.03-3) unstable; urgency=low
+
+ * Moved /etc/profile to base-files package (closes #52987).
+ * debian/skel.bash_profile: Use umask 022 as in debian/etc.profile
+ (closes #53020).
+ * debian/patches/secure-build.dpatch: Build bash without using guessable
+ file names in /tmp (closes #36027).
+ * debian/patches/bashbug-editor.dpatch: Use editor command, not emacs
+ (closes #32576, #32577).
+ * Fixed in 2.03 or before: #16013, #20455, #30803 (according to upstream
+ author, bug submitter does not respond).
+ * #44015 not a bug. Bash is more liberal than POSIX specifies, but function
+ names that are not identifiers is something that may go away in the future.
+ * #40242 not a bug: Non-interactive bash shells have always unset PS1,
+ so scripts and so on can test for it.
+ * Report #21645: */text* completion doesn't work anymore. According to the
+ upstream author, this feature was removed in bash-2.01.1. The TAB
+ completion only succeeds with globbing characters if there is a single
+ completion. It caused too many problems otherwise.
+ * Define DONT_REPORT_SIGPIPE: We don't want to see `Broken pipe' messages
+ when a job like `cat jobs.c | exit 1' is executed. Fixes part of #7047,
+ #10259, #10433 and #10494. Comment from the upstream author: "The default
+ bash behavior with respect to the exit status of a pipeline will not
+ change. Changing it as suggested in the discussion of #10494 would render
+ bash incompatible with every other shell out there.". Closed these reports.
+ * debian/etc.bash.bashrc: Set checkwinsize.
+
+ -- Matthias Klose <doko@debian.org> Sun, 19 Dec 1999 15:58:43 +0100
+
+bash (2.03-2) unstable; urgency=low
+
+ * Apply privmode patch (do not drop privileges, if called as /sh.
+ Closes #52586).
+
+ -- Matthias Klose <doko@debian.org> Mon, 13 Dec 1999 22:25:22 +0100
+
+bash (2.03-1) unstable; urgency=low
+
+ * New maintainer.
+ * New upstream version (closes: #34077, #35642, #46916). For a terse
+ description of new features and bug fixes see /usr/share/doc/bash/NEWS.gz.
+ * Fixed in upstream release (closes: #14229, #16856, #21363, #22498, #28849,
+ #29863, #37971, #38411, #40930, #49702). #37971 either here or in libc6.
+ #30803.
+ * Separate out documentation and examples to bash-doc package.
+ * Do not build shared readline libs from this source. According to the
+ upstream author: "It's not appropriate to build shared libraries from
+ the readline shipped with bash. That is designed to be linked directly
+ into bash."
+ * Link statically with included libreadline. It's intended, because
+ potato does not have a libreadline4 yet. Wait for bash-2.04 and
+ it's version of libreadline.
+ * debian/README.Debian: Sort of FAQ suggested by Guy Maor.
+ * debian/copyright: Updated URL.
+ * debian/rules: Introduced some variables for packages and directories.
+ * debian/control: Updated package names. Add Build-Depends.
+ * Point to /usr/doc/share in man pages (rbash.1, builtins.1).
+ * Make /usr/doc compatibility links (all but libreadline.postinst, which
+ is a C file).
+ * debian/patches/conf-update.dpatch: New config files from automake
+ (closes #33745).
+ * debian/patches/bashbug-editor.dpatch: Use EDITOR variable
+ (closes #32576, #32577).
+ * debian/etc.profile: Fixed comment that /etc/profile is used for Bourne
+ shell and Bourne compatible shells (closes: #3459).
+ * debian/patches/tempnam.dpatch: Applied patch from report #35975
+ (closes: #35975).
+ * bash is not responsible for setting $USER in login shells (closes: #36103).
+ * Compile with -DSYS_BASHRC defined. /etc/bash.bashrc is empty by default
+ (closes #27055).
+ * Fixed with boot-floppies 2.1.3 (closes: #22517).
+ * debian/patches/mailcheck.dpatch: Add maildir support. Patch from
+ Miquel van Smoorenburg <miquels@cistron.nl> (closes #38794).
+ * Patches from NMU are applied (should close #43096).
+ * debian/control: Make builtins depend on source version of bash.
+ * Build for i386, not i486.
+ * Report #28811: "dpkg segfaults trying to install bash. Logging in then
+ produces segfault. Still having to run 2.00.0(1)". Not reproducable.
+ * Report #15165: "If the last command in the pipeline is killed by a signal,
+ bash does not report it even though $? contains the correct value".
+ Not reproducable.
+ * Report #21645: "If you type `rm */text*<TAB>', previous versions would
+ complete text given that they're under the same directory. 2.01.1-1
+ doesn't do that anymore.". Not documented anywhere. It seems, this was
+ a bug disguised as a feature ;-)
+ * Report #36027: "During compiling bash package, files with hardcoded names
+ are created in /tmp. In a malicious multi-user environment, this allows
+ attacks to the user's files and possibly allow creating trojan packages.
+ If the compiling user is root...".
+ Submitter cannot be reached. autoconf/automake issues? Reassign to general?
+ * Report #16700: "bash terminated when I asked it "mailq -v", while in an
+ xterm, with a sysload of approx 1"; not reproducable. Submitter offers
+ core file.
+ * Report #37637: Not reproduceable (should close #37637).
+ * Report #37275: A dpkg error? Or just another reason to completely link
+ bash statically?
+ * Report #34978, #42858: The prerm now is a binary pragram.
+ #34977 as well? #36016 (patch)?
+ * Report #43737: Non bug. Behaviour changed from 1.4 to 2.0 (closes: #43737).
+ * Report #36459: Non bug (closes #36459).
+ * Report #19211: Wanted behaviour?
+ * Report #11938: The included patch is applied upstream (closes: #11938).
+ * Report #10699, #45656: Todo: See #34717 ...
+ * Report #35127: Apply included patch. TODO: test and forward upstream.
+ * Report #41082: Obsoleted patches (closes: #35130, #41802).
+ * Reports tested and still in this version (should be forwarded ...):
+ #2301, #21901, #26619, #26720, #27090, #30460, #33900, #34833,
+ #36877
+ #38804, #41916 (update docs?),
+ #46901, #47990.
+ * Report #47849: You *must* reset OPTIND to 1 before reusing getopts.
+ * Report #45841: This is a POSIX.2/XPG5 requirement.
+ * Report #35979, #45379: set -e works on simple commands only.
+ (command) is not a simple command.
+ * Report #38244: -x and -v and all of the rest of the options are documented
+ in the `set' builtin section. The OPTIONS section of the man page refers
+ to `set'.
+ * Report #37654: When in a pipeline, `tty' prints `not a tty'. This is why
+ grep is looking for `not' in file `a'. Try `w | echo $(tty)'.
+ * Report #33822: This is a locale problem. The de_DE locale gives lower case
+ and upper case letters the same collating weight. POSIX.2 warns that
+ range expressions are not portable across locales.
+ * Report #28789, #22291: resizing xterm bash doesn' t update window limits.
+ Use `shopt -s checkwinsize'. (closes: #28789, #22291).
+ * Report #39728: Suggestion to add something to /etc/skel files. A matter
+ of taste. Added comments where to find `fancy' startup files.
+
+ * Work needed: #33822 (huh?), #42916 and #44015 (update docs, dashs in
+ identifiers).
+
+ * Not tested: (#7047, #10259, #10433, #10494), #14287 (how to test?),
+ #14658 (how to test?), #16013, #16797, #20455 (alpha arch), #20821,
+ #22632, #26571, #29610, #35994 (powerpc arch),
+ #36652, #40242, #47179.
+
+ -- Matthias Klose <doko@debian.org> Sat, 4 Dec 1999 17:03:47 +0100
+
+bash (2.02.1-1.8) unstable; urgency=low
+
+ * Applied Anthonies patch and recompiled as the libc5 version did
+ not compile for him (closes: #34717, #43050, #43096, #10699).
+ * Bumped the version number of libreadline and recompiled,
+ hopefully in time before the dinstall run ;)
+
+ -- Torsten Landschoff <torsten@debian.org> Sat, 18 Sep 1999 19:26:20 +0200
+
+bash (2.02.1-1.7) unstable; urgency=low
+
+ * Non-maintainer release.
+ * Make bash not Pre-Depend on itself. That is, make bash's preinst
+ something other than a /bin/sh script; in this case a reasonably
+ simple binary.
+ * Remove /bin/sh from the .deb, and reinstate it in the postinst if
+ it's not already present. Hence make the postinst a /bin/bash script
+ instead of a /bin/sh script.
+
+ -- Anthony Towns <ajt@debian.org> Sat, 28 Aug 1999 01:09:08 +1000
+
+bash (2.02.1-1.6) unstable; urgency=low
+
+ * Non-maintainer release.
+ * Link bash statically with libreadline. Closes: #42858.
+
+ -- Thomas Quinot <thomas@debian.org> Fri, 13 Aug 1999 21:47:35 +0200
+
+bash (2.02.1-1.5) unstable; urgency=low
+
+ * Non-maintainer release.
+ * Updated to standards version 3.0.0.
+ * Fixed dependency on libreadlineg2. Closes: #35130, #39280, #41802.
+
+ -- Thomas Quinot <thomas@debian.org> Thu, 29 Jul 1999 13:05:26 +0200
+
+bash (2.02.1-1.4) unstable; urgency=low
+
+ * Non-maintainer release.
+ * Make libreadlineg2 conflict with bash (<< 2.02.1-1.2)
+
+ -- Joel Klecker <espy@debian.org> Thu, 25 Mar 1999 09:40:39 -0800
+
+bash (2.02.1-1.3) unstable; urgency=low
+
+ * Non-maintainer release.
+ * Recompile against ncurses 4.2-3.2 for versioned dependency.
+ * Add (>= 2.1-13.1) depend to readline shlibs.
+
+ -- Joel Klecker <espy@debian.org> Thu, 18 Mar 1999 12:33:28 -0800
+
+bash (2.02.1-1.2) unstable; urgency=low
+
+ * Non-maintainer release.
+ * Recompile against glibc 2.1 for libreadline.
+
+ -- Joel Klecker <espy@debian.org> Fri, 5 Mar 1999 09:36:54 -0800
+
+bash (2.02.1-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Replaced config.{sub,guess} with newer ones for ARM.
+
+ -- Jim Pick <jim@jimpick.com> Mon, 22 Feb 1999 23:57:53 -0800
+
+bash (2.02.1-1) unstable; urgency=low
+
+ * libreadline 2.1-13
+ * Upstream upgrade, closes: #26582
+ * Bugs fixed upstream: closes: #21511, #24004.
+ * Rules, control fixes for hurd, powerpc, alpha closes: #29123, #29395,
+ #24931, #31289.
+ * Included paren-matching feature in readline, closes: #27707.
+ * Removed convert-meta comment from etc/inputrc, closes: #23035.
+ * Use system random instead of lousy builtin one, closes: #22104.
+
+ -- Guy Maor <maor@debian.org> Mon, 15 Feb 1999 12:57:53 -0800
+
+bash (2.01.1-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * libreadline 2.1-12
+ * Rebuild with ncurses4.0 to avoid packages linked with libreadline
+ depending on two versions of ncurses; reported by Martin Mitchell
+ <martin@debian.org>. [#27762]
+ * debian/rl.shlibs: bump versioned dependency to >= 2.1-12.
+ * debian/rules (build): add --with-curses to avoid ever linking with
+ termcap; reported by, ehm, Guy Maor <maor@debian.org>. [#25118]
+
+ -- James Troup <james@nocrew.org> Tue, 20 Oct 1998 03:24:03 +0100
+
+bash (2.01.1-3.1) frozen unstable; urgency=low
+
+ * Non-maintainer release.
+ * Build with ncurses3.0-altdev, so libreadline2 doesn't depend on libc6.
+ * Use <architecture>-linux instead of <arch>-debian-linux.
+
+ -- Joel Klecker <jk@espy.org> Tue, 14 July 1998 16:26:43 -0700
+
+bash (2.01.1-3) unstable frozen; urgency=medium
+
+ * libreadline 2.1-10
+ * Make libreadlineg2's postinst a c program, like libreadline2.
+ * Check return code from tempfile in bashbug, closes: #22349.
+ * glibc 2.1 patch, closes #22532.
+ * remove . from /etc/profile PATH, closes #22738.
+
+ -- Guy Maor <maor@ece.utexas.edu> Mon, 25 May 1998 22:41:06 -0700
+
+bash (2.01.1-2) unstable frozen; urgency=high
+
+ * libreadline 2.1-9.
+ * Predepend on libreadlineg2 >= 2.1-8, closes: #20572.
+
+ -- Guy Maor <maor@ece.utexas.edu> Wed, 8 Apr 1998 01:07:10 -0700
+
+bash (2.01.1-1) frozen unstable; urgency=low
+
+ * libreadline 2.1-8.
+ * Upstream upgrade, closes: #13762, #14446, #18296.
+ * Fixed /etc/inputrc, closes: #19745, #19075, #13643, #18004, #17256,
+ #15345, #14672, #15213, #15345, #15638, #18004, #16797, #15638, #19241.
+ * Applied patch to read End, Delete, closes: #20053.
+ * Don't build libc5 packages on alpha & powerpc, closes: #13761, #15538,
+ #15829.
+ * Add sh(1) - symlink to bash(1), close: #15659.
+ * Fix unsafe requests in rbash(1), builtins(1), closes: #19086.
+ * bashbug uses tempfile, closes: #19781.
+ * fixed fc -l segfault, closes: #13726.
+
+ -- Guy Maor <maor@ece.utexas.edu> Sat, 28 Mar 1998 19:34:15 -0800
+
+bash (2.01-5) unstable; urgency=low
+
+ * libreadline 2.1-7
+ * libreadline tries INPUTRC if it's set, else _both_ /etc/inputrc and
+ ~/.inputrc
+ * A better /etc/inputrc.
+
+ -- Guy Maor <maor@ece.utexas.edu> Thu, 25 Sep 1997 11:38:41 -0500
+
+bash (2.01-4) unstable; urgency=low
+
+ * libreadline 2.1-6
+ * bash-builtin examples moved to correct place.
+ * libreadline tries /etc/inputrc if ~/.inputrc doesn't exist.
+ * set -a; set +a problem seems to be fixed (8390)
+
+ -- Guy Maor <maor@ece.utexas.edu> Wed, 24 Sep 1997 14:36:02 -0500
+
+bash (2.01-3) unstable; urgency=low
+
+ * libreadline 2.1-5
+ * Bash depended on wrong version of libreadlineg2. (#12150, #12316)
+ * Put current version in libreadlineg2 shlibs file.
+ * Honor TMPDIR by using tempnam(3) (#9201).
+
+ -- Guy Maor <maor@ece.utexas.edu> Sun, 24 Aug 1997 23:31:19 -0500
+
+bash (2.01-2) unstable; urgency=low
+
+ * libreadline 2.1-4
+ * Make bash predepend on libreadlineg2 (>=2.01-1) so as not to break
+ systems which installed James's releases.
+ * Fix references to shell runtime code in libreadline.so and libhistory.so.
+ * Fix declare -p dumping core on empty temp variable (#12017).
+ * make_quoted_replacement() checks for empty rl_filename_quote_characters
+ (12051).
+ * readline/readline.h - rl_dispatching should be extern (#11049).
+ * Added libreadline2g-dbg.
+
+ -- Guy Maor <maor@ece.utexas.edu> Sat, 16 Aug 1997 13:38:37 -0500
+
+bash (2.01-1) unstable; urgency=low
+
+ * libreadline 2.1-3
+ * Maintainer release of 2.01. (2.01 fixes 3815, 4783, 7782, 8439, 10416,
+ 10598, 10604, 11806).
+ * Cleaned and corrected rules, Makefiles, control files. (7580, 11406).
+ * Reimplemented SHELL compile time as runtime check. Backward compatible
+ with old bash (10916).
+ * Added rbash man page (8645).
+ * ldconfig run in postinst, compiled as libc5 (10176)
+ * :( set -a;set +a problem still there, but acts differently.
+
+ -- Guy Maor <maor@ece.utexas.edu> Thu, 14 Aug 1997 15:35:23 -0500
+
+bash (2.01-0.1) unstable; urgency=high
+
+ * libreadline 2.1-2.2
+ * libreadline2 now has a preinst script which ensures that ld.so.1
+ knows about /lib/libc5-compat and /usr/lib/libc5-compat. Before this
+ change, trying to install with a libc (< 5.4.23-4) broke bash.
+ * libreadlineg2 no longer has version dependant shlibs file [#10742].
+
+ -- James Troup <jjtroup@comp.brad.ac.uk> Mon, 23 Jun 1997 22:00:18 +0100
+
+bash (2.01-0) unstable; urgency=medium
+
+ * libreadline 2.1-2.1
+ * Non-maintainer release
+ * New upstream version [#10416, #10598, #10604, #8390]
+ * Rebuilt for glibc; now provides libreadline2g{,-dev} and
+ libreadline2{,-altdev}.
+ * Not all of Guy's changes are implemented, noticeably a security
+ improvement in execute-cmds.c and his alteration of libreadline's
+ compile time dependance on -DSHELL to run time dependance.
+
+ -- James Troup <jjtroup@comp.brad.ac.uk> Thur, 19 June 1997 19:13:34 +0100
+
+bash (2.0-3) unstable; urgency=medium
+
+ * libreadline 2.1-2
+ * #include <sys/types.h> in general.h needed for alpha build (#7658)
+ * Don't drop suid/sgid bits if invoked as sh (#7796)
+ * Applied patch to fix time in for loop (#7436)
+ * Split off bash-builtins with examples & necessary headers
+ * Juggled libreadline2 documentation around (#7275)
+
+ -- Guy Maor <maor@ece.utexas.edu> Mon, 10 Mar 1997 12:45:06 -0600
+
+bash (2.0-2) unstable; urgency=low
+
+ * Added NEWS, COMPAT to /usr/doc/bash
+
+ -- Guy Maor <maor@ece.utexas.edu> Fri, 7 Feb 1997 17:35:21 -0600
+
+bash (2.0-1) unstable; urgency=low
+
+ * Upstream upgrade.
+ * .bash_history created 600 by default.
+ * Security improvements when creating files in /tmp
+ * Reimplemented SHELL run-time check with backward 2.0 compatibility
+
+ -- Guy Maor <maor@ece.utexas.edu> Wed, 29 Jan 1997 03:31:47 -0600
+
+bash (1.14.7-2) frozen unstable; urgency=low
+
+ * libhistory.so had wrong soname (fixes bug 5381).
+
+ -- Guy Maor <maor@ece.utexas.edu> Sat, 16 Nov 1996 11:07:08 -0600
+
+bash (1.14.7-1) frozen unstable; urgency=low
+
+ * New upstream version converted to new source format.
+ libreadline2, libreadline2-dev produced from bash source.
+ * Made libreadline SHELL define into a runtime check with rl_shell,
+ history_shell flags, 4 hooks.
+ * echo checks write errors (fixes 818).
+ * default unreadable .bash_history in /etc/skel (fixes 1549).
+
+ -- Guy Maor <maor@ece.utexas.edu> Sat, 9 Nov 1996 05:07:31 -0600
diff --git a/debian/clear_console.1 b/debian/clear_console.1
new file mode 100644
index 0000000..99fe089
--- /dev/null
+++ b/debian/clear_console.1
@@ -0,0 +1,50 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: clear.1,v 1.3 2000/07/15 23:59:35 china Exp $
+.TH clear_console 1 ""
+.ds n 5
+.SH NAME
+\fBclear_console\fR - clear the console
+.SH SYNOPSIS
+\fBclear\fR
+.br
+.SH DESCRIPTION
+\fBclear_console\fR clears your console if this is possible. It looks in the
+environment for the terminal type and then in the \fBterminfo\fR database to
+figure out how to clear the screen. To clear the buffer, it then changes the
+foreground virtual terminal to another terminal and then back to the original
+terminal.
+.SH SEE ALSO
+\fBclear\fR(1), \fBchvt\fR(1)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/debian/clear_console.c b/debian/clear_console.c
new file mode 100644
index 0000000..8412827
--- /dev/null
+++ b/debian/clear_console.c
@@ -0,0 +1,267 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#include <getopt.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#if defined(__linux)
+#include <linux/kd.h>
+#include <linux/vt.h>
+#elif defined(__FreeBSD_kernel__)
+#include <sys/consio.h>
+#include <sys/kbio.h>
+#endif
+
+#include <curses.h>
+#include <term.h>
+
+#define VERSION "0.1"
+
+char* progname;
+int quiet = 0;
+
+void usage()
+{
+ fprintf(stderr, "Usage: %s [option]\n", progname);
+ fprintf(stderr, "valid options are:\n");
+ fprintf(stderr, "\t-q --quiet don't print error messages\n");
+ fprintf(stderr, "\t-h --help display this help text and exit\n");
+ fprintf(stderr, "\t-V --version display version information and exit\n");
+}
+
+const struct option opts[] =
+{
+ /* operations */
+ {"help", no_argument, 0, 'h'},
+ {"version", no_argument, 0, 'V'},
+ {"quiet", no_argument, 0, 'q'},
+ {0, 0, 0, 0}
+};
+
+static int putch(int c)
+{
+ return putchar(c);
+}
+
+
+/* taken from console-utils, lib/misc-console-utils.c */
+
+int is_a_console(int fd)
+{
+#if defined(__linux__)
+ char arg;
+#elif defined(__FreeBSD_kernel__)
+ int arg;
+#endif
+
+ arg = 0;
+ return (ioctl(fd, KDGKBTYPE, &arg) == 0
+ && ((arg == KB_OTHER) || (arg == KB_101) || (arg == KB_84)));
+}
+
+static int open_a_console(char *fnam)
+{
+ int fd;
+
+ /* try read-only */
+ fd = open(fnam, O_RDWR);
+
+ /* if failed, try read-only */
+ if (fd < 0 && errno == EACCES)
+ fd = open(fnam, O_RDONLY);
+
+ /* if failed, try write-only */
+ if (fd < 0 && errno == EACCES)
+ fd = open(fnam, O_WRONLY);
+
+ /* if failed, fail */
+ if (fd < 0)
+ return -1;
+
+ /* if not a console, fail */
+ if (! is_a_console(fd))
+ {
+ close(fd);
+ return -1;
+ }
+
+ /* success */
+ return fd;
+}
+
+/*
+ * Get an fd for use with kbd/console ioctls.
+ * We try several things because opening /dev/console will fail
+ * if someone else used X (which does a chown on /dev/console).
+ *
+ * if tty_name is non-NULL, try this one instead.
+ */
+
+int get_console_fd(char* tty_name)
+{
+ int fd;
+
+ if (tty_name)
+ {
+ if (-1 == (fd = open_a_console(tty_name)))
+ return -1;
+ else
+ return fd;
+ }
+
+ fd = open_a_console("/dev/tty");
+ if (fd >= 0)
+ return fd;
+
+ fd = open_a_console("/dev/tty0");
+ if (fd >= 0)
+ return fd;
+
+ fd = open_a_console("/dev/console");
+ if (fd >= 0)
+ return fd;
+
+ for (fd = 0; fd < 3; fd++)
+ if (is_a_console(fd))
+ return fd;
+
+#if 0
+ fprintf(stderr,
+ _("Couldnt get a file descriptor referring to the console\n"));
+#endif
+ return -1; /* total failure */
+}
+
+
+int is_pseudo_tty(int fd)
+{
+ char *tty = ttyname(fd);
+
+ if (!strncmp(tty, "/dev/pts/", 9))
+ return 1;
+
+ if (!strncmp(tty, "/dev/tty", 8) && tty[8] >= 'a' && tty[8] <= 'z')
+ return 1;
+
+ return 0;
+}
+
+int clear_console(int fd)
+{
+ int num, tmp_num;
+#if defined(__linux__)
+ struct vt_stat vtstat;
+#endif
+
+ /* clear screen */
+ setupterm((char *) 0, 1, (int *) 0);
+ if (tputs(clear_screen, lines > 0 ? lines : 1, putch) == ERR)
+ {
+ exit(1);
+ }
+
+ if (is_pseudo_tty(STDIN_FILENO))
+ return 0;
+
+ if (!strcmp(getenv("TERM"), "screen"))
+ return 0;
+
+ /* get current vt */
+#if defined(__linux__)
+ if (ioctl(fd, VT_GETSTATE, &vtstat) < 0)
+#elif defined(__FreeBSD_kernel__)
+ if (ioctl(fd, VT_ACTIVATE, &num) < 0)
+#endif
+ {
+ if (!quiet)
+ fprintf(stderr, "%s: cannot get VTstate\n", progname);
+ exit(1);
+ }
+#if defined(__linux__)
+ num = vtstat.v_active;
+#endif
+ tmp_num = (num == 1 ? 2 : 1);
+
+ /* switch vt to clear the scrollback buffer */
+ if (ioctl(fd, VT_ACTIVATE, tmp_num))
+ {
+ if (!quiet)
+ perror("chvt: VT_ACTIVATE");
+ exit(1);
+ }
+
+ if (ioctl(fd, VT_WAITACTIVE, tmp_num))
+ {
+ if (!quiet)
+ perror("VT_WAITACTIVE");
+ exit(1);
+ }
+
+ /* switch back */
+ if (ioctl(fd, VT_ACTIVATE, num))
+ {
+ if (!quiet)
+ perror("chvt: VT_ACTIVATE");
+ exit(1);
+ }
+
+ if (ioctl(fd, VT_WAITACTIVE, num))
+ {
+ if (!quiet)
+ perror("VT_WAITACTIVE");
+ exit(1);
+ }
+}
+
+int main (int argc, char* argv[])
+{
+ int fd;
+ int result; /* option handling */
+ int an_option;
+
+ if ((progname = strrchr(argv[0], '/')) == NULL)
+ progname = argv[0];
+ else
+ progname++;
+
+ while (1)
+ {
+ result = getopt_long(argc, argv, "Vhq", opts, &an_option);
+
+ if (result == EOF)
+ break;
+
+ switch (result)
+ {
+ case 'V':
+ fprintf(stdout, "%s: Version %s\n", progname, VERSION);
+ exit (0);
+ case 'h':
+ usage();
+ exit (0);
+
+ case 'q':
+ quiet = 1;
+ }
+ }
+
+ if (optind < argc)
+ {
+ if (!quiet)
+ fprintf(stderr, "%s: no non-option arguments are valid", progname);
+ exit(1);
+ }
+
+ if ((fd = get_console_fd(NULL)) == -1)
+ {
+ if (!quiet)
+ fprintf(stderr, "%s: terminal is not a console\n", progname);
+ exit(1);
+ }
+
+ clear_console(fd);
+
+ return 0;
+}
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..18eb0ac
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,85 @@
+Source: bash
+Section: base
+Priority: required
+Maintainer: Matthias Klose <doko@debian.org>
+Standards-Version: 3.6.2
+Build-Depends: autoconf, patch, bison, libncurses5-dev, texinfo, autotools-dev, debhelper (>= 4.1), texi2html, locales
+Build-Depends-Indep: tetex-bin
+
+Package: bash
+Architecture: any
+Pre-Depends: ${shlibs:Pre-Depends}
+Depends: base-files (>= 2.1.12), debianutils (>= 2.15)
+Conflicts: bash-completion
+Replaces: bash-doc (<= 2.05-1), bash-completion
+Suggests: bash-doc
+Essential: yes
+Section: shells
+Priority: required
+Description: The GNU Bourne Again SHell
+ Bash is an sh-compatible command language interpreter that executes
+ commands read from the standard input or from a file. Bash also
+ incorporates useful features from the Korn and C shells (ksh and csh).
+ .
+ Bash is ultimately intended to be a conformant implementation of the
+ IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).
+ .
+ Included in the bash package is the Programmable Completion Code, by
+ Ian Macdonald.
+
+Package: bash-minimal
+Architecture: any
+Depends: ${shlibs:Depends}, passwd (>= 1:4.0.3-10)
+Suggests: bash-doc
+Section: shells
+Priority: optional
+Description: The GNU Bourne Again SHell (minimal version)
+ Bash is an sh-compatible command language interpreter that executes
+ commands read from the standard input or from a file. Bash also
+ incorporates useful features from the Korn and C shells (ksh and csh).
+ .
+ Configured using --enable-minimal-config.
+
+Package: bash-static
+Architecture: any
+Depends: passwd (>= 1:4.0.3-10)
+Suggests: bash-doc
+Section: shells
+Priority: optional
+Description: The GNU Bourne Again SHell (static version)
+ Bash is an sh-compatible command language interpreter that executes
+ commands read from the standard input or from a file. Bash also
+ incorporates useful features from the Korn and C shells (ksh and csh).
+ .
+ Statically linked.
+
+Package: bash-builtins
+Architecture: any
+Depends: bash (= ${Source-Version})
+Section: utils
+Priority: optional
+Description: Bash loadable builtins - headers & examples
+ Bash can dynamically load new builtin commands. Included are the
+ necessary headers to compile your own builtins and lots of examples.
+
+Package: bash-doc
+Architecture: all
+Section: doc
+Priority: optional
+Description: Documentation and examples for the The GNU Bourne Again SHell
+ Bash is an sh-compatible command language interpreter that executes
+ commands read from the standard input or from a file. Bash also
+ incorporates useful features from the Korn and C shells (ksh and csh).
+ .
+ This package contains the documentation in info format, all the
+ examples and the main changelog.
+
+Package: bashdb
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: bash-doc
+Section: shells
+Priority: optional
+Description: The GNU Bourne Again SHell Debugger
+ The bash debugger is a patched version of bash 2.05b to provide
+ debugging support and better error reporting.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c0f7ea6
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,389 @@
+This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash,
+the Bourne Again SHell.
+
+This package was put together by Matthias Klose <doko@debian.org>, from
+the following sources:
+
+ bash: ftp.gnu.org:/pub/gnu/bash/bash-3.1.tar.gz
+ bash_completion: http://freshmeat.net/projects/bashcompletion/
+ bashdb: http://bashdb.sf.net/
+
+Bash homepage: http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
+
+Copyright (C) 1989-2004 Free Software Foundation, Inc.
+
+Bash 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.
+
+Bash 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 with
+your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with
+the Debian GNU/Linux bash source package as the file COPYING. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite
+330, Boston, MA 02111-1307, USA.
+
+The Free Software Foundation has exempted Bash from the requirement of
+Paragraph 2c of the General Public License. This is to say, there is
+no requirement for Bash to print a notice when it is started
+interactively in the usual way. We made this exception because users
+and standards expect shells not to print such messages. This
+exception applies to any program that serves as a shell and that is
+based primarily on Bash as opposed to other GNU software.
+
+
+bash_completion 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.
+
+bashdb 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.
+
+Files with other copyright statement than: Copyright FSF, License GPL
+---------------------------------------------------------------------
+
+doc/FAQ ("the Bash FAQ")
+
+ This document is Copyright 1995-2005 by Chester Ramey.
+
+ Permission is hereby granted, without written agreement and
+ without license or royalty fees, to use, copy, and distribute
+ this document for any purpose, provided that the above copyright
+ notice appears in all copies of this document and that the
+ contents of this document remain unaltered.
+
+
+doc/bashref.texi ("Bash Reference Manual"):
+
+ Copyright (c) 1988-2005 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ are preserved on all copies.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
+ and with the Back-Cover Texts as in (a) below. A copy of the license is
+ included in the section entitled ``GNU Free Documentation License.''
+
+ (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+ this GNU Manual, like GNU software. Copies published by the Free
+ Software Foundation raise funds for GNU development.''
+
+
+examples/bashdb/bashdb (Bash shell debugger)
+
+ # Adapted from an idea in O'Reilly's `Learning the Korn Shell'
+ # Copyright (C) 1993-1994 O'Reilly and Associates, Inc.
+ # Copyright (C) 1998, 1999, 2001 Gary V. Vaughan <gvv@techie.com>>
+
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License [...]
+
+
+examples/functions/pathfuncs (add dir to path)
+
+ # @(#)Copyright (c) 1991 Simon J. Gerraty
+ #
+ # This file is provided in the hope that it will
+ # be of use. There is absolutely NO WARRANTY.
+ # Permission to copy, redistribute or otherwise
+ # use this file is hereby granted provided that
+ # the above copyright notice and this notice are
+ # left intact.
+
+
+examples/functions/recurse (Recursive Directory Traverser)
+
+ # Author: Kaz Kylheku
+ # Copyright 1999
+
+
+examples/scripts/bcsh.sh (Bourne shell cshell-emulator)
+
+ # "Copyright (c) Chris Robertson, December 1985"
+ #
+ # This software may be used for any purpose provided the original
+ # copyright notice and this notice are affixed thereto. No warranties of
+ # any kind whatsoever are provided with this software, and it is hereby
+ # understood that the author is not liable for any damagages arising
+ # from the use of this software.
+
+
+examples/scripts/websrv.sh (WWW server in sh)
+
+ #copyright chris ulrich; This software may be used or modified
+ #in any way so long as this notice remains intact.
+
+
+examples/loadables/getconf.c (POSIX.2 getconf utility)
+
+ /*
+ * ORIGINAL COPYRIGHT STATEMENT:
+ *
+ * Copyright (c) 1994 Winning Strategies, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Winning Strategies, Inc.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ /*
+ * POSIX.2 getconf utility
+ *
+ * Originally Written by:
+ * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
+ *
+ * Heavily modified for inclusion in bash by
+ * Chet Ramey <chet@po.cwru.edu>
+ */
+
+
+examples/loadables/cut.c:
+
+ /*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam S. Moskowitz of Menlo Consulting and Marciano Pitargue.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+lib/readline/doc/rlman.texi (part of the GNU Readline Library manual)
+
+ Copyright (c) 1988-2004 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ are preserved on all copies.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
+ and with the Back-Cover Texts as in (a) below. A copy of the license is
+ included in the section entitled ``GNU Free Documentation License.''
+
+ (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+ this GNU Manual, like GNU software. Copies published by the Free
+ Software Foundation raise funds for GNU development.''
+
+
+lib/readline/doc/rltech.texi (part of the GNU Readline Library manual)
+
+ Copyright (C) 1988-2005 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ pare preserved on all copies.
+
+ Permission is granted to process this file through TeX and print the
+ results, provided the printed document carries copying permission
+ notice identical to this one except for the removal of this paragraph
+ (this paragraph not being relevant to the printed manual).
+
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the above conditions for modified versions,
+ except that this permission notice may be stated in a translation approved
+ by the Foundation.
+
+
+lib/readline/doc/rluser.texi (part of the GNU Readline Library manual)
+
+ Copyright (C) 1988-2005 Free Software Foundation, Inc.
+
+ Authored by Brian Fox and Chet Ramey.
+
+ Permission is granted to process this file through Tex and print the
+ results, provided the printed document carries copying permission notice
+ identical to this one except for the removal of this paragraph (this
+ paragraph not being relevant to the printed manual).
+
+ Permission is granted to make and distribute verbatim copies of this manual
+ provided the copyright notice and this permission notice are preserved on
+ all copies.
+
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided also that the
+ GNU Copyright statement is available to the distributee, and provided that
+ the entire resulting derived work is distributed under the terms of a
+ permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the above conditions for modified versions.
+
+
+readline/doc/{history,hstech,hsuser}.texi (GNU History Library Manual)
+
+ Copyright (C) 1988-2002 Free Software Foundation, Inc.
+ Authored by Brian Fox and Chet Ramey.
+
+ Permission is granted to make and distribute verbatim copies of this manual
+ provided the copyright notice and this permission notice are preserved on
+ all copies.
+
+ Permission is granted to process this file through Tex and print the
+ results, provided the printed document carries copying permission notice
+ identical to this one except for the removal of this paragraph (this
+ paragraph not being relevant to the printed manual).
+
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided also that the
+ GNU Copyright statement is available to the distributee, and provided that
+ the entire resulting derived work is distributed under the terms of a
+ permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the above conditions for modified versions.
+
+
+lib/sh/inet_aton.c:
+
+ * Copyright (c) 1983, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+
+
+lib/termcap/grot/termcap.info (GNU termcap library manual)
+
+ Copyright (C) 1988 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ are preserved on all copies.
+
+ Permission is granted to process this file through TeX and print the
+ results, provided the printed document carries copying permission
+ notice identical to this one except for the removal of this paragraph
+ (this paragraph not being relevant to the printed manual).
+
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the above conditions for modified versions,
+ except that this permission notice may be stated in a translation approved
+ by the Foundation.
+
+
+support/man2html.c
+
+ * This program was written by Richard Verhoeven (NL:5482ZX35)
+ * at the Eindhoven University of Technology. Email: rcb5@win.tue.nl
+ *
+ * Permission is granted to distribute, modify and use this program as long
+ * as this comment is not removed or changed.
+ *
+ * THIS IS A MODIFIED VERSION. IT WAS MODIFIED BY chet@po.cwru.edu FOR
+ * USE BY BASH.
diff --git a/debian/etc.bash.bashrc b/debian/etc.bash.bashrc
new file mode 100644
index 0000000..6cd166f
--- /dev/null
+++ b/debian/etc.bash.bashrc
@@ -0,0 +1,34 @@
+# System-wide .bashrc file for interactive bash(1) shells.
+
+# To enable the settings / commands in this file for login shells as well,
+# this file has to be sourced in /etc/profile.
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, overwrite the one in /etc/profile)
+PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+
+# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
+# If this is an xterm set the title to user@host:dir
+#case "$TERM" in
+#xterm*|rxvt*)
+# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
+# ;;
+#*)
+# ;;
+#esac
+
+# enable bash completion in interactive shells
+#if [ -f /etc/bash_completion ]; then
+# . /etc/bash_completion
+#fi
diff --git a/debian/etc.inputrc b/debian/etc.inputrc
new file mode 100644
index 0000000..422d44d
--- /dev/null
+++ b/debian/etc.inputrc
@@ -0,0 +1,13 @@
+# /etc/inputrc - global inputrc for libreadline
+# See readline(3readline) and `info readline' for more information.
+
+# Be 8 bit clean.
+set input-meta on
+set output-meta on
+
+# To allow the use of german 8bit-characters like the german umlauts, comment
+# out the two lines below. However this makes the meta key not work as a meta
+# key, which is annoying to those which don't need to type in 8-bit characters.
+
+#set meta-flag on
+#set convert-meta off
diff --git a/debian/etc.profile b/debian/etc.profile
new file mode 100644
index 0000000..b67da47
--- /dev/null
+++ b/debian/etc.profile
@@ -0,0 +1,27 @@
+# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
+# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
+
+PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
+
+if [ -f /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+if [ "$PS1" ]; then
+ if [ "$BASH" ]; then
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+ if [ -f /etc/bash.bashrc ]; then
+ . /etc/bash.bashrc
+ fi
+ else
+ if [ "`id -u`" -eq 0 ]; then
+ PS1='# '
+ else
+ PS1='$ '
+ fi
+ fi
+fi
+
+export PATH
+
+umask 022
diff --git a/debian/inputrc.arrows b/debian/inputrc.arrows
new file mode 100644
index 0000000..21aed08
--- /dev/null
+++ b/debian/inputrc.arrows
@@ -0,0 +1,30 @@
+# This file controls the behaviour of line input editing for
+# programs that use the Gnu Readline library.
+#
+# Arrow keys in keypad mode
+#
+"\C-[OD" backward-char
+"\C-[OC" forward-char
+"\C-[OA" previous-history
+"\C-[OB" next-history
+#
+# Arrow keys in ANSI mode
+#
+"\C-[[D" backward-char
+"\C-[[C" forward-char
+"\C-[[A" previous-history
+"\C-[[B" next-history
+#
+# Arrow keys in 8 bit keypad mode
+#
+"\C-M-OD" backward-char
+"\C-M-OC" forward-char
+"\C-M-OA" previous-history
+"\C-M-OB" next-history
+#
+# Arrow keys in 8 bit ANSI mode
+#
+"\C-M-[D" backward-char
+"\C-M-[C" forward-char
+"\C-M-[A" previous-history
+"\C-M-[B" next-history
diff --git a/debian/locale-gen b/debian/locale-gen
new file mode 100644
index 0000000..091a50e
--- /dev/null
+++ b/debian/locale-gen
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+LOCPATH=`pwd`/locales
+export LOCPATH
+
+[ -d $LOCPATH ] || mkdir -p $LOCPATH
+
+umask 022
+
+echo "Generating locales..."
+while read locale charset; do
+ case $locale in \#*) continue;; esac
+ [ -n "$locale" -a -n "$charset" ] || continue
+ echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"
+ echo -n ".$charset"
+ echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`
+ echo -n '...'
+ if [ -f $LOCPATH/$locale ]; then
+ input=$locale
+ else
+ input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`
+ fi
+ localedef -i $input -c -f $charset $LOCPATH/$locale #-A /etc/locale.alias
+ echo ' done'; \
+done <<EOF
+# This file lists locales that the bash testsuite depends on
+en_US.UTF-8 UTF-8
+EOF
+
+echo "Generation complete."
diff --git a/debian/new/bash.postinst b/debian/new/bash.postinst
new file mode 100644
index 0000000..834ac87
--- /dev/null
+++ b/debian/new/bash.postinst
@@ -0,0 +1,27 @@
+#! /bin/bash -e
+
+if [ "$1" = configure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.05b-4; \
+then
+ div=$(dpkg-divert --list /bin/sh)
+ if [ -n "$div" ] && [ -z "${div%%* by bash}" ]; then
+ # paranoia
+ ln -sf dash /bin/sh
+ rm -f /bin/sh.distrib
+
+ dpkg-divert --remove /bin/sh
+ fi
+
+ div=$(dpkg-divert --list /usr/share/man/man1/sh.1.gz)
+ if [ -n "$div" ] && [ -z "${div%%* by bash}" ]; then
+ # paranoia
+ ln -sf dash.1.gz /usr/share/man/man1/sh.1.gz
+ rm -f /usr/share/man/man1/sh.1.gz.distrib
+
+ dpkg-divert --remove /usr/share/man/man1/sh.1.gz
+ fi
+fi
+
+# the symlink is in the package now. So this should never happen ...
+if [ ! -e /bin/sh ]; then
+ ln -s dash /bin/sh
+fi
diff --git a/debian/new/bash.preinst.c b/debian/new/bash.preinst.c
new file mode 100644
index 0000000..10d43c6
--- /dev/null
+++ b/debian/new/bash.preinst.c
@@ -0,0 +1,229 @@
+/* Copyright (c) 1999 Anthony Towns
+ * Copyright (c) 2000 Matthias Klose
+ *
+ * You may freely use, distribute, and modify this program.
+ */
+
+// Don't rely on /bin/sh and popen!
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+/* XXX: evil kludge, deal with arbitrary name lengths */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+int myexec(char *cmd, ...)
+{
+ va_list ap;
+ pid_t child;
+
+ char *new_argv[10];
+ int new_argc = 0, i;
+
+ new_argv[new_argc++] = cmd;
+ va_start(ap, cmd);
+ while ((new_argv[new_argc++] = va_arg(ap, char *)));
+ va_end(ap);
+
+ switch(child = fork()) {
+ case -1:
+ /* fork failed */
+ return EXIT_FAILURE;
+
+ case 0:
+ /* i'm the child */
+ {
+ execv(cmd, new_argv);
+ _exit(127);
+ }
+
+ default:
+ /* i'm the parent */
+ {
+ int status;
+ pid_t pid;
+ pid = wait(&status);
+ if (pid == child) {
+ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+ return EXIT_SUCCESS;
+ }
+ }
+ }
+ }
+ return EXIT_FAILURE;
+}
+
+int check_predepends(void)
+{
+ return myexec("/usr/bin/dpkg", "--assert-support-predepends", NULL);
+}
+
+int dpkg_compare_versions(char *v1, char *op, char *v2)
+{
+ return myexec("/usr/bin/dpkg", "--compare-versions", v1, op, v2, NULL);
+}
+
+int dpkg_divert_add(char *pkg, char *file)
+{
+ return myexec("/usr/sbin/dpkg-divert", "--package", pkg, "--add", file, NULL);
+}
+
+char *check_diversion(char *diversion_name)
+{
+ pid_t child;
+ int pipedes[2];
+
+ if (pipe(pipedes))
+ return NULL;
+
+
+ switch(child = fork()) {
+ case -1:
+ /* fork failed */
+ close(pipedes[0]);
+ close(pipedes[1]);
+ return NULL;
+
+ case 0:
+ /* i'm the child */
+ {
+ if (dup2(pipedes[STDOUT_FILENO], STDOUT_FILENO) < 0)
+ _exit(127);
+ close(pipedes[STDIN_FILENO]);
+ close(pipedes[STDOUT_FILENO]);
+ execl( "/usr/sbin/dpkg-divert", "/usr/sbin/dpkg-divert",
+ "--list", diversion_name, NULL );
+ _exit(127);
+ }
+
+ default:
+ /* i'm the parent */
+ {
+ static char line[1024];
+ FILE *fd;
+
+ close (pipedes[STDOUT_FILENO]);
+ fcntl (pipedes[STDIN_FILENO], F_SETFD, FD_CLOEXEC);
+ fd = fdopen (pipedes[STDIN_FILENO], "r");
+
+ while (fgets(line, 1024, fd) != NULL) {
+ line[strlen(line)-1] = '\0';
+ break;
+ }
+ fclose(fd);
+ return line;
+ }
+ }
+ return NULL;
+}
+
+#define FIRST_WITHOUT_SHLINK "2.05b-4"
+
+const char *msg =
+ "As bash for Debian is destined to provide a working /bin/sh (pointing to\n"
+ "/bin/bash) your link will be overwritten by a default link.\n\n"
+ "If you don't want further upgrades to overwrite your customization,\n"
+ "please read /usr/share/doc/bash/README.Debian for a more permanent solution.\n\n"
+ "[Press RETURN to continue]";
+
+int main(int argc, char *argv[]) {
+ int targetlen;
+ char target[PATH_MAX+1], answer[1024];
+
+ if (argc < 2) {
+ printf("\nbash/preinst: expected at least one argument\n\n");
+ return EXIT_FAILURE;
+ }
+
+ if (check_predepends() != EXIT_SUCCESS) {
+ printf("\nPlease upgrade to a new version of dpkg\n\n");
+ return EXIT_FAILURE;
+ }
+
+/*
+ if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt FIRST_WITHOUT_SHLINK; then
+ div=$(dpkg-divert --list /bin/sh)
+ if [ -z "$div" ]; then
+ dpkg-divert --package bash --add /bin/sh
+ ln -sf dash /bin/sh
+ fi
+ div=$(dpkg-divert --list /usr/share/man/man1/sh.1.gz)
+ if [ -z "$div" ]; then
+ dpkg-divert --package bash --add /usr/share/man/man1/sh.1.gz
+ ln -sf dash.1.gz /usr/share/man/man1/sh.1.gz
+ fi
+ fi
+*/
+
+ if (strcmp(argv[1], "upgrade") == 0) {
+ if (argc < 3) {
+ printf("\nbash/preinst upgrade: expected at least two arguments\n\n");
+ return EXIT_FAILURE;
+ }
+ if (dpkg_compare_versions(argv[2], "lt", FIRST_WITHOUT_SHLINK) == EXIT_SUCCESS) {
+ char *diversion = check_diversion("/bin/sh");
+
+ if (diversion == NULL)
+ return EXIT_FAILURE;
+ // printf("diversion: /%s/\n", diversion);
+ if (strcmp(diversion, "") == 0) {
+ // link is not diverted
+ dpkg_divert_add("bash", "/bin/sh");
+
+ unlink("/bin/sh");
+ symlink("dash", "/bin/sh");
+ }
+
+ diversion = check_diversion("/usr/share/man/man1/sh.1.gz");
+
+ if (diversion == NULL)
+ return EXIT_FAILURE;
+ // printf("diversion: /%s/\n", diversion);
+ if (strcmp(diversion, "") == 0) {
+ // link is not diverted
+ dpkg_divert_add("bash", "/usr/share/man/man1/sh.1.gz");
+
+ unlink("/usr/share/man/man1/sh.1.gz");
+ symlink("dash.1.gz", "/usr/share/man/man1/sh.1.gz");
+ }
+
+ }
+ }
+
+#if 0
+ targetlen = readlink("/bin/sh", target, PATH_MAX);
+ if (targetlen == -1) {
+ // error reading link. Will be overwritten.
+ puts("The bash upgrade discovered that something is wrong with your /bin/sh link.");
+ puts(msg);
+ fgets(answer, 1024, stdin);
+ return EXIT_SUCCESS;
+ }
+ target[targetlen] = '\0';
+ if (strcmp(target, "bash") != 0 && strcmp(target, "/bin/bash") != 0) {
+ char *diversion = check_diversion("/bin/sh");
+
+ if (diversion == NULL)
+ return EXIT_FAILURE;
+ // printf("diversion: /%s/\n", diversion);
+ if (strcmp(diversion, "") != 0)
+ // link is diverted
+ return EXIT_SUCCESS;
+ printf("The bash upgrade discovered that your /bin/sh link points to %s.\n", target);
+ puts(msg);
+ fgets(answer, 1024, stdin);
+ return EXIT_SUCCESS;
+ }
+#endif
+
+ return EXIT_SUCCESS;
+}
diff --git a/debian/new/changelog-add b/debian/new/changelog-add
new file mode 100644
index 0000000..b68f795
--- /dev/null
+++ b/debian/new/changelog-add
@@ -0,0 +1,4 @@
+bash (2.05b-4) unstable; urgency=low
+
+ * Remove /bin/sh symlink from package.
+ * Pre-Depend on base-files (>= 3.0.5), which contains the symlink.
diff --git a/debian/patches/bash-default-editor.dpatch b/debian/patches/bash-default-editor.dpatch
new file mode 100755
index 0000000..1d0f44c
--- /dev/null
+++ b/debian/patches/bash-default-editor.dpatch
@@ -0,0 +1,48 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Use `command -v editor`, as an editor, if available.
+
+--- bash/builtins/fc.def~ 2005-10-13 18:11:24.798452832 +0200
++++ bash/builtins/fc.def 2005-10-13 19:36:11.956087320 +0200
+@@ -156,11 +156,11 @@
+ #endif
+
+ /* String to execute on a file that we want to edit. */
+-#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}"
++#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo vi)}}"
+ #if defined (STRICT_POSIX)
+ # define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}"
+ #else
+-# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}"
++# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo ed)}}"
+ #endif
+
+ int
+--- bash/bashline.c~ 2005-10-13 18:11:24.827448424 +0200
++++ bash/bashline.c 2005-10-13 19:37:35.382404592 +0200
+@@ -800,8 +800,8 @@
+ command being entered (if no explicit argument is given), otherwise on
+ a command from the history file. */
+
+-#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\""
+-#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\""
++#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\""
++#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\""
+ #define POSIX_VI_EDIT_COMMAND "fc -e vi"
+
+ static int
diff --git a/debian/patches/bash-subst-param-length.dpatch b/debian/patches/bash-subst-param-length.dpatch
new file mode 100755
index 0000000..d84a4e3
--- /dev/null
+++ b/debian/patches/bash-subst-param-length.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+DP: ignore array subscript while determining variable name for length
+DP: substitution
+DP: (#345861)
+
+--- ../bash-3.1/subst.c 2006-01-14 01:12:02.000000000 +0100
++++ subst.c 2006-01-14 01:12:39.000000000 +0100
+@@ -5814,7 +5814,7 @@
+ {
+ t_index++;
+ free (name);
+- temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0);
++ temp1 = string_extract (string, &t_index, "#%:-=?+/}", EX_VARNAME);
+ name = (char *)xmalloc (3 + (strlen (temp1)));
+ *name = string[sindex];
+ if (string[sindex] == '!')
diff --git a/debian/patches/bash31-001.dpatch b/debian/patches/bash31-001.dpatch
new file mode 100755
index 0000000..db4ac25
--- /dev/null
+++ b/debian/patches/bash31-001.dpatch
@@ -0,0 +1,123 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Fix parsing problems with compound assignments
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-001
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <20051212015924.GA820@toucan.gentoo.org> <20051214034438.GK1863@toucan.gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00030.html http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00041.html
+
+Bug-Description:
+
+There are parsing problems with compound assignments in several contexts,
+including as arguments to builtins like `local', `eval', and `let', and
+as multiple assignments in a single command.
+
+Patch:
+
+*** ../bash-3.1/parse.y Fri Nov 11 23:14:18 2005
+--- parse.y Fri Dec 16 20:43:07 2005
+***************
+*** 3696,3700 ****
+ b = builtin_address_internal (token, 0);
+ if (b && (b->flags & ASSIGNMENT_BUILTIN))
+! parser_state |= PST_ASSIGNOK;
+ }
+
+--- 3696,3702 ----
+ b = builtin_address_internal (token, 0);
+ if (b && (b->flags & ASSIGNMENT_BUILTIN))
+! parser_state |= PST_ASSIGNOK;
+! else if (STREQ (token, "eval") || STREQ (token, "let"))
+! parser_state |= PST_ASSIGNOK;
+ }
+
+***************
+*** 4687,4691 ****
+ {
+ WORD_LIST *wl, *rl;
+! int tok, orig_line_number, orig_token_size;
+ char *saved_token, *ret;
+
+--- 4689,4693 ----
+ {
+ WORD_LIST *wl, *rl;
+! int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
+ char *saved_token, *ret;
+
+***************
+*** 4693,4696 ****
+--- 4695,4699 ----
+ orig_token_size = token_buffer_size;
+ orig_line_number = line_number;
++ orig_last_token = last_read_token;
+
+ last_read_token = WORD; /* WORD to allow reserved words here */
+***************
+*** 4699,4702 ****
+--- 4702,4707 ----
+ token_buffer_size = 0;
+
++ assignok = parser_state&PST_ASSIGNOK; /* XXX */
++
+ wl = (WORD_LIST *)NULL; /* ( */
+ parser_state |= PST_COMPASSIGN;
+***************
+*** 4741,4745 ****
+ }
+
+! last_read_token = WORD;
+ if (wl)
+ {
+--- 4746,4750 ----
+ }
+
+! last_read_token = orig_last_token; /* XXX - was WORD? */
+ if (wl)
+ {
+***************
+*** 4753,4756 ****
+--- 4758,4765 ----
+ if (retlenp)
+ *retlenp = (ret && *ret) ? strlen (ret) : 0;
++
++ if (assignok)
++ parser_state |= PST_ASSIGNOK;
++
+ return ret;
+ }
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 0
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-002-doc.dpatch b/debian/patches/bash31-002-doc.dpatch
new file mode 100644
index 0000000..3215ef2
--- /dev/null
+++ b/debian/patches/bash31-002-doc.dpatch
@@ -0,0 +1,145 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-002
+
+Bug-Reported-by: vapier@gentoo.org
+Bug-Reference-ID: <20051210223218.GD3324@toucan.gentoo.org>
+Bug-Reference-URL:http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00021.html
+
+Bug-Description:
+
+This corrects several omissions in the bash documentation: It adds the new
+options to `ulimit', the exact expansions for `case' patterns, clarification
+of the language concerning the return value of `[[', and updated version
+information.
+
+Patch:
+
+*** ../bash-3.1/doc/bashref.texi Mon Oct 3 15:07:21 2005
+--- doc/bashref.texi Fri Dec 30 10:50:39 2005
+***************
+*** 962,967 ****
+ is enabled, the match is performed without regard to the case
+ of alphabetic characters.
+! The return value is 0 if the string matches or does not match
+! the pattern, respectively, and 1 otherwise.
+ Any part of the pattern may be quoted to force it to be matched as a
+ string.
+--- 962,967 ----
+ is enabled, the match is performed without regard to the case
+ of alphabetic characters.
+! The return value is 0 if the string matches (@samp{==}) or does not
+! match (@samp{!=})the pattern, and 1 otherwise.
+ Any part of the pattern may be quoted to force it to be matched as a
+ string.
+***************
+*** 2599,2603 ****
+ or inconvenient to obtain with separate utilities.
+
+! This section briefly the builtins which Bash inherits from
+ the Bourne Shell, as well as the builtin commands which are unique
+ to or have been extended in Bash.
+--- 2597,2601 ----
+ or inconvenient to obtain with separate utilities.
+
+! This section briefly describes the builtins which Bash inherits from
+ the Bourne Shell, as well as the builtin commands which are unique
+ to or have been extended in Bash.
+***************
+*** 3834,3838 ****
+ @btindex ulimit
+ @example
+! ulimit [-acdflmnpstuvSH] [@var{limit}]
+ @end example
+ @code{ulimit} provides control over the resources available to processes
+--- 3834,3838 ----
+ @btindex ulimit
+ @example
+! ulimit [-acdfilmnpqstuvxSH] [@var{limit}]
+ @end example
+ @code{ulimit} provides control over the resources available to processes
+***************
+*** 3858,3861 ****
+--- 3858,3864 ----
+ The maximum size of files created by the shell.
+
++ @item -i
++ The maximum number of pending signals.
++
+ @item -l
+ The maximum size that may be locked into memory.
+***************
+*** 3870,3873 ****
+--- 3873,3879 ----
+ The pipe buffer size.
+
++ @item -q
++ The maximum number of bytes in POSIX message queues.
++
+ @item -s
+ The maximum stack size.
+***************
+*** 3882,3885 ****
+--- 3888,3894 ----
+ The maximum amount of virtual memory available to the process.
+
++ @item -x
++ The maximum number of file locks.
++
+ @end table
+
+***************
+*** 4090,4095 ****
+
+ @item -x
+! Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP
+! commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands
+ and their arguments or associated word lists after they are
+ expanded and before they are executed. The value of the @env{PS4}
+--- 4103,4108 ----
+
+ @item -x
+! Print a trace of simple commands, @code{for} commands, @code{case}
+! commands, @code{select} commands, and arithmetic @code{for} commands
+ and their arguments or associated word lists after they are
+ expanded and before they are executed. The value of the @env{PS4}
+*** ../bash-3.1/doc/version.texi Tue Sep 20 14:52:56 2005
+--- doc/version.texi Fri Dec 30 10:50:58 2005
+***************
+*** 3,10 ****
+ @end ignore
+
+! @set LASTCHANGE Mon Sep 5 11:47:04 EDT 2005
+
+! @set EDITION 3.1-beta1
+! @set VERSION 3.1-beta1
+! @set UPDATED 5 September 2005
+! @set UPDATED-MONTH September 2005
+--- 3,10 ----
+ @end ignore
+
+! @set LASTCHANGE Fri Dec 30 10:50:51 EST 2005
+
+! @set EDITION 3.1
+! @set VERSION 3.1
+! @set UPDATED 30 December 2005
+! @set UPDATED-MONTH December 2005
diff --git a/debian/patches/bash31-002.dpatch b/debian/patches/bash31-002.dpatch
new file mode 100755
index 0000000..42f17f6
--- /dev/null
+++ b/debian/patches/bash31-002.dpatch
@@ -0,0 +1,147 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-002
+
+Bug-Reported-by: vapier@gentoo.org
+Bug-Reference-ID: <20051210223218.GD3324@toucan.gentoo.org>
+Bug-Reference-URL:http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00021.html
+
+Bug-Description:
+
+This corrects several omissions in the bash documentation: It adds the new
+options to `ulimit', the exact expansions for `case' patterns, clarification
+of the language concerning the return value of `[[', and updated version
+information.
+
+Patch:
+
+*** ../bash-3.1/doc/bash.1 Wed Oct 12 11:40:52 2005
+--- doc/bash.1 Wed Dec 28 19:58:54 2005
+***************
+*** 7,16 ****
+ .\" chet@po.cwru.edu
+ .\"
+! .\" Last Change: Sat Aug 27 13:28:44 EDT 2005
+ .\"
+ .\" bash_builtins, strip all but Built-Ins section
+ .if \n(zZ=1 .ig zZ
+ .if \n(zY=1 .ig zY
+! .TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1"
+ .\"
+ .\" There's some problem with having a `@'
+--- 7,16 ----
+ .\" chet@po.cwru.edu
+ .\"
+! .\" Last Change: Wed Dec 28 19:58:45 EST 2005
+ .\"
+ .\" bash_builtins, strip all but Built-Ins section
+ .if \n(zZ=1 .ig zZ
+ .if \n(zY=1 .ig zY
+! .TH BASH 1 "2005 Dec 28" "GNU Bash-3.1"
+ .\"
+ .\" There's some problem with having a `@'
+***************
+*** 678,683 ****
+ is enabled, the match is performed without regard to the case
+ of alphabetic characters.
+! The return value is 0 if the string matches or does not match
+! the pattern, respectively, and 1 otherwise.
+ Any part of the pattern may be quoted to force it to be matched as a
+ string.
+--- 678,683 ----
+ is enabled, the match is performed without regard to the case
+ of alphabetic characters.
+! The return value is 0 if the string matches (\fB==\fP) or does not match
+! (\fB!=\fP) the pattern, and 1 otherwise.
+ Any part of the pattern may be quoted to force it to be matched as a
+ string.
+***************
+*** 808,811 ****
+--- 808,817 ----
+ .B Pathname Expansion
+ below).
++ The \fIword\fP is expanded using tilde
++ expansion, parameter and variable expansion, arithmetic substituion,
++ command substitution, process substitution and quote removal.
++ Each \fIpattern\fP examined is expanded using tilde
++ expansion, parameter and variable expansion, arithmetic substituion,
++ command substitution, and process substitution.
+ If the shell option
+ .B nocasematch
+***************
+*** 8485,8489 ****
+ none are found.
+ .TP
+! \fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
+ Provides control over the resources available to the shell and to
+ processes started by it, on systems that allow such control.
+--- 8485,8489 ----
+ none are found.
+ .TP
+! \fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]]
+ Provides control over the resources available to the shell and to
+ processes started by it, on systems that allow such control.
+***************
+*** 8524,8527 ****
+--- 8524,8530 ----
+ The maximum size of files created by the shell
+ .TP
++ .B \-i
++ The maximum number of pending signals
++ .TP
+ .B \-l
+ The maximum size that may be locked into memory
+***************
+*** 8537,8540 ****
+--- 8540,8546 ----
+ The pipe size in 512-byte blocks (this may not be set)
+ .TP
++ .B \-q
++ The maximum number of bytes in POSIX message queues
++ .TP
+ .B \-s
+ The maximum stack size
+***************
+*** 8548,8551 ****
+--- 8554,8560 ----
+ .B \-v
+ The maximum amount of virtual memory available to the shell
++ .TP
++ .B \-x
++ The maximum number of file locks
+ .PD
+ .PP
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-003.dpatch b/debian/patches/bash31-003.dpatch
new file mode 100755
index 0000000..0da5110
--- /dev/null
+++ b/debian/patches/bash31-003.dpatch
@@ -0,0 +1,64 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-003
+
+Bug-Reported-by: Adam Buraczewski <adamb@nor.pl>
+Bug-Reference-ID: <200512210950.jBL9o4C2008608@localhost.localdomain>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00055.html
+
+Bug-Description:
+
+A missing #define guard causes bash to not compile when readline is not
+configured in, either as the result of explicit disabling or when the
+`--enable-minimal-config' option is given to configure.
+
+Patch:
+
+*** ../bash-3.1/variables.c Sat Nov 12 21:22:37 2005
+--- variables.c Mon Dec 26 13:34:03 2005
+***************
+*** 861,867 ****
+--- 863,871 ----
+ char val[INT_STRLEN_BOUND(int) + 1], *v;
+
++ #if defined (READLINE)
+ /* If we are currently assigning to LINES or COLUMNS, don't do anything. */
+ if (winsize_assignment)
+ return;
++ #endif
+
+ v = inttostr (lines, val, sizeof (val));
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-004.dpatch b/debian/patches/bash31-004.dpatch
new file mode 100755
index 0000000..bb885b6
--- /dev/null
+++ b/debian/patches/bash31-004.dpatch
@@ -0,0 +1,65 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-004
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <20051223172359.GF14579@toucan.gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00062.html
+
+Bug-Description:
+
+A local array variable declared at function scope that shadows a variable
+of the same name declared in a previous scope did not create a separate
+variable instance, but used the previous one.
+
+Patch:
+
+*** ../bash-3.1/subst.c Mon Oct 24 09:51:13 2005
+--- subst.c Fri Dec 30 12:11:53 2005
+***************
+*** 2188,2192 ****
+ {
+ v = find_variable (name);
+! if (v == 0 || array_p (v) == 0)
+ v = make_local_array_variable (name);
+ v = assign_array_var_from_string (v, value, flags);
+--- 2188,2192 ----
+ {
+ v = find_variable (name);
+! if (v == 0 || array_p (v) == 0 || v->context != variable_context)
+ v = make_local_array_variable (name);
+ v = assign_array_var_from_string (v, value, flags);
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-005.dpatch b/debian/patches/bash31-005.dpatch
new file mode 100755
index 0000000..8276092
--- /dev/null
+++ b/debian/patches/bash31-005.dpatch
@@ -0,0 +1,71 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-005
+
+Bug-Reported-by:
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+When tilde expansion fails, POSIX leaves it unspecified whether or not the
+word undergoes the additional word expansions. Bash-3.1 as distributed
+skipped the rest of the expansions; this patch restores the bash-3.0 behavior.
+
+This means that something like
+ USER=ratbert
+ echo ~$USER
+
+will echo `~ratbert' rather than `~$USER'.
+
+Patch:
+
+*** ../bash-3.1/subst.c Mon Oct 24 09:51:13 2005
+--- subst.c Fri Dec 30 12:11:53 2005
+***************
+*** 6796,6799 ****
+--- 6823,6832 ----
+ {
+ temp1 = bash_tilde_expand (temp, tflag);
++ if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
++ {
++ FREE (temp);
++ FREE (temp1);
++ goto add_character; /* tilde expansion failed */
++ }
+ free (temp);
+ temp = temp1;
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-006.dpatch b/debian/patches/bash31-006.dpatch
new file mode 100755
index 0000000..c1e9908
--- /dev/null
+++ b/debian/patches/bash31-006.dpatch
@@ -0,0 +1,77 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-006
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-006
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <200601120613.11907.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00045.html
+
+Bug-Description:
+
+Under some circumstances, Bash can use an incorrect setting for the flag
+that indicates whether or not the terminal can auto-wrap, resulting in line-
+wrapping errors.
+
+Patch:
+
+*** ../bash-3.1/lib/readline/terminal.c Sat Nov 12 20:46:54 2005
+--- lib/readline/terminal.c Tue Jan 31 10:57:54 2006
+***************
+*** 123,127 ****
+
+ /* Non-zero means the terminal can auto-wrap lines. */
+! int _rl_term_autowrap;
+
+ /* Non-zero means that this terminal has a meta key. */
+--- 126,130 ----
+
+ /* Non-zero means the terminal can auto-wrap lines. */
+! int _rl_term_autowrap = -1;
+
+ /* Non-zero means that this terminal has a meta key. */
+***************
+*** 275,278 ****
+--- 278,284 ----
+ int rows, cols;
+ {
++ if (_rl_term_autowrap == -1)
++ _rl_init_terminal_io (rl_terminal_name);
++
+ if (rows > 0)
+ _rl_screenheight = rows;
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-007.dpatch b/debian/patches/bash31-007.dpatch
new file mode 100755
index 0000000..09b7639
--- /dev/null
+++ b/debian/patches/bash31-007.dpatch
@@ -0,0 +1,140 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-007
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-007
+
+Bug-Reported-by: Tim Waugh <twaugh@redhat.com>, Laird Breyer <laird@lbreyer.com>
+Bug-Reference-ID: <20060105174434.GY16000@redhat.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00009.html
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347695
+
+Bug-Description:
+
+When the number of saved jobs exceeds the initial size of the jobs array
+(4096 slots), the array must be compacted and reallocated. An error in
+the code to do that could cause a segmentation fault.
+
+Patch:
+
+*** ../bash-3.1/jobs.c Fri Nov 11 23:13:27 2005
+--- jobs.c Wed Feb 1 13:55:38 2006
+***************
+*** 845,851 ****
+ {
+ sigset_t set, oset;
+! int nsize, i, j;
+ JOB **nlist;
+
+ nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS);
+ nsize *= JOB_SLOTS;
+--- 888,895 ----
+ {
+ sigset_t set, oset;
+! int nsize, i, j, ncur, nprev;
+ JOB **nlist;
+
++ ncur = nprev = NO_JOB;
+ nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS);
+ nsize *= JOB_SLOTS;
+***************
+*** 855,869 ****
+
+ BLOCK_CHILD (set, oset);
+! nlist = (JOB **) xmalloc (nsize * sizeof (JOB *));
+ for (i = j = 0; i < js.j_jobslots; i++)
+ if (jobs[i])
+! nlist[j++] = jobs[i];
+
+ js.j_firstj = 0;
+! js.j_lastj = (j > 0) ? j - 1: 0;
+ js.j_jobslots = nsize;
+
+! free (jobs);
+! jobs = nlist;
+
+ UNBLOCK_CHILD (oset);
+--- 899,947 ----
+
+ BLOCK_CHILD (set, oset);
+! nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *));
+!
+ for (i = j = 0; i < js.j_jobslots; i++)
+ if (jobs[i])
+! {
+! if (i == js.j_current)
+! ncur = j;
+! if (i == js.j_previous)
+! nprev = j;
+! nlist[j++] = jobs[i];
+! }
+!
+! #if defined (DEBUG)
+! itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize);
+! itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0);
+! itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0);
+! #endif
+
+ js.j_firstj = 0;
+! js.j_lastj = (j > 0) ? j - 1 : 0;
+! js.j_njobs = j;
+ js.j_jobslots = nsize;
+
+! /* Zero out remaining slots in new jobs list */
+! for ( ; j < nsize; j++)
+! nlist[j] = (JOB *)NULL;
+!
+! if (jobs != nlist)
+! {
+! free (jobs);
+! jobs = nlist;
+! }
+!
+! if (ncur != NO_JOB)
+! js.j_current = ncur;
+! if (nprev != NO_JOB)
+! js.j_previous = nprev;
+!
+! /* Need to reset these */
+! if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj)
+! reset_current ();
+!
+! #ifdef DEBUG
+! itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous);
+! #endif
+
+ UNBLOCK_CHILD (oset);
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-008.dpatch b/debian/patches/bash31-008.dpatch
new file mode 100755
index 0000000..5a2049d
--- /dev/null
+++ b/debian/patches/bash31-008.dpatch
@@ -0,0 +1,70 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-008
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-008
+
+Bug-Reported-by: Ingemar Nilsson <init@kth.se>
+Bug-Reference-ID: <43C38D35.7020404@kth.se>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00044.html
+
+Bug-Description:
+
+In some cases, bash inappropriately allows SIGINT from the terminal to
+reach background processes.
+
+Patch:
+
+*** ../bash-3.1/jobs.c Fri Nov 11 23:13:27 2005
+--- jobs.c Wed Feb 1 13:55:38 2006
+***************
+*** 2199,2203 ****
+ wait_sigint_received = 0;
+ if (job_control == 0)
+! old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+
+ termination_state = last_command_exit_value;
+--- 2298,2306 ----
+ wait_sigint_received = 0;
+ if (job_control == 0)
+! {
+! old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+! if (old_sigint_handler == SIG_IGN)
+! set_signal_handler (SIGINT, old_sigint_handler);
+! }
+
+ termination_state = last_command_exit_value;
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-009.dpatch b/debian/patches/bash31-009.dpatch
new file mode 100755
index 0000000..ec1eee1
--- /dev/null
+++ b/debian/patches/bash31-009.dpatch
@@ -0,0 +1,85 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-009
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-009
+
+Bug-Reported-by: Joshua Neuheisel <jneuheisel@gmail.com>
+Bug-Reference-ID: <25d873330601140820v4ad8efd2t8bf683b073c138b3@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00062.html
+
+Bug-Description:
+
+Under some circumstances, background (asynchronous) jobs can set the terminal
+process group incorrectly. This can cause a foreground process (including
+the foreground shell) to get read errors and exit.
+
+Patch:
+
+*** ../bash-3.1/jobs.c Fri Nov 11 23:13:27 2005
+--- jobs.c Wed Feb 1 13:55:38 2006
+***************
+*** 620,625 ****
+ * the parent gives it away.
+ *
+ */
+! if (job_control && newjob->pgrp)
+ give_terminal_to (newjob->pgrp, 0);
+ }
+--- 634,642 ----
+ * the parent gives it away.
+ *
++ * Don't give the terminal away if this shell is an asynchronous
++ * subshell.
++ *
+ */
+! if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0)
+ give_terminal_to (newjob->pgrp, 0);
+ }
+***************
+*** 1656,1660 ****
+ shell's process group (we could be in the middle of a
+ pipeline, for example). */
+! if (async_p == 0 && pipeline_pgrp != shell_pgrp)
+ give_terminal_to (pipeline_pgrp, 0);
+
+--- 1743,1747 ----
+ shell's process group (we could be in the middle of a
+ pipeline, for example). */
+! if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0))
+ give_terminal_to (pipeline_pgrp, 0);
+
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-010.dpatch b/debian/patches/bash31-010.dpatch
new file mode 100755
index 0000000..ad00d2b
--- /dev/null
+++ b/debian/patches/bash31-010.dpatch
@@ -0,0 +1,183 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-010
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-010
+
+Bug-Reported-by: vw@vonwolff.de
+Bug-Reference-ID: <20060123135234.1AC2F1D596@wst07.vonwolff.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00090.html
+
+Bug-Description:
+
+There is a difference in behavior between bash-3.0 and bash-3.1 involving
+parsing of single- and double-quoted strings occurring in old-style
+command substitution. The difference has to do with how backslashes are
+processed. This patch restores a measure of backwards compatibility while
+the question of POSIX conformance and ultimately correct behavior is discussed.
+
+THIS IS AN UPDATED PATCH. USE THIS COMMAND TO REVERSE THE EFFECTS OF
+THE ORIGINAL PATCH. THE CURRENT DIRECTORY MUST BE THE BASH-3.1 SOURCE
+DIRECTORY.
+
+patch -p0 -R < bash31-010.orig
+
+Then apply this patch as usual.
+
+Patch:
+
+*** ../bash-3.1/parse.y Fri Nov 11 23:14:18 2005
+--- parse.y Thu Feb 23 08:21:12 2006
+***************
+*** 2716,2721 ****
+--- 2723,2729 ----
+ #define P_ALLOWESC 0x02
+ #define P_DQUOTE 0x04
+ #define P_COMMAND 0x08 /* parsing a command, so look for comments */
++ #define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
+
+ static char matched_pair_error;
+ static char *
+***************
+*** 2725,2736 ****
+ int *lenp, flags;
+ {
+ int count, ch, was_dollar, in_comment, check_comment;
+! int pass_next_character, nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans;
+ int retind, retsize, rflags;
+
+ count = 1;
+! pass_next_character = was_dollar = in_comment = 0;
+ check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
+
+ /* RFLAGS is the set of flags we want to pass to recursive calls. */
+--- 2733,2744 ----
+ int *lenp, flags;
+ {
+ int count, ch, was_dollar, in_comment, check_comment;
+! int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans;
+ int retind, retsize, rflags;
+
+ count = 1;
+! pass_next_character = backq_backslash = was_dollar = in_comment = 0;
+ check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
+
+ /* RFLAGS is the set of flags we want to pass to recursive calls. */
+***************
+*** 2742,2752 ****
+ start_lineno = line_number;
+ while (count)
+ {
+! #if 0
+! ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0);
+! #else
+! ch = shell_getc (qc != '\'' && pass_next_character == 0);
+! #endif
+ if (ch == EOF)
+ {
+ free (ret);
+--- 2750,2757 ----
+ start_lineno = line_number;
+ while (count)
+ {
+! ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0);
+!
+ if (ch == EOF)
+ {
+ free (ret);
+***************
+*** 2771,2779 ****
+ continue;
+ }
+ /* Not exactly right yet */
+! else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1])))
+ in_comment = 1;
+
+ if (pass_next_character) /* last char was backslash */
+ {
+ pass_next_character = 0;
+--- 2776,2791 ----
+ continue;
+ }
+ /* Not exactly right yet */
+! else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
+ in_comment = 1;
+
++ /* last char was backslash inside backquoted command substitution */
++ if (backq_backslash)
++ {
++ backq_backslash = 0;
++ /* Placeholder for adding special characters */
++ }
++
+ if (pass_next_character) /* last char was backslash */
+ {
+ pass_next_character = 0;
+***************
+*** 2814,2819 ****
+--- 2824,2831 ----
+ {
+ if MBTEST((flags & P_ALLOWESC) && ch == '\\')
+ pass_next_character++;
++ else if MBTEST((flags & P_BACKQUOTE) && ch == '\\')
++ backq_backslash++;
+ continue;
+ }
+
+***************
+*** 2898,2904 ****
+ }
+ else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
+ {
+! nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags);
+ goto add_nestret;
+ }
+ else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+--- 2910,2920 ----
+ }
+ else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
+ {
+! /* Add P_BACKQUOTE so backslash quotes the next character and
+! shell_getc does the right thing with \<newline>. We do this for
+! a measure of backwards compatibility -- it's not strictly the
+! right POSIX thing. */
+! nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE);
+ goto add_nestret;
+ }
+ else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-011.dpatch b/debian/patches/bash31-011.dpatch
new file mode 100755
index 0000000..23b910e
--- /dev/null
+++ b/debian/patches/bash31-011.dpatch
@@ -0,0 +1,66 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-011
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-011
+
+Bug-Reported-by: Mike Stroyan <mike.stroyan@hp.com>
+Bug-Reference-ID: <E1EvwxP-0004LD-GC@localhost.localdomain>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00033.html
+
+Bug-Description:
+
+A change in bash-3.1 caused the single quotes to be stripped from ANSI-C
+quoting inside double-quoted command substitutions.
+
+Patch:
+
+*** ../bash-3.1/parse.y Fri Nov 11 23:14:18 2005
+--- parse.y Wed Jan 25 14:55:18 2006
+***************
+*** 2908,2912 ****
+ count--;
+ if (ch == '(') /* ) */
+! nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
+ else if (ch == '{') /* } */
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
+--- 2914,2918 ----
+ count--;
+ if (ch == '(') /* ) */
+! nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE);
+ else if (ch == '{') /* } */
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-012.dpatch b/debian/patches/bash31-012.dpatch
new file mode 100755
index 0000000..0234702
--- /dev/null
+++ b/debian/patches/bash31-012.dpatch
@@ -0,0 +1,66 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-012
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-012
+
+Bug-Reported-by: Alexander Kshevetskiy <alex@dgap.mipt.ru>
+Bug-Reference-ID: <308374997.20060124175849@dgap.mipt.ru>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00097.html
+
+Bug-Description:
+
+There is a parsing problem involving parentheses in assignment statements
+that causes words to be terminated prematurely.
+
+Patch:
+
+*** ../bash-3.1/parse.y Fri Nov 11 23:14:18 2005
+--- parse.y Wed Jan 25 14:55:18 2006
+***************
+*** 3579,3583 ****
+ all_digit_token = 0;
+ compound_assignment = 1;
+! #if 0
+ goto next_character;
+ #else
+--- 3584,3588 ----
+ all_digit_token = 0;
+ compound_assignment = 1;
+! #if 1
+ goto next_character;
+ #else
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 12
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-013.dpatch b/debian/patches/bash31-013.dpatch
new file mode 100755
index 0000000..b64cfc1
--- /dev/null
+++ b/debian/patches/bash31-013.dpatch
@@ -0,0 +1,63 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-013
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-013
+
+Bug-Reported-by: Bob Rossi <bob@brasko.net>
+Bug-Reference-ID: <43F60606.80708@case.edu>
+Bug-Reference-URL:
+
+Bug-Description:
+
+In some cases, readline will reference freed memory when attempting to
+display a portion of the prompt.
+
+Patch:
+
+*** ../bash-3.1-patched/lib/readline/readline.c Mon Jul 4 22:29:35 2005
+--- lib/readline/readline.c Fri Feb 17 22:54:22 2006
+***************
+*** 282,287 ****
+--- 282,288 ----
+ {
+ FREE (rl_prompt);
+ rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
++ rl_display_prompt = rl_prompt ? rl_prompt : "";
+
+ rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
+ return 0;
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 12
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-014.dpatch b/debian/patches/bash31-014.dpatch
new file mode 100755
index 0000000..6bf598d
--- /dev/null
+++ b/debian/patches/bash31-014.dpatch
@@ -0,0 +1,124 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-014
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-014
+
+Bug-Reported-by: Mike Stroyan <mike.stroyan@hp.com>
+Bug-Reference-ID: <20060203191607.GC27614@localhost>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00004.html
+
+Bug-Description:
+
+The displayed search prompt is corrupted when using non-incremental
+searches in vi and emacs mode if the prompt contains non-printing
+characters or spans multiple lines. The prompt is expanded more than
+once; the second time without the escape sequences that protect non-
+printing characters from the length calculations.
+
+Patch:
+
+*** ../bash-3.1-patched/lib/readline/display.c Wed Nov 30 14:05:02 2005
+--- lib/readline/display.c Sat Feb 18 12:14:58 2006
+***************
+*** 1983,1993 ****
+ int pchar;
+ {
+ int len;
+! char *pmt;
+
+ rl_save_prompt ();
+
+! if (saved_local_prompt == 0)
+ {
+ len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+--- 1998,2012 ----
+ int pchar;
+ {
+ int len;
+! char *pmt, *p;
+
+ rl_save_prompt ();
+
+! /* We've saved the prompt, and can do anything with the various prompt
+! strings we need before they're restored. We want the unexpanded
+! portion of the prompt string after any final newline. */
+! p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+! if (p == 0)
+ {
+ len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+***************
+*** 1998,2016 ****
+ }
+ else
+ {
+! len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+ if (len)
+! strcpy (pmt, saved_local_prompt);
+ pmt[len] = pchar;
+ pmt[len+1] = '\0';
+! local_prompt = savestring (pmt);
+! prompt_last_invisible = saved_last_invisible;
+! prompt_visible_length = saved_visible_length + 1;
+! }
+
+ prompt_physical_chars = saved_physical_chars + 1;
+-
+ return pmt;
+ }
+
+--- 2017,2033 ----
+ }
+ else
+ {
+! p++;
+! len = strlen (p);
+ pmt = (char *)xmalloc (len + 2);
+ if (len)
+! strcpy (pmt, p);
+ pmt[len] = pchar;
+ pmt[len+1] = '\0';
+! }
+
++ /* will be overwritten by expand_prompt, called from rl_message */
+ prompt_physical_chars = saved_physical_chars + 1;
+ return pmt;
+ }
+
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-015.dpatch b/debian/patches/bash31-015.dpatch
new file mode 100755
index 0000000..f196e20
--- /dev/null
+++ b/debian/patches/bash31-015.dpatch
@@ -0,0 +1,125 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-015
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-015
+
+Bug-Reported-by: Benoit Vila
+Bug-Reference-ID: <43FCA614.1090108@free.fr>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00058.html
+
+Bug-Description:
+
+A problem with the extended globbing code prevented dots from matching
+filenames when used in some extended matching patterns.
+
+Patch:
+
+*** ../bash-3.1-patched/lib/glob/sm_loop.c Sun Oct 16 21:21:04 2005
+--- lib/glob/sm_loop.c Mon Feb 27 17:18:43 2006
+***************
+*** 639,643 ****
+ CHAR *pnext; /* pointer to next sub-pattern */
+ CHAR *srest; /* pointer to rest of string */
+! int m1, m2;
+
+ #if DEBUG_MATCHING
+--- 638,642 ----
+ CHAR *pnext; /* pointer to next sub-pattern */
+ CHAR *srest; /* pointer to rest of string */
+! int m1, m2, xflags; /* xflags = flags passed to recursive matches */
+
+ #if DEBUG_MATCHING
+***************
+*** 645,648 ****
+--- 644,648 ----
+ fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se);
+ fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe);
++ fprintf(stderr, "extmatch: flags = %d\n", flags);
+ #endif
+
+***************
+*** 678,683 ****
+ multiple matches of the pattern. */
+ if (m1)
+! m2 = (GMATCH (srest, se, prest, pe, flags) == 0) ||
+! (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0);
+ if (m1 && m2)
+ return (0);
+--- 678,687 ----
+ multiple matches of the pattern. */
+ if (m1)
+! {
+! /* if srest > s, we are not at start of string */
+! xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+! m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) ||
+! (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0);
+! }
+ if (m1 && m2)
+ return (0);
+***************
+*** 705,710 ****
+ for ( ; srest <= se; srest++)
+ {
+ if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 &&
+! GMATCH (srest, se, prest, pe, flags) == 0)
+ return (0);
+ }
+--- 709,716 ----
+ for ( ; srest <= se; srest++)
+ {
++ /* if srest > s, we are not at start of string */
++ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 &&
+! GMATCH (srest, se, prest, pe, xflags) == 0)
+ return (0);
+ }
+***************
+*** 727,731 ****
+ break;
+ }
+! if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0)
+ return (0);
+ }
+--- 733,739 ----
+ break;
+ }
+! /* if srest > s, we are not at start of string */
+! xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+! if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0)
+ return (0);
+ }
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-016.dpatch b/debian/patches/bash31-016.dpatch
new file mode 100755
index 0000000..ce7c18c
--- /dev/null
+++ b/debian/patches/bash31-016.dpatch
@@ -0,0 +1,70 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-016
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-016
+
+Bug-Reported-by: Nikita Danilov <nikita@clusterfs.com>
+Bug-Reference-ID: <17397.51015.769854.541057@gargle.gargle.HOWL>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00064.html
+
+Bug-Description:
+
+Bash will dump core when attempting to perform globbing in directories with
+very large numbers of files.
+
+Patch:
+
+*** ../bash-3.1-patched/lib/glob/glob.c Thu Mar 24 12:42:27 2005
+--- lib/glob/glob.c Fri Mar 3 16:54:12 2006
+***************
+*** 361,364 ****
+--- 361,365 ----
+
+ firstmalloc = 0;
++ nalloca = 0;
+
+ /* If PAT is empty, skip the loop, but return one (empty) filename. */
+***************
+*** 547,550 ****
+--- 551,556 ----
+ tmplink = lastlink;
+ }
++ else
++ tmplink = 0;
+ free (lastlink->name);
+ lastlink = lastlink->next;
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 16
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bash31-017.dpatch b/debian/patches/bash31-017.dpatch
new file mode 100755
index 0000000..19c9143
--- /dev/null
+++ b/debian/patches/bash31-017.dpatch
@@ -0,0 +1,150 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Upstream patch bash31-017
+
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.1
+Patch-ID: bash31-017
+
+Bug-Reported-by: syphir@syphir.sytes.net
+Bug-Reference-ID: <442421F5.3010105@syphir.sytes.net>
+Bug-Reference-URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358831
+
+Bug-Description:
+
+Array expansion fails with an arithmetic syntax error when the subscript
+appears within double quotes. For example: ${a["4"]}.
+
+Patch:
+
+*** ../bash-3.1-patched/subst.c Wed Apr 12 08:47:08 2006
+--- subst.c Wed Apr 12 08:49:02 2006
+***************
+*** 2576,2579 ****
+--- 2576,2586 ----
+ }
+
++ char *
++ expand_arith_string (string, quoted)
++ char *string;
++ {
++ return (expand_string_if_necessary (string, quoted, expand_string));
++ }
++
+ #if defined (COND_COMMAND)
+ /* Just remove backslashes in STRING. Returns a new string. */
+***************
+*** 5249,5253 ****
+ t = (char *)0;
+
+! temp1 = expand_string_if_necessary (substr, Q_DOUBLE_QUOTES, expand_string);
+ *e1p = evalexp (temp1, &expok);
+ free (temp1);
+--- 5256,5260 ----
+ t = (char *)0;
+
+! temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES);
+ *e1p = evalexp (temp1, &expok);
+ free (temp1);
+***************
+*** 5294,5298 ****
+ t++;
+ temp2 = savestring (t);
+! temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
+ free (temp2);
+ t[-1] = ':';
+--- 5301,5305 ----
+ t++;
+ temp2 = savestring (t);
+! temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
+ free (temp2);
+ t[-1] = ':';
+***************
+*** 6436,6440 ****
+
+ /* Expand variables found inside the expression. */
+! temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
+ free (temp2);
+
+--- 6443,6447 ----
+
+ /* Expand variables found inside the expression. */
+! temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
+ free (temp2);
+
+***************
+*** 6478,6482 ****
+
+ /* Do initial variable expansion. */
+! temp1 = expand_string_if_necessary (temp, Q_DOUBLE_QUOTES, expand_string);
+
+ goto arithsub;
+--- 6485,6489 ----
+
+ /* Do initial variable expansion. */
+! temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES);
+
+ goto arithsub;
+*** ../bash-3.1-patched/subst.h Sun Nov 7 15:12:28 2004
+--- subst.h Mon Mar 27 09:10:38 2006
+***************
+*** 152,155 ****
+--- 152,158 ----
+ extern char *expand_assignment_string_to_string __P((char *, int));
+
++ /* Expand an arithmetic expression string */
++ extern char *expand_arith_string __P((char *, int));
++
+ /* De-quoted quoted characters in STRING. */
+ extern char *dequote_string __P((char *));
+*** ../bash-3.1-patched/arrayfunc.c Mon Jul 4 20:25:58 2005
+--- arrayfunc.c Mon Mar 27 09:10:47 2006
+***************
+*** 593,601 ****
+ strncpy (exp, s, len - 1);
+ exp[len - 1] = '\0';
+! #if 0
+! t = expand_string_to_string (exp, 0);
+! #else
+! t = expand_string_to_string (exp, Q_DOUBLE_QUOTES);
+! #endif
+ this_command_name = (char *)NULL;
+ val = evalexp (t, &expok);
+--- 591,595 ----
+ strncpy (exp, s, len - 1);
+ exp[len - 1] = '\0';
+! t = expand_arith_string (exp, 0);
+ this_command_name = (char *)NULL;
+ val = evalexp (t, &expok);
+*** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
+--- patchlevel.h Wed Dec 7 13:48:42 2005
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 16
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 17
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/debian/patches/bashbug-editor.dpatch b/debian/patches/bashbug-editor.dpatch
new file mode 100755
index 0000000..cb52ebd
--- /dev/null
+++ b/debian/patches/bashbug-editor.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: send bug reports to Debian bash maintainer too.
+
+diff -urb bash.orig/support/bashbug.sh bash/support/bashbug.sh
+--- bash.orig/support/bashbug.sh 2002-04-16 23:15:15.000000000 +0200
++++ bash/support/bashbug.sh 2003-09-27 23:35:04.000000000 +0200
+@@ -134,6 +134,7 @@
+ esac ;;
+ esac
+
++BUGBASH="${BUGBASH},bash@packages.debian.org"
+ BUGADDR="${1-$BUGBASH}"
+
+ if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
+Only in bash/support: bashbug.sh.orig
diff --git a/debian/patches/bashdb-updates.dpatch b/debian/patches/bashdb-updates.dpatch
new file mode 100644
index 0000000..13a6b24
--- /dev/null
+++ b/debian/patches/bashdb-updates.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh -e
+
+dir=.
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir=$3
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ cd $dir && autoconf
+ ;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Debian updates to bashdb
+
diff --git a/debian/patches/bashdb.dpatch b/debian/patches/bashdb.dpatch
new file mode 100644
index 0000000..7a330d1
--- /dev/null
+++ b/debian/patches/bashdb.dpatch
@@ -0,0 +1,56 @@
+#! /bin/sh -e
+
+dir=.
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir=$3
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ rm -f $dir/aclocal.m4
+ rm -f $dir/configure
+ rm -f $dir/doc/bashref.info
+ rm -f $dir/examples/bashdb/bashdb.el
+ rm -f $dir/lib/readline/doc/Makefile
+ rm -f $dir/parser-built
+ rm -f $dir/pathnames.h
+ rm -f $dir/y.tab.[ch]
+ (cd $dir && aclocal -I . -I debugger)
+ (cd $dir && autoconf)
+ for i in config.guess config.sub elisp-comp install-sh \
+ missing mkinstalldirs
+ do
+ cp -p /usr/share/automake-1.7/$i $dir/debugger/
+ done
+ for i in mdate-sh texinfo.tex; do
+ cp -p /usr/share/automake-1.7/$i $dir/debugger/doc/
+ done
+ (cd $dir/debugger && aclocal -I ..)
+ cp -p $dir/debugger/elisp-comp $dir/debugger/emacs/.
+ (cd $dir/debugger && automake)
+ (cd $dir/debugger && autoconf)
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# how to construct this file:
+# - unpack the upstream bash source
+# - unpack the bashdb source
+# - apply bash the seven bash upstream patches
+# - diff -ur --unidirectional-new-file \
+ --exclude CVS --exclude=.cvsignore --exclude=/db/ \
+# bash-2.05b bashdb
+
+# DP: bashdb changes
+
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/ChangeLog cvs/ChangeLog
diff --git a/debian/patches/command-not-found-doc.dpatch b/debian/patches/command-not-found-doc.dpatch
new file mode 100644
index 0000000..2ec9a23
--- /dev/null
+++ b/debian/patches/command-not-found-doc.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Add command_not_found_handle in interactive non POSIX mode
+
+--- bash/doc/bashref.texi~ 2004-06-26 20:26:07.000000000 +0200
++++ bash/doc/bashref.texi 2004-08-28 15:06:27.000000000 +0200
+@@ -4734,6 +4734,13 @@
+ @item UID
+ The numeric real user id of the current user. This variable is readonly.
+
++@item command_not_found_handle
++The name of a shell function to be called if a command cannot be
++found. The return value of this function should be 0, if the command
++is available after execution of the function, otherwise 127 (EX_NOTFOUND).
++Enabled only in interactive, non POSIX mode shells. This is a Debian
++extension.
++
+ @end vtable
+
+ @node Bash Features
diff --git a/debian/patches/command-not-found.dpatch b/debian/patches/command-not-found.dpatch
new file mode 100755
index 0000000..b1feb22
--- /dev/null
+++ b/debian/patches/command-not-found.dpatch
@@ -0,0 +1,66 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Add command_not_found_handle in interactive non POSIX mode
+
+--- bash/execute_cmd.c~ 2004-08-28 14:43:04.000000000 +0200
++++ bash/execute_cmd.c 2004-08-28 14:54:57.000000000 +0200
+@@ -3615,8 +3615,26 @@
+
+ if (command == 0)
+ {
+- internal_error (_("%s: command not found"), pathname);
+- exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
++ SHELL_VAR *f, *v;
++ WORD_LIST *cmdlist;
++ WORD_DESC *w;
++ int fval;
++ if( (posixly_correct || interactive_shell == 0) ||
++ (f = find_function ("command_not_found_handle")) == 0)
++ {
++ internal_error (_("%s: command not found"), pathname);
++ exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
++ }
++ w = make_word("command_not_found_handle");
++ cmdlist = make_word_list(w, (WORD_LIST*)NULL);
++
++ w = make_word(pathname);
++ cmdlist->next = make_word_list(w, (WORD_LIST*)NULL);
++
++ fval = execute_shell_function (f, cmdlist);
++ if (fval == EX_NOTFOUND)
++ internal_error (_("%s: command not found"), pathname);
++ exit(fval);
+ }
+
+ /* Execve expects the command name to be in args[0]. So we
+--- bash/doc/bash.1~ 2004-08-06 08:01:10.000000000 +0200
++++ bash/doc/bash.1 2004-08-28 15:03:13.000000000 +0200
+@@ -1972,6 +1972,13 @@
+ .B %
+ job identifier.
+ .TP
++.B command_not_found_handle
++The name of a shell function to be called if a command cannot be
++found. The return value of this function should be 0, if the command
++is available after execution of the function, otherwise 127 (EX_NOTFOUND).
++Enabled only in interactive, non POSIX mode shells. This is a Debian
++extension.
++.TP
+ .B histchars
+ The two or three characters which control history expansion
+ and tokenization (see
diff --git a/debian/patches/deb-bash-config.dpatch b/debian/patches/deb-bash-config.dpatch
new file mode 100755
index 0000000..1aa1e45
--- /dev/null
+++ b/debian/patches/deb-bash-config.dpatch
@@ -0,0 +1,81 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Changed compile time configuration options:
+# DP:
+# DP: - Set the default path to comply with Debian policy
+# DP:
+# DP: - Enable System-wide .bashrc file for interactive shells.
+# DP:
+# DP: - Enable System-wide .bash.logout file for interactive shells.
+# DP:
+# DP: - make non-interactive shells begun with argv[0][0] == '-'
+# DP: run the startup files when not in posix mode.
+# DP:
+# DP: - try to check whether bash is being run by sshd and source
+# DP: the .bashrc if so (like the rshd behavior).
+# DP:
+# DP: - don't define a default DEFAULT_MAIL_DIRECTORY, because it
+# DP: can cause a timeout on NFS mounts.
+
+--- bash/config-bot.h~ 2003-09-19 21:57:38.000000000 +0200
++++ bash/config-bot.h 2003-10-09 21:06:01.000000000 +0200
+@@ -178,4 +178,4 @@
+ /******************************************************************/
+
+ /* If you don't want bash to provide a default mail file to check. */
+-/* #undef DEFAULT_MAIL_DIRECTORY */
++#undef DEFAULT_MAIL_DIRECTORY
+--- bash-3.1-alpha1/config-top.h 2005-04-29 20:36:34.000000000 +0000
++++ bash/config-top.h 2005-09-09 19:26:41.923569456 +0000
+@@ -52,14 +52,14 @@
+ /* The default value of the PATH variable. */
+ #ifndef DEFAULT_PATH_VALUE
+ #define DEFAULT_PATH_VALUE \
+- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
++ "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ #endif
+
+ /* The value for PATH when invoking `command -p'. This is only used when
+ the Posix.2 confstr () function, or CS_PATH define are not present. */
+ #ifndef STANDARD_UTILS_PATH
+ #define STANDARD_UTILS_PATH \
+- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
++ "/bin:/usr/bin:/sbin:/usr/sbin"
+ #endif
+
+ /* Default primary and secondary prompt strings. */
+@@ -73,15 +73,15 @@
+ #define KSH_COMPATIBLE_SELECT
+
+ /* System-wide .bashrc file for interactive shells. */
+-/* #define SYS_BASHRC "/etc/bash.bashrc" */
++#define SYS_BASHRC "/etc/bash.bashrc"
+
+ /* System-wide .bash_logout for login shells. */
+-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
++#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
+
+ /* Define this to make non-interactive shells begun with argv[0][0] == '-'
+ run the startup files when not in posix mode. */
+-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
++#define NON_INTERACTIVE_LOGIN_SHELLS
+
+ /* Define this if you want bash to try to check whether it's being run by
+ sshd and source the .bashrc if so (like the rshd behavior). */
+-/* #define SSH_SOURCE_BASHRC */
++#define SSH_SOURCE_BASHRC
diff --git a/debian/patches/deb-examples.dpatch b/debian/patches/deb-examples.dpatch
new file mode 100755
index 0000000..f41d553
--- /dev/null
+++ b/debian/patches/deb-examples.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: document readline header location on Debian systems
+
+diff -u ./examples/loadables/README.orig ./examples/loadables/README
+--- ./examples/loadables/README.orig Thu May 7 20:31:34 1998
++++ ./examples/loadables/README Thu Nov 11 20:32:57 1999
+@@ -31,3 +31,6 @@
+ the canonical example. There is no real `builtin writers' programming
+ guide'. The file template.c provides a template to use for creating
+ new loadable builtins.
++
++On Debian GNU/Linux systems, the bash headers are in /usr/include/bash.
++The appropriate options are already set in the example Makefile.
+
diff --git a/debian/patches/input-err.dpatch b/debian/patches/input-err.dpatch
new file mode 100755
index 0000000..8fb93d7
--- /dev/null
+++ b/debian/patches/input-err.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Define PGRP_PIPE to avoid race condition.
+
+--- input.c~ 2005-07-14 13:29:08.000000000 +0100
++++ input.c 2006-04-05 14:51:50.000000000 +0100
+@@ -454,7 +454,7 @@
+ if (nr == 0)
+ bp->b_flag |= B_EOF;
+ else
+- bp->b_flag |= B_ERROR;
++ fatal_error("error reading input file: %s", strerror(errno));
+ return (EOF);
+ }
+
diff --git a/debian/patches/login-shell.dpatch b/debian/patches/login-shell.dpatch
new file mode 100755
index 0000000..7900801
--- /dev/null
+++ b/debian/patches/login-shell.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: * Recognize 'exec -l /bin/bash' as login shell.
+
+--- shell.c.orig 2006-03-03 23:15:17.178734888 +0100
++++ shell.c 2006-03-03 23:44:01.556589608 +0100
+@@ -1533,9 +1533,10 @@
+ any startup files; just try to be more like /bin/sh. */
+ shell_name = argv0 ? base_pathname (argv0) : PROGRAM;
+
+- if (*shell_name == '-')
++ if (argv0 && *argv0 == '-')
+ {
+- shell_name++;
++ if (*shell_name == '-')
++ shell_name++;
+ login_shell++;
+ }
+
diff --git a/debian/patches/man-arithmetic.dpatch b/debian/patches/man-arithmetic.dpatch
new file mode 100755
index 0000000..1178ce8
--- /dev/null
+++ b/debian/patches/man-arithmetic.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: document deprecated syntax for arithmetic evaluation.
+
+diff -urb bash.orig/doc/bash.1 bash/doc/bash.1
+--- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200
++++ bash/doc/bash.1 2003-09-28 00:24:17.000000000 +0200
+@@ -2533,6 +2533,9 @@
+ \fB$((\fP\fIexpression\fP\fB))\fP
+ .RE
+ .PP
++The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will
++be removed in upcoming versions of bash.
++.PP
+ The
+ .I expression
+ is treated as if it were within double quotes, but a double quote
diff --git a/debian/patches/man-bashlogout.dpatch b/debian/patches/man-bashlogout.dpatch
new file mode 100755
index 0000000..9a3f3c1
--- /dev/null
+++ b/debian/patches/man-bashlogout.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: document /etc/bash.bashrc in bash man page
+
+--- bash/doc/bash.1~ 2004-06-19 15:53:01.000000000 +0200
++++ bash/doc/bash.1 2004-06-19 15:53:57.000000000 +0200
+@@ -8283,6 +8283,9 @@
+ .FN /etc/bash.bashrc
+ The systemwide per-interactive-shell startup file
+ .TP
++.FN /etc/bash.logout
++The systemwide login shell cleanup file, executed when a login shell exits
++.TP
+ .FN ~/.bash_profile
+ The personal initialization file, executed for login shells
+ .TP
diff --git a/debian/patches/man-bashrc.dpatch b/debian/patches/man-bashrc.dpatch
new file mode 100755
index 0000000..3e80ef1
--- /dev/null
+++ b/debian/patches/man-bashrc.dpatch
@@ -0,0 +1,81 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: document /etc/bash.bashrc in bash man page
+
+--- bash/doc/bash.1~ 2003-11-11 00:09:34.000000000 +0100
++++ bash/doc/bash.1 2004-01-21 07:33:45.000000000 +0100
+@@ -169,7 +169,9 @@
+ .PD
+ Execute commands from
+ .I file
+-instead of the standard personal initialization file
++instead of the system wide initialization file
++.I /etc/bash.bashrc
++and the standard personal initialization file
+ .I ~/.bashrc
+ if the shell is interactive (see
+ .SM
+@@ -200,7 +202,9 @@
+ below).
+ .TP
+ .B \-\-norc
+-Do not read and execute the personal initialization file
++Do not read and execute the system wide initialization file
++.I /etc/bash.bashrc
++and the personal initialization file
+ .I ~/.bashrc
+ if the shell is interactive.
+ This option is on by default if the shell is invoked as
+@@ -308,13 +312,15 @@
+ .PP
+ When an interactive shell that is not a login shell is started,
+ .B bash
+-reads and executes commands from \fI~/.bashrc\fP, if that file exists.
++reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
++if these files exist.
+ This may be inhibited by using the
+ .B \-\-norc
+ option.
+ The \fB\-\-rcfile\fP \fIfile\fP option will force
+ .B bash
+-to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
++to read and execute commands from \fIfile\fP instead of
++\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP.
+ .PP
+ When
+ .B bash
+@@ -399,7 +405,8 @@
+ If
+ .B bash
+ determines it is being run by \fIrshd\fP, it reads and executes
+-commands from \fI~/.bashrc\fP, if that file exists and is readable.
++commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
++if these files exist and are readable.
+ It will not do this if invoked as \fBsh\fP.
+ The
+ .B \-\-norc
+@@ -8273,6 +8280,9 @@
+ .FN /etc/profile
+ The systemwide initialization file, executed for login shells
+ .TP
++.FN /etc/bash.bashrc
++The systemwide per-interactive-shell startup file
++.TP
+ .FN ~/.bash_profile
+ The personal initialization file, executed for login shells
+ .TP
diff --git a/debian/patches/man-builtin.dpatch b/debian/patches/man-builtin.dpatch
new file mode 100644
index 0000000..6abaef8
--- /dev/null
+++ b/debian/patches/man-builtin.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: fix man page include
+
+--- doc/builtins.1~ Mon Nov 29 22:30:13 1999
++++ doc/builtins.1 Tue Aug 1 21:54:06 2000
+@@ -10,6 +10,6 @@
+ ulimit, umask, unalias, unset, until, wait, while \- bash built-in commands, see \fBbash\fR(1)
+ .SH BASH BUILTIN COMMANDS
+ .nr zZ 1
+-.so bash.1
++.so /usr/share/man/man1/bash.1
+ .SH SEE ALSO
+ bash(1), sh(1)
diff --git a/debian/patches/man-fignore.dpatch b/debian/patches/man-fignore.dpatch
new file mode 100755
index 0000000..cd005bc
--- /dev/null
+++ b/debian/patches/man-fignore.dpatch
@@ -0,0 +1,33 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: bash(1): mention quoting when assigning to FIGNORE
+
+diff -urb bash.orig/doc/bash.1 bash/doc/bash.1
+--- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200
++++ bash/doc/bash.1 2003-09-28 00:25:21.000000000 +0200
+@@ -1584,7 +1584,9 @@
+ is excluded from the list of matched filenames.
+ A sample value is
+ .if t \f(CW".o:~"\fP.
+-.if n ".o:~".
++.if n ".o:~"
++(Quoting is needed when assigning a value to this variable,
++which contains tildes).
+ .TP
+ .B GLOBIGNORE
+ A colon-separated list of patterns defining the set of filenames to
diff --git a/debian/patches/man-net-redirections-doc.dpatch b/debian/patches/man-net-redirections-doc.dpatch
new file mode 100644
index 0000000..3cc49de
--- /dev/null
+++ b/debian/patches/man-net-redirections-doc.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Document, that bash is configured using --disable-net-redirections.
+
+--- bash/doc/bashref.texi~ 2005-09-09 22:08:10.865192816 +0200
++++ bash/doc/bashref.texi 2005-09-10 11:42:51.805867224 +0200
+@@ -2025,6 +2025,9 @@
+ is an integer port number or service name, Bash attempts to open a UDP
+ connection to the corresponding socket.
+
++NOTE: @code{Bash}, as packaged for Debian, does not support using the
++@file{/dev/tcp} and @file{/dev/udp} files.
++
+ @end table
+
+ A failure to open or create a file causes the redirection to fail.
diff --git a/debian/patches/man-net-redirections.dpatch b/debian/patches/man-net-redirections.dpatch
new file mode 100755
index 0000000..1bee4b1
--- /dev/null
+++ b/debian/patches/man-net-redirections.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Document, that bash is configured using --disable-net-redirections.
+
+--- bash/doc/bash.1~ 2005-09-09 22:08:10.833197680 +0200
++++ bash/doc/bash.1 2005-09-10 11:47:57.694365104 +0200
+@@ -3033,6 +3033,9 @@
+ .PD
+ .RE
+ .PP
++\fBNOTE:\fP Bash, as packaged for Debian, does \fBnot\fP support using
++the \fB/dev/tcp\fP and \fB/dev/udp\fP files.
++.PP
+ A failure to open or create a file causes the redirection to fail.
+ .PP
+ Redirections using file descriptors greater than 9 should be used with
diff --git a/debian/patches/man-nocaseglob.dpatch b/debian/patches/man-nocaseglob.dpatch
new file mode 100755
index 0000000..6176a53
--- /dev/null
+++ b/debian/patches/man-nocaseglob.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Clarify documentation about case-insensitive pathname expansion
+
+--- bash/doc/bash.1~ 2004-08-28 18:25:23.000000000 +0200
++++ bash/doc/bash.1 2004-08-28 19:13:24.000000000 +0200
+@@ -2690,6 +2690,10 @@
+ .B nocaseglob
+ is enabled, the match is performed without regard to the case
+ of alphabetic characters.
++Note that when using range expressions like
++[a-z] (see below), letters of the other case may be included,
++depending on the setting of
++.B LC_COLLATE.
+ When a pattern is used for pathname expansion,
+ the character
+ .B ``.''
diff --git a/debian/patches/man-substring-exp-doc.dpatch b/debian/patches/man-substring-exp-doc.dpatch
new file mode 100644
index 0000000..c6cdf58
--- /dev/null
+++ b/debian/patches/man-substring-exp-doc.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Clarify documentation about substring expansion
+
+--- bash/doc/bashref.texi~ 2004-08-28 15:10:17.000000000 +0200
++++ bash/doc/bashref.texi 2004-08-28 18:27:16.000000000 +0200
+@@ -1575,6 +1575,9 @@
+ @var{length} must evaluate to a number greater than or equal to zero.
+ If @var{offset} evaluates to a number less than zero, the value
+ is used as an offset from the end of the value of @var{parameter}.
++Arithmetic expressions starting with a - must be separated by whitespace
++from the preceding : to be
++distinguished from the $@{@var{parameter}:@minus{}@var{word}@} expansion.
+ If @var{parameter} is @samp{@@}, the result is @var{length} positional
+ parameters beginning at @var{offset}.
+ If @var{parameter} is an array name indexed by @samp{@@} or @samp{*},
diff --git a/debian/patches/man-substring-exp.dpatch b/debian/patches/man-substring-exp.dpatch
new file mode 100755
index 0000000..8cfaece
--- /dev/null
+++ b/debian/patches/man-substring-exp.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Clarify documentation about substring expansion
+
+--- bash/doc/bash.1~ 2004-08-28 15:10:17.000000000 +0200
++++ bash/doc/bash.1 2004-08-28 18:25:23.000000000 +0200
+@@ -2356,6 +2356,9 @@
+ \fIlength\fP must evaluate to a number greater than or equal to zero.
+ If \fIoffset\fP evaluates to a number less than zero, the value
+ is used as an offset from the end of the value of \fIparameter\fP.
++Arithmetic expressions starting with a - must be separated by whitespace
++from the preceding : to be
++distinguished from the \fBUse Default Values\fP expansion.
+ If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional
+ parameters beginning at \fIoffset\fP.
+ If \fIparameter\fP is an array name indexed by @ or *,
diff --git a/debian/patches/man-test.dpatch b/debian/patches/man-test.dpatch
new file mode 100755
index 0000000..9382b35
--- /dev/null
+++ b/debian/patches/man-test.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: document conditional file expressions acting on the target of
+# DP: symbolic links as well (except -h, -L).
+
+--- builtins/test.def~ 2002-04-04 21:48:17.000000000 +0200
++++ builtins/test.def 2004-10-16 19:51:24.000000000 +0200
+@@ -60,6 +60,9 @@
+
+ FILE1 -ef FILE2 True if file1 is a hard link to file2.
+
++All file operators except -h and -L are acting on the target of a symbolic
++link, not on the symlink itself, if FILE is a symbolic link.
++
+ String operators:
+
+ -z STRING True if string is empty.
diff --git a/debian/patches/man-test2-doc.dpatch b/debian/patches/man-test2-doc.dpatch
new file mode 100644
index 0000000..6ddb253
--- /dev/null
+++ b/debian/patches/man-test2-doc.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Doucment handling of paramters of the test builtin.
+
+--- doc/bashref.texi~ 2005-09-09 19:51:31.150172600 +0000
++++ doc/bashref.texi 2005-09-09 19:52:12.693857000 +0000
+@@ -5264,6 +5264,10 @@
+ Unless otherwise specified, primaries that operate on files follow symbolic
+ links and operate on the target of the link, rather than the link itself.
+
++See the description of the @code{test} builtin command (section
++@pxref{Bash Builtins} below) for the handling of parameters
++(i.e. missing parameters).
++
+ @table @code
+ @item -a @var{file}
+ True if @var{file} exists.
diff --git a/debian/patches/man-test2.dpatch b/debian/patches/man-test2.dpatch
new file mode 100755
index 0000000..32a9115
--- /dev/null
+++ b/debian/patches/man-test2.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Doucment handling of paramters of the test builtin.
+
+--- builtins/test.def~ 2004-10-17 17:04:56.000000000 +0200
++++ builtins/test.def 2004-10-17 17:19:38.000000000 +0200
+@@ -92,6 +92,9 @@
+ Arithmetic binary operators return true if ARG1 is equal, not-equal,
+ less-than, less-than-or-equal, greater-than, or greater-than-or-equal
+ than ARG2.
++
++See the bash manual page bash(1) for the handling of parameters (i.e.
++missing parameters).
+ $END
+
+ $BUILTIN [
+--- doc/bash.1~ 2005-09-09 19:43:43.298296896 +0000
++++ doc/bash.1 2005-09-09 19:46:26.359507824 +0000
+@@ -3551,6 +3551,10 @@
+ .PP
+ Unless otherwise specified, primaries that operate on files follow symbolic
+ links and operate on the target of the link, rather than the link itself.
++.PP
++See the description of the \fItest\fP builtin command (section SHELL
++BUILTIN COMMANDS below) for the handling of parameters (i.e.
++missing parameters).
+ .sp 1
+ .PD 0
+ .TP
diff --git a/debian/patches/man-typos.dpatch b/debian/patches/man-typos.dpatch
new file mode 100755
index 0000000..7220abd
--- /dev/null
+++ b/debian/patches/man-typos.dpatch
@@ -0,0 +1,36 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Fix typos in man page.
+
+--- ./doc/bash.1 2006-03-22 19:23:19.000000000 -0500
++++ ./doc/bash.1 2006-04-01 03:58:35.000000000 -0500
+@@ -815,10 +815,10 @@
+ .B Pathname Expansion
+ below).
+ The \fIword\fP is expanded using tilde
+-expansion, parameter and variable expansion, arithmetic substituion,
++expansion, parameter and variable expansion, arithmetic substitution,
+ command substitution, process substitution and quote removal.
+ Each \fIpattern\fP examined is expanded using tilde
+-expansion, parameter and variable expansion, arithmetic substituion,
++expansion, parameter and variable expansion, arithmetic substitution,
+ command substitution, and process substitution.
+ If the shell option
+ .B nocasematch
+
+
diff --git a/debian/patches/man-vx-opts.dpatch b/debian/patches/man-vx-opts.dpatch
new file mode 100644
index 0000000..e85b350
--- /dev/null
+++ b/debian/patches/man-vx-opts.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: document -v / -x options
+
+--- ./doc/bash.1~ Wed Jan 20 22:48:04 1999
++++ ./doc/bash.1 Sun Nov 14 13:26:59 1999
+@@ -104,6 +104,12 @@
+ This option allows the positional parameters to be set
+ when invoking an interactive shell.
+ .TP
++.B \-v
++Print shell input lines as they are read.
++.TP
++.B \-x
++Print commands and their arguments as they are executed.
++.TP
+ .B \-D
+ A list of all double-quoted strings preceded by \fB$\fP
+ is printed on the standard ouput.
diff --git a/debian/patches/pgrp-pipe.dpatch b/debian/patches/pgrp-pipe.dpatch
new file mode 100755
index 0000000..21e9f3e
--- /dev/null
+++ b/debian/patches/pgrp-pipe.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Define PGRP_PIPE to avoid race condition.
+
+--- config-bot.h 2004-03-19 17:56:23.000000000 -0500
++++ config-bot.h 2005-09-16 14:32:33.000000000 -0400
+@@ -179,3 +179,6 @@
+
+ /* If you don't want bash to provide a default mail file to check. */
+ #undef DEFAULT_MAIL_DIRECTORY
++
++/* Bug #224543 */
++#define PGRP_PIPE 1
+
diff --git a/debian/patches/po-sv.dpatch b/debian/patches/po-sv.dpatch
new file mode 100755
index 0000000..093f682
--- /dev/null
+++ b/debian/patches/po-sv.dpatch
@@ -0,0 +1,4206 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: swedish message strings
+
+--- bash/po.old/LINGUAS 2003-12-10 16:58:17.000000000 +0000
++++ bash/po/LINGUAS 2006-03-03 23:10:50.879935272 +0000
+@@ -1,2 +1,3 @@
+ # Set of available languages.
+ en@quot en@boldquot
++sv
+diff -urN bash/po.old/sv.po bash/po/sv.po
+--- bash/po.old/sv.po 1970-01-01 01:00:00.000000000 +0100
++++ bash/po/sv.po 2006-03-03 23:53:31.956875584 +0100
+@@ -0,0 +1,4177 @@
++# Swedish translation of bash.
++# Copyright (C) 2005 Free Software Foundation, Inc.
++# This file is distributed under the same license as the bash package.
++# Daniel Nylander <po@danielnylander.se>, 2005.
++#
++msgid ""
++msgstr ""
++"Project-Id-Version: bash 3.0\n"
++"Report-Msgid-Bugs-To: bug-bash@gnu.org\n"
++"POT-Creation-Date: 2003-12-22 15:34-0500\n"
++"PO-Revision-Date: 2005-12-28 16:48+0100\n"
++"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
++"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
++"MIME-Version: 1.0\n"
++"Content-Type: text/plain; charset=utf-8\n"
++"Content-Transfer-Encoding: 8bit\n"
++
++#: arrayfunc.c:45
++msgid "bad array subscript"
++msgstr ""
++
++#: arrayfunc.c:306
++#, c-format
++msgid "%s: cannot assign to non-numeric index"
++msgstr ""
++
++#: bashhist.c:321
++#, c-format
++msgid "%s: cannot create: %s"
++msgstr "%s: kan inte skapa: %s"
++
++#: bashline.c:2791
++msgid "bash_execute_unix_command: cannot find keymap for command"
++msgstr ""
++
++#: bashline.c:2840
++#, c-format
++msgid "%s: first non-whitespace character is not `\"'"
++msgstr ""
++
++#: bashline.c:2869
++#, c-format
++msgid "no closing `%c' in %s"
++msgstr ""
++
++#: bashline.c:2903
++#, c-format
++msgid "%s: missing colon separator"
++msgstr ""
++
++#: builtins/alias.def:123
++#, fuzzy, c-format
++msgid "`%s': invalid alias name"
++msgstr "Ogiltigt aliasnamn"
++
++#: builtins/bind.def:194
++#, c-format
++msgid "`%s': invalid keymap name"
++msgstr ""
++
++#: builtins/bind.def:233
++#, c-format
++msgid "%s: cannot read: %s"
++msgstr "%s: kan inte läsa: %s"
++
++#: builtins/bind.def:248
++#, c-format
++msgid "`%s': cannot unbind"
++msgstr ""
++
++#: builtins/bind.def:283
++#, c-format
++msgid "`%s': unknown function name"
++msgstr ""
++
++#: builtins/bind.def:291
++#, c-format
++msgid "%s is not bound to any keys.\n"
++msgstr ""
++
++#: builtins/bind.def:295
++#, fuzzy, c-format
++msgid "%s can be invoked via "
++msgstr "%s kan startas via %s."
++
++#: builtins/break.def:128
++msgid "only meaningful in a `for', `while', or `until' loop"
++msgstr ""
++
++#: builtins/caller.def:127
++#: builtins.c:320
++msgid "Returns the context of the current subroutine call."
++msgstr ""
++
++#: builtins/caller.def:129
++#: builtins.c:322
++msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
++msgstr ""
++
++#: builtins/caller.def:130
++#: builtins.c:323
++msgid "returns \"$line $subroutine $filename\"; this extra information"
++msgstr ""
++
++#: builtins/caller.def:131
++#: builtins.c:324
++msgid "can be used used to provide a stack trace."
++msgstr ""
++
++#: builtins/caller.def:133
++#: builtins.c:326
++msgid "The value of EXPR indicates how many call frames to go back before the"
++msgstr ""
++
++#: builtins/caller.def:134
++#: builtins.c:327
++msgid "current one; the top frame is frame 0."
++msgstr ""
++
++#: builtins/cd.def:188
++msgid "HOME not set"
++msgstr "HOME inte inställd"
++
++#: builtins/cd.def:200
++msgid "OLDPWD not set"
++msgstr ""
++
++#: builtins/cd.def:357
++#, c-format
++msgid "write error: %s"
++msgstr "skrivfel: %s"
++
++#: builtins/common.c:133
++#: test.c:921
++msgid "too many arguments"
++msgstr "för många argument"
++
++#: builtins/common.c:157
++#: shell.c:465
++#: shell.c:737
++#, c-format
++msgid "%s: option requires an argument"
++msgstr "%s: flagga kräver ett argument"
++
++#: builtins/common.c:164
++#, c-format
++msgid "%s: numeric argument required"
++msgstr ""
++
++#: builtins/common.c:171
++#, c-format
++msgid "%s: not found"
++msgstr "%s: inte funnen"
++
++#: builtins/common.c:180
++#: shell.c:750
++#, c-format
++msgid "%s: invalid option"
++msgstr "%s: ogiltig flagga"
++
++#: builtins/common.c:187
++#, c-format
++msgid "%s: invalid option name"
++msgstr "%s: ogiltigt flaggnamn"
++
++#: builtins/common.c:194
++#: general.c:229
++#: general.c:234
++#, c-format
++msgid "`%s': not a valid identifier"
++msgstr "\"%s\": inte en giltig identifierare"
++
++#: builtins/common.c:201
++#, c-format
++msgid "%s: invalid number"
++msgstr "%s: ogiltigt nummer"
++
++#: builtins/common.c:208
++#, c-format
++msgid "%s: invalid signal specification"
++msgstr ""
++
++#: builtins/common.c:215
++#, c-format
++msgid "`%s': not a pid or valid job spec"
++msgstr ""
++
++#: builtins/common.c:222
++#: error.c:453
++#, c-format
++msgid "%s: readonly variable"
++msgstr "%s: skrivskyddad variabel"
++
++#: builtins/common.c:230
++#, fuzzy, c-format
++msgid "%s: %s out of range"
++msgstr "UTANFÖR OMRÅDET"
++
++#: builtins/common.c:230
++#: builtins/common.c:232
++msgid "argument"
++msgstr "argument"
++
++#: builtins/common.c:232
++#, fuzzy, c-format
++msgid "%s out of range"
++msgstr "UTANFÖR OMRÅDET"
++
++#: builtins/common.c:240
++#, c-format
++msgid "%s: no such job"
++msgstr "%s: inget sådant jobb"
++
++#: builtins/common.c:248
++#, c-format
++msgid "%s: no job control"
++msgstr "%s: ingen jobbkontroll"
++
++#: builtins/common.c:250
++msgid "no job control"
++msgstr "ingen jobbkontroll"
++
++#: builtins/common.c:260
++#, fuzzy, c-format
++msgid "%s: restricted"
++msgstr "Begränsat"
++
++#: builtins/common.c:262
++#, fuzzy
++msgid "restricted"
++msgstr "Begränsat"
++
++#: builtins/common.c:270
++#, c-format
++msgid "%s: not a shell builtin"
++msgstr ""
++
++#: builtins/common.c:486
++#, c-format
++msgid "%s: error retrieving current directory: %s: %s\n"
++msgstr ""
++
++#: builtins/common.c:553
++#: builtins/common.c:555
++#, c-format
++msgid "%s: ambiguous job spec"
++msgstr ""
++
++#: builtins/complete.def:251
++#, c-format
++msgid "%s: invalid action name"
++msgstr "%s: ogiltigt åtgärdsnamn"
++
++#: builtins/complete.def:381
++#: builtins/complete.def:524
++#, c-format
++msgid "%s: no completion specification"
++msgstr ""
++
++#: builtins/complete.def:571
++msgid "warning: -F option may not work as you expect"
++msgstr "varning: flaggan -F kanske inte fungerar som du förväntar"
++
++#: builtins/complete.def:573
++msgid "warning: -C option may not work as you expect"
++msgstr "varning: flaggan -C kanske inte fungerar som du förväntar"
++
++#: builtins/declare.def:105
++msgid "can only be used in a function"
++msgstr "kan endast användas i en funktion"
++
++#: builtins/declare.def:295
++msgid "cannot use `-f' to make functions"
++msgstr ""
++
++#: builtins/declare.def:307
++#: execute_cmd.c:3949
++#, c-format
++msgid "%s: readonly function"
++msgstr "%s: skrivskyddad funktion"
++
++#: builtins/declare.def:389
++#, c-format
++msgid "%s: cannot destroy array variables in this way"
++msgstr ""
++
++#: builtins/enable.def:128
++#: builtins/enable.def:136
++msgid "dynamic loading not available"
++msgstr ""
++
++#: builtins/enable.def:303
++#, c-format
++msgid "cannot open shared object %s: %s"
++msgstr ""
++
++#: builtins/enable.def:326
++#, c-format
++msgid "cannot find %s in shared object %s: %s"
++msgstr ""
++
++#: builtins/enable.def:450
++#, c-format
++msgid "%s: not dynamically loaded"
++msgstr "%s: inte dynamiskt inläst"
++
++#: builtins/enable.def:465
++#, c-format
++msgid "%s: cannot delete: %s"
++msgstr "%s: kan inte ta bort: %s"
++
++#: builtins/evalfile.c:128
++#: execute_cmd.c:3821
++#: shell.c:1395
++#, c-format
++msgid "%s: is a directory"
++msgstr "%s: är en katalog"
++
++#: builtins/evalfile.c:133
++#, c-format
++msgid "%s: not a regular file"
++msgstr "%s: inte en vanlig fil"
++
++#: builtins/evalfile.c:141
++#, c-format
++msgid "%s: file is too large"
++msgstr "%s: fil är för stor"
++
++#: builtins/exec.def:205
++#, c-format
++msgid "%s: cannot execute: %s"
++msgstr "%s: kan inte starta: %s"
++
++#: builtins/exit.def:83
++msgid "not login shell: use `exit'"
++msgstr ""
++
++#: builtins/exit.def:111
++msgid "There are stopped jobs.\n"
++msgstr "Det finns stoppade jobb.\n"
++
++#: builtins/fc.def:252
++msgid "no command found"
++msgstr "inget kommando hittades"
++
++#: builtins/fc.def:317
++msgid "history specification"
++msgstr ""
++
++#: builtins/fc.def:338
++#, c-format
++msgid "%s: cannot open temp file: %s"
++msgstr "%s: kan inte öppna temporärfil: %s"
++
++#: builtins/fg_bg.def:133
++#, c-format
++msgid "job %d started without job control"
++msgstr "jobb %d startad utan jobbkontroll"
++
++#: builtins/getopt.c:109
++#, c-format
++msgid "%s: illegal option -- %c\n"
++msgstr "%s: ogiltig flagga -- %c\n"
++
++#: builtins/getopt.c:110
++#, c-format
++msgid "%s: option requires an argument -- %c\n"
++msgstr "%s: flagga kräver ett argument -- %c\n"
++
++#: builtins/hash.def:83
++msgid "hashing disabled"
++msgstr ""
++
++#: builtins/hash.def:128
++#, c-format
++msgid "%s: hash table empty\n"
++msgstr ""
++
++#: builtins/help.def:108
++msgid "Shell commands matching keywords `"
++msgstr ""
++
++#: builtins/help.def:110
++msgid "Shell commands matching keyword `"
++msgstr ""
++
++#: builtins/help.def:138
++#, c-format
++msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
++msgstr ""
++
++#: builtins/help.def:164
++#, c-format
++msgid "%s: cannot open: %s"
++msgstr "%s: kan inte öppna: %s"
++
++#: builtins/help.def:182
++msgid ""
++"These shell commands are defined internally. Type `help' to see this list.\n"
++"Type `help name' to find out more about the function `name'.\n"
++"Use `info bash' to find out more about the shell in general.\n"
++"Use `man -k' or `info' to find out more about commands not in this list.\n"
++"\n"
++"A star (*) next to a name means that the command is disabled.\n"
++"\n"
++msgstr ""
++
++#: builtins/history.def:148
++msgid "cannot use more than one of -anrw"
++msgstr "kan inte använda mer än en av -anrw"
++
++#: builtins/history.def:180
++msgid "history position"
++msgstr ""
++
++#: builtins/history.def:390
++#, c-format
++msgid "%s: history expansion failed"
++msgstr ""
++
++#: builtins/jobs.def:99
++msgid "no other options allowed with `-x'"
++msgstr ""
++
++#: builtins/kill.def:187
++#, c-format
++msgid "%s: arguments must be process or job IDs"
++msgstr ""
++
++#: builtins/kill.def:248
++msgid "Unknown error"
++msgstr "Okänt fel"
++
++#: builtins/let.def:94
++#: builtins/let.def:119
++#: expr.c:496
++#: expr.c:511
++#, fuzzy
++msgid "expression expected"
++msgstr "Förväntade uttryck"
++
++#: builtins/printf.def:249
++#, c-format
++msgid "`%s': missing format character"
++msgstr "\"%s\": formattecken saknas"
++
++#: builtins/printf.def:408
++#, c-format
++msgid "`%c': invalid format character"
++msgstr "\"%c\": ogiltigt formattecken"
++
++#: builtins/printf.def:601
++msgid "missing hex digit for \\x"
++msgstr ""
++
++#: builtins/pushd.def:168
++msgid "no other directory"
++msgstr "ingen annan katalog"
++
++#: builtins/pushd.def:435
++msgid "<no current directory>"
++msgstr "<ingen nuvarande katalog>"
++
++#: builtins/pushd.def:652
++#: builtins.c:1351
++msgid "Display the list of currently remembered directories. Directories"
++msgstr ""
++
++#: builtins/pushd.def:653
++#: builtins.c:1352
++msgid "find their way onto the list with the `pushd' command; you can get"
++msgstr ""
++
++#: builtins/pushd.def:654
++#: builtins.c:1353
++msgid "back up through the list with the `popd' command."
++msgstr ""
++
++#: builtins/pushd.def:656
++#: builtins.c:1355
++msgid "The -l flag specifies that `dirs' should not print shorthand versions"
++msgstr ""
++
++#: builtins/pushd.def:657
++#: builtins.c:1356
++msgid "of directories which are relative to your home directory. This means"
++msgstr ""
++
++#: builtins/pushd.def:658
++#: builtins.c:1357
++msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
++msgstr ""
++
++#: builtins/pushd.def:659
++#: builtins.c:1358
++msgid "causes `dirs' to print the directory stack with one entry per line,"
++msgstr ""
++
++#: builtins/pushd.def:660
++#: builtins.c:1359
++msgid "prepending the directory name with its position in the stack. The -p"
++msgstr ""
++
++#: builtins/pushd.def:661
++#: builtins.c:1360
++msgid "flag does the same thing, but the stack position is not prepended."
++msgstr ""
++
++#: builtins/pushd.def:662
++#: builtins.c:1361
++msgid "The -c flag clears the directory stack by deleting all of the elements."
++msgstr ""
++
++#: builtins/pushd.def:664
++msgid "+N displays the Nth entry counting from the left of the list shown by"
++msgstr ""
++
++#: builtins/pushd.def:665
++#: builtins/pushd.def:668
++msgid " dirs when invoked without options, starting with zero."
++msgstr ""
++
++#: builtins/pushd.def:667
++msgid "-N displays the Nth entry counting from the right of the list shown by"
++msgstr ""
++
++#: builtins/pushd.def:673
++#: builtins.c:1302
++msgid "Adds a directory to the top of the directory stack, or rotates"
++msgstr ""
++
++#: builtins/pushd.def:674
++#: builtins.c:1303
++msgid "the stack, making the new top of the stack the current working"
++msgstr ""
++
++#: builtins/pushd.def:675
++#: builtins.c:1304
++msgid "directory. With no arguments, exchanges the top two directories."
++msgstr ""
++
++#: builtins/pushd.def:677
++msgid "+N Rotates the stack so that the Nth directory (counting"
++msgstr ""
++
++#: builtins/pushd.def:678
++msgid " from the left of the list shown by `dirs', starting with"
++msgstr ""
++
++#: builtins/pushd.def:679
++#: builtins/pushd.def:683
++msgid " zero) is at the top."
++msgstr ""
++
++#: builtins/pushd.def:681
++msgid "-N Rotates the stack so that the Nth directory (counting"
++msgstr ""
++
++#: builtins/pushd.def:682
++msgid " from the right of the list shown by `dirs', starting with"
++msgstr ""
++
++#: builtins/pushd.def:685
++msgid "-n suppress the normal change of directory when adding directories"
++msgstr ""
++
++#: builtins/pushd.def:686
++msgid " to the stack, so only the stack is manipulated."
++msgstr ""
++
++#: builtins/pushd.def:688
++msgid "dir adds DIR to the directory stack at the top, making it the"
++msgstr ""
++
++#: builtins/pushd.def:689
++msgid " new current working directory."
++msgstr ""
++
++#: builtins/pushd.def:691
++#: builtins/pushd.def:711
++#: builtins.c:1320
++#: builtins.c:1343
++msgid "You can see the directory stack with the `dirs' command."
++msgstr ""
++
++#: builtins/pushd.def:696
++#: builtins.c:1328
++msgid "Removes entries from the directory stack. With no arguments,"
++msgstr ""
++
++#: builtins/pushd.def:697
++#: builtins.c:1329
++msgid "removes the top directory from the stack, and cd's to the new"
++msgstr ""
++
++#: builtins/pushd.def:698
++#: builtins.c:1330
++msgid "top directory."
++msgstr ""
++
++#: builtins/pushd.def:700
++msgid "+N removes the Nth entry counting from the left of the list"
++msgstr ""
++
++#: builtins/pushd.def:701
++msgid " shown by `dirs', starting with zero. For example: `popd +0'"
++msgstr ""
++
++#: builtins/pushd.def:702
++msgid " removes the first directory, `popd +1' the second."
++msgstr ""
++
++#: builtins/pushd.def:704
++msgid "-N removes the Nth entry counting from the right of the list"
++msgstr ""
++
++#: builtins/pushd.def:705
++msgid " shown by `dirs', starting with zero. For example: `popd -0'"
++msgstr ""
++
++#: builtins/pushd.def:706
++msgid " removes the last directory, `popd -1' the next to last."
++msgstr ""
++
++#: builtins/pushd.def:708
++msgid "-n suppress the normal change of directory when removing directories"
++msgstr ""
++
++#: builtins/pushd.def:709
++msgid " from the stack, so only the stack is manipulated."
++msgstr ""
++
++#: builtins/read.def:207
++#, c-format
++msgid "%s: invalid timeout specification"
++msgstr ""
++
++#: builtins/read.def:230
++#, c-format
++msgid "%s: invalid file descriptor specification"
++msgstr ""
++
++#: builtins/read.def:237
++#, c-format
++msgid "%d: invalid file descriptor: %s"
++msgstr ""
++
++#: builtins/read.def:463
++#, c-format
++msgid "read error: %d: %s"
++msgstr "läsfel: %d: %s"
++
++#: builtins/return.def:63
++msgid "can only `return' from a function or sourced script"
++msgstr ""
++
++#: builtins/set.def:743
++msgid "cannot simultaneously unset a function and a variable"
++msgstr ""
++
++#: builtins/set.def:780
++#, c-format
++msgid "%s: cannot unset"
++msgstr ""
++
++#: builtins/set.def:787
++#, c-format
++msgid "%s: cannot unset: readonly %s"
++msgstr ""
++
++#: builtins/set.def:798
++#, c-format
++msgid "%s: not an array variable"
++msgstr ""
++
++#: builtins/setattr.def:165
++#, c-format
++msgid "%s: not a function"
++msgstr "%s: inte en funktion"
++
++#: builtins/shift.def:66
++#: builtins/shift.def:72
++msgid "shift count"
++msgstr ""
++
++#: builtins/shopt.def:226
++msgid "cannot set and unset shell options simultaneously"
++msgstr ""
++
++#: builtins/shopt.def:291
++#, c-format
++msgid "%s: invalid shell option name"
++msgstr ""
++
++#: builtins/source.def:117
++msgid "filename argument required"
++msgstr ""
++
++#: builtins/source.def:137
++#, c-format
++msgid "%s: file not found"
++msgstr "%s: fil inte hittad"
++
++#: builtins/suspend.def:93
++msgid "cannot suspend"
++msgstr ""
++
++#: builtins/suspend.def:103
++msgid "cannot suspend a login shell"
++msgstr ""
++
++#: builtins/type.def:231
++#, c-format
++msgid "%s is aliased to `%s'\n"
++msgstr ""
++
++#: builtins/type.def:252
++#, c-format
++msgid "%s is a shell keyword\n"
++msgstr ""
++
++#: builtins/type.def:272
++#, c-format
++msgid "%s is a function\n"
++msgstr "%s är en funktion\n"
++
++#: builtins/type.def:297
++#, c-format
++msgid "%s is a shell builtin\n"
++msgstr ""
++
++#: builtins/type.def:318
++#, c-format
++msgid "%s is %s\n"
++msgstr "%s är %s\n"
++
++#: builtins/type.def:338
++#, c-format
++msgid "%s is hashed (%s)\n"
++msgstr ""
++
++#: builtins/ulimit.def:332
++#, c-format
++msgid "%s: invalid limit argument"
++msgstr ""
++
++#: builtins/ulimit.def:358
++#, c-format
++msgid "`%c': bad command"
++msgstr "\"%c\": felaktigt kommando"
++
++#: builtins/ulimit.def:387
++#, c-format
++msgid "%s: cannot get limit: %s"
++msgstr ""
++
++#: builtins/ulimit.def:425
++#, c-format
++msgid "%s: cannot modify limit: %s"
++msgstr ""
++
++#: builtins/umask.def:112
++msgid "octal number"
++msgstr "oktalt nummer"
++
++#: builtins/umask.def:226
++#, c-format
++msgid "`%c': invalid symbolic mode operator"
++msgstr ""
++
++#: builtins/umask.def:279
++#, c-format
++msgid "`%c': invalid symbolic mode character"
++msgstr ""
++
++#: error.c:165
++#, c-format
++msgid "last command: %s\n"
++msgstr "senaste kommando: %s\n"
++
++#: error.c:173
++msgid "Aborting..."
++msgstr "Avbryter..."
++
++#: error.c:260
++#, c-format
++msgid "%s: warning: "
++msgstr "%s: varning: "
++
++#: error.c:405
++msgid "unknown command error"
++msgstr "okänt kommandofel"
++
++#: error.c:406
++msgid "bad command type"
++msgstr ""
++
++#: error.c:407
++msgid "bad connector"
++msgstr ""
++
++#: error.c:408
++msgid "bad jump"
++msgstr ""
++
++#: error.c:446
++#, c-format
++msgid "%s: unbound variable"
++msgstr ""
++
++#: eval.c:175
++msgid "timed out waiting for input: auto-logout\n"
++msgstr ""
++
++#: execute_cmd.c:466
++#, c-format
++msgid "cannot redirect standard input from /dev/null: %s"
++msgstr ""
++
++#: execute_cmd.c:1036
++#, c-format
++msgid "TIMEFORMAT: `%c': invalid format character"
++msgstr "TIDSFORMAT: \"%c\": ogiltigt formattecken"
++
++#: execute_cmd.c:3521
++#, c-format
++msgid "%s: restricted: cannot specify `/' in command names"
++msgstr ""
++
++#: execute_cmd.c:3609
++#, c-format
++msgid "%s: command not found"
++msgstr "%s: kommando hittades inte"
++
++#: execute_cmd.c:3839
++#, c-format
++msgid "%s: %s: bad interpreter"
++msgstr "%s: %s: felaktig tolk"
++
++#: execute_cmd.c:3876
++#, c-format
++msgid "%s: cannot execute binary file"
++msgstr "%s: kan inte starta binärfil"
++
++#: execute_cmd.c:3988
++#, c-format
++msgid "cannot duplicate fd %d to fd %d"
++msgstr ""
++
++#: expr.c:239
++msgid "expression recursion level exceeded"
++msgstr ""
++
++#: expr.c:263
++msgid "recursion stack underflow"
++msgstr ""
++
++#: expr.c:374
++msgid "syntax error in expression"
++msgstr "syntaxfel i uttryck"
++
++#: expr.c:414
++msgid "attempted assignment to non-variable"
++msgstr ""
++
++#: expr.c:435
++#: expr.c:440
++#: expr.c:750
++msgid "division by 0"
++msgstr "delning med 0"
++
++#: expr.c:466
++msgid "bug: bad expassign token"
++msgstr ""
++
++#: expr.c:508
++msgid "`:' expected for conditional expression"
++msgstr ""
++
++#: expr.c:775
++msgid "exponent less than 0"
++msgstr ""
++
++#: expr.c:819
++msgid "identifier expected after pre-increment or pre-decrement"
++msgstr ""
++
++#: expr.c:847
++msgid "missing `)'"
++msgstr "saknar `)'"
++
++#: expr.c:871
++msgid "syntax error: operand expected"
++msgstr ""
++
++#: expr.c:1146
++msgid "invalid number"
++msgstr "ogiltigt nummer"
++
++#: expr.c:1150
++msgid "invalid arithmetic base"
++msgstr ""
++
++#: expr.c:1170
++msgid "value too great for base"
++msgstr ""
++
++#: general.c:60
++msgid "getcwd: cannot access parent directories"
++msgstr ""
++
++#: input.c:231
++#, c-format
++msgid "cannot allocate new file descriptor for bash input from fd %d"
++msgstr ""
++
++#: input.c:239
++#, c-format
++msgid "save_bash_input: buffer already exists for new fd %d"
++msgstr ""
++
++#: jobs.c:693
++#, c-format
++msgid "deleting stopped job %d with process group %ld"
++msgstr ""
++
++#: jobs.c:1001
++#, c-format
++msgid "describe_pid: %ld: no such pid"
++msgstr ""
++
++#: jobs.c:1632
++#: nojobs.c:648
++#, c-format
++msgid "wait: pid %ld is not a child of this shell"
++msgstr ""
++
++#: jobs.c:1815
++#, c-format
++msgid "wait_for: No record of process %ld"
++msgstr ""
++
++#: jobs.c:2062
++#, c-format
++msgid "wait_for_job: job %d is stopped"
++msgstr ""
++
++#: jobs.c:2284
++#, c-format
++msgid "%s: job has terminated"
++msgstr "%s: jobb har avslutats"
++
++#: jobs.c:2293
++#, c-format
++msgid "%s: job %d already in background"
++msgstr "%s: jobb %d redan i bakgrund"
++
++#: jobs.c:3037
++msgid "no job control in this shell"
++msgstr "ingen jobbkontroll i detta skal"
++
++#: lib/malloc/malloc.c:298
++#, c-format
++msgid "malloc: failed assertion: %s\n"
++msgstr ""
++
++#: lib/malloc/malloc.c:314
++#, c-format
++msgid ""
++"\r\n"
++"malloc: %s:%d: assertion botched\r\n"
++msgstr ""
++
++#: lib/malloc/malloc.c:740
++msgid "malloc: block on free list clobbered"
++msgstr ""
++
++#: lib/malloc/malloc.c:817
++msgid "free: called with already freed block argument"
++msgstr ""
++
++#: lib/malloc/malloc.c:820
++msgid "free: called with unallocated block argument"
++msgstr ""
++
++#: lib/malloc/malloc.c:839
++msgid "free: underflow detected; mh_nbytes out of range"
++msgstr ""
++
++#: lib/malloc/malloc.c:845
++msgid "free: start and end chunk sizes differ"
++msgstr ""
++
++#: lib/malloc/malloc.c:942
++msgid "realloc: called with unallocated block argument"
++msgstr ""
++
++#: lib/malloc/malloc.c:957
++msgid "realloc: underflow detected; mh_nbytes out of range"
++msgstr ""
++
++#: lib/malloc/malloc.c:963
++msgid "realloc: start and end chunk sizes differ"
++msgstr ""
++
++#: lib/malloc/table.c:175
++msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
++msgstr ""
++
++#: lib/malloc/table.c:182
++#, c-format
++msgid "register_alloc: %p already in table as allocated?\n"
++msgstr ""
++
++#: lib/malloc/table.c:218
++#, c-format
++msgid "register_free: %p already in table as free?\n"
++msgstr ""
++
++#: lib/malloc/watch.c:46
++msgid "allocated"
++msgstr "allokerat"
++
++#: lib/malloc/watch.c:48
++msgid "freed"
++msgstr ""
++
++#: lib/malloc/watch.c:50
++msgid "requesting resize"
++msgstr ""
++
++#: lib/malloc/watch.c:52
++msgid "just resized"
++msgstr ""
++
++#: lib/malloc/watch.c:54
++msgid "bug: unknown operation"
++msgstr "bugg: okänd operation"
++
++#: lib/malloc/watch.c:56
++#, c-format
++msgid "malloc: watch alert: %p %s "
++msgstr ""
++
++#: lib/sh/fmtulong.c:101
++msgid "invalid base"
++msgstr ""
++
++#: lib/sh/netopen.c:158
++#, c-format
++msgid "%s: host unknown"
++msgstr "%s: okänd värd"
++
++#: lib/sh/netopen.c:165
++#, c-format
++msgid "%s: invalid service"
++msgstr "%s: ogiltig tjänst"
++
++#: lib/sh/netopen.c:296
++#, c-format
++msgid "%s: bad network path specification"
++msgstr ""
++
++#: lib/sh/netopen.c:336
++msgid "network operations not supported"
++msgstr ""
++
++#: mailcheck.c:382
++msgid "You have mail in $_"
++msgstr "Du har post i $_"
++
++#: mailcheck.c:407
++msgid "You have new mail in $_"
++msgstr "Du har ny post i $_"
++
++#: mailcheck.c:423
++#, c-format
++msgid "The mail in %s has been read\n"
++msgstr "Posten i %s har lästs\n"
++
++#: make_cmd.c:318
++msgid "syntax error: arithmetic expression required"
++msgstr ""
++
++#: make_cmd.c:320
++msgid "syntax error: `;' unexpected"
++msgstr "syntaxfel: \";\" oväntad"
++
++#: make_cmd.c:321
++#, c-format
++msgid "syntax error: `((%s))'"
++msgstr "syntaxfel: \"((%s))\""
++
++#: make_cmd.c:560
++#, c-format
++msgid "make_here_document: bad instruction type %d"
++msgstr ""
++
++#: make_cmd.c:730
++#, c-format
++msgid "make_redirection: redirection instruction `%d' out of range"
++msgstr ""
++
++#: parse.y:2726
++#, c-format
++msgid "unexpected EOF while looking for matching `%c'"
++msgstr ""
++
++#: parse.y:3011
++msgid "unexpected EOF while looking for `]]'"
++msgstr ""
++
++#: parse.y:3016
++#, c-format
++msgid "syntax error in conditional expression: unexpected token `%s'"
++msgstr ""
++
++#: parse.y:3020
++msgid "syntax error in conditional expression"
++msgstr ""
++
++#: parse.y:3098
++#, c-format
++msgid "unexpected token `%s', expected `)'"
++msgstr ""
++
++#: parse.y:3102
++msgid "expected `)'"
++msgstr "förväntade `)'"
++
++#: parse.y:3130
++#, c-format
++msgid "unexpected argument `%s' to conditional unary operator"
++msgstr ""
++
++#: parse.y:3134
++msgid "unexpected argument to conditional unary operator"
++msgstr ""
++
++#: parse.y:3171
++#, c-format
++msgid "unexpected token `%s', conditional binary operator expected"
++msgstr ""
++
++#: parse.y:3175
++msgid "conditional binary operator expected"
++msgstr ""
++
++#: parse.y:3191
++#, c-format
++msgid "unexpected argument `%s' to conditional binary operator"
++msgstr ""
++
++#: parse.y:3195
++msgid "unexpected argument to conditional binary operator"
++msgstr ""
++
++#: parse.y:3206
++#, c-format
++msgid "unexpected token `%c' in conditional command"
++msgstr ""
++
++#: parse.y:3209
++#, c-format
++msgid "unexpected token `%s' in conditional command"
++msgstr ""
++
++#: parse.y:3213
++#, c-format
++msgid "unexpected token %d in conditional command"
++msgstr ""
++
++#: parse.y:4400
++#, c-format
++msgid "syntax error near unexpected token `%s'"
++msgstr ""
++
++#: parse.y:4418
++#, fuzzy, c-format
++msgid "syntax error near `%s'"
++msgstr "Syntaxfel nära \"%1\""
++
++#: parse.y:4428
++msgid "syntax error: unexpected end of file"
++msgstr ""
++
++#: parse.y:4428
++msgid "syntax error"
++msgstr "syntaxfel"
++
++#: parse.y:4490
++#, c-format
++msgid "Use \"%s\" to leave the shell.\n"
++msgstr "Använd \"%s\" för att lämna skalet.\n"
++
++#: parse.y:4649
++msgid "unexpected EOF while looking for matching `)'"
++msgstr ""
++
++#: pcomplete.c:988
++#, c-format
++msgid "completion: function `%s' not found"
++msgstr ""
++
++#: pcomplib.c:179
++#, c-format
++msgid "progcomp_insert: %s: NULL COMPSPEC"
++msgstr ""
++
++#: print_cmd.c:260
++#, c-format
++msgid "print_command: bad connector `%d'"
++msgstr ""
++
++#: print_cmd.c:1172
++#, c-format
++msgid "cprintf: `%c': invalid format character"
++msgstr ""
++
++#: redir.c:99
++msgid "file descriptor out of range"
++msgstr ""
++
++#: redir.c:141
++#, c-format
++msgid "%s: ambiguous redirect"
++msgstr ""
++
++#: redir.c:145
++#, c-format
++msgid "%s: cannot overwrite existing file"
++msgstr ""
++
++#: redir.c:150
++#, c-format
++msgid "%s: restricted: cannot redirect output"
++msgstr ""
++
++#: redir.c:155
++#, c-format
++msgid "cannot create temp file for here document: %s"
++msgstr ""
++
++#: redir.c:509
++msgid "/dev/(tcp|udp)/host/port not supported without networking"
++msgstr "/dev/(tcp|udp)/host/port stöds inte utan nätverk"
++
++#: redir.c:949
++msgid "redirection error: cannot duplicate fd"
++msgstr ""
++
++#: shell.c:302
++msgid "could not find /tmp, please create!"
++msgstr "kunde inte hitta /tmp, vänligen skapa den!"
++
++#: shell.c:306
++msgid "/tmp must be a valid directory name"
++msgstr "/tmp måste vara ett giltigt katalognamn"
++
++#: shell.c:839
++#, c-format
++msgid "%c%c: invalid option"
++msgstr "%c%c: ogiltig flagga"
++
++#: shell.c:1590
++msgid "I have no name!"
++msgstr "Jag har inget namn!"
++
++#: shell.c:1725
++#, c-format
++msgid ""
++"Usage:\t%s [GNU long option] [option] ...\n"
++"\t%s [GNU long option] [option] script-file ...\n"
++msgstr ""
++"Användning:\t%s [GNU lång flagga] [flagga] ...\n"
++"\t%s [GNU lång flagga] [flagga] skriptfil ...\n"
++
++#: shell.c:1727
++msgid "GNU long options:\n"
++msgstr "GNU långa flaggor:\n"
++
++#: shell.c:1731
++msgid "Shell options:\n"
++msgstr "Skalflaggor:\n"
++
++#: shell.c:1732
++msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
++msgstr "\t-irsD eller -c kommando eller -O shopt_option\t\t(endast anrop)\n"
++
++#: shell.c:1747
++#, c-format
++msgid "\t-%s or -o option\n"
++msgstr "\t-%s eller -o flagga\n"
++
++#: shell.c:1753
++#, c-format
++msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
++msgstr "Skriv \"%s -c \"help set\"\" för mer information om skalflaggor.\n"
++
++#: shell.c:1754
++#, c-format
++msgid "Type `%s -c help' for more information about shell builtin commands.\n"
++msgstr "Skriv \"%s -c help\" för mer information om skalets inbyggda kommandon.\n"
++
++#: shell.c:1755
++msgid "Use the `bashbug' command to report bugs.\n"
++msgstr "Använd kommandot \"bashbug\" för att rapportera buggar.\n"
++
++#: sig.c:485
++#, c-format
++msgid "sigprocmask: %d: invalid operation"
++msgstr ""
++
++#: subst.c:1011
++#, c-format
++msgid "bad substitution: no closing `%s' in %s"
++msgstr ""
++
++#: subst.c:2020
++#, c-format
++msgid "%s: cannot assign list to array member"
++msgstr ""
++
++#: subst.c:3516
++#: subst.c:3532
++msgid "cannot make pipe for process substitution"
++msgstr ""
++
++#: subst.c:3563
++msgid "cannot make child for process substitution"
++msgstr ""
++
++#: subst.c:3608
++#, c-format
++msgid "cannot open named pipe %s for reading"
++msgstr ""
++
++#: subst.c:3610
++#, c-format
++msgid "cannot open named pipe %s for writing"
++msgstr ""
++
++#: subst.c:3618
++#, c-format
++msgid "cannout reset nodelay mode for fd %d"
++msgstr ""
++
++#: subst.c:3628
++#, c-format
++msgid "cannot duplicate named pipe %s as fd %d"
++msgstr ""
++
++#: subst.c:3803
++msgid "cannot make pipe for command substitution"
++msgstr ""
++
++#: subst.c:3832
++msgid "cannot make child for command substitution"
++msgstr ""
++
++#: subst.c:3849
++msgid "command_substitute: cannot duplicate pipe as fd 1"
++msgstr ""
++
++#: subst.c:4284
++#, fuzzy, c-format
++msgid "%s: parameter null or not set"
++msgstr "parameter är tom eller inte satt"
++
++#: subst.c:4529
++#, c-format
++msgid "%s: substring expression < 0"
++msgstr ""
++
++#: subst.c:5209
++#, c-format
++msgid "%s: bad substitution"
++msgstr ""
++
++#: subst.c:5283
++#, c-format
++msgid "$%s: cannot assign in this way"
++msgstr ""
++
++#: subst.c:6652
++#, c-format
++msgid "no match: %s"
++msgstr "ingen match: %s"
++
++#: test.c:154
++#, fuzzy
++msgid "argument expected"
++msgstr "(argument förväntades)"
++
++#: test.c:163
++#, c-format
++msgid "%s: integer expression expected"
++msgstr ""
++
++#: test.c:361
++#, fuzzy
++msgid "`)' expected"
++msgstr "\")\" förväntas\n"
++
++#: test.c:363
++#, fuzzy, c-format
++msgid "`)' expected, found %s"
++msgstr "\")\" förväntades, fann %s\n"
++
++#: test.c:378
++#: test.c:787
++#: test.c:790
++#, fuzzy, c-format
++msgid "%s: unary operator expected"
++msgstr "%s: unär operator förväntas\n"
++
++#: test.c:543
++#: test.c:830
++#, fuzzy, c-format
++msgid "%s: binary operator expected"
++msgstr "%s: binär operator förväntas\n"
++
++#: test.c:905
++msgid "missing `]'"
++msgstr "saknar \"]\""
++
++#: trap.c:194
++msgid "invalid signal number"
++msgstr ""
++
++#: trap.c:309
++#, c-format
++msgid "run_pending_traps: bad value in trap_list[%d]: %p"
++msgstr ""
++
++#: trap.c:313
++#, c-format
++msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
++msgstr ""
++
++#: trap.c:349
++#, c-format
++msgid "trap_handler: bad signal %d"
++msgstr ""
++
++#: variables.c:310
++#, c-format
++msgid "error importing function definition for `%s'"
++msgstr ""
++
++#: variables.c:670
++#, c-format
++msgid "shell level (%d) too high, resetting to 1"
++msgstr ""
++
++#: variables.c:1610
++msgid "make_local_variable: no function context at current scope"
++msgstr ""
++
++#: variables.c:2709
++msgid "all_local_variables: no function context at current scope"
++msgstr ""
++
++#: variables.c:2923
++#: variables.c:2932
++#, c-format
++msgid "invalid character %d in exportstr for %s"
++msgstr ""
++
++#: variables.c:2938
++#, c-format
++msgid "no `=' in exportstr for %s"
++msgstr ""
++
++#: variables.c:3363
++msgid "pop_var_context: head of shell_variables not a function context"
++msgstr ""
++
++#: variables.c:3376
++msgid "pop_var_context: no global_variables context"
++msgstr ""
++
++#: variables.c:3442
++msgid "pop_scope: head of shell_variables not a temporary environment scope"
++msgstr ""
++
++#: version.c:82
++msgid "Copyright (C) 2004 Free Software Foundation, Inc.\n"
++msgstr "Copyright (C) 2004 Free Software Foundation, Inc.\n"
++
++#: xmalloc.c:93
++#, c-format
++msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)"
++msgstr ""
++
++#: xmalloc.c:95
++#, c-format
++msgid "xmalloc: cannot allocate %lu bytes"
++msgstr ""
++
++#: xmalloc.c:115
++#, c-format
++msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
++msgstr ""
++
++#: xmalloc.c:117
++#, c-format
++msgid "xrealloc: cannot allocate %lu bytes"
++msgstr ""
++
++#: xmalloc.c:151
++#, c-format
++msgid "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
++msgstr ""
++
++#: xmalloc.c:153
++#, c-format
++msgid "xmalloc: %s:%d: cannot allocate %lu bytes"
++msgstr ""
++
++#: xmalloc.c:175
++#, c-format
++msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
++msgstr ""
++
++#: xmalloc.c:177
++#, c-format
++msgid "xrealloc: %s:%d: cannot allocate %lu bytes"
++msgstr ""
++
++#: builtins.c:244
++msgid "`alias' with no arguments or with the -p option prints the list"
++msgstr ""
++
++#: builtins.c:245
++msgid "of aliases in the form alias NAME=VALUE on standard output."
++msgstr ""
++
++#: builtins.c:246
++msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
++msgstr ""
++
++#: builtins.c:247
++msgid "A trailing space in VALUE causes the next word to be checked for"
++msgstr ""
++
++#: builtins.c:248
++msgid "alias substitution when the alias is expanded. Alias returns"
++msgstr ""
++
++#: builtins.c:249
++msgid "true unless a NAME is given for which no alias has been defined."
++msgstr ""
++
++#: builtins.c:257
++msgid "Remove NAMEs from the list of defined aliases. If the -a option is given,"
++msgstr ""
++
++#: builtins.c:258
++msgid "then remove all alias definitions."
++msgstr ""
++
++#: builtins.c:266
++msgid "Bind a key sequence to a Readline function or a macro, or set"
++msgstr ""
++
++#: builtins.c:267
++msgid "a Readline variable. The non-option argument syntax is equivalent"
++msgstr ""
++
++#: builtins.c:268
++msgid "to that found in ~/.inputrc, but must be passed as a single argument:"
++msgstr ""
++
++#: builtins.c:269
++msgid "bind '\"\\C-x\\C-r\": re-read-init-file'."
++msgstr "bind '\"\\C-x\\C-r\": re-read-init-file'."
++
++#: builtins.c:270
++msgid "bind accepts the following options:"
++msgstr ""
++
++#: builtins.c:271
++msgid " -m keymap Use `keymap' as the keymap for the duration of this"
++msgstr ""
++
++#: builtins.c:272
++msgid " command. Acceptable keymap names are emacs,"
++msgstr ""
++
++#: builtins.c:273
++msgid " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
++msgstr ""
++
++#: builtins.c:274
++msgid " vi-command, and vi-insert."
++msgstr ""
++
++#: builtins.c:275
++msgid " -l List names of functions."
++msgstr " -l Lista namn på funktioner."
++
++#: builtins.c:276
++msgid " -P List function names and bindings."
++msgstr ""
++
++#: builtins.c:277
++msgid " -p List functions and bindings in a form that can be"
++msgstr ""
++
++#: builtins.c:278
++msgid " reused as input."
++msgstr ""
++
++#: builtins.c:279
++msgid " -r keyseq Remove the binding for KEYSEQ."
++msgstr ""
++
++#: builtins.c:280
++msgid " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when"
++msgstr ""
++
++#: builtins.c:281
++msgid "\t\t\t\tKEYSEQ is entered."
++msgstr ""
++
++#: builtins.c:282
++msgid " -f filename Read key bindings from FILENAME."
++msgstr ""
++
++#: builtins.c:283
++msgid " -q function-name Query about which keys invoke the named function."
++msgstr ""
++
++#: builtins.c:284
++msgid " -u function-name Unbind all keys which are bound to the named function."
++msgstr ""
++
++#: builtins.c:285
++msgid " -V List variable names and values"
++msgstr ""
++
++#: builtins.c:286
++msgid " -v List variable names and values in a form that can"
++msgstr ""
++
++#: builtins.c:287
++msgid " be reused as input."
++msgstr ""
++
++#: builtins.c:288
++msgid " -S List key sequences that invoke macros and their values"
++msgstr ""
++
++#: builtins.c:289
++msgid " -s List key sequences that invoke macros and their values"
++msgstr ""
++
++#: builtins.c:290
++msgid " in a form that can be reused as input."
++msgstr ""
++
++#: builtins.c:297
++msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,"
++msgstr ""
++
++#: builtins.c:298
++msgid "break N levels."
++msgstr ""
++
++#: builtins.c:304
++msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop."
++msgstr ""
++
++#: builtins.c:305
++msgid "If N is specified, resume at the N-th enclosing loop."
++msgstr ""
++
++#: builtins.c:311
++msgid "Run a shell builtin. This is useful when you wish to rename a"
++msgstr ""
++
++#: builtins.c:312
++msgid "shell builtin to be a function, but need the functionality of the"
++msgstr ""
++
++#: builtins.c:313
++msgid "builtin within the function itself."
++msgstr ""
++
++#: builtins.c:334
++msgid "Change the current directory to DIR. The variable $HOME is the"
++msgstr ""
++
++#: builtins.c:335
++msgid "default DIR. The variable CDPATH defines the search path for"
++msgstr ""
++
++#: builtins.c:336
++msgid "the directory containing DIR. Alternative directory names in CDPATH"
++msgstr ""
++
++#: builtins.c:337
++msgid "are separated by a colon (:). A null directory name is the same as"
++msgstr ""
++
++#: builtins.c:338
++msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
++msgstr ""
++
++#: builtins.c:339
++msgid "then CDPATH is not used. If the directory is not found, and the"
++msgstr ""
++
++#: builtins.c:340
++msgid "shell option `cdable_vars' is set, then try the word as a variable"
++msgstr ""
++
++#: builtins.c:341
++msgid "name. If that variable has a value, then cd to the value of that"
++msgstr ""
++
++#: builtins.c:342
++msgid "variable. The -P option says to use the physical directory structure"
++msgstr ""
++
++#: builtins.c:343
++msgid "instead of following symbolic links; the -L option forces symbolic links"
++msgstr ""
++
++#: builtins.c:344
++msgid "to be followed."
++msgstr ""
++
++#: builtins.c:350
++msgid "Print the current working directory. With the -P option, pwd prints"
++msgstr ""
++
++#: builtins.c:351
++msgid "the physical directory, without any symbolic links; the -L option"
++msgstr ""
++
++#: builtins.c:352
++msgid "makes pwd follow symbolic links."
++msgstr ""
++
++#: builtins.c:358
++msgid "No effect; the command does nothing. A zero exit code is returned."
++msgstr ""
++
++#: builtins.c:364
++msgid "Return a successful result."
++msgstr ""
++
++#: builtins.c:370
++msgid "Return an unsuccessful result."
++msgstr ""
++
++#: builtins.c:376
++msgid "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
++msgstr ""
++
++#: builtins.c:377
++msgid "function called `ls', and you wish to call the command `ls', you can"
++msgstr ""
++
++#: builtins.c:378
++msgid "say \"command ls\". If the -p option is given, a default value is used"
++msgstr ""
++
++#: builtins.c:379
++msgid "for PATH that is guaranteed to find all of the standard utilities. If"
++msgstr ""
++
++#: builtins.c:380
++msgid "the -V or -v option is given, a string is printed describing COMMAND."
++msgstr ""
++
++#: builtins.c:381
++msgid "The -V option produces a more verbose description."
++msgstr ""
++
++#: builtins.c:387
++msgid "Declare variables and/or give them attributes. If no NAMEs are"
++msgstr ""
++
++#: builtins.c:388
++msgid "given, then display the values of variables instead. The -p option"
++msgstr ""
++
++#: builtins.c:389
++msgid "will display the attributes and values of each NAME."
++msgstr ""
++
++#: builtins.c:391
++msgid "The flags are:"
++msgstr "Flaggorna är:"
++
++#: builtins.c:393
++msgid " -a\tto make NAMEs arrays (if supported)"
++msgstr ""
++
++#: builtins.c:394
++msgid " -f\tto select from among function names only"
++msgstr ""
++
++#: builtins.c:395
++msgid " -F\tto display function names (and line number and source file name if"
++msgstr ""
++
++#: builtins.c:396
++msgid "\tdebugging) without definitions"
++msgstr ""
++
++#: builtins.c:397
++msgid " -i\tto make NAMEs have the `integer' attribute"
++msgstr ""
++
++#: builtins.c:398
++msgid " -r\tto make NAMEs readonly"
++msgstr ""
++
++#: builtins.c:399
++msgid " -t\tto make NAMEs have the `trace' attribute"
++msgstr ""
++
++#: builtins.c:400
++msgid " -x\tto make NAMEs export"
++msgstr ""
++
++#: builtins.c:402
++msgid "Variables with the integer attribute have arithmetic evaluation (see"
++msgstr ""
++
++#: builtins.c:403
++msgid "`let') done when the variable is assigned to."
++msgstr ""
++
++#: builtins.c:405
++msgid "When displaying values of variables, -f displays a function's name"
++msgstr ""
++
++#: builtins.c:406
++msgid "and definition. The -F option restricts the display to function"
++msgstr ""
++
++#: builtins.c:407
++#, fuzzy
++msgid "name only."
++msgstr "En&dast namn"
++
++#: builtins.c:409
++msgid "Using `+' instead of `-' turns off the given attribute instead. When"
++msgstr ""
++
++#: builtins.c:410
++msgid "used in a function, makes NAMEs local, as with the `local' command."
++msgstr ""
++
++#: builtins.c:416
++msgid "Obsolete. See `declare'."
++msgstr "Föråldrad. Se \"declare\"."
++
++#: builtins.c:422
++msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
++msgstr ""
++
++#: builtins.c:423
++msgid "can only be used within a function; it makes the variable NAME"
++msgstr ""
++
++#: builtins.c:424
++msgid "have a visible scope restricted to that function and its children."
++msgstr ""
++
++#: builtins.c:431
++msgid "Output the ARGs. If -n is specified, the trailing newline is"
++msgstr ""
++
++#: builtins.c:432
++msgid "suppressed. If the -e option is given, interpretation of the"
++msgstr ""
++
++#: builtins.c:433
++msgid "following backslash-escaped characters is turned on:"
++msgstr ""
++
++#: builtins.c:434
++msgid "\t\\a\talert (bell)"
++msgstr ""
++
++#: builtins.c:435
++msgid "\t\\b\tbackspace"
++msgstr ""
++
++#: builtins.c:436
++msgid "\t\\c\tsuppress trailing newline"
++msgstr ""
++
++#: builtins.c:437
++msgid "\t\\E\tescape character"
++msgstr ""
++
++#: builtins.c:438
++msgid "\t\\f\tform feed"
++msgstr ""
++
++#: builtins.c:439
++msgid ""
++"\t\\n"
++"\tnew line"
++msgstr ""
++
++#: builtins.c:440
++msgid "\t\\r\tcarriage return"
++msgstr ""
++
++#: builtins.c:441
++msgid "\t\\t\thorizontal tab"
++msgstr ""
++
++#: builtins.c:442
++msgid "\t\\v\tvertical tab"
++msgstr ""
++
++#: builtins.c:443
++msgid "\t\\\\\tbackslash"
++msgstr ""
++
++#: builtins.c:444
++msgid ""
++"\t\\n"
++"um\tthe character whose ASCII code is NUM (octal)."
++msgstr ""
++
++#: builtins.c:446
++msgid "You can explicitly turn off the interpretation of the above characters"
++msgstr ""
++
++#: builtins.c:447
++msgid "with the -E option."
++msgstr ""
++
++#: builtins.c:455
++msgid "Output the ARGs. If -n is specified, the trailing newline is suppressed."
++msgstr ""
++
++#: builtins.c:462
++msgid "Enable and disable builtin shell commands. This allows"
++msgstr ""
++
++#: builtins.c:463
++msgid "you to use a disk command which has the same name as a shell"
++msgstr ""
++
++#: builtins.c:464
++msgid "builtin without specifying a full pathname. If -n is used, the"
++msgstr ""
++
++#: builtins.c:465
++msgid "NAMEs become disabled; otherwise NAMEs are enabled. For example,"
++msgstr ""
++
++#: builtins.c:466
++msgid "to use the `test' found in $PATH instead of the shell builtin"
++msgstr ""
++
++#: builtins.c:467
++msgid "version, type `enable -n test'. On systems supporting dynamic"
++msgstr ""
++
++#: builtins.c:468
++msgid "loading, the -f option may be used to load new builtins from the"
++msgstr ""
++
++#: builtins.c:469
++msgid "shared object FILENAME. The -d option will delete a builtin"
++msgstr ""
++
++#: builtins.c:470
++msgid "previously loaded with -f. If no non-option names are given, or"
++msgstr ""
++
++#: builtins.c:471
++msgid "the -p option is supplied, a list of builtins is printed. The"
++msgstr ""
++
++#: builtins.c:472
++msgid "-a option means to print every builtin with an indication of whether"
++msgstr ""
++
++#: builtins.c:473
++msgid "or not it is enabled. The -s option restricts the output to the POSIX.2"
++msgstr ""
++
++#: builtins.c:474
++msgid "`special' builtins. The -n option displays a list of all disabled builtins."
++msgstr ""
++
++#: builtins.c:480
++msgid "Read ARGs as input to the shell and execute the resulting command(s)."
++msgstr ""
++
++#: builtins.c:486
++msgid "Getopts is used by shell procedures to parse positional parameters."
++msgstr ""
++
++#: builtins.c:488
++msgid "OPTSTRING contains the option letters to be recognized; if a letter"
++msgstr ""
++
++#: builtins.c:489
++msgid "is followed by a colon, the option is expected to have an argument,"
++msgstr ""
++
++#: builtins.c:490
++msgid "which should be separated from it by white space."
++msgstr ""
++
++#: builtins.c:492
++msgid "Each time it is invoked, getopts will place the next option in the"
++msgstr ""
++
++#: builtins.c:493
++msgid "shell variable $name, initializing name if it does not exist, and"
++msgstr ""
++
++#: builtins.c:494
++msgid "the index of the next argument to be processed into the shell"
++msgstr ""
++
++#: builtins.c:495
++msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
++msgstr ""
++
++#: builtins.c:496
++msgid "a shell script is invoked. When an option requires an argument,"
++msgstr ""
++
++#: builtins.c:497
++msgid "getopts places that argument into the shell variable OPTARG."
++msgstr ""
++
++#: builtins.c:499
++msgid "getopts reports errors in one of two ways. If the first character"
++msgstr ""
++
++#: builtins.c:500
++msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
++msgstr ""
++
++#: builtins.c:501
++msgid "this mode, no error messages are printed. If an invalid option is"
++msgstr ""
++
++#: builtins.c:502
++msgid "seen, getopts places the option character found into OPTARG. If a"
++msgstr ""
++
++#: builtins.c:503
++msgid "required argument is not found, getopts places a ':' into NAME and"
++msgstr ""
++
++#: builtins.c:504
++msgid "sets OPTARG to the option character found. If getopts is not in"
++msgstr ""
++
++#: builtins.c:505
++msgid "silent mode, and an invalid option is seen, getopts places '?' into"
++msgstr ""
++
++#: builtins.c:506
++msgid "NAME and unsets OPTARG. If a required argument is not found, a '?'"
++msgstr ""
++
++#: builtins.c:507
++msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
++msgstr ""
++
++#: builtins.c:508
++#, fuzzy
++msgid "printed."
++msgstr "Utskrivet"
++
++#: builtins.c:510
++msgid "If the shell variable OPTERR has the value 0, getopts disables the"
++msgstr ""
++
++#: builtins.c:511
++msgid "printing of error messages, even if the first character of"
++msgstr ""
++
++#: builtins.c:512
++msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
++msgstr ""
++
++#: builtins.c:514
++msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
++msgstr ""
++
++#: builtins.c:515
++msgid "more arguments are given, they are parsed instead."
++msgstr ""
++
++#: builtins.c:521
++msgid "Exec FILE, replacing this shell with the specified program."
++msgstr ""
++
++#: builtins.c:522
++msgid "If FILE is not specified, the redirections take effect in this"
++msgstr ""
++
++#: builtins.c:523
++msgid "shell. If the first argument is `-l', then place a dash in the"
++msgstr ""
++
++#: builtins.c:524
++msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
++msgstr ""
++
++#: builtins.c:525
++msgid "is supplied, FILE is executed with a null environment. The `-a'"
++msgstr ""
++
++#: builtins.c:526
++msgid "option means to make set argv[0] of the executed process to NAME."
++msgstr ""
++
++#: builtins.c:527
++msgid "If the file cannot be executed and the shell is not interactive,"
++msgstr ""
++
++#: builtins.c:528
++msgid "then the shell exits, unless the shell option `execfail' is set."
++msgstr ""
++
++#: builtins.c:534
++msgid "Exit the shell with a status of N. If N is omitted, the exit status"
++msgstr ""
++
++#: builtins.c:535
++msgid "is that of the last command executed."
++msgstr ""
++
++#: builtins.c:541
++msgid "Logout of a login shell."
++msgstr ""
++
++#: builtins.c:548
++msgid "fc is used to list or edit and re-execute commands from the history list."
++msgstr ""
++
++#: builtins.c:549
++msgid "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
++msgstr ""
++
++#: builtins.c:550
++msgid "string, which means the most recent command beginning with that"
++msgstr ""
++
++#: builtins.c:551
++#, fuzzy
++msgid "string."
++msgstr "STRÄNG"
++
++#: builtins.c:553
++msgid " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
++msgstr ""
++
++#: builtins.c:554
++msgid " then vi."
++msgstr ""
++
++#: builtins.c:556
++msgid " -l means list lines instead of editing."
++msgstr ""
++
++#: builtins.c:557
++msgid " -n means no line numbers listed."
++msgstr ""
++
++#: builtins.c:558
++msgid " -r means reverse the order of the lines (making it newest listed first)."
++msgstr ""
++
++#: builtins.c:560
++msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
++msgstr ""
++
++#: builtins.c:561
++msgid "re-executed after the substitution OLD=NEW is performed."
++msgstr ""
++
++#: builtins.c:563
++msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
++msgstr ""
++
++#: builtins.c:564
++msgid "runs the last command beginning with `cc' and typing `r' re-executes"
++msgstr ""
++
++#: builtins.c:565
++msgid "the last command."
++msgstr ""
++
++#: builtins.c:573
++msgid "Place JOB_SPEC in the foreground, and make it the current job. If"
++msgstr ""
++
++#: builtins.c:574
++msgid "JOB_SPEC is not present, the shell's notion of the current job is"
++msgstr ""
++
++#: builtins.c:575
++#, fuzzy
++msgid "used."
++msgstr "Anv_änt"
++
++#: builtins.c:583
++msgid "Place JOB_SPEC in the background, as if it had been started with"
++msgstr ""
++
++#: builtins.c:584
++msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
++msgstr ""
++
++#: builtins.c:585
++msgid "job is used."
++msgstr ""
++
++#: builtins.c:592
++msgid "For each NAME, the full pathname of the command is determined and"
++msgstr ""
++
++#: builtins.c:593
++msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
++msgstr ""
++
++#: builtins.c:594
++msgid "full pathname of NAME, and no path search is performed. The -r"
++msgstr ""
++
++#: builtins.c:595
++msgid "option causes the shell to forget all remembered locations. The -d"
++msgstr ""
++
++#: builtins.c:596
++msgid "option causes the shell to forget the remembered location of each NAME."
++msgstr ""
++
++#: builtins.c:597
++msgid "If the -t option is supplied the full pathname to which each NAME"
++msgstr ""
++
++#: builtins.c:598
++msgid "corresponds is printed. If multiple NAME arguments are supplied with"
++msgstr ""
++
++#: builtins.c:599
++msgid "-t, the NAME is printed before the hashed full pathname. The -l option"
++msgstr ""
++
++#: builtins.c:600
++msgid "causes output to be displayed in a format that may be reused as input."
++msgstr ""
++
++#: builtins.c:601
++msgid "If no arguments are given, information about remembered commands is displayed."
++msgstr ""
++
++#: builtins.c:608
++msgid "Display helpful information about builtin commands. If PATTERN is"
++msgstr ""
++
++#: builtins.c:609
++msgid "specified, gives detailed help on all commands matching PATTERN,"
++msgstr ""
++
++#: builtins.c:610
++msgid "otherwise a list of the builtins is printed. The -s option"
++msgstr ""
++
++#: builtins.c:611
++msgid "restricts the output for each builtin command matching PATTERN to"
++msgstr ""
++
++#: builtins.c:612
++msgid "a short usage synopsis."
++msgstr ""
++
++#: builtins.c:620
++msgid "Display the history list with line numbers. Lines listed with"
++msgstr ""
++
++#: builtins.c:621
++msgid "with a `*' have been modified. Argument of N says to list only"
++msgstr ""
++
++#: builtins.c:622
++msgid "the last N lines. The `-c' option causes the history list to be"
++msgstr ""
++
++#: builtins.c:623
++msgid "cleared by deleting all of the entries. The `-d' option deletes"
++msgstr ""
++
++#: builtins.c:624
++msgid "the history entry at offset OFFSET. The `-w' option writes out the"
++msgstr ""
++
++#: builtins.c:625
++msgid "current history to the history file; `-r' means to read the file and"
++msgstr ""
++
++#: builtins.c:626
++msgid "append the contents to the history list instead. `-a' means"
++msgstr ""
++
++#: builtins.c:627
++msgid "to append history lines from this session to the history file."
++msgstr ""
++
++#: builtins.c:628
++msgid "Argument `-n' means to read all history lines not already read"
++msgstr ""
++
++#: builtins.c:629
++msgid "from the history file and append them to the history list."
++msgstr ""
++
++#: builtins.c:631
++msgid "If FILENAME is given, then that is used as the history file else"
++msgstr ""
++
++#: builtins.c:632
++msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
++msgstr ""
++
++#: builtins.c:633
++msgid "If the -s option is supplied, the non-option ARGs are appended to"
++msgstr ""
++
++#: builtins.c:634
++msgid "the history list as a single entry. The -p option means to perform"
++msgstr ""
++
++#: builtins.c:635
++msgid "history expansion on each ARG and display the result, without storing"
++msgstr ""
++
++#: builtins.c:636
++msgid "anything in the history list."
++msgstr ""
++
++#: builtins.c:638
++msgid "If the $HISTTIMEFORMAT variable is set and not null, its value is used"
++msgstr ""
++
++#: builtins.c:639
++msgid "as a format string for strftime(3) to print the time stamp associated"
++msgstr ""
++
++#: builtins.c:640
++msgid "with each displayed history entry. No time stamps are printed otherwise."
++msgstr ""
++
++#: builtins.c:648
++msgid "Lists the active jobs. The -l option lists process id's in addition"
++msgstr ""
++
++#: builtins.c:649
++msgid "to the normal information; the -p option lists process id's only."
++msgstr ""
++
++#: builtins.c:650
++msgid "If -n is given, only processes that have changed status since the last"
++msgstr ""
++
++#: builtins.c:651
++msgid "notification are printed. JOBSPEC restricts output to that job. The"
++msgstr ""
++
++#: builtins.c:652
++msgid "-r and -s options restrict output to running and stopped jobs only,"
++msgstr ""
++
++#: builtins.c:653
++msgid "respectively. Without options, the status of all active jobs is"
++msgstr ""
++
++#: builtins.c:654
++msgid "printed. If -x is given, COMMAND is run after all job specifications"
++msgstr ""
++
++#: builtins.c:655
++msgid "that appear in ARGS have been replaced with the process ID of that job's"
++msgstr ""
++
++#: builtins.c:656
++msgid "process group leader."
++msgstr ""
++
++#: builtins.c:664
++msgid "By default, removes each JOBSPEC argument from the table of active jobs."
++msgstr ""
++
++#: builtins.c:665
++msgid "If the -h option is given, the job is not removed from the table, but is"
++msgstr ""
++
++#: builtins.c:666
++msgid "marked so that SIGHUP is not sent to the job if the shell receives a"
++msgstr ""
++
++#: builtins.c:667
++msgid "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all"
++msgstr ""
++
++#: builtins.c:668
++msgid "jobs from the job table; the -r option means to remove only running jobs."
++msgstr ""
++
++#: builtins.c:675
++msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
++msgstr ""
++
++#: builtins.c:676
++msgid "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
++msgstr ""
++
++#: builtins.c:677
++msgid "lists the signal names; if arguments follow `-l' they are assumed to"
++msgstr ""
++
++#: builtins.c:678
++msgid "be signal numbers for which names should be listed. Kill is a shell"
++msgstr ""
++
++#: builtins.c:679
++msgid "builtin for two reasons: it allows job IDs to be used instead of"
++msgstr ""
++
++#: builtins.c:680
++msgid "process IDs, and, if you have reached the limit on processes that"
++msgstr ""
++
++#: builtins.c:681
++msgid "you can create, you don't have to start a process to kill another one."
++msgstr ""
++
++#: builtins.c:687
++msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
++msgstr ""
++
++#: builtins.c:688
++msgid "is done in fixed-width integers with no check for overflow, though"
++msgstr ""
++
++#: builtins.c:689
++msgid "division by 0 is trapped and flagged as an error. The following"
++msgstr ""
++
++#: builtins.c:690
++msgid "list of operators is grouped into levels of equal-precedence operators."
++msgstr ""
++
++#: builtins.c:691
++msgid "The levels are listed in order of decreasing precedence."
++msgstr ""
++
++#: builtins.c:693
++msgid "\tid++, id--\tvariable post-increment, post-decrement"
++msgstr ""
++
++#: builtins.c:694
++msgid "\t++id, --id\tvariable pre-increment, pre-decrement"
++msgstr ""
++
++#: builtins.c:695
++msgid "\t-, +\t\tunary minus, plus"
++msgstr ""
++
++#: builtins.c:696
++msgid "\t!, ~\t\tlogical and bitwise negation"
++msgstr ""
++
++#: builtins.c:697
++msgid "\t**\t\texponentiation"
++msgstr ""
++
++#: builtins.c:698
++msgid "\t*, /, %\t\tmultiplication, division, remainder"
++msgstr ""
++
++#: builtins.c:699
++msgid "\t+, -\t\taddition, subtraction"
++msgstr ""
++
++#: builtins.c:700
++msgid "\t<<, >>\t\tleft and right bitwise shifts"
++msgstr ""
++
++#: builtins.c:701
++msgid "\t<=, >=, <, >\tcomparison"
++msgstr ""
++
++#: builtins.c:702
++msgid "\t==, !=\t\tequality, inequality"
++msgstr ""
++
++#: builtins.c:703
++msgid "\t&\t\tbitwise AND"
++msgstr ""
++
++#: builtins.c:704
++msgid "\t^\t\tbitwise XOR"
++msgstr ""
++
++#: builtins.c:705
++msgid "\t|\t\tbitwise OR"
++msgstr ""
++
++#: builtins.c:706
++msgid "\t&&\t\tlogical AND"
++msgstr ""
++
++#: builtins.c:707
++msgid "\t||\t\tlogical OR"
++msgstr ""
++
++#: builtins.c:708
++msgid "\texpr ? expr : expr"
++msgstr ""
++
++#: builtins.c:709
++msgid "\t\t\tconditional operator"
++msgstr ""
++
++#: builtins.c:710
++msgid "\t=, *=, /=, %=,"
++msgstr "\t=, *=, /=, %=,"
++
++#: builtins.c:711
++msgid "\t+=, -=, <<=, >>=,"
++msgstr "\t+=, -=, <<=, >>=,"
++
++#: builtins.c:712
++msgid "\t&=, ^=, |=\tassignment"
++msgstr ""
++
++#: builtins.c:714
++msgid "Shell variables are allowed as operands. The name of the variable"
++msgstr ""
++
++#: builtins.c:715
++msgid "is replaced by its value (coerced to a fixed-width integer) within"
++msgstr ""
++
++#: builtins.c:716
++msgid "an expression. The variable need not have its integer attribute"
++msgstr ""
++
++#: builtins.c:717
++msgid "turned on to be used in an expression."
++msgstr ""
++
++#: builtins.c:719
++msgid "Operators are evaluated in order of precedence. Sub-expressions in"
++msgstr ""
++
++#: builtins.c:720
++msgid "parentheses are evaluated first and may override the precedence"
++msgstr ""
++
++#: builtins.c:721
++msgid "rules above."
++msgstr ""
++
++#: builtins.c:723
++msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
++msgstr ""
++
++#: builtins.c:724
++msgid "otherwise."
++msgstr ""
++
++#: builtins.c:730
++msgid "One line is read from the standard input, or from file descriptor FD if the"
++msgstr ""
++
++#: builtins.c:731
++msgid "-u option is supplied, and the first word is assigned to the first NAME,"
++msgstr ""
++
++#: builtins.c:732
++msgid "the second word to the second NAME, and so on, with leftover words assigned"
++msgstr ""
++
++#: builtins.c:733
++msgid "to the last NAME. Only the characters found in $IFS are recognized as word"
++msgstr ""
++
++#: builtins.c:734
++msgid "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY"
++msgstr ""
++
++#: builtins.c:735
++msgid "variable. If the -r option is given, this signifies `raw' input, and"
++msgstr ""
++
++#: builtins.c:736
++msgid "backslash escaping is disabled. The -d option causes read to continue"
++msgstr ""
++
++#: builtins.c:737
++msgid "until the first character of DELIM is read, rather than newline. If the -p"
++msgstr ""
++
++#: builtins.c:738
++msgid "option is supplied, the string PROMPT is output without a trailing newline"
++msgstr ""
++
++#: builtins.c:739
++msgid "before attempting to read. If -a is supplied, the words read are assigned"
++msgstr ""
++
++#: builtins.c:740
++msgid "to sequential indices of ARRAY, starting at zero. If -e is supplied and"
++msgstr ""
++
++#: builtins.c:741
++msgid "the shell is interactive, readline is used to obtain the line. If -n is"
++msgstr ""
++
++#: builtins.c:742
++msgid "supplied with a non-zero NCHARS argument, read returns after NCHARS"
++msgstr ""
++
++#: builtins.c:743
++msgid "characters have been read. The -s option causes input coming from a"
++msgstr ""
++
++#: builtins.c:744
++msgid "terminal to not be echoed."
++msgstr ""
++
++#: builtins.c:746
++msgid "The -t option causes read to time out and return failure if a complete line"
++msgstr ""
++
++#: builtins.c:747
++msgid "of input is not read within TIMEOUT seconds. If the TMOUT variable is set,"
++msgstr ""
++
++#: builtins.c:748
++msgid "its value is the default timeout. The return code is zero, unless end-of-file"
++msgstr ""
++
++#: builtins.c:749
++msgid "is encountered, read times out, or an invalid file descriptor is supplied as"
++msgstr ""
++
++#: builtins.c:750
++msgid "the argument to -u."
++msgstr ""
++
++#: builtins.c:756
++msgid "Causes a function to exit with the return value specified by N. If N"
++msgstr ""
++
++#: builtins.c:757
++msgid "is omitted, the return status is that of the last command."
++msgstr ""
++
++#: builtins.c:763
++msgid " -a Mark variables which are modified or created for export."
++msgstr ""
++
++#: builtins.c:764
++msgid " -b Notify of job termination immediately."
++msgstr ""
++
++#: builtins.c:765
++msgid " -e Exit immediately if a command exits with a non-zero status."
++msgstr ""
++
++#: builtins.c:766
++msgid " -f Disable file name generation (globbing)."
++msgstr ""
++
++#: builtins.c:767
++msgid " -h Remember the location of commands as they are looked up."
++msgstr ""
++
++#: builtins.c:768
++msgid " -k All assignment arguments are placed in the environment for a"
++msgstr ""
++
++#: builtins.c:769
++msgid " command, not just those that precede the command name."
++msgstr ""
++
++#: builtins.c:770
++msgid " -m Job control is enabled."
++msgstr ""
++
++#: builtins.c:771
++msgid " -n Read commands but do not execute them."
++msgstr ""
++
++#: builtins.c:772
++#, fuzzy
++msgid " -o option-name"
++msgstr "Inställningsnamn"
++
++#: builtins.c:773
++msgid " Set the variable corresponding to option-name:"
++msgstr ""
++
++#: builtins.c:774
++msgid " allexport same as -a"
++msgstr " allexport samma som -a"
++
++#: builtins.c:775
++msgid " braceexpand same as -B"
++msgstr " braceexpand samma som -B"
++
++#: builtins.c:777
++msgid " emacs use an emacs-style line editing interface"
++msgstr ""
++
++#: builtins.c:779
++msgid " errexit same as -e"
++msgstr " errexit samma som -e"
++
++#: builtins.c:780
++msgid " errtrace same as -E"
++msgstr " errtrace samma som -E"
++
++#: builtins.c:781
++msgid " functrace same as -T"
++msgstr " functrace samma som -T"
++
++#: builtins.c:782
++msgid " hashall same as -h"
++msgstr " hashall samma som -h"
++
++#: builtins.c:784
++msgid " histexpand same as -H"
++msgstr " histexpand samma som -H"
++
++#: builtins.c:787
++msgid " history enable command history"
++msgstr ""
++
++#: builtins.c:789
++msgid " ignoreeof the shell will not exit upon reading EOF"
++msgstr ""
++
++#: builtins.c:790
++msgid " interactive-comments"
++msgstr ""
++
++#: builtins.c:791
++msgid " allow comments to appear in interactive commands"
++msgstr ""
++
++#: builtins.c:792
++msgid " keyword same as -k"
++msgstr " keyword samma som -k"
++
++#: builtins.c:793
++msgid " monitor same as -m"
++msgstr " monitor samma som -m"
++
++#: builtins.c:794
++msgid " noclobber same as -C"
++msgstr " noclobber samma som -C"
++
++#: builtins.c:795
++msgid " noexec same as -n"
++msgstr " noexec samma som -n"
++
++#: builtins.c:796
++msgid " noglob same as -f"
++msgstr " noglob samma som -f"
++
++#: builtins.c:797
++msgid " nolog currently accepted but ignored"
++msgstr ""
++
++#: builtins.c:798
++msgid " notify same as -b"
++msgstr " notify samma som -b"
++
++#: builtins.c:799
++msgid " nounset same as -u"
++msgstr " nounset samma som -u"
++
++#: builtins.c:800
++msgid " onecmd same as -t"
++msgstr " onecmd samma som -t"
++
++#: builtins.c:801
++msgid " physical same as -P"
++msgstr " physical samma som -P"
++
++#: builtins.c:802
++msgid " pipefail the return value of a pipeline is the status of"
++msgstr ""
++
++#: builtins.c:803
++msgid " the last command to exit with a non-zero status,"
++msgstr ""
++
++#: builtins.c:804
++msgid " or zero if no command exited with a non-zero status"
++msgstr ""
++
++#: builtins.c:805
++msgid " posix change the behavior of bash where the default"
++msgstr ""
++
++#: builtins.c:806
++msgid " operation differs from the 1003.2 standard to"
++msgstr ""
++
++#: builtins.c:807
++msgid " match the standard"
++msgstr ""
++
++#: builtins.c:808
++msgid " privileged same as -p"
++msgstr " privileged samma som -p"
++
++#: builtins.c:809
++msgid " verbose same as -v"
++msgstr " verbose samma som -v"
++
++#: builtins.c:811
++msgid " vi use a vi-style line editing interface"
++msgstr ""
++
++#: builtins.c:813
++msgid " xtrace same as -x"
++msgstr " xtrace samma som -x"
++
++#: builtins.c:814
++msgid " -p Turned on whenever the real and effective user ids do not match."
++msgstr ""
++
++#: builtins.c:815
++msgid " Disables processing of the $ENV file and importing of shell"
++msgstr ""
++
++#: builtins.c:816
++msgid " functions. Turning this option off causes the effective uid and"
++msgstr ""
++
++#: builtins.c:817
++msgid " gid to be set to the real uid and gid."
++msgstr ""
++
++#: builtins.c:818
++msgid " -t Exit after reading and executing one command."
++msgstr ""
++
++#: builtins.c:819
++msgid " -u Treat unset variables as an error when substituting."
++msgstr ""
++
++#: builtins.c:820
++msgid " -v Print shell input lines as they are read."
++msgstr ""
++
++#: builtins.c:821
++msgid " -x Print commands and their arguments as they are executed."
++msgstr ""
++
++#: builtins.c:823
++msgid " -B the shell will perform brace expansion"
++msgstr ""
++
++#: builtins.c:825
++msgid " -C If set, disallow existing regular files to be overwritten"
++msgstr ""
++
++#: builtins.c:826
++msgid " by redirection of output."
++msgstr ""
++
++#: builtins.c:827
++msgid " -E If set, the ERR trap is inherited by shell functions."
++msgstr ""
++
++#: builtins.c:829
++msgid " -H Enable ! style history substitution. This flag is on"
++msgstr ""
++
++#: builtins.c:830
++msgid " by default."
++msgstr ""
++
++#: builtins.c:832
++msgid " -P If set, do not follow symbolic links when executing commands"
++msgstr ""
++
++#: builtins.c:833
++msgid " such as cd which change the current directory."
++msgstr ""
++
++#: builtins.c:834
++msgid " -T If set, the DEBUG trap is inherited by shell functions."
++msgstr ""
++
++#: builtins.c:836
++msgid "Using + rather than - causes these flags to be turned off. The"
++msgstr ""
++
++#: builtins.c:837
++msgid "flags can also be used upon invocation of the shell. The current"
++msgstr ""
++
++#: builtins.c:838
++msgid "set of flags may be found in $-. The remaining n ARGs are positional"
++msgstr ""
++
++#: builtins.c:839
++msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
++msgstr ""
++
++#: builtins.c:840
++msgid "ARGs are given, all shell variables are printed."
++msgstr ""
++
++#: builtins.c:846
++msgid "For each NAME, remove the corresponding variable or function. Given"
++msgstr ""
++
++#: builtins.c:847
++msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
++msgstr ""
++
++#: builtins.c:848
++msgid "unset will only act on functions. With neither flag, unset first"
++msgstr ""
++
++#: builtins.c:849
++msgid "tries to unset a variable, and if that fails, then tries to unset a"
++msgstr ""
++
++#: builtins.c:850
++msgid "function. Some variables cannot be unset; also see readonly."
++msgstr ""
++
++#: builtins.c:856
++msgid "NAMEs are marked for automatic export to the environment of"
++msgstr ""
++
++#: builtins.c:857
++msgid "subsequently executed commands. If the -f option is given,"
++msgstr ""
++
++#: builtins.c:858
++msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
++msgstr ""
++
++#: builtins.c:859
++msgid "is given, a list of all names that are exported in this shell is"
++msgstr ""
++
++#: builtins.c:860
++msgid "printed. An argument of `-n' says to remove the export property"
++msgstr ""
++
++#: builtins.c:861
++msgid "from subsequent NAMEs. An argument of `--' disables further option"
++msgstr ""
++
++#: builtins.c:862
++#: builtins.c:874
++#, fuzzy
++msgid "processing."
++msgstr "Bearbetar..."
++
++#: builtins.c:868
++msgid "The given NAMEs are marked readonly and the values of these NAMEs may"
++msgstr ""
++
++#: builtins.c:869
++msgid "not be changed by subsequent assignment. If the -f option is given,"
++msgstr ""
++
++#: builtins.c:870
++msgid "then functions corresponding to the NAMEs are so marked. If no"
++msgstr ""
++
++#: builtins.c:871
++msgid "arguments are given, or if `-p' is given, a list of all readonly names"
++msgstr ""
++
++#: builtins.c:872
++msgid "is printed. The `-a' option means to treat each NAME as"
++msgstr ""
++
++#: builtins.c:873
++msgid "an array variable. An argument of `--' disables further option"
++msgstr ""
++
++#: builtins.c:880
++msgid "The positional parameters from $N+1 ... are renamed to $1 ... If N is"
++msgstr ""
++
++#: builtins.c:881
++msgid "not given, it is assumed to be 1."
++msgstr ""
++
++#: builtins.c:887
++#: builtins.c:896
++msgid "Read and execute commands from FILENAME and return. The pathnames"
++msgstr ""
++
++#: builtins.c:888
++#: builtins.c:897
++msgid "in $PATH are used to find the directory containing FILENAME. If any"
++msgstr ""
++
++#: builtins.c:889
++#: builtins.c:898
++msgid "ARGUMENTS are supplied, they become the positional parameters when"
++msgstr ""
++
++#: builtins.c:890
++#: builtins.c:899
++msgid "FILENAME is executed."
++msgstr ""
++
++#: builtins.c:906
++msgid "Suspend the execution of this shell until it receives a SIGCONT"
++msgstr ""
++
++#: builtins.c:907
++msgid "signal. The `-f' if specified says not to complain about this"
++msgstr ""
++
++#: builtins.c:908
++msgid "being a login shell if it is; just suspend anyway."
++msgstr ""
++
++#: builtins.c:915
++msgid "Exits with a status of 0 (true) or 1 (false) depending on"
++msgstr ""
++
++#: builtins.c:916
++msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
++msgstr ""
++
++#: builtins.c:917
++msgid "expressions are often used to examine the status of a file. There"
++msgstr ""
++
++#: builtins.c:918
++msgid "are string operators as well, and numeric comparison operators."
++msgstr ""
++
++#: builtins.c:920
++msgid "File operators:"
++msgstr ""
++
++#: builtins.c:922
++msgid " -a FILE True if file exists."
++msgstr ""
++
++#: builtins.c:923
++msgid " -b FILE True if file is block special."
++msgstr ""
++
++#: builtins.c:924
++msgid " -c FILE True if file is character special."
++msgstr ""
++
++#: builtins.c:925
++msgid " -d FILE True if file is a directory."
++msgstr ""
++
++#: builtins.c:926
++msgid " -e FILE True if file exists."
++msgstr ""
++
++#: builtins.c:927
++msgid " -f FILE True if file exists and is a regular file."
++msgstr ""
++
++#: builtins.c:928
++msgid " -g FILE True if file is set-group-id."
++msgstr ""
++
++#: builtins.c:929
++msgid " -h FILE True if file is a symbolic link."
++msgstr ""
++
++#: builtins.c:930
++msgid " -L FILE True if file is a symbolic link."
++msgstr ""
++
++#: builtins.c:931
++msgid " -k FILE True if file has its `sticky' bit set."
++msgstr ""
++
++#: builtins.c:932
++msgid " -p FILE True if file is a named pipe."
++msgstr ""
++
++#: builtins.c:933
++msgid " -r FILE True if file is readable by you."
++msgstr ""
++
++#: builtins.c:934
++msgid " -s FILE True if file exists and is not empty."
++msgstr ""
++
++#: builtins.c:935
++msgid " -S FILE True if file is a socket."
++msgstr ""
++
++#: builtins.c:936
++msgid " -t FD True if FD is opened on a terminal."
++msgstr ""
++
++#: builtins.c:937
++msgid " -u FILE True if the file is set-user-id."
++msgstr ""
++
++#: builtins.c:938
++msgid " -w FILE True if the file is writable by you."
++msgstr ""
++
++#: builtins.c:939
++msgid " -x FILE True if the file is executable by you."
++msgstr ""
++
++#: builtins.c:940
++msgid " -O FILE True if the file is effectively owned by you."
++msgstr ""
++
++#: builtins.c:941
++msgid " -G FILE True if the file is effectively owned by your group."
++msgstr ""
++
++#: builtins.c:942
++msgid " -N FILE True if the file has been modified since it was last read."
++msgstr ""
++
++#: builtins.c:944
++msgid " FILE1 -nt FILE2 True if file1 is newer than file2 (according to"
++msgstr ""
++
++#: builtins.c:945
++#, fuzzy
++msgid " modification date)."
++msgstr "Ändrad datum"
++
++#: builtins.c:947
++msgid " FILE1 -ot FILE2 True if file1 is older than file2."
++msgstr ""
++
++#: builtins.c:949
++msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
++msgstr ""
++
++# Operander?
++#: builtins.c:951
++msgid "String operators:"
++msgstr "Strängoperatörer:"
++
++#: builtins.c:953
++msgid " -z STRING True if string is empty."
++msgstr ""
++
++#: builtins.c:955
++#, fuzzy
++msgid " -n STRING"
++msgstr "STRÄNG"
++
++#: builtins.c:956
++msgid " STRING True if string is not empty."
++msgstr ""
++
++#: builtins.c:958
++msgid " STRING1 = STRING2"
++msgstr ""
++
++#: builtins.c:959
++msgid " True if the strings are equal."
++msgstr ""
++
++#: builtins.c:960
++msgid " STRING1 != STRING2"
++msgstr ""
++
++#: builtins.c:961
++msgid " True if the strings are not equal."
++msgstr ""
++
++#: builtins.c:962
++msgid " STRING1 < STRING2"
++msgstr ""
++
++#: builtins.c:963
++msgid " True if STRING1 sorts before STRING2 lexicographically."
++msgstr ""
++
++#: builtins.c:964
++msgid " STRING1 > STRING2"
++msgstr ""
++
++#: builtins.c:965
++msgid " True if STRING1 sorts after STRING2 lexicographically."
++msgstr ""
++
++# Operander?
++#: builtins.c:967
++msgid "Other operators:"
++msgstr "Övriga operatörer:"
++
++#: builtins.c:969
++msgid " -o OPTION True if the shell option OPTION is enabled."
++msgstr ""
++
++#: builtins.c:970
++msgid " ! EXPR True if expr is false."
++msgstr ""
++
++#: builtins.c:971
++msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
++msgstr ""
++
++#: builtins.c:972
++msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
++msgstr ""
++
++#: builtins.c:974
++msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
++msgstr ""
++
++#: builtins.c:975
++msgid " -lt, -le, -gt, or -ge."
++msgstr ""
++
++#: builtins.c:977
++msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
++msgstr ""
++
++#: builtins.c:978
++msgid "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
++msgstr ""
++
++#: builtins.c:979
++msgid "than ARG2."
++msgstr ""
++
++#: builtins.c:985
++msgid "This is a synonym for the \"test\" builtin, but the last"
++msgstr ""
++
++#: builtins.c:986
++msgid "argument must be a literal `]', to match the opening `['."
++msgstr ""
++
++#: builtins.c:992
++msgid "Print the accumulated user and system times for processes run from"
++msgstr ""
++
++#: builtins.c:993
++#, fuzzy
++msgid "the shell."
++msgstr "Skal: "
++
++#: builtins.c:999
++msgid "The command ARG is to be read and executed when the shell receives"
++msgstr ""
++
++#: builtins.c:1000
++msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
++msgstr ""
++
++#: builtins.c:1001
++msgid "reset to their original values. If ARG is the null string each"
++msgstr ""
++
++#: builtins.c:1002
++msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
++msgstr ""
++
++#: builtins.c:1003
++msgid "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
++msgstr ""
++
++#: builtins.c:1004
++msgid "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every"
++msgstr ""
++
++#: builtins.c:1005
++msgid "command. If ARG is `-p' then the trap commands associated with"
++msgstr ""
++
++#: builtins.c:1006
++msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
++msgstr ""
++
++#: builtins.c:1007
++msgid "only `-p' is given, trap prints the list of commands associated with"
++msgstr ""
++
++#: builtins.c:1008
++msgid "each signal number. Each SIGNAL_SPEC is either a signal name in <signal.h>"
++msgstr ""
++
++#: builtins.c:1009
++msgid "or a signal number. `trap -l' prints a list of signal names and their"
++msgstr ""
++
++#: builtins.c:1010
++msgid "corresponding numbers. Note that a signal can be sent to the shell"
++msgstr ""
++
++#: builtins.c:1011
++msgid "with \"kill -signal $$\"."
++msgstr ""
++
++#: builtins.c:1017
++msgid "For each NAME, indicate how it would be interpreted if used as a"
++msgstr ""
++
++#: builtins.c:1018
++#, fuzzy
++msgid "command name."
++msgstr "Kommandonamn"
++
++#: builtins.c:1020
++msgid "If the -t option is used, `type' outputs a single word which is one of"
++msgstr ""
++
++#: builtins.c:1021
++msgid "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
++msgstr ""
++
++#: builtins.c:1022
++msgid "alias, shell reserved word, shell function, shell builtin, disk file,"
++msgstr ""
++
++#: builtins.c:1023
++msgid "or unfound, respectively."
++msgstr ""
++
++#: builtins.c:1025
++msgid "If the -p flag is used, `type' either returns the name of the disk"
++msgstr ""
++
++#: builtins.c:1026
++msgid "file that would be executed, or nothing if `type -t NAME' would not"
++msgstr ""
++
++#: builtins.c:1027
++msgid "return `file'."
++msgstr ""
++
++#: builtins.c:1029
++msgid "If the -a flag is used, `type' displays all of the places that contain"
++msgstr ""
++
++#: builtins.c:1030
++msgid "an executable named `file'. This includes aliases, builtins, and"
++msgstr ""
++
++#: builtins.c:1031
++msgid "functions, if and only if the -p flag is not also used."
++msgstr ""
++
++#: builtins.c:1033
++msgid "The -f flag suppresses shell function lookup."
++msgstr ""
++
++#: builtins.c:1035
++msgid "The -P flag forces a PATH search for each NAME, even if it is an alias,"
++msgstr ""
++
++#: builtins.c:1036
++msgid "builtin, or function, and returns the name of the disk file that would"
++msgstr ""
++
++#: builtins.c:1037
++msgid "be executed."
++msgstr ""
++
++#: builtins.c:1044
++msgid "Ulimit provides control over the resources available to processes"
++msgstr ""
++
++#: builtins.c:1045
++msgid "started by the shell, on systems that allow such control. If an"
++msgstr ""
++
++#: builtins.c:1046
++msgid "option is given, it is interpreted as follows:"
++msgstr ""
++
++#: builtins.c:1048
++msgid " -S\tuse the `soft' resource limit"
++msgstr ""
++
++#: builtins.c:1049
++msgid " -H\tuse the `hard' resource limit"
++msgstr ""
++
++#: builtins.c:1050
++msgid " -a\tall current limits are reported"
++msgstr ""
++
++#: builtins.c:1051
++msgid " -c\tthe maximum size of core files created"
++msgstr ""
++
++#: builtins.c:1052
++msgid " -d\tthe maximum size of a process's data segment"
++msgstr ""
++
++#: builtins.c:1053
++msgid " -f\tthe maximum size of files created by the shell"
++msgstr ""
++
++#: builtins.c:1054
++msgid " -l\tthe maximum size a process may lock into memory"
++msgstr ""
++
++#: builtins.c:1055
++msgid " -m\tthe maximum resident set size"
++msgstr ""
++
++#: builtins.c:1056
++msgid " -n\tthe maximum number of open file descriptors"
++msgstr ""
++
++#: builtins.c:1057
++msgid " -p\tthe pipe buffer size"
++msgstr ""
++
++#: builtins.c:1058
++msgid " -s\tthe maximum stack size"
++msgstr ""
++
++#: builtins.c:1059
++msgid " -t\tthe maximum amount of cpu time in seconds"
++msgstr ""
++
++#: builtins.c:1060
++msgid " -u\tthe maximum number of user processes"
++msgstr ""
++
++#: builtins.c:1061
++msgid " -v\tthe size of virtual memory"
++msgstr ""
++
++#: builtins.c:1063
++msgid "If LIMIT is given, it is the new value of the specified resource;"
++msgstr ""
++
++#: builtins.c:1064
++msgid "the special LIMIT values `soft', `hard', and `unlimited' stand for"
++msgstr ""
++
++#: builtins.c:1065
++msgid "the current soft limit, the current hard limit, and no limit, respectively."
++msgstr ""
++
++#: builtins.c:1066
++msgid "Otherwise, the current value of the specified resource is printed."
++msgstr ""
++
++#: builtins.c:1067
++msgid "If no option is given, then -f is assumed. Values are in 1024-byte"
++msgstr ""
++
++#: builtins.c:1068
++msgid "increments, except for -t, which is in seconds, -p, which is in"
++msgstr ""
++
++#: builtins.c:1069
++msgid "increments of 512 bytes, and -u, which is an unscaled number of"
++msgstr ""
++
++#: builtins.c:1070
++#, fuzzy
++msgid "processes."
++msgstr "Processer"
++
++#: builtins.c:1077
++msgid "The user file-creation mask is set to MODE. If MODE is omitted, or if"
++msgstr ""
++
++#: builtins.c:1078
++msgid "`-S' is supplied, the current value of the mask is printed. The `-S'"
++msgstr ""
++
++#: builtins.c:1079
++msgid "option makes the output symbolic; otherwise an octal number is output."
++msgstr ""
++
++#: builtins.c:1080
++msgid "If `-p' is supplied, and MODE is omitted, the output is in a form"
++msgstr ""
++
++#: builtins.c:1081
++msgid "that may be used as input. If MODE begins with a digit, it is"
++msgstr ""
++
++#: builtins.c:1082
++msgid "interpreted as an octal number, otherwise it is a symbolic mode string"
++msgstr ""
++
++#: builtins.c:1083
++msgid "like that accepted by chmod(1)."
++msgstr ""
++
++#: builtins.c:1090
++#: builtins.c:1102
++msgid "Wait for the specified process and report its termination status. If"
++msgstr ""
++
++#: builtins.c:1091
++#: builtins.c:1103
++msgid "N is not given, all currently active child processes are waited for,"
++msgstr ""
++
++#: builtins.c:1092
++msgid "and the return code is zero. N may be a process ID or a job"
++msgstr ""
++
++#: builtins.c:1093
++msgid "specification; if a job spec is given, all processes in the job's"
++msgstr ""
++
++#: builtins.c:1094
++msgid "pipeline are waited for."
++msgstr ""
++
++#: builtins.c:1104
++msgid "and the return code is zero. N is a process ID; if it is not given,"
++msgstr ""
++
++#: builtins.c:1105
++msgid "all child processes of the shell are waited for."
++msgstr ""
++
++#: builtins.c:1112
++msgid "The `for' loop executes a sequence of commands for each member in a"
++msgstr ""
++
++#: builtins.c:1113
++msgid "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
++msgstr ""
++
++#: builtins.c:1114
++msgid "assumed. For each element in WORDS, NAME is set to that element, and"
++msgstr ""
++
++#: builtins.c:1115
++msgid "the COMMANDS are executed."
++msgstr ""
++
++#: builtins.c:1121
++msgid "Equivalent to"
++msgstr ""
++
++#: builtins.c:1122
++msgid "\t(( EXP1 ))"
++msgstr ""
++
++#: builtins.c:1123
++msgid "\twhile (( EXP2 )); do"
++msgstr ""
++
++#: builtins.c:1124
++msgid "\t\tCOMMANDS"
++msgstr ""
++
++#: builtins.c:1125
++msgid "\t\t(( EXP3 ))"
++msgstr ""
++
++#: builtins.c:1126
++msgid "\tdone"
++msgstr ""
++
++#: builtins.c:1127
++msgid "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is"
++msgstr ""
++
++#: builtins.c:1128
++msgid "omitted, it behaves as if it evaluates to 1."
++msgstr ""
++
++#: builtins.c:1134
++msgid "The WORDS are expanded, generating a list of words. The"
++msgstr ""
++
++#: builtins.c:1135
++msgid "set of expanded words is printed on the standard error, each"
++msgstr ""
++
++#: builtins.c:1136
++msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
++msgstr ""
++
++#: builtins.c:1137
++msgid "is assumed. The PS3 prompt is then displayed and a line read"
++msgstr ""
++
++#: builtins.c:1138
++msgid "from the standard input. If the line consists of the number"
++msgstr ""
++
++#: builtins.c:1139
++msgid "corresponding to one of the displayed words, then NAME is set"
++msgstr ""
++
++#: builtins.c:1140
++msgid "to that word. If the line is empty, WORDS and the prompt are"
++msgstr ""
++
++#: builtins.c:1141
++msgid "redisplayed. If EOF is read, the command completes. Any other"
++msgstr ""
++
++#: builtins.c:1142
++msgid "value read causes NAME to be set to null. The line read is saved"
++msgstr ""
++
++#: builtins.c:1143
++msgid "in the variable REPLY. COMMANDS are executed after each selection"
++msgstr ""
++
++#: builtins.c:1144
++msgid "until a break command is executed."
++msgstr ""
++
++#: builtins.c:1150
++msgid "Execute PIPELINE and print a summary of the real time, user CPU time,"
++msgstr ""
++
++#: builtins.c:1151
++msgid "and system CPU time spent executing PIPELINE when it terminates."
++msgstr ""
++
++#: builtins.c:1152
++msgid "The return status is the return status of PIPELINE. The `-p' option"
++msgstr ""
++
++#: builtins.c:1153
++msgid "prints the timing summary in a slightly different format. This uses"
++msgstr ""
++
++#: builtins.c:1154
++msgid "the value of the TIMEFORMAT variable as the output format."
++msgstr ""
++
++#: builtins.c:1160
++msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The"
++msgstr ""
++
++#: builtins.c:1161
++msgid "`|' is used to separate multiple patterns."
++msgstr ""
++
++#: builtins.c:1167
++msgid "The if COMMANDS are executed. If the exit status is zero, then the then"
++msgstr ""
++
++#: builtins.c:1168
++msgid "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
++msgstr ""
++
++#: builtins.c:1169
++msgid "in turn, and if the exit status is zero, the corresponding then COMMANDS"
++msgstr ""
++
++#: builtins.c:1170
++msgid "are executed and the if command completes. Otherwise, the else COMMANDS"
++msgstr ""
++
++#: builtins.c:1171
++msgid "are executed, if present. The exit status is the exit status of the last"
++msgstr ""
++
++#: builtins.c:1172
++msgid "command executed, or zero if no condition tested true."
++msgstr ""
++
++#: builtins.c:1178
++#: builtins.c:1185
++msgid "Expand and execute COMMANDS as long as the final command in the"
++msgstr ""
++
++#: builtins.c:1179
++msgid "`while' COMMANDS has an exit status of zero."
++msgstr ""
++
++#: builtins.c:1186
++msgid "`until' COMMANDS has an exit status which is not zero."
++msgstr ""
++
++#: builtins.c:1192
++msgid "Create a simple command invoked by NAME which runs COMMANDS."
++msgstr ""
++
++#: builtins.c:1193
++msgid "Arguments on the command line along with NAME are passed to the"
++msgstr ""
++
++#: builtins.c:1194
++msgid "function as $0 .. $n."
++msgstr ""
++
++#: builtins.c:1200
++msgid "Run a set of commands in a group. This is one way to redirect an"
++msgstr ""
++
++#: builtins.c:1201
++msgid "entire set of commands."
++msgstr ""
++
++#: builtins.c:1207
++msgid "This is similar to the `fg' command. Resume a stopped or background"
++msgstr ""
++
++#: builtins.c:1208
++msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
++msgstr ""
++
++#: builtins.c:1209
++msgid "WORD, then the job whose name begins with WORD is used. Following the"
++msgstr ""
++
++#: builtins.c:1210
++msgid "job specification with a `&' places the job in the background."
++msgstr ""
++
++#: builtins.c:1216
++msgid "The EXPRESSION is evaluated according to the rules for arithmetic"
++msgstr ""
++
++#: builtins.c:1217
++msgid "evaluation. Equivalent to \"let EXPRESSION\"."
++msgstr ""
++
++#: builtins.c:1223
++msgid "Returns a status of 0 or 1 depending on the evaluation of the conditional"
++msgstr ""
++
++#: builtins.c:1224
++msgid "expression EXPRESSION. Expressions are composed of the same primaries used"
++msgstr ""
++
++#: builtins.c:1225
++msgid "by the `test' builtin, and may be combined using the following operators"
++msgstr ""
++
++#: builtins.c:1227
++msgid "\t( EXPRESSION )\tReturns the value of EXPRESSION"
++msgstr ""
++
++#: builtins.c:1228
++msgid "\t! EXPRESSION\tTrue if EXPRESSION is false; else false"
++msgstr ""
++
++#: builtins.c:1229
++msgid "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false"
++msgstr ""
++
++#: builtins.c:1230
++msgid "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false"
++msgstr ""
++
++#: builtins.c:1232
++msgid "When the `==' and `!=' operators are used, the string to the right of the"
++msgstr ""
++
++#: builtins.c:1233
++msgid "operator is used as a pattern and pattern matching is performed. The"
++msgstr ""
++
++#: builtins.c:1234
++msgid "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to"
++msgstr ""
++
++#: builtins.c:1235
++msgid "determine the expression's value."
++msgstr ""
++
++#: builtins.c:1241
++msgid "BASH_VERSION Version information for this Bash."
++msgstr ""
++
++#: builtins.c:1242
++msgid "CDPATH A colon separated list of directories to search"
++msgstr ""
++
++#: builtins.c:1243
++msgid "\t\twhen the argument to `cd' is not found in the current"
++msgstr ""
++
++#: builtins.c:1244
++msgid "\t\tdirectory."
++msgstr ""
++
++#: builtins.c:1245
++msgid "GLOBIGNORE\tA colon-separated list of patterns describing filenames to"
++msgstr ""
++
++#: builtins.c:1246
++msgid "\t\tbe ignored by pathname expansion."
++msgstr ""
++
++#: builtins.c:1248
++msgid "HISTFILE The name of the file where your command history is stored."
++msgstr ""
++
++#: builtins.c:1249
++msgid "HISTFILESIZE The maximum number of lines this file can contain."
++msgstr ""
++
++#: builtins.c:1250
++msgid "HISTSIZE The maximum number of history lines that a running"
++msgstr ""
++
++#: builtins.c:1251
++msgid "\t\tshell can access."
++msgstr ""
++
++#: builtins.c:1253
++msgid "HOME The complete pathname to your login directory."
++msgstr ""
++
++#: builtins.c:1254
++msgid "HOSTNAME\tThe name of the current host."
++msgstr ""
++
++#: builtins.c:1255
++msgid "HOSTTYPE The type of CPU this version of Bash is running under."
++msgstr ""
++
++#: builtins.c:1256
++msgid "IGNOREEOF Controls the action of the shell on receipt of an EOF"
++msgstr ""
++
++#: builtins.c:1257
++msgid "\t\tcharacter as the sole input. If set, then the value"
++msgstr ""
++
++#: builtins.c:1258
++msgid "\t\tof it is the number of EOF characters that can be seen"
++msgstr ""
++
++#: builtins.c:1259
++msgid "\t\tin a row on an empty line before the shell will exit"
++msgstr ""
++
++#: builtins.c:1260
++msgid "\t\t(default 10). When unset, EOF signifies the end of input."
++msgstr ""
++
++#: builtins.c:1261
++msgid "MACHTYPE\tA string describing the current system Bash is running on."
++msgstr ""
++
++#: builtins.c:1262
++msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
++msgstr ""
++
++#: builtins.c:1263
++msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
++msgstr ""
++
++#: builtins.c:1264
++msgid "\t\tfor new mail."
++msgstr ""
++
++#: builtins.c:1265
++msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
++msgstr ""
++
++#: builtins.c:1266
++msgid "PATH A colon-separated list of directories to search when"
++msgstr ""
++
++#: builtins.c:1267
++msgid "\t\tlooking for commands."
++msgstr ""
++
++#: builtins.c:1268
++msgid "PROMPT_COMMAND A command to be executed before the printing of each"
++msgstr ""
++
++#: builtins.c:1269
++msgid "\t\tprimary prompt."
++msgstr ""
++
++#: builtins.c:1270
++msgid "PS1 The primary prompt string."
++msgstr ""
++
++#: builtins.c:1271
++msgid "PS2 The secondary prompt string."
++msgstr ""
++
++#: builtins.c:1272
++msgid "PWD\t\tThe full pathname of the current directory."
++msgstr ""
++
++#: builtins.c:1273
++msgid "SHELLOPTS\tA colon-separated list of enabled shell options."
++msgstr ""
++
++#: builtins.c:1274
++msgid "TERM The name of the current terminal type."
++msgstr ""
++
++#: builtins.c:1275
++msgid "TIMEFORMAT\tThe output format for timing statistics displayed by the"
++msgstr ""
++
++#: builtins.c:1276
++msgid "\t\t`time' reserved word."
++msgstr ""
++
++#: builtins.c:1277
++msgid "auto_resume Non-null means a command word appearing on a line by"
++msgstr ""
++
++#: builtins.c:1278
++msgid "\t\titself is first looked for in the list of currently"
++msgstr ""
++
++#: builtins.c:1279
++msgid "\t\tstopped jobs. If found there, that job is foregrounded."
++msgstr ""
++
++#: builtins.c:1280
++msgid "\t\tA value of `exact' means that the command word must"
++msgstr ""
++
++#: builtins.c:1281
++msgid "\t\texactly match a command in the list of stopped jobs. A"
++msgstr ""
++
++#: builtins.c:1282
++msgid "\t\tvalue of `substring' means that the command word must"
++msgstr ""
++
++#: builtins.c:1283
++msgid "\t\tmatch a substring of the job. Any other value means that"
++msgstr ""
++
++#: builtins.c:1284
++msgid "\t\tthe command must be a prefix of a stopped job."
++msgstr ""
++
++#: builtins.c:1287
++msgid "histchars Characters controlling history expansion and quick"
++msgstr ""
++
++#: builtins.c:1288
++msgid "\t\tsubstitution. The first character is the history"
++msgstr ""
++
++#: builtins.c:1289
++msgid "\t\tsubstitution character, usually `!'. The second is"
++msgstr ""
++
++#: builtins.c:1290
++msgid "\t\tthe `quick substitution' character, usually `^'. The"
++msgstr ""
++
++#: builtins.c:1291
++msgid "\t\tthird is the `history comment' character, usually `#'."
++msgstr ""
++
++#: builtins.c:1293
++msgid "HISTIGNORE\tA colon-separated list of patterns used to decide which"
++msgstr ""
++
++#: builtins.c:1294
++msgid "\t\tcommands should be saved on the history list."
++msgstr ""
++
++#: builtins.c:1306
++msgid "+N\tRotates the stack so that the Nth directory (counting"
++msgstr ""
++
++#: builtins.c:1307
++msgid "\tfrom the left of the list shown by `dirs', starting with"
++msgstr ""
++
++#: builtins.c:1308
++#: builtins.c:1312
++msgid "\tzero) is at the top."
++msgstr ""
++
++#: builtins.c:1310
++msgid "-N\tRotates the stack so that the Nth directory (counting"
++msgstr ""
++
++#: builtins.c:1311
++msgid "\tfrom the right of the list shown by `dirs', starting with"
++msgstr ""
++
++#: builtins.c:1314
++msgid "-n\tsuppress the normal change of directory when adding directories"
++msgstr ""
++
++#: builtins.c:1315
++msgid "\tto the stack, so only the stack is manipulated."
++msgstr ""
++
++#: builtins.c:1317
++msgid "dir\tadds DIR to the directory stack at the top, making it the"
++msgstr ""
++
++#: builtins.c:1318
++msgid "\tnew current working directory."
++msgstr ""
++
++#: builtins.c:1332
++msgid "+N\tremoves the Nth entry counting from the left of the list"
++msgstr ""
++
++#: builtins.c:1333
++msgid "\tshown by `dirs', starting with zero. For example: `popd +0'"
++msgstr ""
++
++#: builtins.c:1334
++msgid "\tremoves the first directory, `popd +1' the second."
++msgstr ""
++
++#: builtins.c:1336
++msgid "-N\tremoves the Nth entry counting from the right of the list"
++msgstr ""
++
++#: builtins.c:1337
++msgid "\tshown by `dirs', starting with zero. For example: `popd -0'"
++msgstr ""
++
++#: builtins.c:1338
++msgid "\tremoves the last directory, `popd -1' the next to last."
++msgstr ""
++
++#: builtins.c:1340
++msgid "-n\tsuppress the normal change of directory when removing directories"
++msgstr ""
++
++#: builtins.c:1341
++msgid "\tfrom the stack, so only the stack is manipulated."
++msgstr ""
++
++#: builtins.c:1363
++msgid "+N\tdisplays the Nth entry counting from the left of the list shown by"
++msgstr ""
++
++#: builtins.c:1364
++#: builtins.c:1367
++msgid "\tdirs when invoked without options, starting with zero."
++msgstr ""
++
++#: builtins.c:1366
++msgid "-N\tdisplays the Nth entry counting from the right of the list shown by"
++msgstr ""
++
++#: builtins.c:1374
++msgid "Toggle the values of variables controlling optional behavior."
++msgstr ""
++
++#: builtins.c:1375
++msgid "The -s flag means to enable (set) each OPTNAME; the -u flag"
++msgstr ""
++
++#: builtins.c:1376
++msgid "unsets each OPTNAME. The -q flag suppresses output; the exit"
++msgstr ""
++
++#: builtins.c:1377
++msgid "status indicates whether each OPTNAME is set or unset. The -o"
++msgstr ""
++
++#: builtins.c:1378
++msgid "option restricts the OPTNAMEs to those defined for use with"
++msgstr ""
++
++#: builtins.c:1379
++msgid "`set -o'. With no options, or with the -p option, a list of all"
++msgstr ""
++
++#: builtins.c:1380
++msgid "settable options is displayed, with an indication of whether or"
++msgstr ""
++
++#: builtins.c:1381
++msgid "not each is set."
++msgstr ""
++
++#: builtins.c:1387
++msgid "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT"
++msgstr ""
++
++#: builtins.c:1388
++msgid "is a character string which contains three types of objects: plain"
++msgstr ""
++
++#: builtins.c:1389
++msgid "characters, which are simply copied to standard output, character escape"
++msgstr ""
++
++#: builtins.c:1390
++msgid "sequences which are converted and copied to the standard output, and"
++msgstr ""
++
++#: builtins.c:1391
++msgid "format specifications, each of which causes printing of the next successive"
++msgstr ""
++
++#: builtins.c:1392
++msgid "argument. In addition to the standard printf(1) formats, %b means to"
++msgstr ""
++
++#: builtins.c:1393
++msgid "expand backslash escape sequences in the corresponding argument, and %q"
++msgstr ""
++
++#: builtins.c:1394
++msgid "means to quote the argument in a way that can be reused as shell input."
++msgstr ""
++
++#: builtins.c:1401
++msgid "For each NAME, specify how arguments are to be completed."
++msgstr ""
++
++#: builtins.c:1402
++msgid "If the -p option is supplied, or if no options are supplied, existing"
++msgstr ""
++
++#: builtins.c:1403
++msgid "completion specifications are printed in a way that allows them to be"
++msgstr ""
++
++#: builtins.c:1404
++msgid "reused as input. The -r option removes a completion specification for"
++msgstr ""
++
++#: builtins.c:1405
++msgid "each NAME, or, if no NAMEs are supplied, all completion specifications."
++msgstr ""
++
++#: builtins.c:1413
++msgid "Display the possible completions depending on the options. Intended"
++msgstr ""
++
++#: builtins.c:1414
++msgid "to be used from within a shell function generating possible completions."
++msgstr ""
++
++#: builtins.c:1415
++msgid "If the optional WORD argument is supplied, matches against WORD are"
++msgstr ""
++
++#: builtins.c:1416
++msgid "generated."
++msgstr "genererad."
++
diff --git a/debian/patches/privmode.dpatch b/debian/patches/privmode.dpatch
new file mode 100755
index 0000000..eb9abf2
--- /dev/null
+++ b/debian/patches/privmode.dpatch
@@ -0,0 +1,37 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: XXX missing description
+# DP:
+# DP: Comment from Chet Ramey <chet@nike.ins.cwru.edu>:
+# DP:
+# DP: Nope. This will allow setuid scripts if not called as `sh' and not
+# DP: called with the -p option. I won't install this.
+
+
+diff -urb bash.orig/shell.c bash/shell.c
+--- bash.orig/shell.c 2003-06-03 19:50:35.000000000 +0200
++++ bash/shell.c 2003-09-28 00:26:28.000000000 +0200
+@@ -447,7 +447,7 @@
+ if (dump_translatable_strings)
+ read_but_dont_execute = 1;
+
+- if (running_setuid && privileged_mode == 0)
++ if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
+ disable_priv_mode ();
+
+ /* Need to get the argument to a -c option processed in the
diff --git a/debian/patches/random.dpatch b/debian/patches/random.dpatch
new file mode 100644
index 0000000..6304468
--- /dev/null
+++ b/debian/patches/random.dpatch
@@ -0,0 +1,107 @@
+#! /bin/sh -e
+
+dir=.
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir=$3
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ echo '2.05' > $dir/_distribution
+ echo '0' > $dir/_patchlevel
+ cd $dir && autoconf
+ rm -f $dir/_distribution $dir/_patchlevel
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ rm -f $dir/configure $dir/_distribution $dir/_patchlevel
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: use the system random functions
+
+diff -urb bash.orig/config.h.in bash/config.h.in
+--- bash.orig/config.h.in 2003-09-22 14:42:35.000000000 +0200
++++ bash/config.h.in 2003-09-28 00:27:15.000000000 +0200
+@@ -606,6 +606,9 @@
+ /* Define if you have the putenv function. */
+ #undef HAVE_PUTENV
+
++/* Define if you have the random function. */
++#undef HAVE_RANDOM
++
+ /* Define if you have the readlink function. */
+ #undef HAVE_READLINK
+
+@@ -696,6 +699,9 @@
+ /* Define if you have the strsignal function or macro. */
+ #undef HAVE_STRSIGNAL
+
++/* Define if you have the srandom function. */
++#undef HAVE_SRANDOM
++
+ /* Define if you have the sysconf function. */
+ #undef HAVE_SYSCONF
+
+diff -urb bash.orig/variables.c bash/variables.c
+--- bash.orig/variables.c 2003-07-31 16:28:57.000000000 +0200
++++ bash/variables.c 2003-09-28 00:27:15.000000000 +0200
+@@ -1098,16 +1098,22 @@
+ static unsigned long rseed = 1;
+ static int last_random_value;
+
+-/* A linear congruential random number generator based on the example
+- one in the ANSI C standard. This one isn't very good, but a more
+- complicated one is overkill. */
++/* Use the random number genrator provided by the standard C library,
++ else use a linear congruential random number generator based on the
++ ANSI C standard. This one isn't very good (the values are alternately
++ odd and even, for example), but a more complicated one is overkill. */
+
+ /* Returns a pseudo-random number between 0 and 32767. */
+ static int
+ brand ()
+ {
++#if defined(HAVE_RANDOM)
++ rseed = (unsigned int) (labs(random()) & 32767);
++ return rseed;
++#else
+ rseed = rseed * 1103515245 + 12345;
+ return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */
++#endif
+ }
+
+ /* Set the random number generator seed to SEED. */
+@@ -1115,8 +1121,12 @@
+ sbrand (seed)
+ unsigned long seed;
+ {
++#if defined(HAVE_SRANDOM)
++ srandom(seed);
++#else
+ rseed = seed;
+ last_random_value = 0;
++#endif
+ }
+
+ static SHELL_VAR *
+--- bash/configure.in~ 2004-03-02 00:04:29.000000000 +0100
++++ bash/configure.in 2004-03-02 00:05:48.000000000 +0100
+@@ -667,6 +667,9 @@
+
+ AC_FUNC_MKTIME
+
++dnl checks for random functions
++AC_CHECK_FUNCS(random srandom)
++
+ dnl
+ dnl Checks for lib/intl and related code (uses some of the output from
+ dnl AM_GNU_GETTEXT)
diff --git a/debian/patches/rbash-manpage.dpatch b/debian/patches/rbash-manpage.dpatch
new file mode 100755
index 0000000..73a9969
--- /dev/null
+++ b/debian/patches/rbash-manpage.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: doc/rbash.1: fix bash(1) reference
+
+--- doc/rbash.1~ 1999-11-29 22:30:03.000000000 +0100
++++ doc/rbash.1 2003-02-21 16:15:59.000000000 +0100
+@@ -3,6 +3,6 @@
+ rbash \- restricted bash, see \fBbash\fR(1)
+ .SH RESTRICTED SHELL
+ .nr zY 1
+-.so bash.1
++.so man1/bash.1
+ .SH SEE ALSO
+ bash(1)
diff --git a/debian/patches/read-memleak.dpatch b/debian/patches/read-memleak.dpatch
new file mode 100755
index 0000000..c0c9f8a
--- /dev/null
+++ b/debian/patches/read-memleak.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Fix read memleak when reading from non-blocking fd.
+
+--- builtins/read.def.orig 2005-08-21 03:46:19.000000000 +0200
++++ builtins/read.def 2006-03-03 23:43:37.889187600 +0100
+@@ -472,6 +472,7 @@
+ if (retval < 0)
+ {
+ builtin_error (_("read error: %d: %s"), fd, strerror (errno));
++ run_unwind_frame ("read_builtin");
+ return (EXECUTION_FAILURE);
+ }
+ #endif
diff --git a/debian/patches/readline51-001.dpatch b/debian/patches/readline51-001.dpatch
new file mode 100755
index 0000000..268540b
--- /dev/null
+++ b/debian/patches/readline51-001.dpatch
@@ -0,0 +1,94 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 5.1
+Patch-ID: readline51-001
+
+Bug-Reported-by: Andreas Schwab <schwab@suse.de>
+Bug-Reference-ID: <20051213141916.4014A394BFABD@sykes.suse.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00038.html
+
+Bug-Description:
+
+A problem with the readline callback interface can result in segmentation
+faults when using the delete-char function via a multiple-key sequence.
+Two consecutive calls to delete-char will crash the application calling
+readline.
+
+Patch:
+
+*** ../readline-5.1/readline.c Mon Jul 4 22:29:35 2005
+--- lib/readline/readline.c Tue Dec 20 17:38:29 2005
+***************
+*** 715,719 ****
+ rl_dispatching = 1;
+ RL_SETSTATE(RL_STATE_DISPATCHING);
+! r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
+ RL_UNSETSTATE(RL_STATE_DISPATCHING);
+ rl_dispatching = 0;
+--- 715,719 ----
+ rl_dispatching = 1;
+ RL_SETSTATE(RL_STATE_DISPATCHING);
+! (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
+ RL_UNSETSTATE(RL_STATE_DISPATCHING);
+ rl_dispatching = 0;
+*** ../readline-5.1/text.c Sat Sep 24 19:06:07 2005
+--- lib/readline/text.c Tue Dec 20 17:38:26 2005
+***************
+*** 1072,1077 ****
+ int count, key;
+ {
+- int r;
+-
+ if (count < 0)
+ return (_rl_rubout_char (-count, key));
+--- 1072,1075 ----
+***************
+*** 1091,1097 ****
+ rl_forward_byte (count, key);
+
+! r = rl_kill_text (orig_point, rl_point);
+ rl_point = orig_point;
+- return r;
+ }
+ else
+--- 1089,1094 ----
+ rl_forward_byte (count, key);
+
+! rl_kill_text (orig_point, rl_point);
+ rl_point = orig_point;
+ }
+ else
+***************
+*** 1100,1105 ****
+
+ new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+! return (rl_delete_text (rl_point, new_point));
+ }
+ }
+
+--- 1097,1103 ----
+
+ new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+! rl_delete_text (rl_point, new_point);
+ }
++ return 0;
+ }
+
diff --git a/debian/patches/rl-del-backspace-policy.dpatch b/debian/patches/rl-del-backspace-policy.dpatch
new file mode 100644
index 0000000..ec56b43
--- /dev/null
+++ b/debian/patches/rl-del-backspace-policy.dpatch
@@ -0,0 +1,48 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Handle Debian Backspace/Delete keyboard policy
+
+diff -urb bash.orig/lib/readline/terminal.c bash/lib/readline/terminal.c
+--- bash.orig/lib/readline/terminal.c 2003-09-18 17:03:42.000000000 +0200
++++ bash/lib/readline/terminal.c 2003-09-27 23:25:59.000000000 +0200
+@@ -148,6 +148,9 @@
+ /* Insert key */
+ static char *_rl_term_kI;
+
++/* The key sequence sent by the Delete key, if any. */
++static char *_rl_term_kD;
++
+ /* Cursor control */
+ static char *_rl_term_vs; /* very visible */
+ static char *_rl_term_ve; /* normal */
+@@ -314,6 +317,7 @@
+ { "ic", &_rl_term_ic },
+ { "im", &_rl_term_im },
+ { "kH", &_rl_term_kH }, /* home down ?? */
++ { "kD", &_rl_term_kD }, /* delete */
+ { "kI", &_rl_term_kI }, /* insert */
+ { "kd", &_rl_term_kd },
+ { "ke", &_rl_term_ke }, /* end keypad mode */
+@@ -492,6 +496,7 @@
+
+ rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
+ rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
++ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); /* Delete */
+
+ _rl_keymap = xkeymap;
+ }
diff --git a/debian/patches/rl-examples-bdb.dpatch b/debian/patches/rl-examples-bdb.dpatch
new file mode 100644
index 0000000..33cca15
--- /dev/null
+++ b/debian/patches/rl-examples-bdb.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Modified readline examples to properly build with Debian setup.
+
+--- ./lib/readline/examples/rl.c~ Mon Nov 8 22:22:03 1999
++++ ./lib/readline/examples/rl.c Fri Dec 31 17:34:30 1999
+@@ -11,7 +11,7 @@
+
+ #include <stdio.h>
+ #include <sys/types.h>
+-#include "posixstat.h"
++#include <sys/stat.h>
+
+ #if defined (READLINE_LIBRARY)
+ # include "readline.h"
diff --git a/debian/patches/rl-header.dpatch b/debian/patches/rl-header.dpatch
new file mode 100644
index 0000000..d147813
--- /dev/null
+++ b/debian/patches/rl-header.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: include stdio.h in readline.h
+--- lib/readline/readline.h~ Thu Aug 5 14:10:59 1999
++++ lib/readline/readline.h Mon Oct 9 20:32:56 2000
+@@ -32,6 +32,7 @@
+ # include "keymaps.h"
+ # include "tilde.h"
+ #else
++# include <stdio.h>
+ # include <readline/rlstdc.h>
+ # include <readline/keymaps.h>
+ # include <readline/tilde.h>
diff --git a/debian/patches/rl-inputrc.dpatch b/debian/patches/rl-inputrc.dpatch
new file mode 100755
index 0000000..e79ed5e
--- /dev/null
+++ b/debian/patches/rl-inputrc.dpatch
@@ -0,0 +1,102 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Support for /etc/inputrc in addition to ~/inputrc
+
+diff -ur bash.saved/lib/readline/bind.c bash/lib/readline/bind.c
+--- bash.saved/lib/readline/bind.c 2005-01-16 13:18:30.000000000 +0100
++++ bash/lib/readline/bind.c 2005-01-16 13:21:43.000000000 +0100
+@@ -713,6 +713,9 @@
+ /* The last key bindings file read. */
+ static char *last_readline_init_file = (char *)NULL;
+
++/* Flag to read system init file */
++static int read_system_init_file = 0;
++
+ /* The file we're currently reading key bindings from. */
+ static const char *current_readline_init_file;
+ static int current_readline_init_include_level;
+@@ -780,7 +783,7 @@
+ to the first non-null filename from this list:
+ 1. the filename used for the previous call
+ 2. the value of the shell variable `INPUTRC'
+- 3. ~/.inputrc
++ 3. /etc/inputrc and ~/.inputrc
+ If the file existed and could be opened and read, 0 is returned,
+ otherwise errno is returned. */
+ int
+@@ -791,14 +794,31 @@
+ if (filename == 0)
+ {
+ filename = last_readline_init_file;
+- if (filename == 0)
++ if (filename == 0) {
+ filename = sh_get_env_value ("INPUTRC");
+- if (filename == 0)
++ read_system_init_file = 0;
++ }
++ if (filename == 0) {
+ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
+ }
+
+- if (*filename == 0)
++ if (*filename == 0) {
+ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
++
++ if (read_system_init_file)
++ if (filename == last_readline_init_file)
++ {
++ filename = savestring (filename);
++ _rl_read_init_file (SYSTEM_INPUTRC, 0);
++ free (last_readline_init_file);
++ last_readline_init_file = filename;
++ }
++ else
++ _rl_read_init_file (SYSTEM_INPUTRC, 0);
+
+ #if defined (__MSDOS__)
+ if (_rl_read_init_file (filename, 0) == 0)
+Only in bash/lib/readline: bind.c.orig
+Only in bash/lib/readline: bind.c.rej
+diff -ur bash.saved/lib/readline/doc/rluser.texi bash/lib/readline/doc/rluser.texi
+--- bash.saved/lib/readline/doc/rluser.texi 2005-01-16 13:18:30.000000000 +0100
++++ bash/lib/readline/doc/rluser.texi 2005-01-16 13:21:28.000000000 +0100
+@@ -336,7 +336,8 @@
+ @ifclear BashFeatures
+ file is taken from the value of the environment variable @env{INPUTRC}. If
+ @end ifclear
+-that variable is unset, the default is @file{~/.inputrc}.
++that variable is unset, Readline will read both @file{/etc/inputrc} and
++@file{~/.inputrc}.
+
+ When a program which uses the Readline library starts up, the
+ init file is read, and the key bindings are set.
+diff -ur bash.saved/lib/readline/rlconf.h bash/lib/readline/rlconf.h
+--- bash.saved/lib/readline/rlconf.h 2005-01-16 13:18:30.000000000 +0100
++++ bash/lib/readline/rlconf.h 2005-01-16 13:21:28.000000000 +0100
+@@ -39,6 +39,7 @@
+
+ /* The final, last-ditch effort file name for an init file. */
+ #define DEFAULT_INPUTRC "~/.inputrc"
++#define SYSTEM_INPUTRC "/etc/inputrc"
+
+ /* If defined, expand tabs to spaces. */
+ #define DISPLAY_TABS
diff --git a/debian/patches/rl-setenv.dpatch b/debian/patches/rl-setenv.dpatch
new file mode 100644
index 0000000..9ae1d08
--- /dev/null
+++ b/debian/patches/rl-setenv.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Prefer setenv over putenv
+
+--- lib/readline/shell.c~ 2004-10-17 13:07:37.000000000 +0200
++++ lib/readline/shell.c 2004-10-17 13:06:48.000000000 +0200
+@@ -122,7 +122,7 @@
+ {
+ char *b;
+
+-#if defined (HAVE_PUTENV)
++#if 0
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
+ sprintf (b, "LINES=%d", lines);
+ putenv (b);
diff --git a/debian/patches/template.dpatch b/debian/patches/template.dpatch
new file mode 100644
index 0000000..e583619
--- /dev/null
+++ b/debian/patches/template.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: <your description>
diff --git a/debian/patches/ulimit-doc.dpatch b/debian/patches/ulimit-doc.dpatch
new file mode 100644
index 0000000..39129bf
--- /dev/null
+++ b/debian/patches/ulimit-doc.dpatch
@@ -0,0 +1,50 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Add ulimit options -e and -r.
+
+--- bash-3.1/doc/bashref.texi.ulimit 2006-01-10 11:21:49.000000000 +0000
++++ bash-3.1/doc/bashref.texi 2006-01-10 11:25:06.000000000 +0000
+@@ -3833,7 +3833,7 @@
+ @item ulimit
+ @btindex ulimit
+ @example
+-ulimit [-acdfilmnpqstuvxSH] [@var{limit}]
++ulimit [-acdefilmnpqrstuvxSH] [@var{limit}]
+ @end example
+ @code{ulimit} provides control over the resources available to processes
+ started by the shell, on systems that allow such control. If an
+@@ -3854,6 +3854,9 @@
+ @item -d
+ The maximum size of a process's data segment.
+
++@item -e
++The maximum scheduling priority.
++
+ @item -f
+ The maximum size of files created by the shell.
+
+@@ -3875,6 +3878,9 @@
+ @item -q
+ The maximum number of bytes in POSIX message queues.
+
++@item -r
++The maximum RT priority.
++
+ @item -s
+ The maximum stack size.
+
diff --git a/debian/patches/ulimit.dpatch b/debian/patches/ulimit.dpatch
new file mode 100755
index 0000000..462dc61
--- /dev/null
+++ b/debian/patches/ulimit.dpatch
@@ -0,0 +1,88 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Add ulimit options -e and -r.
+
+--- bash-3.1/builtins/ulimit.def.ulimit 2005-08-04 13:39:04.000000000 +0100
++++ bash-3.1/builtins/ulimit.def 2006-01-10 11:21:49.000000000 +0000
+@@ -34,6 +34,7 @@
+ -a all current limits are reported
+ -c the maximum size of core files created
+ -d the maximum size of a process's data segment
++ -e the maximum scheduling priority (`nice')
+ -f the maximum size of files created by the shell
+ -i the maximum number of pending signals
+ -l the maximum size a process may lock into memory
+@@ -41,6 +42,7 @@
+ -n the maximum number of open file descriptors
+ -p the pipe buffer size
+ -q the maximum number of bytes in POSIX message queues
++ -r the maximum rt priority
+ -s the maximum stack size
+ -t the maximum amount of cpu time in seconds
+ -u the maximum number of user processes
+@@ -202,6 +204,9 @@
+ #ifdef RLIMIT_DATA
+ { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" },
+ #endif
++#ifdef RLIMIT_NICE
++ { 'e', RLIMIT_NICE, 1, "max nice", (char *)NULL},
++#endif /* RLIMIT_NICE */
+ { 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" },
+ #ifdef RLIMIT_SIGPENDING
+ { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL },
+@@ -217,6 +222,9 @@
+ #ifdef RLIMIT_MSGQUEUE
+ { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" },
+ #endif
++#ifdef RLIMIT_RTPRIO
++ { 'r', RLIMIT_RTPRIO, 1, "max rt priority", (char *)NULL},
++#endif /* RLIMIT_RTPRIO */
+ #ifdef RLIMIT_STACK
+ { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" },
+ #endif
+--- bash-3.1/doc/bash.1.ulimit 2006-01-10 11:21:49.000000000 +0000
++++ bash-3.1/doc/bash.1 2006-01-10 11:24:43.000000000 +0000
+@@ -8496,7 +8496,7 @@
+ returns true if any of the arguments are found, false if
+ none are found.
+ .TP
+-\fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]]
++\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]]
+ Provides control over the resources available to the shell and to
+ processes started by it, on systems that allow such control.
+ The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
+@@ -8532,6 +8532,9 @@
+ .B \-d
+ The maximum size of a process's data segment
+ .TP
++.B \-e
++The maximum scheduling priority (`nice')
++.TP
+ .B \-f
+ The maximum size of files created by the shell
+ .TP
+@@ -8554,6 +8557,9 @@
+ .B \-q
+ The maximum number of bytes in POSIX message queues
+ .TP
++.B \-r
++The maximum rt priority
++.TP
+ .B \-s
+ The maximum stack size
+ .TP
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ec30491
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,631 @@
+#! /usr/bin/make -f
+# -*- makefile -*-
+
+#export DH_VERBOSE=1
+
+unexport LANG LC_ALL LC_CTYPE LC_COLLATE LC_TIME LC_NUMERIC LC_MESSAGES
+
+# architecture dependent variables
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+VERSION := 3.1
+#PKGVERSION := $(shell dpkg-parsechangelog \
+# | sed -n '/Version:/s/\(.* \)\(.*\)-2\(.*\)/\2\3/p')
+#PKGVERSION := 3.0
+#dpkg_ctrl_args := -v$(PKGVERSION) -VBinary-Version=$(PKGVERSION)
+
+
+with_gfdl = no
+
+CC = gcc
+CFLAGS = -g -O2
+SHELL = bash
+YACC = bison -y
+
+IX = install -o 0 -g 0
+ID = install -o 0 -g 0 -m 644
+
+# built with installed libreadline?
+with_installed_rl = no
+
+debflags =
+
+PWD := $(shell pwd)
+p = bash
+p_min = bash-minimal
+p_stat = bash-static
+p_bins = bash-builtins
+p_doc = bash-doc
+p_bdb = bashdb
+
+d = debian/$(p)
+d_min = debian/$(p_min)
+d_stat = debian/$(p_stat)
+d_bins = debian/$(p_bins)
+d_doc = debian/$(p_doc)
+d_bdb = debian/$(p_bdb)
+
+conf_args = \
+ --with-curses \
+ --disable-net-redirections \
+ --enable-largefile \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man
+ifeq ($(with_installed_rl),yes)
+ conf_args += --with-installed-readline
+endif
+
+static_conf_args := $(conf_args) \
+ --enable-static-link \
+ --without-bash-malloc \
+ --host=$(DEB_HOST_GNU_TYPE)
+
+conf_args += --host=$(DEB_HOST_GNU_TYPE)
+
+min_conf_args = \
+ --enable-minimal-config \
+ --enable-largefile \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man
+min_conf_args += --host=$(DEB_HOST_GNU_TYPE)
+
+
+#build: bash-build minimal-build static-build preinst-build all-bashdb-build check
+build: before-build bash-build minimal-build static-build preinst-build check
+
+before-build:
+ : # see #327477, needed to have HAVE_DEV_STDIN defined
+ (test -d /dev/fd && test -r /dev/stdin < /dev/null) \
+ || (test -d /proc/self/fd && test -r /dev/stdin < /dev/null)
+ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux freebsd))
+ $(CC) $(CFLAGS) -o clear_console debian/clear_console.c -lncurses
+endif
+
+# ---------------------------------------------------------------------------
+# build standard bash
+
+bash-build:
+ $(MAKE) -f debian/rules do-build-bash \
+ bash_src=bash \
+ bash_patches="$(debian_patches)" \
+ build=bash \
+ configure_args="$(conf_args)"
+bash-configure:
+ $(MAKE) -f debian/rules do-configure-bash \
+ bash_src=bash \
+ bash_patches="$(debian_patches)" \
+ build=bash \
+ configure_args="$(conf_args)"
+
+# ---------------------------------------------------------------------------
+# build minimal bash
+
+minimal-build:
+ $(MAKE) -f debian/rules do-build-min \
+ bash_src=bash \
+ bash_patches="$(debian_patches)" \
+ build=min \
+ configure_args="$(min_conf_args)"
+minimal-configure:
+ $(MAKE) -f debian/rules do-configure-min \
+ bash_src=bash \
+ bash_patches="$(debian_patches)" \
+ build=min \
+ configure_args="$(min_conf_args)"
+
+# ---------------------------------------------------------------------------
+# build static bash
+
+static-build:
+ $(MAKE) -f debian/rules do-build-static \
+ bash_src=bash \
+ bash_patches="$(debian_patches)" \
+ build=static \
+ configure_args="$(static_conf_args)"
+static-configure:
+ $(MAKE) -f debian/rules do-configure-static \
+ bash_src=bash \
+ bash_patches="$(debian_patches)" \
+ build=static \
+ configure_args="$(static_conf_args)"
+
+# ---------------------------------------------------------------------------
+# build standard bash
+
+all-bashdb-build: bashdb-build #bashdb-doc-build
+
+bashdb-build:
+ DEBUGGER_START_FILE=/usr/share/bashdb/dbg-main.inc \
+ $(MAKE) -f debian/rules do-build-bashdb \
+ bash_src=bashdb \
+ bash_patches="$(bashdb_patches)" \
+ build=bashdb \
+ configure_args="$(conf_args)"
+bashdb-configure:
+ DEBUGGER_START_FILE=/usr/share/bashdb/dbg-main.inc \
+ $(MAKE) -f debian/rules do-configure-bashdb \
+ bash_src=bashdb \
+ bash_patches="$(bashdb_patches)" \
+ build=bashdb \
+ configure_args="$(conf_args)"
+
+bashdb-doc-build: stamps/stamp-build-bashdb-doc
+stamps/stamp-build-bashdb-doc:
+ cp -p build-bashdb/doc/version.texi bashdb/doc/
+ cp -p build-bashdb/debugger/doc/version.texi bashdb/debugger/doc/
+# $(MAKE) -C build-bashdb doc
+ $(MAKE) -C build-bashdb/debugger/doc
+ touch stamps/stamp-build-bashdb-doc
+
+# ---------------------------------------------------------------------------
+
+bash-doc-build: stamps/stamp-build-bash-doc
+stamps/stamp-build-bash-doc:
+ifeq ($(with_gfdl),yes)
+ rm -f bash/doc/bashref.info
+ $(MAKE) -C build-bash/doc bashref.info bashref.pdf
+endif
+ touch stamps/stamp-build-bash-doc
+
+# ---------------------------------------------------------------------------
+
+check: stamps/stamp-check
+stamps/stamp-check: bash-build
+ @echo BEGIN test
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ -sh debian/locale-gen
+ LOCPATH=$(PWD)/locales \
+ $(MAKE) -C build-bash test 2>&1 | tee build-bash/test-protocol
+else
+ @echo Suppress 'make' test, because this is cross build
+endif
+ @echo END test
+ touch stamps/stamp-check
+
+# ---------------------------------------------------------------------------
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -rf stamps build-* bash bashdb
+ rm -f debian/bash.preinst
+ rm -f debian/README.Debian
+ rm -rf locales
+ rm -f clear_console
+ dh_clean
+
+preinst-build: debian/bash.preinst
+debian/bash.preinst: debian/bash.preinst.c
+ $(CC) -O2 -s -o debian/bash.preinst debian/bash.preinst.c
+
+# ---------------------------------------------------------------------------
+
+
+install: bash-install #bashdb-install
+
+bash-install: bash-build stamps/stamp-install-bash
+stamps/stamp-install-bash: stamps/stamp-build-bash
+ dh_testdir
+ dh_testroot
+ dh_clean -k -p$(p) -p$(p_doc) -p$(p_bins)
+ dh_installdirs -p$(p) \
+ bin \
+ etc/skel \
+ etc/bash_completion.d \
+ usr/share/doc/$(p)
+ dh_installdirs -p$(p_doc) \
+ usr/share/doc/$(p)
+ dh_installdirs -p$(p_bins) \
+ usr/share/doc/$(p)/examples/loadables \
+ usr/{include/bash/{builtins,lib/{glob,tilde}}}
+
+ifeq ($(with_gfdl),yes)
+# XXXXX
+ cp -p build-bash/doc/*.info bash/doc/
+endif
+
+ : # install it
+ $(MAKE) -C build-bash install \
+ CC='$(CC)' \
+ CFLAGS='$(CFLAGS)' \
+ YACC="$(YACC)" \
+ DESTDIR=$(PWD)/$(d)
+ mv $(d)/usr/bin/bash $(d)/bin/.
+ chmod 755 $(d)/usr/bin/bashbug
+ifneq ($(with_gfdl),yes)
+ mkdir -p $(d)/usr/share/man/man1
+ cp -p bash/doc/bash.1 $(d)/usr/share/man/man1/bash.1
+endif
+
+ : # extra links
+ ln -sf bash $(d)/bin/rbash
+ ln -sf bash $(d)/bin/sh
+ ln -sf bash.1 $(d)/usr/share/man/man1/sh.1
+
+ : # skeleton files
+ $(ID) debian/etc.bash.bashrc $(d)/etc/bash.bashrc
+ $(ID) debian/skel.bashrc $(d)/etc/skel/.bashrc
+ $(ID) debian/skel.bash_profile $(d)/etc/skel/.bash_profile
+ $(ID) debian/skel.bash_logout $(d)/etc/skel/.bash_logout
+
+ : # clean_console
+ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux freebsd))
+ $(IX) clear_console $(d)/usr/bin/
+ $(ID) debian/clear_console.1 $(d)/usr/share/man/man1/
+endif
+
+ : # install bash-completion
+ $(ID) debian/bash_completion/bash_completion $(d)/etc/.
+ cp -a debian/bash_completion/contrib \
+ $(d)/usr/share/doc/$(p)/completion-contrib
+ chmod 755 $(d)/usr/share/doc/$(p)/completion-contrib
+ chmod 644 $(d)/usr/share/doc/$(p)/completion-contrib/*
+ $(ID) debian/bash_completion/Changelog \
+ $(d)/usr/share/doc/$(p)/changelog.bash_completion
+ $(ID) debian/README.bash_completion $(d)/usr/share/doc/$(p)/
+ cat debian/bash_completion/README \
+ >> $(d)/usr/share/doc/$(p)/README.bash_completion
+ $(ID) debian/bash_completion/BUGS \
+ $(d)/usr/share/doc/bash/BUGS.bash_completion
+
+ifeq ($(with_gfdl),yes)
+ : # files for the bash-doc package
+ mv $(d)/usr/share/info/bash.info $(d)/usr/share/info/bashref.info
+ ln -sf bashref.info $(d)/usr/share/info/bash.info
+ mv $(d)/usr/share/info $(d_doc)/usr/share/
+endif
+
+ dh_installexamples -p$(p_doc) bash/examples/*
+ mv $(d_doc)/usr/share/doc/$(p_doc)/examples \
+ $(d_doc)/usr/share/doc/$(p)/examples
+ rm -rf $(d_doc)/usr/share/doc/$(p)/examples/loadables
+ ln -sf ../$(p)/examples $(d_doc)/usr/share/doc/$(p_doc)/examples
+
+ cd $(d_doc)/usr/share/doc/$(p)/examples && chmod 644 \
+ *bashdb/PERMISSION complete/complete.gnu-longopt
+ cd $(d_doc)/usr/share/doc/$(p)/examples && chmod 755 \
+ misc/aliasconv.*sh misc/cshtobash
+
+ cd $(d_doc)/usr/share/doc/$(p)/examples && chmod 644 \
+ scripts/shprompt scripts/precedence \
+ scripts/bcsh.sh scripts/krand.bash
+
+ : # files for the bash-builtins package
+ $(ID) bash/include/*.h bash/*.h $(d_bins)/usr/include/bash/
+ $(ID) build-bash/*.h $(d_bins)/usr/include/bash/
+ rm -f $(d_bins)/usr/include/bash/y.tab.h
+ $(ID) bash/builtins/*.h $(d_bins)/usr/include/bash/builtins/
+ $(ID) bash/lib/glob/*.h $(d_bins)/usr/include/bash/lib/glob/
+ $(ID) bash/lib/tilde/*.h $(d_bins)/usr/include/bash/lib/tilde/
+ $(ID) bash/examples/loadables/{README,*.c} \
+ $(d_bins)/usr/share/doc/$(p)/examples/loadables
+ $(ID) build-bash/examples/loadables/Makefile \
+ $(d_bins)/usr/share/doc/$(p)/examples/loadables
+ ln -sf bash $(d_bins)/usr/share/doc/$(p_bins)
+
+ cat debian/README stamps/stamp-patch-bash > debian/README.Debian
+
+ touch stamps/stamp-install-bash
+
+bashdb-install: stamps/stamp-install-bashdb
+stamps/stamp-install-bashdb: stamps/stamp-build-bashdb
+ dh_testdir
+ dh_testroot
+ dh_clean -k -p$(p_bdb)
+ dh_installdirs -p$(p_bdb) \
+ usr/share/doc/$(p_bdb) \
+ usr/share/emacs/site-lisp/$(p_bdb)
+
+ : # install it
+ $(MAKE) -C build-bashdb install \
+ CC='$(CC)' \
+ CFLAGS='$(CFLAGS)' \
+ YACC="$(YACC)" \
+ DESTDIR=$(PWD)/$(d_bdb)
+ rm -f $(d_bdb)/usr/bin/bashbug
+ rm -f $(d_bdb)/usr/share/man/man1/bashbug.1
+ rm -f $(d_bdb)/usr/share/info/*
+
+ mv $(d_bdb)/usr/share/man/man1/bash.1 \
+ $(d_bdb)/usr/share/man/man1/bash+dbg.1
+
+ $(MAKE) -C build-bashdb/debugger/doc install \
+ DESTDIR=$(PWD)/$(d_bdb)
+ cp -p build-bashdb/debugger/doc/bashdb.html \
+ $(d_bdb)/usr/share/doc/$(p_bdb)/.
+ cp -p build-bashdb/debugger/doc/bashdb.1 \
+ $(d_bdb)/usr/share/man/man1/.
+
+ : # some corrections
+ mv $(d_bdb)/usr/bin/bash $(d_bdb)/usr/bin/bash+dbg
+ sed -e 's,/usr/bin/bash,/usr/bin/bash+dbg,g' \
+ -e 's,/lib/bashdb,/share/bashdb,g' \
+ $(d_bdb)/usr/bin/bashdb > $(d_bdb)/usr/bin/bashdb.new
+ mv -f $(d_bdb)/usr/bin/bashdb.new $(d_bdb)/usr/bin/bashdb
+ chmod 755 $(d_bdb)/usr/bin/bashdb
+ cp -p bashdb/debugger/emacs/*.el \
+ $(d_bdb)/usr/share/emacs/site-lisp/$(p_bdb)/
+
+ touch stamps/stamp-install-bashdb
+
+binary-doc: bash-install bash-doc-build
+ dh_testdir
+ dh_testroot
+ mkdir -p $(d_doc)/usr/share/doc/$(p)
+ dh_installdocs -p$(p_doc)
+ifeq ($(with_gfdl),yes)
+ cp -p build-bash/doc/bashref.pdf $(d_doc)/usr/share/doc/$(p)/.
+ dh_link -p$(p_doc) \
+ /usr/share/doc/$(p)/bashref.pdf /usr/share/doc/$(p_doc)/bashref.pdf
+endif
+ dh_installchangelogs -p$(p_doc)
+ dh_compress -p$(p_doc) -Xexamples -X.pdf
+ dh_fixperms -p$(p_doc)
+ dh_installdeb -p$(p_doc)
+ dh_gencontrol -p$(p_doc)
+ dh_md5sums -p$(p_doc)
+ dh_builddeb -p$(p_doc)
+
+binary-bash: bash-install debian/bash.preinst
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -p$(p) bash/CWRU/changelog
+ dh_installdocs -p$(p) \
+ bash/{CHANGES,NEWS,COMPAT,doc/INTRO,POSIX} \
+ debian/{README.Debian,README.abs-guide,README.commands} \
+ debian/inputrc.arrows
+ifeq ($(with_gfdl),yes)
+ cp -p bash/doc/FAQ $(d)/usr/share/doc/$(p)/.
+endif
+ cp -p debian/FAQ $(d)/usr/share/doc/$(p)/.
+ dh_installman -p$(p) bash/doc/rbash.1 debian/bash-builtins.7
+ dh_installmenu -p$(p)
+ dh_strip -p$(p)
+ dh_compress -p$(p)
+ dh_fixperms -p$(p)
+ dh_shlibdeps -p$(p) -- -dPre-Depends $(d)/bin/bash debian/bash.preinst
+ dh_installdeb -p$(p)
+ dh_gencontrol -p$(p)
+ dh_md5sums -p$(p)
+ dh_builddeb -p$(p)
+
+# Even though it contains only headers and example files,
+# bash-builtins is NOT arch-independent because the config.h* files
+# differ on different archs.
+binary-builtins: bash-install
+ dh_testdir
+ dh_testroot
+ dh_compress -p$(p_bins) -Xexamples
+ dh_fixperms -p$(p_bins)
+ dh_installdeb -p$(p_bins)
+ dh_gencontrol -p$(p_bins)
+ dh_md5sums -p$(p_bins)
+ dh_builddeb -p$(p_bins)
+
+binary-static: static-build
+ dh_testdir
+ dh_testroot
+ dh_clean -k -p$(p_stat)
+ dh_installdirs -p$(p_stat) \
+ bin \
+ usr/share/man/man1
+ cp -p build-static/bash $(d_stat)/bin/bash-static
+ cp -p bash/doc/bash.1 $(d_stat)/usr/share/man/man1/bash-static.1
+ dh_installdocs -p$(p_stat)
+ dh_installchangelogs -p$(p_stat)
+ dh_strip -p$(p_stat)
+ dh_compress -p$(p_stat)
+ dh_fixperms -p$(p_stat)
+ dh_installdeb -p$(p_stat)
+ dh_gencontrol -p$(p_stat)
+ dh_md5sums -p$(p_stat)
+ dh_builddeb -p$(p_stat)
+
+binary-minimal: minimal-build
+ dh_testdir
+ dh_testroot
+ dh_clean -k -p$(p_min)
+ dh_installdirs -p$(p_min) \
+ bin \
+ usr/share/man/man1
+ cp -p build-min/bash $(d_min)/bin/bash-minimal
+ cp -p debian/bash-minimal.1 $(d_min)/usr/share/man/man1/.
+ dh_installdocs -p$(p_min)
+ dh_installchangelogs -p$(p_min)
+ dh_strip -p$(p_min)
+ dh_compress -p$(p_min)
+ dh_fixperms -p$(p_min)
+ dh_shlibdeps -p$(p_min)
+ dh_installdeb -p$(p_min)
+ dh_gencontrol -p$(p_min)
+ dh_md5sums -p$(p_min)
+ dh_builddeb -p$(p_min)
+
+binary-bashdb: bashdb-install
+ dh_testdir
+ dh_testroot
+ dh_installdocs -p$(p_bdb) \
+ bashdb/{CHANGES,NEWS,README}
+ cp -p debian/README.bashdb $(d_bdb)/usr/share/doc/$(p_bdb)/README.Debian
+ for i in AUTHORS CHANGES NEWS README THANKS TODO; do \
+ cp -p bashdb/debugger/$$i \
+ $(d_bdb)/usr/share/doc/$(p_bdb)/$$i.bashdb; \
+ done
+ dh_installdocs -p$(p_bdb)
+ dh_installchangelogs -p$(p_bdb) bashdb/debugger/ChangeLog
+ dh_installemacsen -p$(p_bdb)
+ dh_strip -p$(p_bdb)
+ dh_compress -p$(p_bdb)
+ dh_fixperms -p$(p_bdb)
+ dh_installdeb -p$(p_bdb)
+ dh_gencontrol -p$(p_bdb)
+ dh_md5sums -p$(p_bdb)
+ dh_builddeb -p$(p_bdb)
+
+binary-indep: binary-doc
+binary-arch: binary-bash binary-builtins binary-static binary-minimal #binary-bashdb
+binary: binary-indep binary-arch
+
+# ---------------------------------------------------------------------------
+# common rules for all bash build variations
+
+do-build-$(build): stamps/stamp-build-$(build)
+stamps/stamp-build-$(build): stamps/stamp-configure-$(build)
+ dh_testdir
+ $(MAKE) -C build-$(build) \
+ CC='$(CC)' \
+ CFLAGS='$(CFLAGS)' \
+ YACC="$(YACC)" \
+ deb_builddir=build-$(build)/ \
+ $(debflags)
+ifeq ($(with_gfdl),yes)
+# XXX not done by toplevel make?
+ $(MAKE) -C build-$(build)/doc \
+ bash.info
+endif
+ touch stamps/stamp-build-$(build)
+
+do-configure-$(build): stamps/stamp-configure-$(build)
+stamps/stamp-configure-$(build): stamps/stamp-patch-$(bash_src)
+ dh_testdir
+ rm -rf build-$(build)
+ mkdir build-$(build)
+ cd build-$(build) && \
+ CC="$(CC)" CFLAGS="$(CFLAGS)" YACC="$(YACC)" \
+ ../$(bash_src)/configure $(configure_args)
+ if ! grep -q '#define HAVE_DEV_STDIN 1' build-$(build)/config.h; then \
+ echo "HAVE_DEV_STDIN not defined, abortig build"; \
+ exit 1; \
+ fi
+ touch stamps/stamp-configure-$(build)
+
+patchdir = debian/patches
+debian_patches = \
+ bash31-001 \
+ bash31-002 \
+ bash31-003 \
+ bash31-004 \
+ bash31-005 \
+ bash31-006 \
+ bash31-007 \
+ bash31-008 \
+ bash31-009 \
+ bash31-010 \
+ bash31-011 \
+ bash31-012 \
+ bash31-013 \
+ bash31-014 \
+ bash31-015 \
+ bash31-016 \
+ bash31-017 \
+ readline51-001 \
+ rl-inputrc \
+ bashbug-editor \
+ deb-bash-config \
+ deb-examples \
+ man-arithmetic \
+ man-fignore \
+ man-bashrc \
+ man-bashlogout \
+ man-substring-exp \
+ man-nocaseglob \
+ man-test \
+ man-test2 \
+ man-net-redirections \
+ privmode \
+ rbash-manpage \
+ command-not-found \
+ bash-default-editor \
+ ulimit \
+ po-sv \
+ bash-subst-param-length \
+ pgrp-pipe \
+ input-err \
+ read-memleak \
+ login-shell \
+ man-typos \
+
+ifeq ($(with_gfdl),yes)
+ debian_patches += \
+ bash31-002-doc \
+ command-not-found-doc \
+ man-substring-exp-doc \
+ man-test2-doc \
+ ulimit-doc \
+ man-net-redirections-doc \
+
+endif
+
+# all debian_patches, without bash205b-*
+# patches integrated in bashdb: builtins-shift, execute-cmd, man-arithmetic,
+# man-builtin, man-fignore, random, rbash-manpage, report-155436,
+# rl-8bit-init, s390-build
+# and bashdb patch
+# rbash-manpage \
+
+bashdb_patches = \
+ bashdb \
+ rl-examples-bdb \
+ rl-inputrc \
+ bashbug-editor \
+ deb-bash-config \
+ deb-examples \
+ privmode \
+
+# various \
+
+# these are applied in bashdb cvs as well
+# man-arithmetic \
+# man-fignore \
+# random \
+# report-155436 \
+# s390-build \
+# builtins-shift
+
+patch-$(bash_src): stamps/stamp-patch-$(bash_src)
+stamps/stamp-patch-$(bash_src): stamps/stamp-unpack-$(bash_src) \
+ $(foreach p,$(bash_patches),stamps/stamp-patch-$(bash_src)-$(p))
+ echo -e "\nPatches applied in this version:" > pxxx
+ for i in $(bash_patches); do \
+ echo -e "\n$$i:" >> pxxx; \
+ sed -n 's/^# *DP: */ /p' $(patchdir)/$$i.dpatch >> pxxx; \
+ done
+ mv -f pxxx $@
+
+stamps/stamp-patch-$(bash_src)-%: $(patchdir)/%.dpatch
+ if [ -x $< ]; then true; else chmod +x $<; fi
+ if [ -f $@ ]; then \
+ echo "$* patches already applied."; exit 1; \
+ fi
+ $< -patch -d $(bash_src)
+ echo "$* patches applied." > $@
+
+unpack-$(bash_src): stamps/stamp-unpack-$(bash_src)
+stamps/stamp-unpack-$(bash_src):
+ mkdir -p stamps
+ rm -rf bash-$(VERSION) $(bash_src)
+ rm -f stamps/stamp-patch-$(bash_src){,-*}
+ tar xfz bash-$(VERSION)*.tar.gz
+ mv bash-$(VERSION) $(bash_src)
+ cp -p /usr/share/misc/config.* $(bash_src)/.
+ cp -p /usr/share/misc/config.* $(bash_src)/support/.
+ touch stamps/stamp-unpack-$(bash_src)
+
+.PHONY: unpack patch binary binary-arch binary-indep clean \
+ build bash-build minimal-build static-build preinst-build \
+ all-bashdb-build bashdb-build bashdb-doc-build \
+ check \
+ bash-configure minimal-configure static-configure bashdb-configure \
+ binary-doc binary-bash binary-builtins binary-static binary-bashdb \
+ install bash-install bashdb-install
+
+# Local Variables:
+# mode: makefile
+# end:
diff --git a/debian/skel.bash_logout b/debian/skel.bash_logout
new file mode 100644
index 0000000..de4f5f7
--- /dev/null
+++ b/debian/skel.bash_logout
@@ -0,0 +1,7 @@
+# ~/.bash_logout: executed by bash(1) when login shell exits.
+
+# when leaving the console clear the screen to increase privacy
+
+if [ "$SHLVL" = 1 ]; then
+ [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
+fi
diff --git a/debian/skel.bash_profile b/debian/skel.bash_profile
new file mode 100644
index 0000000..2b29651
--- /dev/null
+++ b/debian/skel.bash_profile
@@ -0,0 +1,16 @@
+# ~/.bash_profile: executed by bash(1) for login shells.
+# see /usr/share/doc/bash/examples/startup-files for examples.
+# the files are located in the bash-doc package.
+
+# the default umask is set in /etc/login.defs
+#umask 022
+
+# include .bashrc if it exists
+if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d ~/bin ] ; then
+ PATH=~/bin:"${PATH}"
+fi
diff --git a/debian/skel.bashrc b/debian/skel.bashrc
new file mode 100644
index 0000000..939f390
--- /dev/null
+++ b/debian/skel.bashrc
@@ -0,0 +1,72 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+export HISTCONTROL=ignoredups
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, unless we know we "want" color)
+case "$TERM" in
+xterm-color)
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+ ;;
+*)
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+ ;;
+esac
+
+# Comment in the above and uncomment this below for a color prompt
+#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+ PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
+ ;;
+*)
+ ;;
+esac
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+#if [ -f ~/.bash_aliases ]; then
+# . ~/.bash_aliases
+#fi
+
+# enable color support of ls and also add handy aliases
+if [ "$TERM" != "dumb" ]; then
+ eval "`dircolors -b`"
+ alias ls='ls --color=auto'
+ #alias dir='ls --color=auto --format=vertical'
+ #alias vdir='ls --color=auto --format=long'
+fi
+
+# some more ls aliases
+#alias ll='ls -l'
+#alias la='ls -A'
+#alias l='ls -CF'
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..dd1998d
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=2
+ftp://ftp.gnu.org/gnu/bash/bash-([\d\.]*).tar.gz debian uupdate