diff options
author | Steve Dignam <steve@dignam.xyz> | 2016-01-06 23:14:30 -0500 |
---|---|---|
committer | John Hood <cgull@glup.org> | 2016-03-30 23:52:19 -0400 |
commit | 99ce327d93ca60c558364c96095adc33fcd8cf0d (patch) | |
tree | 1241ebeffbed364287ebee604548ad71d891a03a /conf | |
parent | c964d40dd8352d12f6f9ee0739a56f9dc6ae9470 (diff) |
updated bash completion
Diffstat (limited to 'conf')
-rw-r--r-- | conf/bash-completion/completions/mosh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/conf/bash-completion/completions/mosh b/conf/bash-completion/completions/mosh index e928112..4734dd2 100644 --- a/conf/bash-completion/completions/mosh +++ b/conf/bash-completion/completions/mosh @@ -1,9 +1,18 @@ -_mosh () { - local cur prev +#!/bin/bash - _init_completion || return +_mosh () { + local simple_flags="-a -b -4 -6 -p" + local flags="--client= --server= --predict= --family= --port= + --bind-server= --ssh= --no-init --help --version" - _known_hosts_real -a "$cur" + local cur=$(_get_cword) + if [[ "$cur" == --* && "$COMP_CWORD" == 1 ]]; then + COMPREPLY=($(compgen -W "$flags" -- "$cur")) + elif [[ "$cur" == -* && "$COMP_CWORD" == 1 ]]; then + COMPREPLY=($(compgen -W "$simple_flags" -- "$cur")) + else + _known_hosts_real -a "$cur" + fi } -complete -F _mosh mosh +complete -o nospace -F _mosh mosh |