diff --git a/bash_completion b/bash_completion index 573370ad..27771188 100644 --- a/bash_completion +++ b/bash_completion @@ -2,7 +2,7 @@ # # # @@ -1655,6 +1655,23 @@ _screen() } [ $have ] && complete -F _screen -o default screen +# ncftp(1) bookmark completion +# +have ncftp && +_ncftp() +{ + local cur + cur=${COMP_WORDS[COMP_CWORD]} + + if [ $COMP_CWORD = 1 ] && [ -f ~/.ncftp/bookmarks ]; then + COMPREPLY=( $( compgen -W '`cut --output-delimiter " " \ + -s -f1-2 -d, ~/.ncftp/bookmarks`' $cur )) + fi + + return 0 +} +[ $have ] && complete -F _ncftp -o default ncftp + _expand() { # expand ~username type directory specifications