ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/selection-pastebin
(Generate patch)

Comparing rxvt-unicode/src/perl/selection-pastebin (file contents):
Revision 1.20 by root, Sun Jun 10 17:31:53 2012 UTC vs.
Revision 1.24 by sf-exg, Sat May 17 15:48:29 2014 UTC

1#! perl 1#! perl
2 2
3#:META:X_RESOURCE:%.cmd:string:the command to run create a new pastebin 3#:META:RESOURCE:%.cmd:string:the command to run create a new pastebin
4#:META:X_RESOURCE:%.url:string:the url template for new pastebins 4#:META:RESOURCE:%.url:string:the url template for new pastebins
5 5
6=head1 NAME 6=head1 NAME
7 7
8 selection-pastebin - automatic pastebin upload 8selection-pastebin - automatic pastebin upload
9 9
10=head1 DESCRPTION 10=head1 DESCRIPTION
11 11
12This is a little rarely useful extension that uploads the selection as 12This is a little rarely useful extension that uploads the selection as
13textfile to a remote site (or does other things). (The implementation is 13textfile to a remote site (or does other things). (The implementation is
14not currently secure for use in a multiuser environment as it writes to 14not currently secure for use in a multiuser environment as it writes to
15F</tmp> directly.). 15F</tmp> directly.).
113 }; 113 };
114 114
115 () 115 ()
116} 116}
117 117
118sub on_user_command { 118sub on_action {
119 my ($self, $cmd) = @_; 119 my ($self, $action) = @_;
120 120
121 if ($cmd eq "selection-pastebin:remote-pastebin") { 121 $action eq "remote-pastebin"
122 $self->upload_paste; 122 and $self->upload_paste;
123 }
124 123
125 () 124 ()
126} 125}
127 126

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines