Skip to content

Commit

Permalink
Resolves Issue 196 (#199)
Browse files Browse the repository at this point in the history
* Issue_196 > editor is launched in background with ie

* Add Wait parameter

- Add Wait parameter in case old behavior is desired

Co-authored-by: belotn <[email protected]>
  • Loading branch information
kelleyma49 and belotn authored Nov 12, 2022
1 parent de453b0 commit 0364b14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PSFzf.Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Get-EditorLaunch() {
}
}
function Invoke-FuzzyEdit() {
param($Directory = ".")
param($Directory = ".", [switch]$Wait)

$files = @()
try {
Expand Down Expand Up @@ -123,7 +123,8 @@ function Invoke-FuzzyEdit() {
# Not sure if being passed relative or absolute path
$cmd = Get-EditorLaunch -FileList $files
Write-Host "Executing '$cmd'..."
Invoke-Expression -Command $cmd
($Editor, $Arguments) = $cmd.Split(' ')
Start-Process $Editor -ArgumentList $Arguments -Wait:$Wait -NoNewWindow
}
catch {
}
Expand Down

0 comments on commit 0364b14

Please sign in to comment.