From 844c3bae5fabd0493a3e9737b5bf013adc565122 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 27 Mar 2026 10:06:03 +1030 Subject: fix: set WorkingDirectory in PowerShell Invoke-AtuinSearch (#3351) Fixes #3350 PowerShell's Set-Location (cd) doesn't update the process-level working directory, so the spawned search process sees a stale cwd and directory filter mode matches against the wrong directory. Setting `WorkingDirectory` on the `ProcessStartInfo` ensures the correct cwd is passed through. --- crates/atuin/src/shell/atuin.ps1 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates') diff --git a/crates/atuin/src/shell/atuin.ps1 b/crates/atuin/src/shell/atuin.ps1 index 088e8626..431ee2c3 100644 --- a/crates/atuin/src/shell/atuin.ps1 +++ b/crates/atuin/src/shell/atuin.ps1 @@ -150,6 +150,8 @@ New-Module -Name Atuin -ScriptBlock { $process.StartInfo.StandardErrorEncoding = [System.Text.Encoding]::UTF8 $process.StartInfo.EnvironmentVariables["ATUIN_SHELL"] = "powershell" $process.StartInfo.EnvironmentVariables["ATUIN_QUERY"] = Get-CommandLine + # PowerShell's Set-Location (cd) doesn't update the process-level working directory, set it explicitly + $process.StartInfo.WorkingDirectory = (Get-Location -PSProvider FileSystem).ProviderPath try { $process.Start() | Out-Null -- cgit v1.3.1