reference: https://cloud.google.com/sdk/docs/interactive-gcloud
-
Installation and use
The
gcloudinteractive shell is included in thegcloud betacomponents.-
To check if you have the
gcloud betacomponents installed, run the following command:gcloud components list -
If you don’t see the
gcloud betacomponents listed, to install the beta components, run the following command:gcloud components install beta -
To enter the
gcloudinteractive mode, run the following command:gcloud beta interactiveYour usual shell prompt is replaced with the
gcloudinteractive shell prompt$. -
To get auto-suggestions and inline help, start typing a command.
-
To save time when you’re working with a command for a while, type the part of the command you’ll reuse and then press
F7. For example, to work withgcloud compute, typegcloud computeand then pressF7. You can then type subcommands such aslistwithout needing to first typegcloud compute. When you’re no longer using the command, pressCtrl-CandF7to clear the context. -
To exit the interactive shell press
Ctrl-DorF9.
Auto-completion and help
gcloud interactivehas auto prompting for commands and flags, and displays inline help snippets in the lower section as you type a command.Static information, like command and sub-command names, and flag names and enumerated flag values, are auto-completed using dropdown menus.

Shortcuts
To accomplish common tasks, you can use the following shortcuts:
Action Shortcut Complete a file path or resource argument TabRefine the dropdown completion menu Continue typing the command Scroll through the menu Tab,Shift+Tab, or arrow keysSelect a highlighted item or directory Spaceor/Toggle the active help section, ON when enabled, OFF when disabled F2Set the context for command input to avoid retyping command prefixes F7Clear the context for command input Ctrl-CandF7Open a web browser tab or window to display the complete man page for the current command F8Exit F9orCtrl+DBash compatibility
bashcompletion configs, aliases, exports, functions,set -osettings, and variables initialized in your.bashrcare all available at the interactive command prompt. The interactive command line edit mode is derived from theset -o emacsorset -o visetting. -