I tried both 1. the official Google installation for Ubuntu https://cloud.google.com/sdk/docs/install#deb, and 2. the one-liner sudo snap install google-cloud-sdk --classic
, and neither didn't give me command autocompletion with tab. Has anyone found a version of installation that gives you autocomplete? I had it on my last laptop, so I know it's possible
ie. usage: gcloud compute instances li
(here you hit tab) and it autocompletes to gcloud compute instances list
Thanks!
我成功安装了带有自动完成功能的 gcloud 命令行界面here https://vitux.com/install-google-cloud-sdk-on-ubuntu/2021 年 2 月 24 日晚上 7:00 EST(东部标准时间)。我的操作系统是Ubuntu 20.04
从上述来源复制的 Shell 命令:
sudo apt-get update
# You should probably do other commands after this like
# sudo apt-get upgrade, sudo apt-get dist-upgrade,
# but I didn't need them
# can cd wherever here:
cd
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-307.0.0-linux-x86_64.tar.gz
tar –xvzf google-cloud-sdk-307.0.0-linux-x86_64.tar.gz
cd google-cloud-sdk
./install.sh
# Answer a few "y/N" questions, mostly to your preference.
# NOTE: Be sure to answer "Y" to the question "modify profile to update your $PATH and enable shell command completion?" !! (This was the crux of the OP's question)
# Clean up:
cd ..
rm -f google-cloud-sdk-307.0.0-linux-x86_64.tar.gz
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)