contrib: make editmergeps use -NoNewWindow option in Start-Process cmdlet
authorKostia Balytskyi <ikostia@fb.com>
Tue, 30 May 2017 06:02:31 -0700
changeset 32601 4daf5c18055a
parent 32600 4b9b87930cb3
child 32602 04e18be6e188
contrib: make editmergeps use -NoNewWindow option in Start-Process cmdlet Running 'Start-Process -Wait "vim" "+10" "filename"' from PowerShell actually spawns a separate cmd window to run vim in. This looks ugly and in most cases not what user wants. During my initial testing I was using the Cmder app, which made me not notice this (it captures new windows as new tabs).
contrib/editmergeps.ps1
--- a/contrib/editmergeps.ps1	Tue May 30 05:56:48 2017 -0700
+++ b/contrib/editmergeps.ps1	Tue May 30 06:02:31 2017 -0700
@@ -56,7 +56,7 @@
         $linearg = "+$firstline"
     }
 
-    Start-Process -Wait $ed $linearg,$file
+    Start-Process -Wait -NoNewWindow $ed $linearg,$file
     $previousline = $firstline
     $lines = Get-Lines
     $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil }