/[gentoo-x86]/dev-util/source-highlight/files/source-highlight-2.10.bash-completion
Gentoo

Contents of /dev-util/source-highlight/files/source-highlight-2.10.bash-completion

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jul 4 12:39:20 2012 UTC (11 months, 2 weeks ago) by dev-zero
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix bash-completion installation (bug #424753) and cleanup old bash-completion files.

(Portage version: 2.1.11/cvs/Linux x86_64)

1 # $Header: /var/cvsroot/gentoo-x86/dev-util/source-highlight/files/source-highlight-2.10.bash-completion,v 1.1 2008/07/21 06:20:36 dev-zero Exp $
2 # completion for source-highlight
3
4 _source_highlight()
5 {
6 local cur prev opts
7 COMPREPLY=()
8 cur="${COMP_WORDS[COMP_CWORD]}"
9 prev="${COMP_WORDS[COMP_CWORD-1]}"
10
11 opts="-h --help -V --version -i --input -o --output -s --src-lang \
12 --lang-list --outlang-list -f --out-format -d --doc --no-doc -c --css \
13 -T --title -t --tab -H --header -F --footer --style-file --outlang-def \
14 --outlang-map --data-dir --output-dir --lang-def --lang-map --show-lang-elements \
15 --infer-lang -n --line-number --line-number-ref --gen-references --ctags-file \
16 --ctags -v --verbose --statistics --gen-version --check-lang --check-outlang \
17 --failsafe -g --debug-langdef --show-regex"
18
19 if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then
20 COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
21 return 0
22 fi
23
24 case "${prev}" in
25 -T|--title|-t|--tab|--gen-references)
26 COMPREPLY=()
27 ;;
28 -i|--input|-o|--output|-c|--css|-H|--header|-F|--footer|--style-file|--outlang-def|--outlang-map|--lang-def|--lang-map|--show-lang-elements|--ctags-file|--check-lang|--check-outlang|--show-regex)
29 COMPREPLY=($(compgen -A file -- "${cur}"))
30 ;;
31 -s|--src-lang)
32 COMPREPLY=($(compgen -W "C H ac am autoconf bib bison c caml cc changelog cls cpp cs csh csharp css \
33 diff docbook dtx eps fixed-fortran flex fortran free-fortran glsl h haxe hh hpp htm html hx in ini java javascript js kcfg kdevelop kidl ksh l lang \
34 langdef latex ldap ldif lex lgt ll log logtalk lsm lua m4 ml mli moc outlang pas pascal patch perl php php3 php4 php5 \
35 pl pm postscript prolog properties ps py python rb rc ruby sh shell sig sl slang slsh sml spec sql sty style syslog tcl tcsh \
36 tex tk txt ui xhtml xml y yacc yy" -- "${cur}"))
37 ;;
38 -f|--out-format)
39 COMPREPLY=($(compgen -W "docbook esc html html-css htmltable\
40 javadoc latex latexcolor texinfo xhtml xhtml-css xhtmltable" -- "${cur}"))
41 ;;
42 --data-dir|--output-dir)
43 COMPREPLY=($(compgen -A directory -- "${cur}"))
44 ;;
45 *)
46 COMPREPLY=($(compgen -W "${opts/${preprev}}" -- "${cur}"))
47 ;;
48 esac
49 }
50 complete -F _source_highlight source-highlight
51
52 # vim: set ft=sh tw=80 sw=4 et :

  ViewVC Help
Powered by ViewVC 1.1.20