# HG changeset patch # User Oleksandr Gavenko # Date 1671881430 -7200 # Node ID 0077617b0debcea52d59e0cd33fa69fa435daf10 # Parent ad4478dd89fcf686685d90c6f40fa87950491ee5 Added completion for hgsync. diff -r ad4478dd89fc -r 0077617b0deb .bash_completion --- a/.bash_completion Fri Dec 23 20:26:07 2022 +0200 +++ b/.bash_completion Sat Dec 24 13:30:30 2022 +0200 @@ -42,6 +42,23 @@ } complete -F _hgsyncew -o nospace hgsyncew +_hgsync() { + local cur=${COMP_WORDS[COMP_CWORD]} + case $COMP_CWORD in + 0|1) + COMPREPLY=( $(compgen -W "local remote pull push info --help" -- $cur) ) + compopt +o nospace + return ;; + 2) + COMPREPLY=( $(compgen -d -S / -- "$cur") ) + return ;; + *) + COMPREPLY=( ) + return ;; + esac +} +complete -F _hgsync -o nospace hgsync + _pathsearch() { local prev cur=${COMP_WORDS[COMP_CWORD]} [[ $COMP_CWORD > 0 ]] && prev=${COMP_WORDS[COMP_CWORD-1]}