Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design] Is CLI syntax case sensitive? #2394

Open
KathleenDollard opened this issue Apr 23, 2024 · 2 comments
Open

[Design] Is CLI syntax case sensitive? #2394

KathleenDollard opened this issue Apr 23, 2024 · 2 comments
Labels
Design Powderhouse Work to isolate parser and features

Comments

@KathleenDollard
Copy link
Contributor

Should command lines be treated as case sensitive?

Case sensitive CLIs have different behavior for -x and -X, for example.

Arguments for case sensitivity

Many common utilities, including git use case sensitivity.

Is this in the Posix standard? Need link here if so.

There are more possibilities for identifiers if case is recognized

Arguments for **in-*sensitivity

The PowerShell and Windows command prompt are case -insensitive.

Questions

Can't people just use ToLower if they want case-insensitivity?

No. This would change the case of arguments, as well as CLI syntax

@KalleOlaviNiemitalo
Copy link

Many common utilities, including git use case sensitivity.

Is this in the Posix standard? Need link here if so.

I'm not sure it outright says options are case sensitive; but it specifies the ls utility with distinct -A and -a options, and Utility Syntax Guidelines specifically reserve upper-case -W for vendor options.

@Keboo
Copy link
Member

Keboo commented Apr 23, 2024

There was a lot of discussion around this when we first started. There are a lot of conflicting things in the wild. We landed on case sensitive, as it is easier to loosen those requirements in the future vs trying to tighten them. As mentioned above, many of the examples we found where there were casing differences were often short (single letter) options. We did not find many longer named identifiers that had different behavior based only on casing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Powderhouse Work to isolate parser and features
Projects
None yet
Development

No branches or pull requests

3 participants