Difference between revisions of "Autocompletion (Bash)"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
To enable [[Bash]] completion on Ubuntu comment out lines in <code>~/.bashrc</code> | To enable [[Bash]] completion on Ubuntu comment out lines in <code>~/.bashrc</code> | ||
* <code>[[/usr/share/bash-completion/completions]]</code> | * <code>[[/usr/share/bash-completion/completions]]</code> | ||
+ | * <code>[[/usr/share/bash-completion/completions/ssh]]</code> | ||
+ | Installation: | ||
+ | * [[brew install bash-completion]] | ||
+ | * [[apt install bash-completion]] | ||
https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete | 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. | + | [[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 | [[apt install]] bash-completion | ||
Line 19: | Line 21: | ||
[[/etc/bash_completion]] | [[/etc/bash_completion]] | ||
[[/etc/bash_completion.d/]] | [[/etc/bash_completion.d/]] | ||
+ | |||
+ | == Related terms == | ||
+ | * <code>[[complete]]</code> [[Bash]] [[buildin]] function | ||
+ | * [[Aws cli: Auto-prompt]] | ||
+ | [[~/brew/etc/bash_completion]] | ||
+ | [[Bash: $HOME/brew/etc/bash completion: No such file or directory]] | ||
== See also == | == See also == | ||
+ | * {{Autocompletion}} | ||
* {{Bash}} | * {{Bash}} | ||
− | |||
[[Category:Bash]] | [[Category:Bash]] |
Latest revision as of 11:17, 4 April 2023
To enable Bash completion on Ubuntu comment out lines in ~/.bashrc
Installation:
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
/etc/bash_completion /etc/bash_completion.d/
Related terms[edit]
complete
Bash buildin function- Aws cli: Auto-prompt
~/brew/etc/bash_completion Bash: $HOME/brew/etc/bash completion: No such file or directory
See also[edit]
- Autocompletion (Bash),
complete
,kubectl completion
Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
Advertising: