18 lines
431 B
Bash
18 lines
431 B
Bash
# bash completion for ncftp -*- shell-script -*-
|
|
|
|
_ncftp()
|
|
{
|
|
local cur prev words cword
|
|
_init_completion || return
|
|
|
|
if [[ $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 -o default ncftp
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|