… | |
… | |
72 | and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); |
72 | and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); |
73 | |
73 | |
74 | /[\\"'\ \t|&;<>()]/ |
74 | /[\\"'\ \t|&;<>()]/ |
75 | and $add_button->("shell quote" => sub { $_ = "\Q$_" }); |
75 | and $add_button->("shell quote" => sub { $_ = "\Q$_" }); |
76 | |
76 | |
77 | /^(http|ftp|telnet|irc|news):\// |
77 | /^(https?|ftp|telnet|irc|news):\// |
78 | and $add_button->("run $self->{browser}" => sub { $self->exec_async ($self->{browser}, $_) }); |
78 | and $add_button->("run $self->{browser}" => sub { $self->exec_async ($self->{browser}, $_) }); |
79 | |
79 | |
80 | for my $hook (@{ $self->{term}{selection_popup_hook} || [] }) { |
80 | for my $hook (@{ $self->{term}{selection_popup_hook} || [] }) { |
81 | if (my ($title, $cb) = $hook->($popup)) { |
81 | if (my ($title, $cb) = $hook->($popup)) { |
82 | $add_button->($title, $cb); |
82 | $add_button->($title, $cb); |