From 07989f3e5dff301a75f8f0a29154563252d2f368 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:06:10 -0700 Subject: [PATCH] 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> --- .../Commands/Public/CmdletInterface.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1 b/module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1 index e54089d91..f09335e41 100644 --- a/module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1 +++ b/module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1 @@ -195,7 +195,7 @@ function Open-EditorFile { $preview = $true } - Get-ChildItem $Paths -File | ForEach-Object { + Get-ChildItem $Paths -File -Force | ForEach-Object { $psEditor.Workspace.OpenFile($_.FullName, $preview) } }