Created
October 29, 2015 18:51
-
-
Save renatocron/2b0a7de1da2ff56c0bc4 to your computer and use it in GitHub Desktop.
gotofolder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
my $list = { | |
f => 'eokoe/flotum/api # BluMoney ', | |
o => 'eokoe/omicron/api # n-gage ', | |
i => 'aware/RNSP-PCS # iota ', | |
n => 'aware/nueta/api # family ', | |
e => 'aware/etamu/api # b-cam ', | |
y => 'eokoe/yod # premio mao', | |
}; | |
print STDERR "choose your dir\n"; | |
my $i = 0; | |
foreach my $k ( sort keys %$list ) { | |
my $v = $list->{$k}; | |
$i++; | |
print STDERR "[$k] $v [$i]\n"; | |
$list->{$i} = $list->{$k}; | |
} | |
my $key; | |
use Term::ReadKey; | |
ReadMode 4; # Turn off controls keys | |
while ( not defined( $key = ReadKey(-1) ) ) { | |
select undef, undef, undef, .05; | |
} | |
ReadMode 0; # Reset tty mode before exiting | |
if ( exists $list->{$key} ) { | |
print "cd /home/renato/projetos/" . &remov($list->{$key}) . "; git status; ls -lhas"; | |
} | |
sub remov { | |
my $x = shift; | |
$x =~ s/\s+#.+//; | |
use DDP; p $x; | |
return $x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment