[Secure-testing-commits] r56670 - bin

Raphael Geissert geissert at moszumanska.debian.org
Thu Oct 12 22:02:19 UTC 2017


Author: geissert
Date: 2017-10-12 22:02:19 +0000 (Thu, 12 Oct 2017)
New Revision: 56670

Modified:
   bin/check-new-issues
Log:
add completion for the pkg status


Modified: bin/check-new-issues
===================================================================
--- bin/check-new-issues	2017-10-12 21:24:56 UTC (rev 56669)
+++ bin/check-new-issues	2017-10-12 22:02:19 UTC (rev 56670)
@@ -222,6 +222,7 @@
 my $attribs = $term->Attribs;
 
 my @completion_commands = qw(.f .c .w .m .r ! v e - .help q);
+$attribs->{completer_word_break_characters} = ' ';
 
 sub initial_completion {
     my ($text, $line, $start, $end) = @_;
@@ -239,12 +240,14 @@
 
 	return $term->completion_matches($text,
 					 $attribs->{list_completion_function});
-    } elsif ($line =~ /^-\s+(.)?/) {
-	my $fc = $1;
+    } elsif ($line =~ /^-\s+(.)?(?:([^\s]+)\s+)?/) {
+	my ($fc, $pkg) = ($1, $2);
 
 	if (length($fc) == 0) {
 	    $attribs->{completion_suppress_append} = 1;
 	    $attribs->{completion_word} = [ keys %seen_pkgs ];
+	} elsif (length($pkg) != 0) {
+	    $attribs->{completion_word} = [ qw(<end-of-life> <unfixed> <removed> <not-affected> <ignored> <postponed> <unimportant> <itp>) ];
 	} elsif (exists($seen_pkgs{$fc})) {
 	    $attribs->{completion_word} = [ keys %{$seen_pkgs{$fc}} ];
 	} else {




More information about the Secure-testing-commits mailing list