bugs.gw.com
Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000060 [tcsh] general feature always 2007-10-01 18:26 2007-10-01 21:51
Reporter Marcin Konarski View Status public  
Assigned To Christos Zoulas
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 6.15.00
  Product Build
Summary 0000060: current command line available for complete `programme`
Description I would really welcome new feature in tcsh (I hope that new features
can be added to tcsh). The feature I strive for is already described
in your wish list page: http://www.tcsh.org/WishList, [^] the last wish
on that page that is.

To put it short I want to have access to current command line string
from context of `programme` invoked from the complete.

For example, I would like to define following completion:

complete svn 'n@*@`fancy_svn_complete`@'

then when I press tab on the following command line:

[amok@ubiquitous](2/1)~/proj/$ svn ls file:///home/amok/var/db/repo/ [^]

my external script (fancy_svn_complete) is invoked, and inside of this
script I can examine contents of CURRCMDLINE environment variable,
which shall hold at this very moment value of:
"svn ls file:///home/amok/var/db/repo/". [^]

With CURRCMDLINE variable at hand I can build much more powerful
completions than I am able to do it now.
Steps To Reproduce
Additional Information The patch incorporates following changes:
1) tw.comp.c: creation of environment variable in question itself,
2) tcsh.man: introduction/description of the new feature
3) complete.tcsh: example completion for svn(1) command that use new
   feature
4) complete.d: new directory designated as container for new feature
   completion scripts
5) complete.d/svn: example complete script for svn(1) command that
   utilises new feature

To test this patch one has to apply it, build tcsh, create
following directory structure:
${HOME}/etc/tcsh/complete.d
place example script (complete.d/svn) in directory mentioned
above, invoke newly build shell, source new complete.tcsh and type:
svn ls <tab> f<tab>P<tab>T<tab>Y<tab>S<tab>R<tab>S<tab>R<tab>R<tab>P<tab>

where P, T, Y, R, S, R, R, P is:
Path/To/Your/SVN/Repository/SVN/Repository/Relative/Path first letters,
and <tab> is tab key press.

If every thing went ok, tcsh should complete file and directory
names both in real file system and virtual repository file system.
Attached Files  tcsh-6.15.00.patch [^] (3,460 bytes) 2007-10-01 18:26

- Relationships

- Notes
(0000067)
Christos Zoulas
2007-10-01 21:51

added feature.
 

- Issue History
Date Modified Username Field Change
2007-10-01 18:26 Marcin Konarski New Issue
2007-10-01 18:26 Marcin Konarski File Added: tcsh-6.15.00.patch
2007-10-01 21:51 Christos Zoulas Status new => resolved
2007-10-01 21:51 Christos Zoulas Resolution open => fixed
2007-10-01 21:51 Christos Zoulas Assigned To  => Christos Zoulas
2007-10-01 21:51 Christos Zoulas Note Added: 0000067


Mantis 1.0.6[^]
Copyright © 2000 - 2006 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker