【发布时间】:2021-12-01 16:02:39
【问题描述】:
几周前我在使用 GCloud Shell,并从 gcloud 命令中获得了漂亮的打印输出,如下所示:
DISPLAY NAME EMAIL DISABLED
Compute Engine default service account XXXXXXXXXXXX-compute@developer.gserviceaccount.com False
sa-xxxxxxxxx sa-xxxxxxxxx@my-project.iam.gserviceaccount.com False
几天后,输出不再漂亮了:
DISPLAY NAME: Compute Engine default service account
EMAIL: XXXXXXXXXXXX-compute@developer.gserviceaccount.com
DISABLED: False
DISPLAY NAME: sa-xxxxxxxxx
EMAIL: sa-xxxxxxxxx@my-project.iam.gserviceaccount.com
DISABLED: False
我检查了嵌入式 gcloud SDK 版本:
$ gcloud -v
Google Cloud SDK 360.0.0
alpha 2021.10.04
app-engine-go 1.9.71
app-engine-java 1.9.91
app-engine-python 1.9.95
app-engine-python-extras 1.9.95
beta 2021.10.04
bigtable
bq 2.0.71
cbt 0.10.1
cloud-build-local 0.5.2
cloud-datastore-emulator 2.1.0
core 2021.10.04
datalab 20190610
gsutil 5.3
kind 0.7.0
kpt 1.0.0-beta.5
local-extract 1.3.1
minikube 1.23.2
pubsub-emulator 0.5.0
skaffold 1.32.0
我还检查了the documentation on output formats,但没有任何帮助。尝试了几个输出,却没有像以前那样漂亮。
我尝试在 Cloud Shell 上安装 SDK 360.0.0,这给了我和以前一样漂亮的输出......
还有其他人有这个问题吗?或者知道如何像以前一样获得漂亮的打印效果(无需手动安装 gcloud SDK)?
编辑:
按照 John Hanley 的要求,这是gcloud config list 的输出:
[accessibility]
screen_reader = True
[component_manager]
disable_update_check = True
[compute]
gce_metadata_read_timeout_sec = 30
[core]
account = nicolas@mydomain.com
disable_usage_reporting = True
project = my-project
[metrics]
environment = devshell
Your active configuration is: [cloudshell-25102]
tput cols 给出的列宽为 267。
【问题讨论】:
-
编辑您的问题并包含有关运行 Cloud Shell 的窗口宽度的详细信息(以列为单位的宽度)。还包括 gcloud config list 的输出。
-
@JohnHanley 按要求完成编辑
标签: google-cloud-platform gcloud google-cloud-sdk google-cloud-shell