File: optcomplete.bash

package info (click to toggle)
optcomplete 1.2-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 172 kB
  • ctags: 106
  • sloc: python: 558; sh: 13; makefile: 9
file content (18 lines) | stat: -rw-r--r-- 487 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# $Id: optcomplete.bash,v 1.6 2004/01/26 06:24:48 blais Exp $
# $Source: /u/blais/cvsroot/optcomplete/etc/optcomplete.bash,v $
#

# optcomplete harness for bash shell. You then need to tell 
# bash to invoke this shell function with a command like 
# this::
#
#   complete -F _optcomplete optcomplete-test
#

_optcomplete()
{
    COMPREPLY=( $( \
	COMP_LINE=$COMP_LINE  COMP_POINT=$COMP_POINT \
	COMP_WORDS="${COMP_WORDS[*]}"  COMP_CWORD=$COMP_CWORD \
	OPTPARSE_AUTO_COMPLETE=1 $1 ) )
}