Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
public:computer:iterm_customize [2018/03/17 18:16] – created alex | public:computer:iterm_customize [2022/09/25 01:20] – alex | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
====== iTerm2 Customize on macOS ====== | ====== iTerm2 Customize on macOS ====== | ||
+ | |||
+ | < | ||
+ | ref from : | ||
+ | |||
+ | get and install iTerm2 | ||
+ | |||
+ | iTerm-> | ||
+ | |||
+ | get and install Oh My Zsh | ||
+ | |||
+ | sh -c " | ||
+ | edit ~/.zshrc -> ZSH_THEME=“agnoster” | ||
+ | |||
+ | install a patched font (Meslo) | ||
+ | |||
+ | https:// | ||
+ | |||
+ | iTerm-> | ||
+ | |||
+ | install zsh-syntax-highlighting | ||
+ | git clone https:// | ||
+ | echo " | ||
+ | |||
+ | |||
+ | test font | ||
+ | echo " | ||
+ | |||
+ | |||
+ | using multi-line prompt | ||
+ | |||
+ | ref from : | ||
+ | |||
+ | vi ~/.zshrc | ||
+ | # to delete computer name in prompt | ||
+ | prompt_context() { | ||
+ | if [[ " | ||
+ | prompt_segment black default " | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | vi ~/ | ||
+ | ## Main prompt | ||
+ | build_prompt() { | ||
+ | RETVAL=$? | ||
+ | prompt_status | ||
+ | prompt_virtualenv | ||
+ | prompt_context | ||
+ | prompt_dir | ||
+ | prompt_git | ||
+ | prompt_bzr | ||
+ | prompt_hg | ||
+ | prompt_newline # 멀티라인 적용 | ||
+ | prompt_end | ||
+ | } | ||
+ | |||
+ | # 멀티라인 적용, 커버모양 변경 | ||
+ | prompt_newline() { | ||
+ | if [[ -n $CURRENT_BG ]]; then | ||
+ | echo -n " | ||
+ | %(? | ||
+ | |||
+ | else | ||
+ | echo -n " | ||
+ | fi | ||
+ | |||
+ | echo -n " | ||
+ | CURRENT_BG='' | ||
+ | } | ||
+ | |||
+ | </ | ||
====== Preparation ====== | ====== Preparation ====== | ||
Line 103: | Line 173: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ====== Update manually ====== | ||
+ | Old Version | ||
+ | <cli> | ||
+ | $ upgrade_oh_my_zsh | ||
+ | </ | ||
+ | |||
+ | Newer Version | ||
+ | <cli> | ||
+ | $ omz update | ||
+ | </ | ||
+ | |||
+ | <cli> | ||
+ | Updating Oh My Zsh | ||
+ | error: cannot pull with rebase: You have unstaged changes. | ||
+ | error: please commit or stash them. | ||
+ | There was an error updating. Try again later | ||
+ | |||
+ | $ cd ~/ | ||
+ | $ git status | ||
+ | $ git stash | ||
+ | or | ||
+ | $ git add . | ||
+ | $ git commit -m | ||
+ | $ upgrade_oh_my_zsh | ||
+ | </ | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// |