Add configuration for GNOME
This commit is contained in:
parent
46b9bacd18
commit
7804080953
47 changed files with 6899 additions and 0 deletions
|
|
@ -11,6 +11,40 @@ complete -W '--force' dotfiles-install dotfiles-update
|
|||
complete -W '--quieter' generate-shell-completions
|
||||
|
||||
|
||||
_color_palette() {
|
||||
local cur="$2" prev="$3"
|
||||
local flags='--scheme --show --write'
|
||||
|
||||
# Values for `--scheme`, in both the "--scheme value"
|
||||
# and the "--scheme=value" form
|
||||
case "$prev" in
|
||||
--scheme)
|
||||
mapfile -t COMPREPLY < <(compgen -W 'dark light' -- "$cur")
|
||||
return
|
||||
;;
|
||||
=)
|
||||
if [ "${COMP_WORDS[COMP_CWORD - 2]}" = "--scheme" ]; then
|
||||
mapfile -t COMPREPLY < <(compgen -W 'dark light' -- "$cur")
|
||||
return
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Offer only flags not already on the line
|
||||
local flag remaining=''
|
||||
for flag in $flags; do
|
||||
case " ${COMP_WORDS[*]} " in
|
||||
*" $flag "*) ;;
|
||||
*) remaining="$remaining $flag" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
mapfile -t COMPREPLY < <(compgen -W "$remaining" -- "$cur")
|
||||
}
|
||||
|
||||
complete -F _color_palette color-palette
|
||||
|
||||
|
||||
# Fuzzy completion with the `**` trigger
|
||||
# (e.g., `vi **<Tab>`, `ssh **<Tab>`)
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue