Load cargo bash completion
This commit is contained in:
parent
b9e8d9b21f
commit
230bce4418
1 changed files with 9 additions and 0 deletions
|
@ -89,6 +89,15 @@ then
|
|||
PS1="\[\033[01m\]${_acp_ps1_prefix}\u@\h\\$\[\033[00m\] "
|
||||
unset _acp_ps1_prefix
|
||||
|
||||
_acp_rust_toolchain=$(rustup toolchain list | awk '/\(default\)$/ {print $1}')
|
||||
_acp_cargo_bash_completion="$HOME/.rustup/toolchains/$_acp_rust_toolchain/etc/bash_completion.d/cargo"
|
||||
if [ -n "$_acp_rust_toolchain" ] && [ -r "$_acp_cargo_bash_completion" ]
|
||||
then
|
||||
. "$_acp_cargo_bash_completion"
|
||||
fi
|
||||
unset _acp_cargo_bash_completion
|
||||
unset _acp_rust_toolchain
|
||||
|
||||
elif [ -n "$ZSH_VERSION" ]
|
||||
then
|
||||
autoload -Uz compinit && compinit
|
||||
|
|
Loading…
Reference in a new issue