App-lsplusplus
view release on metacpan or search on metacpan
#!/usr/bin/perl
# vim:ft=perl:et:
package App::lsplusplus;
my $APP = 'ls++';
our $VERSION = '0.69';
$App::lsplusplus::VERSION = '0.69';
use strict;
use utf8;
use open qw(:std :utf8);
use Term::ExtendedColor qw(fg uncolor);
use File::LsColor;
use Pod::Usage;
use Getopt::Long;
use Time::Local;
#use Data::Dumper;
use locale;
#{
# package Data::Dumper;
# no strict 'vars';
# $Terse = $Indent = $Useqq = $Deparse = $Sortkeys = 1;
# $Quotekeys = 0;
#}
my $ls = '/bin/ls';
my @ls_opts = get_ls_cmdline();
my @ls_where = get_ls_where(@ARGV);
if(not isa_tty()) {
system($ls, @ls_where);
exit;
}
if(not _init_config()) {;
die "No configuration file found at $ENV{HOME}/.ls++.conf\n";
}
our(@c, @d, %ls_colors, $symlink_delim, $symlink_color, $symlink_attr);
my $colors = _get_color_support();
my ($sizelen, $stringlen, $permlen);
$ENV{DEBUG} and print "$_ x\n" for @c;
my $opt = {
perm_file => undef,
perm_time_file => undef,
perm_size_file => undef,
perm_time_size_file => undef,
perm_owner_time_size_file => undef,
};
Getopt::Long::Configure(
qw(
pass_through
no_auto_abbrev
)
);
GetOptions(
'pf' => \$opt->{perm_file},
'psf' => \$opt->{perm_size_file},
'ptsf' => \$opt->{perm_time_size_file},
'potsf' => \$opt->{perm_owner_time_size_file},
'ansi' => sub {
$colors = 16;
@c = (
'30', '30;1',
'31', '31;1',
'32', '32;1',
'33', '33;1',
'34', '34;1',
'35', '35;1',
'36', '36;1',
( run in 1.616 second using v1.01-cache-2.11-cpan-ceb78f64989 )