about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lr.c4
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 <