comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Tab completion of variables and routines at the IDL command line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Tab completion of variables and routines at the IDL command line [message #54717] Tue, 10 July 2007 01:23 Go to next message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Dear all,

Yesterday I got annoyed enough with the lack of tab completion inside a
standard UNIX tty session (i.e. not the development environment) that I
tried to implement something which I've suspected for a while should
give me tab completion.

Anyway, turned out it worked, after a fashion.

(For background on tab completion if you don't know what I'm talking
about see, e.g.:

http://www.cmp.liv.ac.uk/docs/linux_guide/node28.html

chances are though, if you didn't know what it was then you probably
aren't too bothered about having it.)

I now have an IDL command line that will tab complete variables in the
current scope, compiled functions (and append a '(' to them) and
compiled procedures (and append a ',' to them). System procedures and
functions are also handled.

What it DOESN'T do (yet) is:

Tab complete structure tags.

Realise you can't have a function call as the first item on the command
line.

Realise you can't have a procedure call as anything except the first
item (or, I guess, after a '&').

Tab complete keywords to routines. *

Retain support for saving history between sessions.

Handle Ctrl-C interrupts as gracefully as it should. *

Expand on uncompiled routines. *

Full understanding of when a new tab completion can start (e.g. after a
',' or a '(' - at the moment it's on space).

Look at IDL system variables (or somewhere) to get options for how the
tab completion should work.

Tab complete filenames when appropriate (e.g. after a ".r").

Gracefully handle exiting from inside an IDL procedure (by calling the
"quit" routine). *

With the exception of the starred items above, all of the others are
really my immediate wishlist can/will probably be implemented this week.

Now, the question...

Is anyone else interested in this? If so then you're welcome to the code
but if there is sufficient interest (more than five people, say) then
I'll attempt to produce compilation instructions (of course, first I
have to understand the compilation step) and possibly binaries for
different versions of IDL.

It could be that most people are using either IDLDE or IDLWAVE in which
case I'm one of the few luddites left unwilling to abandon a standard
TTY. Also, if this feature already exists in a standard TTY then break
the news to me gently :).

I should say that the way in which this is implemented is truly awful
and there has to be a better way to do it. However, I gave up waiting
for someone smarter (hint hint ITTVIS) to do it and just did it myself.

As an additional warning I should point out that I've not written any
serious C in years and that all of the malloc'ing and the realisation I
could put most of the code in a macro seemed a lot more obvious after a
glass of wine. Use at your peril :).

Let me know if you're interested either by posting to the group or by
e-mail and I'll assess demand. Depending on who is interested I'll
perhaps do a pre-release to people who are better equipped than me to
assess how dangerous the code is before I distribute it to many people.
Please also indicate if you think you can help in a testing or code
evaluation step.

Thanks,

Allan
Re: Tab completion of variables and routines at the IDL command line [message #54980 is a reply to message #54717] Thu, 19 July 2007 23:07 Go to previous message
alvin[1] is currently offline  alvin[1]
Messages: 4
Registered: July 2007
Junior Member
Please post the instructions quick. I think its quite useful. It will
catch on as soon as the word spreads. I have a bunch of IDL student
here at IIAP, India, and more is interested to learn. The command line
completion is a plus for new people to learn quickly. I say good job!

Alvin Das
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: widget_table
Next Topic: zero-padding an array of arbitrary dimensionality (replacing execute in vm)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:48:39 PDT 2025

Total time taken to generate the page: 0.00446 seconds