diff --git a/docs/00_install.md b/docs/00_install.md index 77305ce..9b7b2f4 100644 --- a/docs/00_install.md +++ b/docs/00_install.md @@ -77,12 +77,3 @@ ghq でリポジトリを管理する場合は以下のようになる。 name = Foo Bar email = foo@example.com ``` - -## 補完を追加 (必要なら) - -補完が必要な場合,`scripts/utils/download-completions.zsh` を使って補完をローカルの補完( `~/.zsh/local/completions/`) へ追加する。 -更新する時も同じスクリプトを使う。 - -```bash -$ zsh scripts/utils/download-completions.zsh -``` diff --git a/scripts/utils/download-completions.zsh b/scripts/utils/download-completions.zsh deleted file mode 100755 index 5b79519..0000000 --- a/scripts/utils/download-completions.zsh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env zsh -# 補完をダウンロードするスクリプト - -set -eu - -COMPLETIONS_DIR=~/.zsh/local/completions -mkdir -p $COMPLETIONS_DIR - -# docker -if type "docker" > /dev/null 2>&1; then - echo "Setup docker completion" - curl -sSL https://raw.githubusercontent.com/docker/cli/master/contrib/completion/zsh/_docker >| ${COMPLETIONS_DIR}/_docker -fi - -# Kubernetes -if type "kubectl" > /dev/null 2>&1; then - echo "Setup kubectl completion" - kubectl completion zsh >| ${COMPLETIONS_DIR}/_kubectl -fi - -# minikube -if type "minikube" > /dev/null 2>&1; then - echo "Setup minikube completion" - minikube completion zsh >| ${COMPLETIONS_DIR}/_minikube -fi - -# task -if type "task" > /dev/null 2>&1; then - echo "Setup task completion" - curl -sSL https://raw.githubusercontent.com/go-task/task/main/completion/zsh/_task >| ${COMPLETIONS_DIR}/_task -fi diff --git a/symlinks/dirs/.zsh/custom/completion.zsh b/symlinks/dirs/.zsh/custom/completion.zsh index 4b9d231..31a3f28 100644 --- a/symlinks/dirs/.zsh/custom/completion.zsh +++ b/symlinks/dirs/.zsh/custom/completion.zsh @@ -1,13 +1,38 @@ # コマンドの補完の設定を行うファイル # -# コマンドの引数でシェルの補完を作成出来る場合は, このファイルで行う. +# コマンドの引数でシェルの補完を作成出来る場合はこのファイルで行う -# gh コマンドの補完設定 +# gh if type "gh" > /dev/null 2>&1; then eval "$(gh completion -s zsh)" fi -# brew コマンドの補完設定 +# brew if type "brew" > /dev/null 2>&1; then FPATH="$(brew --prefix)/share/zsh/site-functions:$FPATH" fi + +# docker +if type "docker" > /dev/null 2>&1; then + eval "$(docker completion zsh)" +fi + +# Kubernetes +if type "docker" > /dev/null 2>&1; then + eval "$(kubectl completion zsh)" +fi + +# minikube +if type "minikube" > /dev/null 2>&1; then + eval "$(minikube completion zsh)" +fi + +# task +if type "task" > /dev/null 2>&1; then + eval "$(task --completion zsh)" +fi + +# mise +if type "mise" > /dev/null 2>&1; then + eval "$(mise completion zsh)" +fi diff --git a/symlinks/dirs/.zsh/custom/local.zsh b/symlinks/dirs/.zsh/custom/local.zsh index ed7b0d2..fd469f2 100644 --- a/symlinks/dirs/.zsh/custom/local.zsh +++ b/symlinks/dirs/.zsh/custom/local.zsh @@ -12,8 +12,3 @@ export PATH="${HOME}/bin-local:$PATH" # Local のみの補完を設定 fpath=(~/.zsh/local/completions $fpath) - -# Cargo の設定 -if [ -f "$HOME/.cargo/env" ];then - source "$HOME/.cargo/env" -fi diff --git a/symlinks/dirs/.zsh/init/env.zsh b/symlinks/dirs/.zsh/init/env.zsh index e9edcf6..ad4fe52 100644 --- a/symlinks/dirs/.zsh/init/env.zsh +++ b/symlinks/dirs/.zsh/init/env.zsh @@ -15,18 +15,3 @@ export VISUAL="vim" # Golang export GOPATH=~/go export PATH=$PATH:~/go/bin - -# Rust (macOS) -if type "brew" > /dev/null 2>&1; then - export PATH="$(brew --prefix bison)/bin:$PATH" - export PATH="$(brew --prefix libxml2)/bin:$PATH" - export PATH="$(brew --prefix bzip2)/bin:$PATH" - export PATH="$(brew --prefix curl)/bin:$PATH" - export PATH="$(brew --prefix libiconv)/bin:$PATH" - export PATH="$(brew --prefix krb5)/bin:$PATH" - export PATH="$(brew --prefix openssl@1.1)/bin:$PATH" - export PATH="$(brew --prefix icu4c)/bin:$PATH" - export PKG_CONFIG_PATH="$(brew --prefix krb5)/lib/pkgconfig:$PKG_CONFIG_PATH" - export PKG_CONFIG_PATH="$(brew --prefix openssl@1.1)/lib/pkgconfig:$PKG_CONFIG_PATH" - export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig:$PKG_CONFIG_PATH" -fi diff --git a/symlinks/files/auto-link/.zshrc b/symlinks/files/auto-link/.zshrc index 1824a0b..65d412a 100644 --- a/symlinks/files/auto-link/.zshrc +++ b/symlinks/files/auto-link/.zshrc @@ -3,9 +3,8 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi - # $PATHを設定 -export PATH="$HOME/bin:/opt/homebrew/bin:$HOME/.composer/vendor/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/usr/local/bin:/usr/local/heroku/bin:$PATH" +export PATH="$HOME/bin:/opt/homebrew/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/usr/local/bin:$PATH" # 優先的に読み込む設定 for file in `ls -1 ~/.zsh/init/*.zsh`;do