yenpag
Last Updated: February 25, 2016
·
548
· yanick

Open repo's github page from cli

Plop that git-hub script in your path:

#!/usr/bin/env perl

use 5.10.0;

use Path::Tiny;

for( path('.git/config')->lines ) {
    next unless m#url = git\@github.com:(.*)\.git#;

    my $url = "https://github.com/".$1;

    say $url || 'no github remote found';

    exec 'firefox' => $url;             
}           

And then you'll be able to fire up the github page of the project from the command line:

$ git hub
<magic happens>