about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-12-27 15:49:29 +0100
committerAxel Beckert <abe@deuxchevaux.org>2015-12-27 15:50:24 +0100
commit5f3e47ca5e8b98480d73b99a51606dda8be9cb32 (patch)
tree2341305bb8cc50aee7bf705fa4307c4e4ca13abc
parentc054786a49ead807f29dc882059405b3c21a07d7 (diff)
downloadzsh-5f3e47ca5e8b98480d73b99a51606dda8be9cb32.tar.gz
zsh-5f3e47ca5e8b98480d73b99a51606dda8be9cb32.tar.xz
zsh-5f3e47ca5e8b98480d73b99a51606dda8be9cb32.zip
37438: C/D/C/_aptitude: Also parse -h output of aptitude 0.7.5 and later
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Debian/Command/_aptitude2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fc7440098..b46d7eda8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-27  Axel Beckert  <abe@deuxchevaux.org>
+
+	* 37438: Completion/Debian/Command/_aptitude: Also parse --help/-h
+	output of aptitude 0.7.5 and later.
+
 2015-12-26  Axel Beckert  <abe@deuxchevaux.org>
 
 	* 37436: Felipe Sateler: Completion/Debian/Command/_apt:
diff --git a/Completion/Debian/Command/_aptitude b/Completion/Debian/Command/_aptitude
index 2cb211149..b2b54599f 100644
--- a/Completion/Debian/Command/_aptitude
+++ b/Completion/Debian/Command/_aptitude
@@ -80,7 +80,7 @@ _arguments -C \
 
 case $state in
   cmds)
-    cmds=( ${${(M)${(f)"$(LC_ALL=C _call_program commands aptitude -h 2>/dev/null)"}:#* - *}/(#b) (*[^ ]) #- (*)/$match[1]:$match[2]:l})
+    cmds=( ${${(M)${(f)"$(LC_ALL=C _call_program commands aptitude -h 2>/dev/null)"}:# [^- ][^ ]## *}/(#b) ([^ ]##) ##(- )#([^- ]*)/$match[1]:$match[3]:l})
 
     _describe -t commands 'aptitude command' cmds && ret=0
   ;;