[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-494-ge401bec

Ville Skyttä ville.skytta at iki.fi
Tue Nov 1 20:26:30 UTC 2011


The following commit has been merged in the master branch:
commit 66fc912020a594270c213e2eff6f6b9c5f6489b1
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Nov 1 22:23:33 2011 +0200

    a2x: Split from asciidoc into separate file.

diff --git a/completions/.gitignore b/completions/.gitignore
index 582188a..427fdff 100644
--- a/completions/.gitignore
+++ b/completions/.gitignore
@@ -1,4 +1,3 @@
-a2x
 aclocal-1.11
 alpine
 alternatives
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 2c58235..cf80909 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -1,5 +1,6 @@
 bashcompdir = $(pkgdatadir)/completions
-bashcomp_DATA = abook \
+bashcomp_DATA = a2x \
+		abook \
 		aclocal \
 		add_members \
 		alias \
@@ -327,7 +328,6 @@ EXTRA_DIST = $(bashcomp_DATA) \
 	     _mock _modules _subversion _yum _yum-utils
 
 CLEANFILES = \
-	a2x \
 	aclocal-1.11 \
 	alpine \
 	alternatives \
@@ -514,7 +514,7 @@ symlinks:
 		rm -f $(targetdir)/$$file && \
 			$(LN_S) ant $(targetdir)/$$file ; \
 	done
-	for file in a2x asciidoc.py ; do \
+	for file in asciidoc.py ; do \
 		rm -f $(targetdir)/$$file && \
 			$(LN_S) asciidoc $(targetdir)/$$file ; \
 	done
diff --git a/completions/a2x b/completions/a2x
new file mode 100644
index 0000000..7c33090
--- /dev/null
+++ b/completions/a2x
@@ -0,0 +1,40 @@
+# a2x(1) completion                                        -*- shell-script -*-
+
+_a2x()
+{
+    local cur prev words cword split
+    _init_completion -s || return
+
+    case $prev in
+        -a|--attribute|--asciidoc-opts|--dblatex-opts|--fop-opts|-h|--help|\
+        --version|--xsltproc-opts)
+            return
+            ;;
+        -D|--destination-dir|--icons-dir)
+            _filedir -d
+            return
+            ;;
+        --doctype|-d)
+            _xfunc asciidoc _asciidoc_doctype
+            return
+            ;;
+        --stylesheet)
+            _filedir css
+            return
+            ;;
+    esac
+
+    $split && return
+
+    if [[ $cur == -* ]]; then
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' \
+            -- "$cur" ) )
+        [[ $COMPREPLY == *= ]] && compopt -o nospace
+        return
+    fi
+
+    _filedir
+} &&
+complete -F _a2x a2x
+
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/completions/asciidoc b/completions/asciidoc
index 9f4a94e..722614f 100644
--- a/completions/asciidoc
+++ b/completions/asciidoc
@@ -49,42 +49,4 @@ _asciidoc()
 } &&
 complete -F _asciidoc asciidoc asciidoc.py
 
-
-_a2x()
-{
-    local cur prev words cword split
-    _init_completion -s || return
-
-    case $prev in
-        -a|--attribute|--asciidoc-opts|--dblatex-opts|--fop-opts|-h|--help|\
-        --version|--xsltproc-opts)
-            return
-            ;;
-        -D|--destination-dir|--icons-dir)
-            _filedir -d
-            return
-            ;;
-        --doctype|-d)
-            _asciidoc_doctype
-            return
-            ;;
-        --stylesheet)
-            _filedir css
-            return
-            ;;
-    esac
-
-    $split && return
-
-    if [[ $cur == -* ]]; then
-        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' \
-            -- "$cur" ) )
-        [[ $COMPREPLY == *= ]] && compopt -o nospace
-        return
-    fi
-
-    _filedir
-} &&
-complete -F _a2x a2x
-
 # ex: ts=4 sw=4 et filetype=sh

-- 
bash-completion



More information about the Bash-completion-commits mailing list