The following commit has been merged in the master branch:
commit fe1e044ed1e79cae5cd9ecab4653e2211c7b6cc4
Author: David Paleino <[email protected]>
Date:   Fri Jun 5 08:25:08 2009 +0200

    Split iconv completion to contrib/iconv

diff --git a/CHANGES b/CHANGES
index 0462a23..d800068 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@ bash-completion (1.x)
   * Don't assume "sed" being GNU sed, use "gsed" whenever available
     (Debian: #501479, Alioth: #311393)
   * Split mutt completion to contrib/mutt
+  * Split iconv completion to contrib/iconv
 
   [ Ville Skyttä ]
   * Split yum and yum-arch completion into contrib/yum.
diff --git a/Makefile.am b/Makefile.am
index bac647b..53a13bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,6 +34,7 @@ bashcomp_DATA = contrib/ant \
                contrib/gzip \
                contrib/harbour \
                contrib/heimdal \
+               contrib/iconv \
                contrib/imagemagick \
                contrib/info \
                contrib/iptables \
diff --git a/bash_completion b/bash_completion
index 4f8d673..c0143ea 100644
--- a/bash_completion
+++ b/bash_completion
@@ -3204,34 +3204,6 @@ _ypmatch()
 } &&
 complete -F _ypmatch ypmatch ypcat
 
-# iconv(1) completion
-#
-have iconv &&
-_iconv()
-{
-       local cur prev
-
-       COMPREPLY=()
-       cur=`_get_cword`
-       prev=${COMP_WORDS[COMP_CWORD-1]}
-
-       case "$prev" in
-               -@(f|t|-@(from|to)-code))
-                       COMPREPLY=( $( compgen -W \
-                           '$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) )
-                       return 0
-                       ;;
-       esac
-
-
-       if [[ "$cur" = -* ]]; then
-               COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list
-               --output -o --verbose' -- "$cur" ) )
-               return 0
-       fi
-} &&
-complete -F _iconv $default iconv
-
 # dict(1) completion
 #
 { have dict || have rdict; } && {
diff --git a/contrib/iconv b/contrib/iconv
new file mode 100644
index 0000000..fe3dd4b
--- /dev/null
+++ b/contrib/iconv
@@ -0,0 +1,27 @@
+# iconv(1) completion
+#
+have iconv &&
+_iconv()
+{
+       local cur prev
+
+       COMPREPLY=()
+       cur=`_get_cword`
+       prev=${COMP_WORDS[COMP_CWORD-1]}
+
+       case "$prev" in
+               -@(f|t|-@(from|to)-code))
+                       COMPREPLY=( $( compgen -W \
+                           '$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) )
+                       return 0
+                       ;;
+       esac
+
+
+       if [[ "$cur" = -* ]]; then
+               COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list
+               --output -o --verbose' -- "$cur" ) )
+               return 0
+       fi
+} &&
+complete -F _iconv $default iconv

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to