* small dpkg completion update patch
@ 2005-05-05 0:20 Jesse W
2005-05-05 22:27 ` Clint Adams
0 siblings, 1 reply; 2+ messages in thread
From: Jesse W @ 2005-05-05 0:20 UTC (permalink / raw)
To: zsh-workers
I've written a tiny patch for _dpkg, the completion function for dpkg,
and dpkg-deb. It adds the --show option, which was added to dpkg-deb
(but not dpkg) in version 10.1. I'm intending to hack up completion
for dpkg-query evetually, so this is also sort of a training for me in
the process of creating and sending in patches for zsh. If I've done
anything wrong, please let me know. The patch is included below.
Jesse Weinstein
*** /Users/jesse/_dpkg.old Wed May 4 17:00:21 2005
--- /Users/jesse/_dpkg Wed May 4 17:07:56 2005
***************
*** 2,9 ****
--- 2,13 ----
local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions
_dpkg_options
local _dpkg_options_recursive _dpkg_actions_install
_dpkg_actions_record_avail
+ local _dpkg_deb_only_actions
local curcontext="$curcontext" context state line expl ret
typeset -A opt_args
+ _dpkg_deb_only_actions=(
+ '(--show -W)'{--show,-W}'[show package info]:Debian
package:_files -g \*.u\#deb'
+ )
_dpkg_deb_actions=(
'(--build -b)'{--build,-b}'[build archive]:directory:_files -/'
***************
*** 83,89 ****
dpkg-deb)
_arguments "$_dpkg_deb_actions[@]" \
! "$_dpkg_common_actions[@]" && return 0
;;
--- 87,94 ----
dpkg-deb)
_arguments "$_dpkg_deb_actions[@]" \
! "$_dpkg_common_actions[@]" \
! "$_dpkg_deb_only_actions[@]" && return 0
;;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: small dpkg completion update patch
2005-05-05 0:20 small dpkg completion update patch Jesse W
@ 2005-05-05 22:27 ` Clint Adams
0 siblings, 0 replies; 2+ messages in thread
From: Clint Adams @ 2005-05-05 22:27 UTC (permalink / raw)
To: Jesse W; +Cc: zsh-workers
> for dpkg-query evetually, so this is also sort of a training for me in
> the process of creating and sending in patches for zsh. If I've done
> anything wrong, please let me know. The patch is included below.
The changes to _dpkg are good, but your mail program seems to have
mangled the patch. Next time you might want to try sending it as an
attachment instead of putting it inline.
Here's what I'm committing.
Index: Completion/Debian/Command/_dpkg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_dpkg,v
retrieving revision 1.11
diff -u -r1.11 _dpkg
--- Completion/Debian/Command/_dpkg 19 Apr 2005 17:01:50 -0000 1.11
+++ Completion/Debian/Command/_dpkg 5 May 2005 22:23:28 -0000
@@ -2,9 +2,14 @@
local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions _dpkg_options
local _dpkg_options_recursive _dpkg_actions_install _dpkg_actions_record_avail
+local _dpkg_deb_only_actions
local curcontext="$curcontext" context state line expl ret
typeset -A opt_args
+_dpkg_deb_only_actions=(
+ '(--show -W)'{--show,-W}'[show package info]:Debian package:_files -g \*.u\#deb'
+)
+
_dpkg_deb_actions=(
'(--build -b)'{--build,-b}'[build archive]:directory:_files -/'
'(--contents -c)'{--contents,-c}'[list contents]:Debian package:_files -g "*.u#deb(-.)"'
@@ -84,6 +89,7 @@
dpkg-deb)
_arguments "$_dpkg_deb_actions[@]" \
+ "$_dpkg_deb_only_actions[@]" \
"$_dpkg_common_actions[@]" && return 0
;;
dpkg-reconfigure)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-05 22:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05 0:20 small dpkg completion update patch Jesse W
2005-05-05 22:27 ` Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).