Skip to content

Odd option "-lang" in "dotnet new --help" #4277

@am11

Description

@am11

Steps to reproduce

dotnet new --help

Expected behavior

should not have -lang as a shorthand for --language, which is sufficient on its own:

.. snip ..
  --language   Filters templates based on language and specifies the language of the template to create.
.. snip ..

Actual behavior

has -lang, --language, which is a odd one out as the convention is to either have "single character followed by a single hyphen" and/or "full name after double hyphen".

FWIW, gcc and clang use -x to specify language:

// C++
gcc -x c++ -O -Wall -o myapp.exe /dev/stdin <<<"int main(){return 0;}"

// or C

clang -x c -O -Wall -o myapp.exe /dev/stdin <<<"int main(void){return 0;}"

which dotnet-new can use as well.

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.100
 Commit:    cd82f021f4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /Users/adeel/.dotnet/sdk/3.1.100/

Host (useful for support):
  Version: 3.1.0
  Commit:  65f04fb6db

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions