概要
- brewを使ってfigをインストールした。アクセシビリティ系の権限許可なども行いVScodeのターミナルで動作確認したがコマンドがサジェストされないので解決までの道のりを記載する。
問題発生までの経緯
-
下記コマンドを実行してfigをインストールした。
brew install fig
-
インストール後に表示されるfigのウインドウの指示に従って各種設定を行った。
-
メールアドレスの認証やログインも行った。
問題
- コマンドが補完されずサジェストタブが表示されない。
問題解決までの経緯
-
下記コマンドを実行して解析を試みた。
fig doctor
-
下記のエラーが出た。
PATH contains ~/.local/bin: Path does not contain ~/.local/bin ✘ Doctor found errors. Please fix them and try again.
-
直訳
PATH に ~/.local/bin が含まれています: パスに ~/.local/bin が含まれていません ✘ 医師がエラーを発見しました。 それらを修正して、もう一度お試しください。
-
必要なものがないっぽい。
-
エラーで検索したら下記のissueがヒットした。
-
下記コマンドを実行するとレポートが詳しく出るらしいので実行してみる。
fig doctor --verbose
-
下記のように出力された。
$ fig doctor --verbose Let's check if you're logged in... ✔ Logged into Fig Let's check your dotfiles... ✔ bash ~/.bashrc integration check ✔ bash ~/.bash_profile integration check ● /Users/shun/.zshrc does not source pre integration ● /Users/shun/.zprofile does not source pre integration Let's make sure Fig is setup correctly... ✔ Fig bin exists ✘ PATH contains ~/.local/bin: Path does not contain ~/.local/bin ✘ PATH contains ~/.fig/bin: Path does not contain ~/.fig/bin ✔ Settings Corruption ✔ State Corruption ✘ Fig Integration: Figterm is not running in this terminal, please try restarting your terminal FIG_TERM= ✘ SSH integration: Integration not installed: /Users/shun/.ssh/config does not exist. 0: Integration not installed: /Users/shun/.ssh/config does not exist. Location: fig_cli/src/cli/doctor.rs:1244 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. Let's make sure Fig is running... ✔ Fig is running ✔ Fig socket exists ✔ Daemon ✔ Daemon diagnostics Let's see if Fig is in a working state... ✘ Figterm: No FIGTERM_SESSION_ID 0: No FIGTERM_SESSION_ID 1: environment variable not found Location: fig_cli/src/cli/doctor.rs:649 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. ✔ Insertion lock does not exist ✔ Autocomplete dev mode ✔ Plugin dev mode ✔ Dashboard is loading from the correct URL ✔ Autocomplete is loading from the correct URL Let's check if your system is compatible... ✔ OS is supported ✔ Fish is up to date ✔ Jetbrains Toolbox Check Let's check fig diagnostic... ✔ Compatible shell ✔ Fig app installed in the right place ✔ Autocomplete is enabled ✔ Fig CLI path ✔ Accessibility enabled Let's check your terminal integrations... ✔ Terminal support Fig still not working? Run fig issue to let us know! Or, email us at hello@fig.io!
-
解決策を書いてくれている人がいた。
-
↑の通りやってみる。(ただしviのほうがなれているのでこちらを使う)
sudo vi /etc/paths
-
開いたファイルの末尾に下記を追記する。
/.local/bin /.fig/bin
-
念の為PCを再起動する。
-
下記を実行する。
fig doctor --verbose
-
ちょっとだけエラーが減った。別の部分も解決する必要がある。
$ fig doctor --verbose Let's check if you're logged in... ✔ Logged into Fig Let's check your dotfiles... ✔ bash ~/.bashrc integration check ✔ bash ~/.bash_profile integration check ● /Users/shun/.zshrc does not source pre integration ● /Users/shun/.zprofile does not source pre integration Let's make sure Fig is setup correctly... ✔ Fig bin exists ✔ PATH contains ~/.local/bin ✔ PATH contains ~/.fig/bin ✔ Settings Corruption ✔ State Corruption ✔ Fig Integration ✘ SSH integration: Integration not installed: /Users/shun/.ssh/config does not exist. 0: Integration not installed: /Users/shun/.ssh/config does not exist. Location: fig_cli/src/cli/doctor.rs:1244 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. Let's make sure Fig is running... ✔ Fig is running ✔ Fig socket exists ✔ Daemon ✔ Daemon diagnostics Let's see if Fig is in a working state... ✔ Figterm ✔ Insertion lock does not exist ✔ Autocomplete dev mode ✔ Plugin dev mode ✔ Dashboard is loading from the correct URL ✔ Autocomplete is loading from the correct URL Let's check if your system is compatible... ✔ OS is supported ✔ Fish is up to date ✔ Jetbrains Toolbox Check Let's check fig diagnostic... ✔ Compatible shell ✔ Fig app installed in the right place ✔ Autocomplete is enabled ✔ Fig CLI path ✔ Accessibility enabled Let's check your terminal integrations... ✔ Terminal support Fig still not working? Run fig issue to let us know! Or, email us at hello@fig.io!
-
次に解決すべきエラーは下記である。
✘ SSH integration: Integration not installed: /Users/shun/.ssh/config does not exist. 0: Integration not installed: /Users/shun/.ssh/config does not exist. Location: fig_cli/src/cli/doctor.rs:1244 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets.
-
直訳
✘ SSHの統合を行いました。統合がインストールされていません。/Users/shun/.ssh/config は存在しません。 0: 統合がインストールされていません。/Users/shun/.ssh/config は存在しません。 場所を指定します。 fig_cli/src/cli/doctor.rs:1244 バックトレースは省略されています。環境変数RUST_BACKTRACE=1を指定して実行すると表示されます。 RUST_BACKTRACE=fullで実行すると、ソーススニペットが含まれます。
-
自身のhomeディレクトリ直下に.sshディレクトリ内にconfigファイルがないらしい。とりあえず/Users/shun/.ssh/直下にからのconfigファイルを設置してみる。
touch /Users/shun/.ssh/config
-
下記を実行する。
fig doctor --verbose
-
ちょっとだけエラーが変わった。
$ fig doctor --verbose Let's check if you're logged in... ✔ Logged into Fig Let's check your dotfiles... ✔ bash ~/.bashrc integration check ✔ bash ~/.bash_profile integration check ● /Users/shun/.zshrc does not source pre integration ● /Users/shun/.zprofile does not source pre integration Let's make sure Fig is setup correctly... ✔ Fig bin exists ✔ PATH contains ~/.local/bin ✔ PATH contains ~/.fig/bin ✔ Settings Corruption ✔ State Corruption ✔ Fig Integration ✘ SSH integration: /Users/shun/.fig/ssh does not exist. 0: /Users/shun/.fig/ssh does not exist. Location: fig_cli/src/cli/doctor.rs:1244 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. Let's make sure Fig is running... ✔ Fig is running ✔ Fig socket exists ✔ Daemon ✔ Daemon diagnostics Let's see if Fig is in a working state... ✔ Figterm ✔ Insertion lock does not exist ✔ Autocomplete dev mode ✔ Plugin dev mode ✔ Dashboard is loading from the correct URL ✔ Autocomplete is loading from the correct URL Let's check if your system is compatible... ✔ OS is supported ✔ Fish is up to date ✔ Jetbrains Toolbox Check Let's check fig diagnostic... ✔ Compatible shell ✔ Fig app installed in the right place ✔ Autocomplete is enabled ✔ Fig CLI path ✔ Accessibility enabled Let's check your terminal integrations... ✔ Terminal support Fig still not working? Run fig issue to let us know! Or, email us at hello@fig.io!
-
/Users/shun/.fig/直下にsshファイルがないらしい。つくてみる。
touch /Users/shun/.fig/ssh
-
下記を実行する。
fig doctor --verbose
-
ちょっとだけエラーが変わった。
$ fig doctor --verbose Let's check if you're logged in... ✔ Logged into Fig Let's check your dotfiles... ✔ bash ~/.bashrc integration check ✔ bash ~/.bash_profile integration check ● /Users/shun/.zshrc does not source pre integration ● /Users/shun/.zprofile does not source pre integration Let's make sure Fig is setup correctly... ✔ Fig bin exists ✔ PATH contains ~/.local/bin ✔ PATH contains ~/.fig/bin ✔ Settings Corruption ✔ State Corruption ✔ Fig Integration ✘ SSH integration: Improper integration installation: /Users/shun/.fig/ssh should contain: Match exec="command -v fig && fig _ generate-ssh %r" Include ~/.fig/ssh_inner 0: Improper integration installation: /Users/shun/.fig/ssh should contain: Match exec="command -v fig && fig _ generate-ssh %r" Include ~/.fig/ssh_inner 0: Location: fig_cli/src/cli/doctor.rs:1244 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. Let's make sure Fig is running... ✔ Fig is running ✔ Fig socket exists ✔ Daemon ✔ Daemon diagnostics Let's see if Fig is in a working state... ✔ Figterm ✔ Insertion lock does not exist ✔ Autocomplete dev mode ✔ Plugin dev mode ✔ Dashboard is loading from the correct URL ✔ Autocomplete is loading from the correct URL Let's check if your system is compatible... ✔ OS is supported ✔ Fish is up to date ✔ Jetbrains Toolbox Check Let's check fig diagnostic... ✔ Compatible shell ✔ Fig app installed in the right place ✔ Autocomplete is enabled ✔ Fig CLI path ✔ Accessibility enabled Let's check your terminal integrations... ✔ Terminal support Fig still not working? Run fig issue to let us know! Or, email us at hello@fig.io!
-
うまく統合インストールできてない的なエラーが出ている。
✘ SSH integration: Improper integration installation: /Users/shun/.fig/ssh should contain: Match exec="command -v fig && fig _ generate-ssh %r" Include ~/.fig/ssh_inner 0: Improper integration installation: /Users/shun/.fig/ssh should contain: Match exec="command -v fig && fig _ generate-ssh %r" Include ~/.fig/ssh_inner
-
直訳
✘ SSHの統合。統合のインストールが適切でない。/Users/shun/.fig/ssh が含まれている必要があります。 マッチ exec="command -v fig && fig _ generate-ssh %r" インクルード ~/.fig/ssh_inner 0:不適切な統合インストールです。/Users/shun/.fig/ssh が含まれている必要があります。 マッチ exec="command -v fig && fig _ generate-ssh %r" インクルード ~/.fig/ssh_inner
-
近いことで困っている方がいた。
-
下記コマンドを実行してみる。
fig integrations install ssh
-
下記のように帰ってきた
$ fig integrations install ssh Installed!
-
下記を実行する。
fig doctor --verbose
-
問題は解決した模様
$ fig doctor --verbose Let's check if you're logged in... ✔ Logged into Fig Let's check your dotfiles... ✔ bash ~/.bashrc integration check ✔ bash ~/.bash_profile integration check ● /Users/shun/.zshrc does not source pre integration ● /Users/shun/.zprofile does not source pre integration Let's make sure Fig is setup correctly... ✔ Fig bin exists ✔ PATH contains ~/.local/bin ✔ PATH contains ~/.fig/bin ✔ Settings Corruption ✔ State Corruption ✔ Fig Integration ✔ SSH integration Let's make sure Fig is running... ✔ Fig is running ✔ Fig socket exists ✔ Daemon ✔ Daemon diagnostics Let's see if Fig is in a working state... ✔ Figterm ✔ Insertion lock does not exist ✔ Autocomplete dev mode ✔ Plugin dev mode ✔ Dashboard is loading from the correct URL ✔ Autocomplete is loading from the correct URL Let's check if your system is compatible... ✔ OS is supported ✔ Fish is up to date ✔ Jetbrains Toolbox Check Let's check fig diagnostic... ✔ Compatible shell ✔ Fig app installed in the right place ✔ Autocomplete is enabled ✔ Fig CLI path ✔ Accessibility enabled Let's check your terminal integrations... ✔ Terminal support Fig still not working? Run fig issue to let us know! Or, email us at hello@fig.io!
-
doctorコマンドのオプションなしも実行しておく。
$ fig doctor ● /Users/shun/.zshrc does not source pre integration ● /Users/shun/.zprofile does not source pre integration ✔ Everything looks good! Fig still not working? Run fig issue to let us know! Or, email us at hello@fig.io!
-
問題なさそう。一旦Macそのものを再起動してみる。
-
Vscodeのターミナルを使って補完を確認してみたところ正常に補完された。
-
問題解決
2024/04/11 追記
その後またfigの動作が怪しくなったので「Amazon CodeWhisperer」に乗り換えた↓
参考文献