https://iterm2.com/downloads.html
sudo apt-get install zsh
로 zsh 설치chsh -s /usr/bin/zsh
로 기본 셸을 zsh로 바꾸기which zsh
로 /usr/bin/zsh 나오는지 확인sudo apt-get install curl
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
입력vi ~/.zshrc
입력하여 테마 변경# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
// *********************
ZSH_THEME="agnoster" // 이거 바꿔주기
// *********************
# Set list of themes to pick from when loading at random
// 아래 생략
git clone https://github.com/powerline/fonts.git
입력cd fonts
./install.sh
open ~/.zshrc
입력
// 윗줄 생략
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
// *********************
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
prompt_context() {
# Custom (Random emoji)
emojis=("🐿" "🤍" "💛" "🐰" "🐥" "🦋" "🌈" "🍻" "🚀" "🍒" "🌙")
RAND_EMOJI_N=$(( $RANDOM % ${#emojis[@]} + 1))
prompt_segment black default "subin ${emojis[$RAND_EMOJI_N]} "
}
// ********************* 이렇게 두문단 추가하기
보통 이렇게 했을때 VsCode 터미널을 키면 바로 연동이 된다. 그러나..! 나는 연동이 되지 않았다..
원인은 mac의 나라는 관리자 계정을 연습용으로 두개 생성했는데 이 과정에서 권한 관련 에러가 생긴것이 아닐까 추측된다.
나는 에러메세지를 무시하는 방법으로 문제를 해결하였다.
vi ~/.zshrc
ZSH_DISABLE_COMPFIX = “true”
를 입력해준다.
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
ZSH_DISABLE_COMPFIX="true" // source oh-my-zsh.sh 실행전 자동으로 에러메세지 무시
source $ZSH/oh-my-zsh.sh
# User configuration