# no such file or directory: /usr/share/zsh/vendor-completions/_docker

Windows10 に WSL2 の Ubuntu 環境に ZSH 入れております。正確にいうと zsh の oh-my-zsh 使っています。なんの影響かわかりませんが、ある日突然に warning error が出るようになったため、調べました。

現状 .zshrc 内容は oh-my-zsh のデフォルトで特に弄ることがありません。

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="jonathan"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled  # disable automatic updates
# zstyle ':omz:update' mode auto      # update automatically without asking
# zstyle ':omz:update' mode reminder  # just remind me to update when it's time

# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

source $ZSH/oh-my-zsh.sh

# エラー解決

あとからの資料整理で参考先忘れましたが、どこかの issue で対応方法載せたくれた開発者がいました

  1. シンボリックリンク削除
sudo rm -rf /usr/share/zsh/vendor-completions/_docker
  1. wsl の vendor completion _docker コピー
sudo cp /mnt/wsl/docker-desktop/cli-tools/usr/share/zsh/vendor-completions/_docker /usr/share/zsh/vendor-completions/
  1. 書き込みできないように権限変更
sudo chattr +i /usr/share/zsh/vendor-completions/_docker
  1. Ubuntu から source 有効化
. ~/.zshrc
  1. 必要に応じて wsl 再起動します。
wsl --shutdown

以上

2022-10-23
  • server

関連記事

ジェネレーティブ AI と大規模言語モデル(LLM)を学ぶためのリソース
XZ Utils 事件対応
Ubuntu で Web サーバーを構築する手順
メールサーバー移行と POP & IMAP 設定
Docker Supervisor 使ってバッチ処理
よく使う WSL コマンド
自宅サーバー構築!  Nextcloud で NAS クラウドストレージ
oh my zsh 使うべし
AWS CloudWatch ログ監視で Lambda 処理
AWS SES メール開封確認  DB に集計
Vim 操作とショートカット
DDNS 無料ダイナミック DNS サービス 4 つ
Nginx 基本設定
SPF メール送信なりすまし対策
Windows Mac Linux hosts ファイル場所
AWS Unresolved resource dependencies [AWSEBV2LoadBalancer] エラー
ディスク容量を確認する df コマンド
Laravel Address already in use の原因
content-security-policy 設定
AWS Elastic Beanstalk php.ini 設定変更
AWS Elastic Beanstalk 環境設定
AWS のタイムゾーンを UTC 協定世界時から JST 日本標準時に変更
Docker の基本的な使い方
Amazon DynamoDB 制限調査
AWS 504 Gateway Timeout エラー対応
Shell と Bash のいろいろ
Mac ターミナル SSH 接続設定
Elastic Beanstalk \$\SERVER['REMOTEADDR'] 取得できない
crontab 設定いろいろ
AWS EC2 の amazon-linux-extras の話
デプロイツール Capistrano
解決! xserver php バージョンアップした時に ssh 環境に反映されない
youtube 見れるように vpn サーバー建ててみた
xserver に vim インストール
xserver に nodejs インストール
レンタルサーバーなら xserver おすすめ理由
Docker command でドッカー練習する時のメモ
Windows10 Home に Docker 入れた時のメモ
Centos7 Webserver 構築の時のメモ