Skip to content

Instantly share code, notes, and snippets.

@kevinr
Created December 29, 2010 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinr/758245 to your computer and use it in GitHub Desktop.
Save kevinr/758245 to your computer and use it in GitHub Desktop.
first pass at BarnOwl filteredit command
#!/usr/bin/env perl
use warnings;
use strict;
sub cmd_filteredit {
my $cmd = shift;
my $filtername = shift;
my $filter = BarnOwl::getfilter($filtername);
chomp $filter;
BarnOwl::command("start-command filter " . $filter);
}
BarnOwl::new_command('filteredit' => \&cmd_filteredit, {
summary => 'edit the named filter',
usage => 'filteredit FILTERNAME',
description => 'Edit the named filter'
});
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment