Last active
September 25, 2020 04:15
-
-
Save kimitoboku/e46a5320303113cc125e52e0e281a954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZPLUG_HOME=/usr/local/opt/zplug | |
source $ZPLUG_HOME/init.zsh | |
export PATH="/usr/local/opt/ruby/bin:$PATH" | |
zplug 'zplug/zplug', hook-build:'zplug --self-manage' | |
# theme (https://github.com/sindresorhus/pure#zplug) | |
# zplug "mafredri/zsh-async" | |
# zplug "sindresorhus/pure" | |
zplug "yous/lime" | |
# 構文のハイライト(https://github.com/zsh-users/zsh-syntax-highlighting) | |
zplug "zsh-users/zsh-syntax-highlighting" | |
# history関係 | |
zplug "zsh-users/zsh-history-substring-search" | |
# タイプ補完 | |
zplug "zsh-users/zsh-autosuggestions" | |
zplug "zsh-users/zsh-completions" | |
zplug "chrissicool/zsh-256color" | |
# Install plugins if there are plugins that have not been installed | |
if ! zplug check --verbose; then | |
printf "Install? [y/N]: " | |
if read -q; then | |
echo; zplug install | |
fi | |
fi | |
# Then, source plugins and add commands to $PATH | |
zplug load | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=1000000 | |
SAVEHIST=1000000 | |
setopt hist_ignore_dups | |
setopt EXTENDED_HISTORY | |
setopt ignore_eof | |
setopt share_history | |
setopt inc_append_history | |
alias ls="ls -G --color" | |
alias la="ls -a" | |
alias ll="ls -lh" | |
alias l='ls -lha' | |
alias gg='git grep' | |
alias vat='bat' | |
alias e='emacsclient -n' | |
function peco-history-selection() { | |
BUFFER=`history -n 1 | tac | awk '!a[$0]++' | peco` | |
CURSOR=$#BUFFER | |
zle reset-prompt | |
} | |
zle -N peco-history-selection | |
bindkey '^R' peco-history-selection | |
function peco-src () { | |
local selected_dir=$(ghq list -p | peco --query "$LBUFFER") | |
if [ -n "$selected_dir" ]; then | |
BUFFER="cd ${selected_dir}" | |
zle accept-line | |
fi | |
zle clear-screen | |
} | |
zle -N peco-src | |
bindkey '^]' peco-src | |
function ssa() { | |
eval $(ssh-agent -s) | |
ssh-add ~/.ssh/id_rsa | |
} | |
function dls(){ | |
docker ps | |
} | |
function dexec(){ | |
docker exec -it $@ | |
} | |
function dshell(){ | |
docker exec -it $1 bash | |
} | |
function dcat(){ | |
docker logs $1 2>&1 | |
} | |
function dtail(){ | |
docker logs -f $1 2>&1 | |
} | |
# direnv | |
eval "$(direnv hook zsh)" | |
export PATH="/usr/local/opt/llvm/bin:$PATH" | |
# pyenv | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
export PATH="/usr/local/opt/binutils/bin:$PATH" | |
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" | |
export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH" | |
export MANPATH="/usr/local/opt/findutils/libexec/gnuman:$MANPATH" | |
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" | |
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH" | |
export MANPATH="/usr/local/opt/grep/libexec/gnuman:$MANPATH" | |
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment