summaryrefslogtreecommitdiff
path: root/.urxvt/extensions/wgetpaste
diff options
context:
space:
mode:
Diffstat (limited to '.urxvt/extensions/wgetpaste')
-rw-r--r--.urxvt/extensions/wgetpaste8
1 files changed, 4 insertions, 4 deletions
diff --git a/.urxvt/extensions/wgetpaste b/.urxvt/extensions/wgetpaste
index 7462319..0f159c3 100644
--- a/.urxvt/extensions/wgetpaste
+++ b/.urxvt/extensions/wgetpaste
@@ -2,13 +2,14 @@
# Adds an entry to the selection popup allowing to move the current selection
# to a pastebin via wgetpaste.
+
use IPC::Open2;
sub on_start {
my ($self) = @_;
push @{ $self->{term}{selection_popup_hook} }, sub { ("Pastebin" => \&wgetpaste) }
- if `which wgetpast 2> /dev/null`;
+ if `which wgetpaste 2> /dev/null`;
return ()
}
@@ -20,7 +21,6 @@ sub wgetpaste {
print $pin $_;
close $pin;
- $_ = <$pout>;
-
- s/^.*?://;
+ # selection-popup expects the final text in $_
+ ($_ = <$pout>) =~ s/^.*?://;
}