-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
description
file \--help 2>&1 | bat -pl help gives:
-M LIST use LIST as a colon-separated list of magic
number files in place of default
-d use default magic file
-i do not further classify regular files
Usage: file [OPTION...] [FILE...]
Determine type of FILEs.
--help display this help and exit
-v, --version output version information and exit
-m, --magic-file LIST use LIST as a colon-separated list of magic
number files
...
Because file writes some part of its help message to stderr and it goes first in the resulting text. Without 2>&1 everything is right:
file \--help | bat -pl help:
Usage: file [OPTION...] [FILE...]
Determine type of FILEs.
--help display this help and exit
-v, --version output version information and exit
-m, --magic-file LIST use LIST as a colon-separated list of magic
number files
...
I think it's quite rare for most tools to write help to stderr, but I guess it's worth mentioning.
$ bat --version
bat 0.25.0
$ COMMAND --help
file \--help 2>&1 | bat -pl help
$ COMMAND --version
file-5.41; magic file from /usr/share/file/magic
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working