[Bash-completion-commits] [SCM] bash-completion branch, master, updated. eced7126a30bb62c49924f0b2dc61f0131317c00

Guillaume Rousse guillomovitch at zarb.org
Sun May 17 20:13:21 UTC 2009


The following commit has been merged in the master branch:
commit aeaa1af92096a85b8006919a8f5250cbbd0a64cc
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date:   Sun May 17 22:04:05 2009 +0200

    split ncftp completion

diff --git a/bash_completion b/bash_completion
index 978139e..5b3bc44 100644
--- a/bash_completion
+++ b/bash_completion
@@ -3988,25 +3988,6 @@ _lftp()
 } &&
 complete -F _lftp $default lftp
 
-# ncftp(1) bookmark completion
-#
-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
-
 # gdb(1) completion
 #
 have gdb &&
diff --git a/contrib/ncftp b/contrib/ncftp
new file mode 100644
index 0000000..5431451
--- /dev/null
+++ b/contrib/ncftp
@@ -0,0 +1,21 @@
+# -*- 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 ) )
+	fi
+
+	return 0
+} &&
+complete -F _ncftp $default ncftp

-- 
bash-completion



More information about the Bash-completion-commits mailing list