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

Passing an unquoted asterisk from the command line as an argument gets a filename #136

Open
sduplooy opened this issue Mar 29, 2024 · 0 comments

Comments

@sduplooy
Copy link

Version: Cocona 2.2.0
Terminal: iTerm2 with zsh
OS: MacOS Sonoma 14.4

Something strange happens when passing an unquoted asterisk as the value of an argument. Consider the below test runs and output below:

CoconaStarBug$ dotnet run -- set key-1 value-1
(key-1,value-1)
CoconaStarBug$ dotnet run -- set key-1 *
(key-1,CoconaStarBug.csproj)

As you can see in the second execution Console.Writeline() prints CoconaStarBug.csproj and not the asterisk as one would expect. If I place the * in double-quotes it works correctly. Why is that? Is it that * gets a listing of the files in the current directory and picks the first filename? Is it that Cocona doesn't consider special characters as strings?

See the attached example. CoconaStarBug.zip

@sduplooy sduplooy changed the title Passing an unquoted asterisk from the command line as an rgument gets a filename Passing an unquoted asterisk from the command line as an argument gets a filename Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant