2022-08-01 13:59:07 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
_dote_completions()
|
|
|
|
{
|
2022-10-13 14:08:14 +00:00
|
|
|
if [ "${#COMP_WORDS[@]}" == "1" ]; then
|
2022-08-01 13:59:07 +00:00
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
COMPREPLY=()
|
|
|
|
while IFS='' read -r line
|
|
|
|
do
|
|
|
|
COMPREPLY+=("$line")
|
|
|
|
done < <(compgen -W "$(.e -l)" "${COMP_WORDS[1]}")
|
|
|
|
}
|
|
|
|
complete -F _dote_completions ".e"
|
2022-10-13 14:08:14 +00:00
|
|
|
|
2023-10-30 21:50:18 +00:00
|
|
|
_dott_completions()
|
|
|
|
{
|
2023-12-19 22:59:30 +00:00
|
|
|
if [ "${#COMP_WORDS[@]}" == "2" ]; then
|
|
|
|
COMPREPLY=()
|
|
|
|
while IFS='' read -r line
|
|
|
|
do
|
|
|
|
COMPREPLY+=("$line")
|
|
|
|
done < <(compgen -W "$(.t -l)" "${COMP_WORDS[1]}")
|
2023-10-30 21:50:18 +00:00
|
|
|
fi
|
|
|
|
|
2023-12-19 22:59:30 +00:00
|
|
|
if [ "${#COMP_WORDS[@]}" == "3" ]; then
|
|
|
|
compgen -f "${COMP_WORDS[2]}"
|
|
|
|
fi
|
2023-10-30 21:50:18 +00:00
|
|
|
}
|
2024-01-09 15:52:53 +00:00
|
|
|
complete -F _dott_completions ".t"
|
2023-10-30 21:50:18 +00:00
|
|
|
|
2024-01-09 15:52:53 +00:00
|
|
|
#_autostart_manage_completions()
|
|
|
|
#{
|
|
|
|
# if [ "${#COMP_WORDS[@]}" == "2" ]; then
|
|
|
|
# return
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# COMPREPLY=()
|
|
|
|
# while IFS='' read -r line
|
|
|
|
# do
|
|
|
|
# COMPREPLY+=("$line")
|
|
|
|
# done < <(compgen -W "$(autostart-manage list)" "${COMP_WORDS[1]}")
|
|
|
|
#}
|
|
|
|
#complete -F _autostart_manage_completions "autostart-manage"
|
2022-10-13 14:08:14 +00:00
|
|
|
|
2024-01-09 15:52:53 +00:00
|
|
|
for additional_completions in "$XDG_CONFIG_HOME/completionsrc.d/"*; do
|
|
|
|
# shellcheck disable=1090
|
|
|
|
. "$additional_completions"
|
|
|
|
done
|