zsh를 써봅니다.
함께 oh-my-zsh를 써봅니다.

1. zsh install
1.1. install zsh
 
linux 배포본에 맞춰 설치
fedora, centos8 : prmpt>dnf install zsh
ubuntu, freebsd:  prmpt>pkg install zsh

1.2. change shell
prmpt> witch zsh # shell 파일의 위치 확인
prmpt>chsh -s $SHELL-PATH     or usermod -s $SHELL-PATH
ex>prmpt>chsh -s /bin/zsh     or usermod -s /bin/zsh

2. oh-my-zsh install

$ sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
or

$ sh -c “$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)”

 

[reference] https://ohmyz.sh

3. oh-my-zsh configuration
3.1. change theme to ‘agnoster’
> open ~/.zshrc and set theme as ‘agnoster’

ZSH_THEME=”agnoster”

3.2. change prompt
> open ~/.zshrc and add below

# For Oy My Zsh
prompt_context() {
  # Custom (Random emoji)
  emojis=(“⚡️” “????” “????” “????” “????” “????” “????” “????” “????” “????” “????” “????” “????” “????” “????????” “????” “????”)
  RAND_EMOJI_N=$(( $RANDOM % ${#emojis[@]} + 1))
  prompt_segment black default “${emojis[$RAND_EMOJI_N]}$USER ”
}

prompt_dir() {
  prompt_segment blue $PRIMARY_FG ‘ %c ‘
}
# .For Oy My Zsh

2705400979.zshrc

Leave a Reply

Your email address will not be published. Required fields are marked *