Repository: cantino/mcfly (language: rust)

Issue:
Can't search command with '-' arguments in PowerShell
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

```text
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.



Discussion / hints:

Fix patch:
diff --git a/mcfly.ps1 b/mcfly.ps1
index cb9373e..731a377 100644
--- a/mcfly.ps1
+++ b/mcfly.ps1
@@ -105,7 +105,7 @@ $null = New-Module mcfly {
         $cursor = $null
         [Microsoft.PowerShell.PSConsoleReadline]::GetBufferState([ref]$line, [ref]$cursor)
         "#mcfly: $line" | Out-File -FilePath $env:MCFLY_HISTORY -Append
-        Invoke-McFly -CommandToComplete $line
+        Invoke-McFly -CommandToComplete "`"$line`""
     }
 
     Export-ModuleMember -Function @(


Test patch: