25 lines
643 B
Shell
25 lines
643 B
Shell
#!/bin/bash
|
|
|
|
# Custom `bash` completions
|
|
#
|
|
# Sourced automatically by the `bash-completion` package at shell start
|
|
|
|
|
|
complete -W '--force' dotfiles-install dotfiles-update
|
|
|
|
|
|
complete -W '--quieter' generate-shell-completions
|
|
|
|
|
|
# Automagical completion for all ~/.config/shell/aliases
|
|
#
|
|
# See: https://github.com/cykerway/complete-alias
|
|
|
|
# shellcheck disable=SC2034 # Read by complete_alias sourced below
|
|
COMPAL_AUTO_UNMASK=1
|
|
# shellcheck disable=SC1091 # Third-party file, not linted
|
|
. "${XDG_CONFIG_HOME:-$HOME/.config}/bash/complete_alias"
|
|
|
|
if [ "${#BASH_ALIASES[@]}" -gt 0 ]; then
|
|
complete -F _complete_alias "${!BASH_ALIASES[@]}"
|
|
fi
|