--- sort.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sort.c b/sort.c index fc76738..c586394 100644 --- a/sort.c +++ b/sort.c _AT_@ -383,10 +383,15 @@ main(int argc, char *argv[]) usage(); } ARGEND - /* -b shall only apply to custom key definitions */ - if (TAILQ_EMPTY(&kdhead) && global_flags) - addkeydef("1", global_flags & ~(MOD_STARTB | MOD_ENDB)); - addkeydef("1", global_flags & MOD_R); + if (TAILQ_EMPTY(&kdhead)) { + if (global_flags) { + /* -b shall only apply to custom key definitions */ + addkeydef("1", global_flags & ~(MOD_STARTB | MOD_ENDB)); + } + addkeydef("1", global_flags & MOD_R); + } else if (!Cflag && !cflag) { + addkeydef("1", global_flags & MOD_R); + } if (!argc) { if (Cflag || cflag) { -- 2.24.1Received on Wed Jan 01 2020 - 12:51:06 CET
This archive was generated by hypermail 2.3.0 : Wed Jan 01 2020 - 13:00:22 CET