LoginSignup
0
0

More than 1 year has passed since last update.

oh-my-zshを始めたら、brew ,ls コマンドが使えなくなった

Posted at

前提
Homebrewがインストールされている。
zshがデフォルトのシェル

oh-my-zshをインストールし、テーマ、Flutter SDKのPAT を通した

以下、ターミナルから

[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x 3 takabatakesotaro admin 96 Feb 28 16:22 /usr/local/share/zsh
drwxrwxr-x 6 takabatakesotaro admin 192 May 10 05:06 /usr/local/share/zsh/site-functions

[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.

[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w

[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.

それをdeepl翻訳 
[oh-my-zsh] 安全でない補完依存のディレクトリが検出されました。
drwxrwxr-x 3 takabatakesotaro admin 96 Feb 28 16:22 /usr/local/share/zsh
drwxrwxr-x 6 takabatakesotaro admin 192 May 10 05:06 /usr/local/share/zsh/site-functions

[oh-my-zsh] 安全のため、これらのディレクトリからの補完は、次のようになるまで読み込みません。
[oh-my-zsh] パーミッションとオーナーシップを修正して zsh を再起動するまで、これらのディレクトリから補完をロードしません。
[oh-my-zsh] グループまたはその他の書き込みが可能なディレクトリについては、上記のリストを参照してください。

[oh-my-zsh] パーミッションを修正するには、以下を無効にします。
[oh-my-zsh] "group "および "others "の書き込み権限を無効にして
[oh-my-zsh] これらのディレクトリの所有者が、root または現在のユーザであることを確認します。
[oh-my-zsh] 以下のコマンドが役に立つかもしれません。
[oh-my-zsh] compaudit | xargs chmod g-w,o-w

[oh-my-zsh] 上記が役に立たない場合や、以下の検証をスキップしたい場合は、以下のコマンドを実行してください。
[oh-my-zsh] 安全でないディレクトリの検証をスキップしたい場合は、変数 ZSH_DISABLE_COMPFIX を次のように設定できます。
[oh-my-zsh] "true" に設定してから、zshrc ファイルで oh-my-zsh がソースされます。
//////////////////////////////////////////

試したこと。
ターミナルで
compaudit | xargs chmod g-w,o-w
を実行しましたが、xargs コマンドが通りません。

次に試したこと。
.zshrcファイルの、source $ZSH/oh-my-zsh.shの前に ZSH_DISABLE_COMPFIX=true を追記しました。

openが使えないので、Finderのhomeで
command + shift + .
で隠しファイルを表示し、
source $ZSH/oh-my-zsh.shの前に ZSH_DISABLE_COMPFIX=true を追記しました。

すると、brew、ls、flutter doctor が使えるようになりました。

ほっ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0