It is currently Thu, 20 Jan 2022 09:58:19 GMT

Author Message
 complete function in tcsh
I was wondering if there is any way to access the current command line
within a script called from the complete mechanism.

Take the example:

I want a completion for the -b option that depends on the fact that A
was selected for the -a option.

I know I can do this:

complete myprog 'n/-b/`my-completion-script`'

When I hit <TAB> after the -b option, it will call the script
my-completion-script.  If it were possible to get access within the
script to the text already typed on the command line (i.e. 'myprog -a
A -b'), then the script could sort everything out and return the
appropriate list (or say that -a should be specified to get a relevant
completion list).  I have already dumped all environment variables and
input arguments to the script to see if this was already being done
for me, but I didn't see the command line anywhere.


 Sun, 10 Sep 2006 23:21:25 GMT   
   [ 1 post ] 

Similar Threads

1. tcsh & complete

2. tcsh: complete with backreference

3. tcsh: completing ssh commands

4. case insensitive file complete with tcsh

5. Tcsh builtin command "complete"

6. nice tcsh complete for 'make'

7. complete tcsh

8. tcsh - complete command

9. How to use complete in tcsh?

10. tcsh complete mechanism

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