From 60752090387d340e319ab7c0e3111a7f0262014b Mon Sep 17 00:00:00 2001 From: HIGUCHI Yuta Date: Fri, 11 Mar 2016 10:14:51 -0800 Subject: [PATCH] bash-completion workaround for bash 3.2 This should resolve mobile-shell/mosh#675 --- conf/bash-completion/completions/mosh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/conf/bash-completion/completions/mosh b/conf/bash-completion/completions/mosh index b66a857..3a2e08a 100644 --- a/conf/bash-completion/completions/mosh +++ b/conf/bash-completion/completions/mosh @@ -1,8 +1,19 @@ #!/usr/bin/env bash -_mosh() { +__mosh_init_completion() +{ + if declare -F _init_completions >/dev/null 2>&1; then + _init_completion + else + COMPREPLY=() + _get_comp_words_by_ref cur prev words cword + fi +} + +_mosh () { local cur - _init_completion || return + + __mosh_init_completion || return local simple_flags="-a -b -4 -6 -p" local flags="--client= --server= --predict= --family= --port=