feat(fish): 支持 Windows Terminal 新标签页保持当前目录

This commit is contained in:
2026-04-15 03:43:26 +08:00
parent af82b03b3e
commit ba7e0bb7af
+7
View File
@@ -47,6 +47,13 @@ in
alias pbpaste "powershell.exe -noprofile -c Get-Clipboard" alias pbpaste "powershell.exe -noprofile -c Get-Clipboard"
end end
# Windows Terminal: emit OSC 9;9 so new tab/pane opens in same directory
function __wt_osc9_9 --on-variable PWD
if test -n "$WT_SESSION"
printf "\e]9;9;%s\e\\" (wslpath -w "$PWD")
end
end
# 1Password env vars (cached locally, no network on shell start) # 1Password env vars (cached locally, no network on shell start)
# Startup only sources the cache; run op-env-refresh manually to fetch/update. # Startup only sources the cache; run op-env-refresh manually to fetch/update.
# Auth via OP_SERVICE_ACCOUNT_TOKEN (set it in ~/.config/fish/local.fish) # Auth via OP_SERVICE_ACCOUNT_TOKEN (set it in ~/.config/fish/local.fish)