~xdavidwu/dotfiles

e96bbc38dd97fc954683deef01bb6611e5d01bfb — xdavidwu 3 years ago 45a872a
bash: completion: support termux
1 files changed, 7 insertions(+), 1 deletions(-)

M .bashrc
M .bashrc => .bashrc +7 -1
@@ 216,7 216,13 @@ export PTERM
alias rssh="command ssh"
alias ssh="env TERM=$PTERM ssh"

! type _completion_loader >/dev/null 2>&1 && [ -f /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
if ! type _completion_loader >/dev/null 2>&1; then
	if [ -f /usr/share/bash-completion/bash_completion ]; then
		. /usr/share/bash-completion/bash_completion
	elif [ -f /data/data/com.termux/files/usr/share/bash-completion/bash_completion ]; then
		. /data/data/com.termux/files/usr/share/bash-completion/bash_completion
	fi
fi

_completion_loader ssh 2>/dev/null
[ $? -eq 124 ] && complete -F _ssh rssh