Sdk: `dotnet new console -lang` fails with "no matches found" on zsh (macOS)

Created on 11 Jun 2018  路  3Comments  路  Source: dotnet/sdk

Steps to reproduce

On macOS with zsh terminal, start a new dotnet console app with F# as the language:

dotnet new console -lang F# -o src/MyApp

Expected behavior

New console app should be created without error

Actual behavior

zsh gives error: zsh: no matches found: F#

This command works fine in bash. It also works if 'F#' is put in quotation mark

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.300
 Commit:    adab45bf0c

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.300/

Host (useful for support):
  Version: 2.1.0
  Commit:  caa7b7e2ba

.NET Core SDKs installed:
  2.1.300 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

screen shot 2018-06-11 at 3 53 31 pm

Most helpful comment

I believe this happens because # has special meaning in zsh. Does enclosing the F# name in single quotes work for you? I.e.:

dotnet new console -lang 'F#' -o src/MyApp

All 3 comments

I believe this happens because # has special meaning in zsh. Does enclosing the F# name in single quotes work for you? I.e.:

dotnet new console -lang 'F#' -o src/MyApp

@svick yes it works. thanks for the info!!

Don't believe we can do anything in this case.

Was this page helpful?
0 / 5 - 0 ratings