PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion_lib/complete-nohostcomplete/talk

http://github.com/brinkman83/bashrc
#! | 22 lines | 14 code | 8 blank | 0 comment | 0 complexity | 1edd76c3cb82e5283a40eae369271971 MD5 | raw file
 1# This function provides simple user@host completion
 2
 3
 4comp_include _get_cword _known_hosts
 5
 6
 7_user_at_host() {
 8    local cur
 9
10    COMPREPLY=()
11    cur=`_get_cword`
12
13    if [[ $cur == *@* ]]; then
14        _known_hosts
15    else
16        COMPREPLY=( $( compgen -u -- "$cur" ) )
17    fi
18
19    return 0
20}
21_user_at_host
22