summaryrefslogtreecommitdiff
path: root/contrib/ncftp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncftp')
-rw-r--r--contrib/ncftp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/ncftp b/contrib/ncftp
index 6d5a611a..b831f444 100644
--- a/contrib/ncftp
+++ b/contrib/ncftp
@@ -6,16 +6,16 @@ _ncftp()
local cur
COMPREPLY=()
- cur=`_get_cword`
+ _get_comp_words_by_ref cur
- if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
+ 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
+complete -F _ncftp -o default ncftp
# Local variables:
# mode: shell-script