vscode
vscode copied to clipboard
zsh history not working after update
Type: Bug
zsh history in terminal is not working anymore. MacOS - apple silicon chip
VS Code version: Code 1.74.0 (5235c6bb189b60b01b1f49062f4ffa42384f8c91, 2022-12-05T16:37:54.581Z) OS version: Darwin arm64 21.6.0 Modes: Sandboxed: No
yes, this has impacted me this morning, for both stable build and insider build
I'm using M1 Apple Silicon
I'm having the same problem.
macOS - Intel Core i7 VS Code version: Code 1.74.0 macOS version: 13.0.1 (22A400)
echo $HISTFILE
using a new profile directory without the default profile (current user).
I can confirm the same problem with the zsh history
Version: 1.74.0
Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91
Date: 2022-12-05T16:37:54.581Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 22.1.0
Sandboxed: No
Also, I can’t type Cyrillic letters anymore. This might be related:
https://user-images.githubusercontent.com/105274/206443255-d262d0d9-a57f-4566-a8b8-aa5174925fc6.mov
Reinstalled 1.73, and now it works fine again
https://user-images.githubusercontent.com/105274/206444592-a971b564-6726-4592-96f5-1a70488a36fd.mov
https://code.visualstudio.com/updates/v1_73
+1
echo $HISTFILE
/var/folders/mw/96tsjxxxxxxxxxw0000gn/T/xxx-code-zsh/.zsh_history
Can confirm this bug on my M1 macOS Ventura
Updated to 1.74 and vscode now uses it's own history file: $HISTFILE -> /var/folders/zc/3p6k6jwj3ql9_r6q_smnz53r0000gn/T/[username]-code-zsh/.zsh_history
instead of /Users/alexmirkin/.zsh_history
any way to change it?
Intel Mac
A way to work around this for now is to set the HISTFILE
in your .zshrc
. For example:
HISTFILE=/Users/meganrogge/.zsh_history
A way to work around this for now is to set the
HISTFILE
in your.zshrc
. For example:
HISTFILE=/Users/meganrogge/.zsh_history
Or HISTFILE="$HOME/.zsh_history"
Same issue here.
I confirm setting HISTFILE
variable directly in .zshrc
does the trick (until this is fixed).
However, If you have like me, an indirection to load vars from another file (ex: source $HOME/.zshrc.local
), and you have your HISTFILE
defined therein, it does not work.
So, it must be defined directly in .zshrc
.
I was able to resolve this issue by disabling the setting: terminal.integrated.shellIntegration.enabled
. For example,
➜ printenv HISTFILE
/Users/conradwt/.zsh_history
Thus, one doesn't need to set the HISTFILE within $HOME/.zshrc
file. Finally, a better fix for people may be to disable this setting, terminal.integrated.shellIntegration.enabled
, by default.
@conradwt that is not what I'd suggest as it will prevent you from using features. This will soon be fixed in our recovery release.
@meganrogge Thanks for the feedback and I appreciate it.
@meganrogge Thanks for the workaround. Works for me 👍
@meganrogge thanks - did the trick for me as well.
Y
I was able to resolve this issue by disabling the setting:
terminal.integrated.shellIntegration.enabled
. For example,
➜ printenv HISTFILE /Users/conradwt/.zsh_history
Thus, one doesn't need to set the HISTFILE within
$HOME/.zshrc
file. Finally, a better fix for people may be to disable this setting,terminal.integrated.shellIntegration.enabled
, by default.
Thank for the trick, it's work again now
Instead of disabling terminal.integrated.shellIntegration.enabled
and lose features or modifying $HOME/.zshrc
, we can add HISTFILE
env var in vscode terminal settings as a temporary workaround.
"terminal.integrated.env.osx": {
"HISTFILE": "$HOME/.zsh_history"
}
Same issue on intel mac book pro latest macos latest vs code
@vinothpandian In general, I would prefer to set this setting within .zshrc
because I prefer that VSCode inherits any and all shell or terminal-related settings from macOS.
Fix ported to release branch already.