Mercurial > hg
comparison contrib/editmergeps.ps1 @ 32568:4daf5c18055a
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).
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Tue, 30 May 2017 06:02:31 -0700 |
parents | a438f5a3bc09 |
children | 04e18be6e188 |
comparison
equal
deleted
inserted
replaced
32567:4b9b87930cb3 | 32568:4daf5c18055a |
---|---|
54 else | 54 else |
55 { | 55 { |
56 $linearg = "+$firstline" | 56 $linearg = "+$firstline" |
57 } | 57 } |
58 | 58 |
59 Start-Process -Wait $ed $linearg,$file | 59 Start-Process -Wait -NoNewWindow $ed $linearg,$file |
60 $previousline = $firstline | 60 $previousline = $firstline |
61 $lines = Get-Lines | 61 $lines = Get-Lines |
62 $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil } | 62 $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil } |
63 Write-Output "firstline is: $firstline, previousline is: $previousline" | 63 Write-Output "firstline is: $firstline, previousline is: $previousline" |
64 } | 64 } |