diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-03-21 20:03:13 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-03-21 20:03:13 -0400 |
commit | 1f54a19b76946dafcd98a85b53410dfa9204ebe1 (patch) | |
tree | 30da75ab724227ca0370e733abcd4e56c789ea33 /parse.c | |
parent | 352b9eaf4479d204c617c68744de9ba075078308 (diff) |
parse: Add -X and -s to -D tree output
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 43 |
1 files changed, 26 insertions, 17 deletions
@@ -3343,6 +3343,26 @@ void dump_cmdline(const struct cmdline *cmdline, bool verbose) { cfprintf(cerr, "${ex}%s${rs} ", cmdline->argv[0]); + if (cmdline->flags & BFTW_LOGICAL) { + cfprintf(cerr, "${cyn}-L${rs} "); + } else if (cmdline->flags & BFTW_COMFOLLOW) { + cfprintf(cerr, "${cyn}-H${rs} "); + } else { + cfprintf(cerr, "${cyn}-P${rs} "); + } + + if (cmdline->xargs_safe) { + cfprintf(cerr, "${cyn}-X${rs} "); + } + + if (cmdline->flags & BFTW_SORT) { + cfprintf(cerr, "${cyn}-s${rs} "); + } + + if (cmdline->optlevel != 3) { + cfprintf(cerr, "${cyn}-O%d${rs} ", cmdline->optlevel); + } + const char *strategy = NULL; switch (cmdline->strategy) { case BFTW_BFS: @@ -3358,18 +3378,6 @@ void dump_cmdline(const struct cmdline *cmdline, bool verbose) { assert(strategy); cfprintf(cerr, "${cyn}-S${rs} ${bld}%s${rs} ", strategy); - if (cmdline->flags & BFTW_LOGICAL) { - cfprintf(cerr, "${cyn}-L${rs} "); - } else if (cmdline->flags & BFTW_COMFOLLOW) { - cfprintf(cerr, "${cyn}-H${rs} "); - } else { - cfprintf(cerr, "${cyn}-P${rs} "); - } - - if (cmdline->optlevel != 3) { - cfprintf(cerr, "${cyn}-O%d${rs} ", cmdline->optlevel); - } - enum debug_flags debug = cmdline->debug; if (debug) { cfprintf(cerr, "${cyn}-D${rs} "); @@ -3407,20 +3415,21 @@ void dump_cmdline(const struct cmdline *cmdline, bool verbose) { if (cmdline->ignore_races) { cfprintf(cerr, "${blu}-ignore_readdir_race${rs} "); } - if (cmdline->flags & BFTW_MOUNT) { - cfprintf(cerr, "${blu}-mount${rs} "); - } else if (cmdline->flags & BFTW_XDEV) { - cfprintf(cerr, "${blu}-xdev${rs} "); - } if (cmdline->mindepth != 0) { cfprintf(cerr, "${blu}-mindepth${rs} ${bld}%d${rs} ", cmdline->mindepth); } if (cmdline->maxdepth != INT_MAX) { cfprintf(cerr, "${blu}-maxdepth${rs} ${bld}%d${rs} ", cmdline->maxdepth); } + if (cmdline->flags & BFTW_MOUNT) { + cfprintf(cerr, "${blu}-mount${rs} "); + } if (cmdline->unique) { cfprintf(cerr, "${blu}-unique${rs} "); } + if ((cmdline->flags & (BFTW_MOUNT | BFTW_XDEV)) == BFTW_XDEV) { + cfprintf(cerr, "${blu}-xdev${rs} "); + } dump_expr(cerr, cmdline->expr, verbose); |