我想知道是否有一种方法可以在 bash 中找出命令的所有可选参数,而无需打开手册页并查看大量不需要的信息。
Eg:
Input: <some_command> cat
Output: -A, --show-all equivalent to -vET
-b, --number-nonblank number nonempty output lines, overrides -n
-e equivalent to -vE
-E, --show-ends display $ at end of each line
-n, --number number all output lines
-s, --squeeze-blank suppress repeated empty output lines
-t equivalent to -vT
-T, --show-tabs display TAB characters as ^I
-u (ignored)
-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB
--help display this help and exit
--version output …Run Code Online (Sandbox Code Playgroud)