DESCRIPTION

    tcsh allows completion to come from various sources. One of the
    simplest is from a list of words:

     % complete CMDNAME 'p/*/(one two three)/'

    Another source is from an external command:

     % complete CMDNAME 'p/*/`mycompleter --somearg`/'

    The command receives one environment variables COMMAND_LINE (string,
    raw command-line). Unlike bash, tcsh does not (yet) provide something
    akin to COMP_POINT in bash. Command is expected to print completion
    entries, one line at a time.

     % cat mycompleter
     #!/usr/bin/perl
     use Complete::Tcsh qw(parse_cmdline format_completion);
     use Complete::Util qw(complete_array_elem);
     my ($words, $cword) = parse_cmdline();
     my $res = complete_array_elem(array=>[qw/--help --verbose --version/], word=>$words->[$cword]);
     print format_completion($res);
    
     % complete -C foo-complete foo
     % foo --v<Tab>
     --verbose --version

    This module provides routines for you to be doing the above.

    Also, unlike bash, currently tcsh does not allow delegating completion
    to a shell function.

SEE ALSO

    Complete

    Complete::Bash

    tcsh manual.

