/bash_completion.d/ncftp
http://github.com/brinkman83/bashrc · #! · 26 lines · 21 code · 5 blank · 0 comment · 0 complexity · 38eafbb813ea79d20d931a63255dd1e2 MD5 · raw file
- # bash completion for ncftp
- have ncftp &&
- _ncftp()
- {
- local cur
- COMPREPLY=()
- cur=`_get_cword`
- if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
- COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
- ~/.ncftp/bookmarks )' -- "$cur" ) )
- fi
- return 0
- } &&
- complete -F _ncftp $default ncftp
- # Local variables:
- # mode: shell-script
- # sh-basic-offset: 4
- # sh-indent-comment: t
- # indent-tabs-mode: nil
- # End:
- # ex: ts=4 sw=4 et filetype=sh