1. 程式人生 > >我的zsh 配置

我的zsh 配置

怎麽 不同的 err plugin output exec nal folder 顏色

# If you come from bash you might have to change your $PATH.
# ZSH的環境變量
export ZSH=/Users/lorialex/.oh-my-zsh
# 主題設置
# 主題列表在 ~/.oh-my-zsh/themes/
# 如果設置為 "random", 每次開啟都會是不同的主題
ZSH_THEME="powerlevel9k/powerlevel9k"
# command line 左邊想顯示的內容
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir) # <= left prompt 設了 "dir"
# command line 右邊想顯示的內容

#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(time) # <= right prompt 設了 "time"
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs) # 加上 "vcs"
# 加上 "dir_writable"
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs)
# 加上 "vi_mode"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs vi_mode)
# 加上 "status" 顯示上一個指令的 return code:
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status ram time)
# 加上 ram,顯示目前的 free memory
#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status ram battery time)
POWERLEVEL9K_MODE=‘nerdfont-complete‘
# 如果想要大小寫敏感,可以取消註釋下面的一行
# CASE_SENSITIVE="true"
# 如果想要連接符不敏感,可以取消註釋下面的一行。_ 和 - 將可以互換
# HYPHEN_INSENSITIVE="true"
# 如果不想要自動更新,可以取消註釋下面的一行
# DISABLE_AUTO_UPDATE="true"
# 自動更新的時間間隔,單位是天,這裏設置 30 天更新一次
export UPDATE_ZSH_DAYS=30
# 如果不想要 ls 命令輸出帶顏色,可以取消註釋下面的一行
# DISABLE_LS_COLORS="true"
# 是否禁止更改終端標題,不要禁止,不然所有終端tab只顯示zsh了,而不隨著目錄的改變而改變顯示
# DISABLE_AUTO_TITLE="true"
# 自動糾正命令,不啟用,不怎麽好用
# ENABLE_CORRECTION="true"
# 按tab鍵補全命令的時候,如果沒什麽可補全的就會出現三個紅點,更人性化顯示,這裏我們啟用
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# 不要在意這些細節,不需要改動
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# 歷史命令日期顯示格式
# 有三種方式: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd",我比較習慣最後那種
HIST_STAMPS="yyyy-mm-dd"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# 插件設置,如果添加太多啟動速度會比較慢
plugins=(git autojump)
[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && . ~/.autojump/etc/profile.d/autojump.zsh
# 剩下部分比較不常改動
# User configuration
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin"
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR=‘vim‘
# else
# export EDITOR=‘mvim‘
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH=/Users/lorialex/.oh-my-zsh

# Set name of the theme to load. Optionally, if you set this to "random"
# it‘ll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="lambda-mod"

# Set list of themes to load
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
# An empty array have no effect
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR=‘vim‘
# else
# export EDITOR=‘mvim‘
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

我的zsh 配置