本页面上的部分或全部信息可能不适用于 Trusted Cloud by S3NS。
启用无障碍功能
为了提供更精简的屏幕阅读器体验,gcloud 命令行工具会附带 accessibility/screen_reader
属性。如果此属性设置为 true,则系统会启用以下行为:
- 状态跟踪器代替 unicode 旋转图标:在 gcloud 执行任务时,系统会在 stderr 上显示“正在处理”。
- 百分比进度条:进度以百分比的形式显示,并输出到 stderr。
- 展平表:框表是多个列表命令的默认输出。结果不是以 Unicode 绘制的表格中显示的,而是以展平化的项列表形式呈现的。此外,请考虑使用
--format
标志定义您自己的格式。
如需启用这些无障碍功能,请运行以下命令:
gcloud config set accessibility/screen_reader true
其他资源
其他文档使用体验
- 如需在 gcloud CLI 参考文档中搜索关键字或命令,请使用
gcloud help
。这将会搜索帮助文本与给定的一个或多个参数匹配的所有命令。
优化 gcloud CLI 输出
- 如需调整命令的详尽程度,您可以使用“调试”“信息”“警告”“错误”“严重”或“无”设置 gcloud CLI 标志
--verbosity
。
- 对于列表命令,您可以使用
--limit
标志来设置要列出的资源数上限,从而进一步优化输出。如果服务分页列出输出,您还可以使用 --page-size
标志定义每页的资源数量。如需排序,请使用 --sort-by
标志及相关字段进行排序。
- 如需停用交互式提示,请使用
--quiet
标志。
- 为了构建和生成更有意义的输出,您可以使用格式设置、过滤和投影标志对输出进行微调。
- 如果您只想定义输出的格式,请使用
--format
标志来生成表格式或展平版本的输出(用于交互式显示),或生成机器可读版本的输出(json、csv、yaml、value)。
- 如需设置用于选择资源数据值的键列表的格式,请使用 projections。
- 如需根据您定义的条件进一步优化输出,请使用
--filter
标志。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Enabling accessibility features\n\nIn order to provide a more streamlined screen reader experience, the gcloud\ncommand-line tool comes with an `accessibility/screen_reader` property.\nWhen this property is set to true, the following behaviour is enabled:\n\n- **Status trackers instead of unicode spinners:** The phrase 'working' is displayed on stderr while gcloud is performing tasks.\n- **Percentage progress bars:** Progress is displayed as a percentage, outputted to stderr.\n- **Flattened tables** : Boxed tables are the default output of many list commands. Instead of the queried resources being displayed in tables drawn in Unicode, results are rendered as a flattened list of items. Also, consider using the `--format` flag to define your own format.\n\nTo enable these accessibility features, run: \n\n gcloud config set accessibility/screen_reader true\n\nAdditional resources\n--------------------\n\n### Alternate documentation experiences\n\n- To search the gcloud CLI reference docs for a keyword or command, use [`gcloud help`](/sdk/gcloud/reference/help). This runs a search for all commands with help text matching the given argument or arguments.\n\n### Refining gcloud CLI output\n\n- To adjust the verbosity level of a command, you can set the gcloud CLI flag `--verbosity` with either debug, info, warning, error, critical, or none.\n- For list commands, you can further refine your output by using the `--limit` flag to set a maximum number of resources to list. You can also use the `--page-size` flag to define the number of resources per page if the service lists output in pages. To sort, use the `--sort-by` flag with the relevant field to sort.\n- To disable interactive prompting, use the [`--quiet`](/sdk/gcloud/reference#--quiet) flag.\n- To structure and produce more meaningful output, you can use the format, filter and projection flags to fine-tune your output.\n - If you'd like to define just the format of your output, use the [`--format`](/sdk/gcloud/reference/topic/formats) flag to produce a tabulated or flattened version of your output (for interactive display) or a machine-readable version of the output (json, csv, yaml, value).\n - To format a list of keys that select resource data values, use [projections](/sdk/gcloud/reference/topic/projections).\n - To further refine your output to a criteria you'd like to define, use the [`--filter`](/sdk/gcloud/reference/topic/filters) flag.\n\nFiling feedback\n---------------\n\nTo file a bug, provide feedback, or send suggestions, use `gcloud feedback` to\nhelp improve the gcloud CLI experience. This command will\nopen the public issue tracker in a browser window.\n\nYou can also directly log issues using\n[issue tracker](https://issuetracker.google.com/issues/new?component=187143).\nBe sure to toggle the 'Type' field to reflect the nature of the issue you're\nfiling (Bug, Feature Request, etc.) to help make responses more efficient."]]