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 / ncftp < prev    next >
Encoding:
Text File  |  2010-11-16  |  514 b   |  27 lines

  1. # bash completion for ncftp
  2.  
  3. have ncftp &&
  4. _ncftp()
  5. {
  6.     local cur
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur
  10.  
  11.     if [[ $COMP_CWORD -eq 1 && -f ~/.ncftp/bookmarks ]]; then
  12.         COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
  13.             ~/.ncftp/bookmarks )' -- "$cur" ) )
  14.     fi
  15.  
  16.     return 0
  17. } &&
  18. complete -F _ncftp -o default ncftp
  19.  
  20. # Local variables:
  21. # mode: shell-script
  22. # sh-basic-offset: 4
  23. # sh-indent-comment: t
  24. # indent-tabs-mode: nil
  25. # End:
  26. # ex: ts=4 sw=4 et filetype=sh
  27.