Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 1.44 KB

zsh_setup.md

File metadata and controls

67 lines (41 loc) · 1.44 KB

Zsh Shell Setup

Starting with macOS 10.15 Catalina, zsh will be the default macOS shell. Zsh is highly configurable but configuration can be tricky. Get up and running with some essential options and plugins, and an informative prompt theme.


Check zsh

% which zsh
the output should be /bin/zsh

Config

Change Prompt Style

% cd && vim .zshrc

add following content into .zshrc

PROMPT='%n:%~ %(!.#.$) '

Reload the current shell by % source .zshrc or new a terminal

zsh-completions

Installation

$ brew install zsh-completions

Add following content into .zshrc

if type brew &>/dev/null; then
    FPATH=$(brew --prefix)/share/zsh-completions:$FPATH

    autoload -Uz compinit
    compinit
fi

Reload the current shell by % source .zshrc or new a terminal

  • QA

If there shows the warning message

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

try the command : $ compaudit | xargs chmod g-w with a new line output There are insecure directories:

Ref