Skip to content

PR #154300 breaks customised HISTFILE usage (integrated shell, zsh) #164025

Closed
@proea

Description

@proea

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.72.2
  • OS Version: macOS Monterey 12.5

Steps to Reproduce:

  1. Configure custom HISTFILE (example custom HISTFILE per project)
  2. Load integrated terminal (zsh) in VS code
  3. HISTFILE will be /Users/<user>/.zsh_history instead of custom history file
    What i use:
    vscode settings.json:
    "terminal.integrated.env.osx": {
      "WORKSPACE_HISTFILE": "true",
      "SHELL": "/bin/zsh",
    },

~/.zshrc

if [[ "${WORKSPACE_HISTFILE:-false}" == "true" ]]; then
  history_file="${HOME}/.zsh_history_files/.zsh_history_${PWD//\//_}"
  echo ">>> Loading Workspace History File [$history_file]"

  export HISTFILE=$history_file
  fc -W
fi

I found that the changes made to break the ability to use a custom HISTFILE because the HISTFILE is always overwritten by these changes:
https://github.com/microsoft/vscode/pull/154300/files#diff-b5f144ca334c56807b1af2c57851271f3c7af88fed7a4287a2627c46ebb97d05R25-R27

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersterminal-shell-zshAn issue in the terminal specific to zsh, including shell integrationverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions