home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / sshfs < prev    next >
Encoding:
Text File  |  2010-11-16  |  729 b   |  35 lines

  1. # sshfs(1) completion
  2.  
  3. have sshfs &&
  4. _sshfs()
  5. {
  6.     local cur userhost path
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref -n : cur
  10.  
  11.     _expand || return 0
  12.  
  13.     if [[ "$cur" == *:* ]] && type _scp_remote_files &>/dev/null ; then
  14.         _scp_remote_files -d
  15.         # unlike scp and rsync, sshfs works with 1 backslash instead of 3
  16.         COMPREPLY=( "${COMPREPLY[@]//\\\\\\/\\}" )
  17.         return 0
  18.     fi
  19.  
  20.     [[ "$cur" == */* ]] || _known_hosts_real -c -a "$cur"
  21.  
  22.     type _scp_local_files &>/dev/null && _scp_local_files -d
  23.  
  24.     return 0
  25. } &&
  26. complete -F _sshfs -o nospace sshfs
  27.  
  28. # Local variables:
  29. # mode: shell-script
  30. # sh-basic-offset: 4
  31. # sh-indent-comment: t
  32. # indent-tabs-mode: nil
  33. # End:
  34. # ex: ts=4 sw=4 et filetype=sh
  35.