forked from Futaba-Kosuke/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
100 lines (78 loc) · 2.15 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# 日本語使用
export LANG=ja_JP.UTF-8
# パス
export PYENV_ROOT="$HOME/.pyenv"
export PATH="/bin:$PATH"
export PATH="/Users/$USER/.nodebrew/current/bin:$PATH"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
export LD_LIBRARY_PATH="/Library/Developer/CommandLineTools/usr/lib/:$LD_LIBRARY_PATH"
# 色を使用
autoload -Uz colors
colors
# 補完
autoload -Uz compinit
# 他のターミナルとヒストリーを共有
setopt share_history
# ヒストリーに重複を表示しない
setopt histignorealldups
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
# cd省略
setopt auto_cd
# コマンドミス修正
setopt list_packed
setopt correct
zstyle ':completion::complete:*' use-cache true
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
SPROMPT="correct: $RED%R$DEFAULT -> $GREEN%r$DEFAULT ? [Yes/No/Abort/Edit] => "
# 表示
# vcs_infoロード
autoload -Uz vcs_info
# PROMPT変数内で変数参照
setopt prompt_subst
# vcsの表示
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr " +"
zstyle ':vcs_info:git:*' unstagedstr " *"
zstyle ':vcs_info:*' formats "%F{red}(%b%u%c) %f"
zstyle ':vcs_info:*' actionformats "[%b|%a]"
# プロンプト表示前にvcs_infoを呼び出す
precmd() { vcs_info }
# プロンプト表示
PROMPT='${fg[cyan]}%~/%f%f ${vcs_info_msg_0_}
\$ '
# alias
alias ls='ls -FG'
alias la='ls -FGa'
alias l='ls -FG'
alias ll='ls -lG'
alias so='source'
alias ..='cd ..'
alias mk='touch'
alias cp='cp -i'
alias rm='rm -i'
alias mv='mv -i'
alias jn='jupyter notebook'
alias vi='vim'
fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
alias gs='git status'
alias gl='git log --graph'
alias gcom='git commit'
alias gc='git checkout'
alias gb='git branch'
alias gd='git diff'
alias gdc='git diff --cached'
alias c='clear'
alias pip='pip3'
alias port_50000='lsof -i:50000'
alias g++='g++ -std=c++14'
alias pythonx='/usr/local/opt/[email protected]/bin/python3'
export KAGGLE="$HOME/program/study/kaggle/"
eval "$(pyenv init -)"
export PATH="/usr/local/opt/tcl-tk/bin:$PATH"
eval "$(starship init zsh)"
fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
autoload -U compinit
compinit -u