Skip to content

Instantly share code, notes, and snippets.

Last active Sep 25, 2020
What would you like to do?
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 (
# zplug "mafredri/zsh-async"
# zplug "sindresorhus/pure"
zplug "yous/lime"
# 構文のハイライト(
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
# Then, source plugins and add commands to $PATH
zplug load
setopt hist_ignore_dups
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`
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
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