Home>

Currently here , MacBook in the terminal: ~ You are about to change the display of Taro $.
I changed it according to the link above, but the display in the terminal is

Last login: Fri Nov 22 10:53:22 on ttys000
(base) \ [\ e [37;100m \] \ # \ [\ e [90;47m \]  \ [\ e [30;47m \] \ W \ [\ e [37m \] $(__ git_ps1 " \ [\ e [37;102m \]  \ [\ e [30m \]  \ [\ e [0;92m \] ") \ [\ e [49m \]  \ [\ e [m \] \ $

This is now.

Error message
Last login: Fri Nov 22 10:53:22 on ttys000
(base) \ [\ e [37;100m \] \ # \ [\ e [90;47m \]  \ [\ e [30;47m \] \ W \ [\ e [37m \] $(__ git_ps1 " \ [\ e [37;102m \]  \ [\ e [30m \]  \ [\ e [0;92m \] ") \ [\ e [49m \]  \ [\ e [m \] \ $
Applicable source code
export PATH = "$PYENV_ROOT/bin: $PATH"
eval "$(pyenv init-)"
# added by Anaconda3 2019.07 installer
# >>>conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup = "$(CONDA_REPORT_ERRORS = false '/ Users/user/anaconda3/bin/conda' shell.bash hook 2>/dev/null)"
if [$? -eq 0];then
    \ eval "$__ conda_setup"
else
    if [-f "/Users/user/anaconda3/etc/profile.d/conda.sh"];then
        "/Users/user/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1 = false conda activate base
    else
        \ export PATH = "/ Users/user/anaconda3/bin: $PATH"
    fi
fi
unset __conda_setup
#<<<conda init<<<
export PYENV_ROOT = "${HOME} /. pyenv"
export PATH = "${PYENV_ROOT}/bin: $PATH"
eval "$(pyenv init-)"

Since I recently changed MacOS to catalina, I changed the terminal login shell from bash to zsh or changed the path, but it didn't work out.

Supplemental information (FW/tool version etc.)

Please provide more information here.

  • Answer # 1

    Prerequisites/What you want to achieve

    I want to make MacBook: ~ Taro $display nicely in the terminal.
    The following problems occurred when referring to the site.

    Problem/Error message
    Last login: Fri Nov 22 10:53:22 on ttys000
    (base) \ [\ e [37;100m \] \ # \ [\ e [90;47m \]  \ [\ e [30;47m \] \ W \ [\ e [37m \] $(__ git_ps1 " \ [\ e [37;102m \]  \ [\ e [30m \]  \ [\ e [0;92m \] ") \ [\ e [49m \]  \ [\ e [m \] \ $
    Applicable source code
    export PATH = "~/.rbenv/shims:/usr/local/bin: $PATH"
    eval "$(rbenv init-)"
    source ~/.git-prompt.sh
    # Insert newline after output
    function add_line {
      if [[-z "${PS1_NEWLINE_LOGIN}"]];then
        PS1_NEWLINE_LOGIN = true
      else
        printf '\ n'
      fi
    }
    PROMPT_COMMAND = 'add_line'
    export PS1 = '\ [\ e [37;100m \] \ # \ [\ e [90;47m \]  \ [\ e [30;47m \] \ W \ [\ e [37m \] $(__ git_ps1 "\ [\ e [37;102m \]  \ [\ e [30m \] % s \ [\ e [0;92m \]") \ [\ e [49m \]  \ [\ e [m \] \ $'
    What I solved by trying

    Since we recently updated macOS to catalina, the default login shell for the terminal was changed to zsh, which was the cause of this issue.

    So when you select users and groups in the mac system preferences, change the default login shell of the terminal to zsh->bash and restart the terminal, the terminal looks cool! !

    Supplemental information

    A shell or a path is difficult. .