-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
93 lines (75 loc) · 2.27 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
# direnv
eval "$(direnv hook zsh)"
# for rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init - zsh)"
# for mise
eval "$(~/.local/bin/mise activate zsh)"
# prompt
# %~: 現在のディレクトリ(省略形)
# %#: super userなら#。それ以外は%
# %n: user
# %F: 色付け開始
# %f: 色付け終了
PS1='%F{cyan}%~:%f %# '
# alias
alias gis='git status'
alias gis='git status'
alias gid='git diff'
alias gic='git switch -c'
alias gib='git branch'
alias gip='git remote prune origin'
alias gibd="git branch --merged|egrep -v '\*|develop|master|main'|xargs git branch -d"
alias grep='grep --color=auto'
alias vtop="vtop --theme brew"
alias vi='vim -u NONE'
alias vim=nvim
alias lvim='~/.local/bin/lvim'
#alias docker-compose='docker compose'
# ↑ではwp-cliの問題は解決しないのでsymlink貼った方が良い
# > As a workaround, you can create the following symlink:
# > sudo ln -sf /Applications/Docker.app/Contents/Resources/cli-plugins/docker-compose /usr/local/bin/docker-compose
# > https://docs.docker.com/desktop/release-notes/#4320
# history
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
setopt share_history
setopt hist_ignore_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
# 日本語ファイル名を表示可能にする
setopt print_eight_bit
# 色を使用出来るようにする
autoload -Uz colors
colors
# lsに色を付けるエイリアス
case $OSTYPE in
darwin*)
alias ls='ls -G'
alias la='ls -la -G'
;;
linux-gnu)
alias ls='ls --color'
alias la='ls -la --color'
;;
esac
# 補完で小文字でも大文字にマッチさせる
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
# [TAB] -> [TAB] でパス名の補完候補を選択
zstyle ':completion:*:default' menu select=1
# cd した先のディレクトリをディレクトリスタックに追加する
setopt auto_pushd
setopt pushd_ignore_dups
# コマンドのスペルを訂正する
setopt correct
# EDITOR
export EDITOR=nvim
# compsys
autoload -U compinit && compinit
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH"
# for PHP
export LDFLAGS="-L/opt/homebrew/opt/[email protected]/lib"
export CPPFLAGS="-I/opt/homebrew/opt/[email protected]/include"