/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. comp_include _get_cword _known_hosts
  3. _user_at_host() {
  4. local cur
  5. COMPREPLY=()
  6. cur=`_get_cword`
  7. if [[ $cur == *@* ]]; then
  8. _known_hosts
  9. else
  10. COMPREPLY=( $( compgen -u -- "$cur" ) )
  11. fi
  12. return 0
  13. }
  14. _user_at_host