Homebrewでインストールしたgcloudコマンドの補完を有効化する
注意
pyenvなどでPython 3系などを使っていると、うまく動かないっぽい。
pyenv global system
でmacOSデフォルトのPython 2を使うようにすると動いた。
gcloud
コマンドをインストール
$ brew cask install google-cloud-sdk
install.shを実行
$ cd /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk
$ ./install.sh
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? Y
This will install all the core command line tools necessary for working with
the Google Cloud Platform.
All components are up to date.
Modify profile to update your $PATH and enable shell command
completion?
Do you want to continue (Y/n)? Y
The Google Cloud SDK installer will now prompt you to update an rc
file to bring the Google Cloud CLIs into your environment.
Enter a path to an rc file to update, or leave blank to use
[/Users/tadamasatoshi/.bash_profile]:
Backing up [/Users/tadamasatoshi/.bash_profile] to [/Users/tadamasatoshi/.bash_profile.backup].
[/Users/tadamasatoshi/.bash_profile] has been updated.
==> Start a new shell for the changes to take effect.
For more information on how to get started, please visit:
https://cloud.google.com/sdk/docs/quickstarts
$ source ~/.bash_profile
$ brew cask install google-cloud-sdk
$ cd /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk
$ ./install.sh
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? Y
This will install all the core command line tools necessary for working with
the Google Cloud Platform.
All components are up to date.
Modify profile to update your $PATH and enable shell command
completion?
Do you want to continue (Y/n)? Y
The Google Cloud SDK installer will now prompt you to update an rc
file to bring the Google Cloud CLIs into your environment.
Enter a path to an rc file to update, or leave blank to use
[/Users/tadamasatoshi/.bash_profile]:
Backing up [/Users/tadamasatoshi/.bash_profile] to [/Users/tadamasatoshi/.bash_profile.backup].
[/Users/tadamasatoshi/.bash_profile] has been updated.
==> Start a new shell for the changes to take effect.
For more information on how to get started, please visit:
https://cloud.google.com/sdk/docs/quickstarts
$ source ~/.bash_profile
Author And Source
この問題について(Homebrewでインストールしたgcloudコマンドの補完を有効化する), 我々は、より多くの情報をここで見つけました https://qiita.com/suke_masa/items/3c9e7051e7e8aa56da57著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .