I have a problem with terminal display configuration in macOS Big Sur 11.1 I want it to look like windows terminal from CMDer editor. Which can be used in the picture below
(img) I want to have something like this
I was very used to to this look of a terminal so I started to dig for solution. I found, that I need to configure .zshrc file to change colour and add git information when needed.
I found the code which needs to be set in .zshrc file:
parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
COLOR_DEF=$'\e[0m'
COLOR_USR=$'\e[38;5;44m'
COLOR_DIR=$'\e[38;5;106m'
COLOR_GIT=$'\e[38;5;208m'
NEWLINE=$'\n'
setopt PROMPT_SUBST
export PROMPT='${COLOR_USR}%n ${COLOR_DEF}in ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}Ⲗ '
And it works when it comes to colours. I’m not able to make parse_git_branch function to work. I don't know what is going on here. In other post there is info that the method works.
(img) currently, I have something like this. With no git branching information