为什么 tar 允许不带连字符的选项?

Why does tar allow unhyphenated options?

通读 man tar 时,您会发现 tar 命令在任何地方都没有连字符。为什么 tar 允许以下两个命令有效:

tar c .
tar -c .

3.3 The Three Option Styles

There are three styles for writing operations and options to the command line invoking tar. The different styles were developed at different times during the history of tar. These styles will be presented below, from the most recent to the oldest.

https://www.gnu.org/software/tar/manual/html_section/tar_21.html

我使用 linux mint distrib 并看到 man tar 的那部分看起来像

SYNOPSIS
 tar [-] A --catenate --concatenate | c --create | d --diff --compare | --delete | r --append | t --list | --test-label |
     u --update | x --extract --get [options] [pathname ...]

所以我们看到连字符是可选的。但是我们可以使用它。