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

Comparing rxvt-unicode/src/perl/selection-popup (file contents):
Revision 1.1 by root, Mon Jan 9 00:34:36 2006 UTC vs.
Revision 1.3 by root, Mon Jan 9 02:06:43 2006 UTC

33 } 33 }
34 }); 34 });
35 }; 35 };
36 36
37 for ($text) { 37 for ($text) {
38 $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ });
39
40 urxvt::safe
41 and $add_button->("eval perl expression" => sub { $_ = eval urxvt::untaint $_ });
42
38 /^(\S+):(\d+):?$/ 43 /^(\S+):(\d+):?$/
39 and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); 44 and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ });
45
40 /%[0-9a-fA-F]{2}/ && !/%[^0-9a-fA-F]/ && !/%.[^0-9a-fA-F]/ 46 /%[0-9a-fA-F]{2}/ && !/%[^0-9a-fA-F]/ && !/%.[^0-9a-fA-F]/
41 and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); 47 and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge });
48
42 /^(http|ftp|telnet|irc|news):\// 49 /^(http|ftp|telnet|irc|news):\//
43 and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" }); 50 and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" });
44 } 51 }
45 52
46 $popup->show; 53 $popup->show;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines