Skip to content

Commit

Permalink
use IO::Pager for pullreq show command.
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Nov 22, 2011
1 parent a06a97b commit 8aaf47c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/App/gh/Command/Pullreq/Show.pm
Expand Up @@ -6,6 +6,7 @@ use App::gh::Utils;
use File::stat;
use File::Temp;
use Text::Wrap;
use IO::Pager;
require App::gh::Git;


Expand Down Expand Up @@ -63,6 +64,8 @@ sub run {
die "Github authtoken not found. Can not get pull request.\n";
}

local $STDOUT = new IO::Pager *STDOUT;

my $data = App::gh->api->pullreq_get($user, $repo, $number);
my $pull = $data->{pull};
printf "Title: [%s] %s\n", ucfirst($pull->{state}) , $pull->{title};
Expand Down

0 comments on commit 8aaf47c

Please sign in to comment.