This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Questo contenuto non è disponibile nella lingua selezionata.
Chapter 2. Configuring the CLI
2.1. Enabling tab completion Copia collegamentoCollegamento copiato negli appunti!
After you install the oc
CLI tool, you can enable tab completion to automatically complete oc
commands or suggest options when you press Tab.
Prerequisites
-
You must have the
oc
CLI tool installed.
Procedure
The following procedure enables tab completion for Bash.
Save the Bash completion code to a file.
oc completion bash > oc_bash_completion
$ oc completion bash > oc_bash_completion
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the file to
/etc/bash_completion.d/
.sudo cp oc_bash_completion /etc/bash_completion.d/
$ sudo cp oc_bash_completion /etc/bash_completion.d/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can also save the file to a local directory and source it from your
.bashrc
file instead.
Tab completion is enabled when you open a new terminal.