“垂直显示‘ls’命令的输出”在哪里记录?

B F*_*ley 38 ls man documentation

我发现可以ls使用-1开关垂直显示命令的输出:

$ ls -1

但是在说明书上没找到ls。这是一个秘密选择吗?

Tim*_*imo 47

该手册已与程序过时。尝试ls --help | grep -- ' -1':

  -1                         list one file per line
Run Code Online (Sandbox Code Playgroud)

如果您只是这样做,它是描述的最后一个选项之一ls --help。


Ant*_*hon 6

正如@Timo-1在帮助中指出的那样,@terdon 指出-1手册中记录了某些版本。coreutils8.13 在手册页中有那个错误,8.22 版不再有。

在coreutils的黑客指南中。明确指出

手册页是从 --help 输出生成的,因此您不需要更改 man/ 下的任何内容。

因此,转换中一定有什么问题导致类似-m的出现,但不是-1. 在ls使用我提出的补丁构建时回答@timo 的问题而,手册页ls会正确重新生成,相关部分内容如下:

  -Z, --context
          print any security context of each file

  -1     list one file per line

  -0     list files separated with NUL

  --help display this help and exit

  --version
          output version information and exit
Run Code Online (Sandbox Code Playgroud)

如果没有那个补丁,-1 也会出现在手册中。该git log节目没有具体的行动来纠正。最近help2man,用于生成手册页的2013 年 9 月已更新。这help2man ChangeLog没有任何显示具体的行动。