Changeset dc8f6e0


Ignore:
Timestamp:
Dec 28, 2009, 12:03:29 AM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
54b4a87
Parents:
e6cec01
git-author:
Nelson Elhage <nelhage@mit.edu> (12/24/09 16:47:37)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/28/09 00:03:29)
Message:
Complete several commands that accept a filename.
File:
1 edited

Legend:

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

    r4d26776 rdc8f6e0  
    66package BarnOwl::Complete::Client;
    77
    8 use BarnOwl::Completion::Util qw(complete_flags);
     8use BarnOwl::Completion::Util qw(complete_flags complete_file);
    99use BarnOwl::Complete::Filter qw(complete_filter_name complete_filter_expr);
    1010
     
    189189}
    190190
     191sub complete_one_file_arg {
     192    my $ctx = shift;
     193    return unless $ctx->word == 1;
     194    return complete_file($ctx->words->[1]);
     195}
     196
    191197BarnOwl::Completion::register_completer(help    => \&complete_help);
    192198BarnOwl::Completion::register_completer(filter  => \&complete_filter);
     
    203209BarnOwl::Completion::register_completer(print   => \&complete_print);
    204210
     211BarnOwl::Completion::register_completer(source      => \&complete_one_file_arg);
     212BarnOwl::Completion::register_completer('load-subs' => \&complete_one_file_arg);
     213BarnOwl::Completion::register_completer(loadsubs    => \&complete_one_file_arg);
     214BarnOwl::Completion::register_completer(loadloginsubs    => \&complete_one_file_arg);
     215BarnOwl::Completion::register_completer(dump        => \&complete_one_file_arg);
     216
    2052171;
Note: See TracChangeset for help on using the changeset viewer.