diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-11-08 16:40:15 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-11-08 16:40:15 +0100 |
commit | 7fda0be00b7b86131ff378419f1c30c22e4a6667 (patch) | |
tree | 1a039b8f0cc0dd3489e4cf27e5d031b26b52551f | |
parent | edf84d21a185598cee59132e34fdf33bc71df6b3 (diff) | |
download | lr-7fda0be00b7b86131ff378419f1c30c22e4a6667.tar.gz lr-7fda0be00b7b86131ff378419f1c30c22e4a6667.tar.xz lr-7fda0be00b7b86131ff378419f1c30c22e4a6667.zip |
fix -1 and -A
-rw-r--r-- | lr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lr.c b/lr.c index fe2d91b..459f012 100644 --- a/lr.c +++ b/lr.c @@ -2171,8 +2171,8 @@ main(int argc, char *argv[]) while ((c = getopt(argc, argv, "01ABC:DFGHLQST:UXde:f:lho:st:x")) != -1) switch (c) { case '0': format = zero_format; input_delim = 0; Qflag = 0; break; - case '1': expr = chain(parse_expr("depth == 0 || prune"), EXPR_AND, expr); break; - case 'A': expr = chain(expr, EXPR_AND, parse_expr("!(path ~~ \"*/.*\" && prune) && path != \".\"")); break; + case '1': expr = chain(parse_expr("depth > 0 && prune || print"), EXPR_AND, expr); break; + case 'A': expr = chain(expr, EXPR_AND, parse_expr("name =~ \"^\\.\" && path != \".\" ? prune : print")); break; case 'B': Bflag++; Dflag = 0; Uflag = 0; need_stat++; break; case 'C': if ((unsigned int)Cflag < |