Changeset bd25f30


Ignore:
Timestamp:
Aug 1, 2009, 9:38:41 PM (15 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
6bc35b4
Parents:
bc5e856
git-author:
David Benjamin <davidben@mit.edu> (08/01/09 20:44:37)
git-committer:
David Benjamin <davidben@mit.edu> (08/01/09 21:38:41)
Message:
Complete the view command

Signed-off-by: David Benjamin <davidben@mit.edu>
File:
1 edited

Legend:

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

    rbc5e856 rbd25f30  
    203203}
    204204
     205sub complete_view {
     206    my $ctx = shift;
     207    if ($ctx->word == 1) {
     208        return ("--home", "-d", complete_filter_name());
     209    }
     210    if ($ctx->words->[1] eq "--home") {
     211        return;
     212    }
     213    if ($ctx->words->[1] eq "-d") {
     214        return complete_filter_expr($ctx, 2);
     215    }
     216    return;
     217}
     218
    205219sub complete_getvar {
    206220    my $ctx = shift;
     
    227241BarnOwl::Completion::register_completer(help    => \&complete_help);
    228242BarnOwl::Completion::register_completer(filter  => \&complete_filter);
     243BarnOwl::Completion::register_completer(view    => \&complete_view);
    229244BarnOwl::Completion::register_completer(show    => \&complete_show);
    230245BarnOwl::Completion::register_completer(getvar  => \&complete_getvar);
Note: See TracChangeset for help on using the changeset viewer.