Equals vs space (“-o=value” vs “-o value”) in *nix

2019-02-26 05:53发布

I see no pattern in command line programs that take

-o=value

versus

-o value

For double dash long options, I see a major preference to the equals notation but not for short options. Is there a reason or best practice?

1条回答
Lonely孤独者°
2楼-- · 2019-02-26 06:14

After some Googling it seems most discussions of the evolution of command-line arguments couple the rise of the = sign to the rise of GNU-style long options. I can't find a reference stating explicitly that it was never common practice to use = to separate short options from their arguments, but I also can't find any discussion of anyone doing that.

Some brief discussions ...

查看更多
登录 后发表回答