@lxs_opt,
qw(save output|mfolder|o=s format|f=s dedupe|d=s threads|t+
sort|s=s reverse|r offset=i pretty jobs|j=s globoff|g augment|a
- import-before! lock=s@ rsyncable alert=s@ mua=s verbose|v+), @c_opt,
- opt_dash('limit|n=i', '[0-9]+') ],
+ import-before! lock=s@ rsyncable alert=s@ mua=s verbose|v+
+ color!), @c_opt, opt_dash('limit|n=i', '[0-9]+') ],
'up' => [ 'OUTPUT|--all', 'update saved search',
qw(jobs|j=s lock=s@ alert=s@ mua=s verbose|v+ all:s), @c_opt ],
# some of these options are ridiculous for lcat
@lxs_opt, qw(output|mfolder|o=s format|f=s dedupe|d=s threads|t+
sort|s=s reverse|r offset=i jobs|j=s globoff|g augment|a
- import-before! lock=s@ rsyncable alert=s@ mua=s verbose|v+), @c_opt,
- opt_dash('limit|n=i', '[0-9]+') ],
+ import-before! lock=s@ rsyncable alert=s@ mua=s verbose|v+
+ color!), @c_opt, opt_dash('limit|n=i', '[0-9]+') ],
'blob' => [ 'OID', 'show a git blob, reconstructing from mail if necessary',
qw(git-dir=s@ cwd! verbose|v+ mail! oid-a|A=s path-a|a=s path-b|b=s),
'incremental! import' => 'import already seen IMAP and NNTP articles',
'globoff|g' => "do not match locations using '*?' wildcards ".
"and\xa0'[]'\x{a0}ranges",
+'color!' => 'disable color (for --format=text)',
'verbose|v+' => 'be more verbose',
'external!' => 'do not use externals',
'mail!' => 'do not look in mail storage for OID',
sub new {
my ($cls, $lei) = @_;
my $self = bless { %{$lei->{opt}}, -colored => \&uncolored }, $cls;
- return $self unless $self->{color} || -t $lei->{1};
+ return $self unless $self->{color} //= -t $lei->{1};
my $cmd = [ qw(git config -z --includes -l) ];
my ($r, $pid) = popen_rd($cmd, undef, { 2 => $lei->{2} });
my $cfg = PublicInbox::Config::config_fh_parse($r, "\0", "\n");