Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Oct 28, 2023
1 parent 8494407 commit fa3fe71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 130 deletions.
41 changes: 0 additions & 41 deletions .zsh/60_lang.zsh

This file was deleted.

89 changes: 0 additions & 89 deletions .zsh/80_custom.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,6 @@ if [[ -d $KREW_ROOT ]]; then
export PATH="${KREW_ROOT}/bin:$PATH"
fi

if has "lazygit"; then
alias lg='lazygit'
fi

if has "vault"; then
complete -o nospace -C `which vault` vault
fi

if has "mc"; then
complete -o nospace -C `which mc` mc
fi

if ! has "helm"; then
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
fi

if has "go"; then
export GOPRIVATE="*.yahoo.co.jp"
fi

if has "gh"; then
gli() {
local args="$@"
local cmd="gh issue list ${args} | fzf --reverse --preview \"gh issue view {1}\""
selected=`eval ${cmd}`
gh issue view --web $(echo ${selected} | awk '{print $1}')
}
fi

if has "consul"; then
complete -o nospace -C `which consul` consul
fi

alias lgtm="echo '![LGTM](//lgtmoon.herokuapp.com/images/23050)'|pbcopy"

if [[ -d "/usr/local/Caskroom/google-cloud-sdk" ]]; then
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
fi

if has "julia"; then
export LD_LIBRARY_PATH=$HOME/.julia/conda/3/lib
if is_osx; then
Expand All @@ -52,56 +12,7 @@ if has "julia"; then
fi
fi

if has "terraform"; then
complete -o nospace -C /usr/local/bin/terraform terraform
fi

if has "rga"; then
rga-fzf() {
RG_PREFIX="rga --files-with-matches"
local file
file="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
--phony -q "$1" \
--bind "change:reload:$RG_PREFIX {q}" \
--preview-window="70%:wrap"
)" &&
echo "opening $file" &&

if [[ `basename "${file}"` =~ ".gz" ]]; then
gzip -dc ${file} | vim -
else
vim ${file}
fi
}
fi

if has "setup-envtest"; then
k8s_version="1.25.x"
source <(setup-envtest use -i -p env ${k8s_version})
fi

if has 'nvim'; then
alias vim='nvim'
fi

gh_install() {
local extensions_home="${XDG_DATA_HOME}/gh/extensions"
local extension=$1
if ! [[ -d "${extensions_home}/$(basename ${extension})" ]]; then
gh extension install "${extension}"
fi
}

if has "gh"; then
gh_install "cappyzawa/gh-ghq-cd"
gh_install "mislav/gh-branch"
gh_install "seachicken/gh-poi"
gh_install "dlvhdr/gh-dash"
gh alias import --clobber "${XDG_CONFIG_HOME}/gh/alias.yml" >/dev/null
fi

if has "exa"; then
alias ls="exa"
fi

0 comments on commit fa3fe71

Please sign in to comment.