22 lines
435 B
Plaintext
Raw Normal View History

2009-05-17 22:04:05 +02:00
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# 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" ) )
2009-05-17 22:04:05 +02:00
fi
return 0
} &&
complete -F _ncftp $default ncftp