Skip to content

Commit 07989f3

Browse files
Open hidden files in Open-EditorFile
On macOS and Linux, dot files are hidden, so `Get-ChildItem` skips them unless `-Force` is passed. This meant `psedit ~/.zshrc` (and similar) silently opened nothing, making the alias useless for exactly the kind of config files people most often want to jump into. Add `-Force` to the `Get-ChildItem` call in `Open-EditorFile` so hidden files resolve and open. The issue notes a wrinkle: with `-Force`, passing a *directory* would now also enumerate its hidden files. I think that's an acceptable trade-off for the common path-to-a-file case, and a draft for maintainer review either way. Fixes #1750. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6ad4f46 commit 07989f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function Open-EditorFile {
195195
$preview = $true
196196
}
197197

198-
Get-ChildItem $Paths -File | ForEach-Object {
198+
Get-ChildItem $Paths -File -Force | ForEach-Object {
199199
$psEditor.Workspace.OpenFile($_.FullName, $preview)
200200
}
201201
}

0 commit comments

Comments
 (0)