Home > OS >  Histfile in integrated terminal not the same as normal terminal
Histfile in integrated terminal not the same as normal terminal

Time:12-13

I just lost my terminal history in VS Code. I noticed it when trying to do a reverse search in the Integrated Terminal (CTRL R).

To debug, I ran this command:

echo $HISTFILE

This gives me:

/var/folders/ky/ltbvkg9s1239m5c9bccj5xtc0000gn/T/johndoe-code-zsh/.zsh_history

I would expect the normal path of my ZSH history is shown instead, like I get in iTerm2 when running the same command.

/Users/johndoe/.zsh_history

enter image description here

CodePudding user response:

Try turning off the shell integration that's enabled by default ("terminal.integrated.shellIntegration.enabled") and then restart the terminal.

https://i.stack.imgur.com/1Ger0.png

CodePudding user response:

I fixed the problem by just adding this two lines at the bottom of my ~/.zshrc file.

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
  • Related