Sample Header Ad - 728x90

Use underscore or hyphen for a CLI utility name?

3 votes
1 answer
896 views
I'm creating a CLI utility which is aimed at *nix OS:es. Let's call it 'Super CLI Project'. Looking at the latest POSIX Issue 7, 2018 edition - https://pubs.opengroup.org/onlinepubs/9699919799/ - Utility Conventions - The section shows an example with underscores like this -> utility_name[-a]... which I could interpret as that my util should be named super_cli_project, by convention (with underscores as separator). However, POSIX does not say this explicitly. A quick 'ls' in my /usr/bin/ shows that most utils in my OS (Ubuntu) that consists of several words uses a hyphen instead of an underscore. That implies that my util should be named 'super-cli-project' instead. So, what is really the preferred naming convention here? Note: There are a few discussions regarding FILENAMES in general for this topic - but not for the naming conventions of *nix CLI utils themselves.
Asked by Beamie (133 rep)
Jul 16, 2024, 06:23 PM
Last activity: Jul 17, 2024, 07:52 AM