使用 Bash 5.0:
$ bash --help
GNU bash, version 5.0.0(1)-release-(x86_64-pc-linux-gnu)
Usage: bash [GNU long option] [option] ...
bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--pretty-print
--rcfile
--restricted
--verbose
--version
这个 --pretty-print
选项是什么?我在 Bash 5.0 手册页和互联网上都找不到它!好神秘:O
最佳答案
找到了 8)
在代码源中,CWRU/changelog
第 1427 行:
shell.c
- --pretty-print: new invocation option, currently undocumented, dumps
a pretty-printed version of a shell script given as an argument to
stdout
我刚刚试过了,它的工作方式类似于 type
的功能,但适用于整个脚本!整洁的。不过,评论将被删除!
关于bash - Bash 5.0 的 --pretty-print 选项有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55582730/