It is currently Tue, 07 Dec 2021 02:22:25 GMT



 
Author Message
 Tcsh builtin command "complete"
Does anyone know how to use the builtin command "complete" for tcsh. Is
there any detailed information on the syntax for the command?

I am trying to write a "complete" which has three arguments for the
command in question, the second argument is dependant on the first, and
the third is dependant on both the first and second. How do I reference
the chosen completions for the previous arguments?

My current attempt which obviously doesn't work is:
complete my_cmd 'p/1/`cmd_args`/' \
               'p/2/`cmd_args FIRST_ARGUMENT`/' \
               'p/3/`cmd_args FIRST_ARG SECOND_ARG`/'

I need to know what to replace the "FIRST_ARG" and "SECOND_ARG" with?



 Sun, 13 Jul 2003 22:11:09 GMT   
 Tcsh builtin command "complete"
I have now worked this one out. The previous arguments  are referenced
using the syntax shown below
complete my_cmd 'p/1/`cmd_args`/' \
               'p/2/`cmd_args $:-1`/' \
               'p/3/`cmd_args $:-2 $:-1`/'

Obvious or not as the case may be.

Check out the following web page for tcsh info

http://www.primate.wisc.edu/software/csh-tcsh-book

Mark



 Mon, 14 Jul 2003 20:44:31 GMT   
 
   [ 2 post ] 

Similar Threads

1. "complete" command in tcsh

2. tcsh question on builtin "ls-F"

3. "last" command not showing complete information

4. ":-" operator/builtin help

5. differences in "read" builtin behaviour

6. GETSERVBYNAME()????????????????????"""""""""""""

7. Windows-Linux Connectivity "Ping" (Complete Newbie)

8. "The Complete Linux Kit" by Tauber

9. book "The Complete FreeBSD": opinions please

10. Bash "menu-complete" bug


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software