dot: change bash configuration

This commit is contained in:
2026-03-16 18:23:38 +08:00
parent b8f0c66d87
commit 9ce32f5670
10 changed files with 358 additions and 27 deletions

17
dot/.bashrc.d/rust.bash Normal file
View File

@@ -0,0 +1,17 @@
basedir=$(realpath -m $(dirname "${BASH_SOURCE[0]:-$0}"))
source "${basedir}/function.bash"
unset basedir
if [[ -d "${HOME}/.cargo/bin" ]]; then
add-to-path "${HOME}/.cargo/bin"
fi
if [[ -e "${HOME}/.cargo/env" ]]; then
. "${HOME}/.cargo/env"
fi
if [[ -x "$(type -p rustup)" ]]; then
generate-bash-completion rustup "rustup completions bash cargo"
generate-bash-completion cargo "rustup completions bash cargo"
fi