Fixing the shell-loading-snippets and the editor

This commit is contained in:
lksz 2021-01-14 21:31:31 -05:00
parent 3f9303bad2
commit c453e5bdea
5 changed files with 11 additions and 450 deletions

View file

@ -23,7 +23,11 @@ if( $editor -match 'code(\.exe)?$' ) {
}
}
$local:arguments = $Path -join "' '"
$local:arguments = $($Path | ForEach-Object {
if ($Path -match '\*|\?|~') {
Get-ChildItem -Path $_ | Select-Object -ExpandProperty FullName
} else { $_ }
} ) -join "' '"
if( $Path ) { $arguments = "'$arguments'" }
if( $PSCmdlet.ShouldProcess( "Edit ($editor): $arguments" ) ) {