Skip to content

whyareyoudoingthis/spectre-paths-completion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PathArgumentDemo

Reproducer for weird path behaviour when using completion on Windows. Essentially when PowerShell tab completes a path with spaces in it, the resulting string escapes its own path separator, breaking Spectre's argument parsing.

To see it in action, cd to the src/PathArgumentDemo directory and run the following:

dotnet run -- .\bin\ sample
# you should see the correct behaviour
dotnet run -- "./path with spaces" sample
# again, correct behaviour

However, if you use tab completion:

# use <TAB> to complete the "path with spaces" directory and you'll get an input that looks like this:
dotnet run -- '.\path with spaces\' sample
# that will break the parsing and result in the whole command being passed as the first argument with an (escaped) '"' character

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages