diff options
| author | James Brooks <james@jamesbrooks.net> | 2026-03-27 10:06:03 +1030 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-26 23:36:03 +0000 |
| commit | 844c3bae5fabd0493a3e9737b5bf013adc565122 (patch) | |
| tree | 069a2839c19aa705ae8daa173688e98a529bbc70 | |
| parent | fix: use printf to append fish shell init block (#3346) (diff) | |
| download | atuin-844c3bae5fabd0493a3e9737b5bf013adc565122.zip | |
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.
| -rw-r--r-- | crates/atuin/src/shell/atuin.ps1 | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
