Отредактируйте файл /etc/pacman.d/mirrorlist
и переместите ближайшее зеркало в начало файла.
Включение определенного зеркала
Tip:
Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.
compgen будет работать только с одним словом, как показано ниже:
compgen -c git
Вот индивидуальное решение для вашего случая:
Сначала вам нужно будет создать сценарий завершения bash -, затем установить переменные COMP_*так, чтобы они соответствовали этому варианту использования, а затем программно запустить завершение с помощью собственной bash_completion
функции xfunc и результаты затем будут собраны в COMPREPLY
массив (пример взят из здесь):
# load bash-completion helper functions
source /usr/share/bash-completion/bash_completion
# array of words in command line
COMP_WORDS=(git c)
# index of the word containing cursor position
COMP_CWORD=1
# command line
COMP_LINE='git c'
# index of cursor position
COMP_POINT=${#COMP_LINE}
# execute completion function
_xfunc git _git
# print completions to stdout
printf '%s\n' "${COMPREPLY[@]}"
P.S. :Чтобы точно знать, какие функции вызываются при завершении команды :использоватьcomplete -p <command>
Выход:
checkout
cherry
cherry-pick
clean
clone
column
commit
config
credential
Для полного обзора вы можете посетить сообщение владельца здесь