Changeset 1dc839b for perl/lib


Ignore:
Timestamp:
Dec 28, 2009, 12:03:28 AM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
4d26776
Parents:
ac374fc
git-author:
Nelson Elhage <nelhage@mit.edu> (12/24/09 15:58:35)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/28/09 00:03:28)
Message:
Complete the 'bindkey' command.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Complete/Client.pm

    rdab89e28 r1dc839b  
    167167}
    168168
     169sub complete_bindkey {
     170    my $ctx = shift;
     171    # bindkey KEYMAP KEYSEQ command COMMAND
     172    #   0      1       2      3        4
     173    if ($ctx->word == 1) {
     174        return complete_keymap();
     175    } elsif ($ctx->word == 2) {
     176        return;
     177    } elsif ($ctx->word == 3) {
     178        return ('command');
     179    } else {
     180        my $new_ctx = $ctx->shift_words(4);
     181        return BarnOwl::Completion::get_completions($new_ctx);
     182    }
     183}
     184
    169185BarnOwl::Completion::register_completer(help    => \&complete_help);
    170186BarnOwl::Completion::register_completer(filter  => \&complete_filter);
     
    178194BarnOwl::Completion::register_completer(unset   => \&complete_set);
    179195BarnOwl::Completion::register_completer(startup => \&complete_startup);
     196BarnOwl::Completion::register_completer(bindkey => \&complete_bindkey);
    180197
    1811981;
Note: See TracChangeset for help on using the changeset viewer.