bash.d/50-cargo-completion

10 lines
323 B
Text
Raw Permalink Normal View History

# shellcheck shell=bash
# Enable bash completion for cargo (Rust package manager)
if command -v rustc &>/dev/null; then
_cargo_comp="$(rustc --print sysroot)/etc/bash_completion.d/cargo"
if [[ -f "$_cargo_comp" ]]; then
# shellcheck source=/dev/null
. "$_cargo_comp"
fi
unset _cargo_comp
fi