Intellij idea terminal zsh error command not found

for some reason, zsh runs abnormally in intellij idead.
Open the terminal of Intellij IDEA, prompt
configureCommandHistory:6: command not found: cp
and then enter ls and other common commands do not exist.
export PATH finds that the path is different from the value under item2.


has found a solution. Be a porter
https://stackoverflow.com/que...
final solution: replace / Applications/IntelliJ IDEA.app/Contents/plugins/terminal/.zshrc with the following file:

-sharp!/bin/zsh

-sharp starver mod
-sharp Jetbrains uses jediterm as a java terminal emulator for all terminal uses.
-sharp There are some apparent limits on use:
-sharp - must use old-style shebang - not the -sharp!/usr/bin/env zsh
-sharp - must implement the startup file loading here
-sharp
-sharp Note: original contents are in lib/terminal.jar

-sharp mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
bindkey '^[^[[C' forward-word
bindkey '^[^[[D' backward-word

ZDOTDIR=$_OLD_ZDOTDIR

if [ -n "$JEDITERM_USER_RCFILE" ]
then
  source "$JEDITERM_USER_RCFILE"
  unset JEDITERM_USER_RCFILE
fi

if [ -n "$ZDOTDIR" ]
then
  DOTDIR=$ZDOTDIR
else
  DOTDIR=$HOME
fi

if [ -f "/etc/zshenv" ]; then
     source "/etc/zshenv"
fi

if [ -f "$DOTDIR/.zshenv" ]; then
     source "$DOTDIR/.zshenv"
fi

if [ -n $LOGIN_SHELL ]; then
  if [ -f "/etc/zprofile" ]; then
       source "/etc/zprofile"
  fi
  if [ -f "$DOTDIR/.zprofile" ]; then
       source "$DOTDIR/.zprofile"
  fi
fi

if [ -f "/etc/zshrc" ]; then
     source "/etc/zshrc"
fi

if [ -f "$DOTDIR/.zshrc" ]; then
     source "$DOTDIR/.zshrc"
fi

if [ -n $LOGIN_SHELL ]; then
  if [ -f "/etc/zlogin" ]; then
       source "/etc/zlogin"
  fi
  if [ -f "$DOTDIR/.zlogin" ]; then
       source "$DOTDIR/.zlogin"
  fi
fi

if [ -n "$JEDITERM_SOURCE" ]
then
  source $(echo $JEDITERM_SOURCE)
  unset JEDITERM_SOURCE
fi
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bc8021-308b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bc8021-308b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?