#?/bin/tcsh

#? NAME
#?      $0  -  tcsh completion function for o-saft, o-saft.pl, o-saft-tcl
#?
#? DESCRIPTION
#?      This tcsh function provides values to be used in tcsh's completion
#?      (see tcsh's complete  key).
#?
#? USAGE
#?      source tcsh_completion_o-saft
#?
#? SEE ALSO
#?      http://hyperpolyglot.org/unix-shells
#?      http://www.tcsh.org/tcsh.html/Builtin_commands.html#complete
#?      Get inspired by:
#?      http://www.opensource.apple.com/source/tcsh/tcsh-64/tcsh/complete.tcsh
#?
#? AUTHOR
#?      14-dec-14 Achim Hoffmann
# ------------------------------------------------------------------------------

complete o-saft \
	'C@+@`o-saft    --help=commands|awk /^\\+/\{print\ \$1\}`@' \
	'C@-@`o-saft    --help=opts    |awk /^\\-/\{print\ \$1\}`@' \

complete o-saft.pl \
	'C@+@`o-saft.pl --help=commands|awk /^\\+/\{print\ \$1\}`@' \
	'C@-@`o-saft.pl --help=opts    |awk /^\\-/\{print\ \$1\}`@' \

complete o-saft.tcl \
	'C@+@`o-saft.tcl --help=opts   |awk /^\\+/\{print\ \$1\}`@' \
	'C@-@`o-saft.tcl --help=opts   |awk /^\\-/\{print\ \$1\}`@' \

# NOTE: Some tcsh's man-pages state that ` (backtick) needs to be esacped in
#       the substitute part. This seems to be wrong.
