cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.75k stars 176 forks source link

Can't search command with '-' arguments in PowerShell #382

Closed YoshidaRyoko closed 6 months ago

YoshidaRyoko commented 7 months ago

I have run "mcfly init powershell" and append its output to my PowerShell profile It works well when I press Ctrl+R with no command or command with no argument, such as cargo build.

But when I type command like ls -a or Get-ChildItem -Name it reports an error

error: unexpected argument '-a' found

  tip: to pass '-a' as a value, use '-- -a'

Usage: mcfly.exe search [OPTIONS] [COMMAND]...

For more information, try '--help'.

The reason of this error is when pressing Ctrl+R, the input line is not properly quoted.