diff options
author | Raphael Geissert <geissert@debian.org> | 2017-10-12 22:02:19 +0000 |
---|---|---|
committer | Raphael Geissert <geissert@debian.org> | 2017-10-12 22:02:19 +0000 |
commit | ad964567ae41459fc0138180958f4dfe73599472 (patch) | |
tree | adfc3fc178af84b38e1b41dc391310a48d23d5e2 /bin/check-new-issues | |
parent | 6d4256ec37f1a27b5cd713e5a204b07cda94c868 (diff) |
add completion for the pkg status
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@56670 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/check-new-issues')
-rwxr-xr-x | bin/check-new-issues | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/check-new-issues b/bin/check-new-issues index bebbfa3a74..a7e60db6f8 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -222,6 +222,7 @@ if ($term->ReadLine() eq 'Term::ReadLine::Stub') { 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 @@ sub initial_completion { 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 { |