-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
83 lines (65 loc) · 1.88 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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Created by newuser for 5.7.1
export KCODE=u
setopt print_eight_bit
# load zgen
source "${HOME}/.zgen/zgen.zsh"
# if the init script doesn't exist
if ! zgen saved; then
# specify plugins here
zgen oh-my-zsh
zgen oh-my-zsh plugins/docker
zgen oh-my-zsh plugins/docker-compose
## zgen default plugins
zgen load zsh-users/zsh-completions
zgen load zsh-users/zsh-history-substring-search
zgen load zsh-users/zsh-syntax-highlighting
## zgen plugins
zgen load unixorn/autoupdate-zgen
zgen load zsh-users/zsh-completions
## zsh themes
zgen load romkatv/powerlevel10k powerlevel10k
# generate the init script from plugins above
zgen save
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Set brew completions
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
# add fucking completions
eval $(thefuck --alias)
# alias
## gnu utils alias
alias xargs='gxargs'
alias find='gfind'
alias sed='gsed'
alias diff='colordiff'
## original alais
alias beck='bundle exec kitchen'
alias nv='nvim'
alias ash='ssh -F ~/.ssh/assh_config'
alias ku='kubectl'
alias kux='kubectx'
alias kuns='kubens'
# encode
export LANG='ja_JP.UTF-8'
# git function
gd() {
DIR=$(ghq list -p | peco --prompt "GIT REPOSITORY>")
[ -n "$DIR" ] && cd $DIR
}
gs() {
git branch | peco --prompt "GIT BRANCH>" | head -n 1 | xargs git switch
}
gsc() {
git switch -c $1
}