From 5409effc90a24ac9a5f63b332af6c96e8b6fdfaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Mon, 30 Sep 2013 16:50:15 +0200 Subject: urxvt: wgetpaste fix --- .urxvt/extensions/wgetpaste | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.urxvt') 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/^.*?://; } -- cgit v1.2.3