Difference between revisions of "Autocompletion (Bash)"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 5: Line 5:
 
  source <([[kubectl]] completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
 
  source <([[kubectl]] completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
 
  echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
 
  echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
 +
 +
apt install bash-completion
 +
Reading package lists... Done
 +
Building dependency tree
 +
Reading state information... Done
 +
bash-completion is already the newest version (1:2.8-1ubuntu1).
 +
bash-completion set to manually installed.
 +
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
  
  
 
== See also ==
 
== See also ==
 
* {{Bash}}
 
* {{Bash}}
 +
 +
 +
[[Category:Bash]]

Revision as of 01:06, 26 March 2020


https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete

source <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
apt install bash-completion
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version (1:2.8-1ubuntu1).
bash-completion set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded


See also

Advertising: