File: dp

package info (click to toggle)
bash 2.05a-11
  • links: PTS
  • area: main
  • in suites: woody
  • size: 9,804 kB
  • ctags: 6,165
  • sloc: ansic: 67,305; sh: 10,832; perl: 4,105; yacc: 3,166; makefile: 3,075; asm: 48; awk: 23
file content (98 lines) | stat: -rw-r--r-- 3,734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
From doko@cs.tu-berlin.de Fri Mar 08 19:44:43 2002
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	["1580" "Friday" "8" "March" "2002" "10:41:37" "-0800" "Ian Macdonald" "ian@caliban.org" nil "55" "dpkg completion" "^From:" nil nil "3" nil nil nil nil nil]
	nil)
Received: from localhost ([127.0.0.1] ident=smbadmin)
	by gate.local with esmtp (Exim 3.35 #1 (Debian))
	id 16jPLy-0002cU-00
	for <doko@localhost>; Fri, 08 Mar 2002 19:44:30 +0100
X-Sieve: cmu-sieve 1.3
Received: from einhorn.in-berlin.de [192.109.42.8]
	by localhost with POP3 (fetchmail-5.9.8)
	for doko@localhost (single-drop); Fri, 08 Mar 2002 19:44:30 +0100 (MET)
Received: from mail.cs.tu-berlin.de (root@mail.cs.tu-berlin.de [130.149.17.13])
	by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id g28Ioq3g019309
	for <doko@klose.in-berlin.de>; Fri, 8 Mar 2002 19:50:52 +0100
Received: (from doko@localhost)
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) id TAA19084
	for doko@klose.in-berlin.de; Fri, 8 Mar 2002 19:46:12 +0100 (MET)
Received: from cartero.cs.tu-berlin.de (postfix@cartero.cs.tu-berlin.de [130.149.17.20])
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id TAA18363
	for <doko@cs.tu-berlin.de>; Fri, 8 Mar 2002 19:41:41 +0100 (MET)
Received: from caliban.org (caliban.org [66.125.233.130])
	by cartero.cs.tu-berlin.de (Postfix) with ESMTP id EDDD8130BA0
	for <doko@cs.tu-berlin.de>; Fri,  8 Mar 2002 19:41:39 +0100 (MET)
Received: from jiskefet.caliban.org (hades.caliban.org [66.125.233.131])
	by caliban.org (Postfix) with ESMTP id 9C67E1DE21A
	for <doko@cs.tu-berlin.de>; Fri,  8 Mar 2002 10:41:37 -0800 (PST)
Received: by jiskefet.caliban.org (Postfix, from userid 500)
	id 522CA4C01C; Fri,  8 Mar 2002 10:41:37 -0800 (PST)
Message-ID: <20020308104137.B19547@caliban.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
X-PGP-Fingerprint: 5549 8FFB CE82 CF71 B0D7  14E0 BB98 B98B BFBA F0E8
X-Operating-System: Linux 2.4.18 i686
X-MailScanner: Found to be clean
From: Ian Macdonald <ian@caliban.org>
To: doko@cs.tu-berlin.de
Subject: dpkg completion
Date: Fri, 8 Mar 2002 10:41:37 -0800

Hi,

Please ignore the dpkg completion I just sent. My Emacs made a mess of
it.

Here's the correct one:

_dpkg()
{
	local cur prev

	COMPREPLY=()
	cur=${COMP_WORDS[COMP_CWORD]}
	prev=${COMP_WORDS[COMP_CWORD-1]}

	case "$prev" in 
	-i|--install|--unpack|-A|--record-avail)
		COMPREPLY=( $( compgen -f -X '!*.deb' -- $cur ) \
			    $( compgen -d -- $cur ) )
		return 0
		;;
   	-s|--status|-p|--print-avail|-L|--listfiles)
		COMPREPLY=( $( apt-cache pkgnames | grep ^$cur ) )
		return 0
		;;
	*)
		;;
	esac

	COMPREPLY=( $( compgen -W '-i --install --unpack -A --record-avail \
			--configure -r --remove --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 -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 \
			--ignore-depends= --abort-after' -- $cur ) )
}
complete -F _dpkg -o filenames dpkg


Ian
-- 
Ian Macdonald               | C makes it easy for you to shoot yourself
ian@caliban.org             | in the foot.  C++ makes that harder, but
                            | when you do, it blows away your whole leg. 
                            | -- Bjarne Stroustrup 
                            |