[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] autocomplete in gst REPL
From: |
Stefan Schmiedl |
Subject: |
Re: [Help-smalltalk] autocomplete in gst REPL |
Date: |
Thu, 2 Jul 2009 22:33:54 +0200 |
On Thu, 02 Jul 2009 22:15:32 +0200
Paolo Bonzini <address@hidden> wrote:
> On 07/02/2009 08:34 PM, Stefan Schmiedl wrote:
> > While I tried out Nico's sample code, I noticed that
> > the tab-auto-complete in gst's REPL is not as all-knowing
> > as it could be:
> >
> > st> error sign<TAB>
> > signal: signalOn: signalWithArguments:
> > signalClass: signalWith: signed:
> >
> > although error signalingContext is defined in my gst.
> >
> > Bug or feature?
>
> Half-half. The completion list is built from the symbol table, which
> includes both variables and methods. Including all methods including
> unary methods would have meant having variables too in the completion
> list. I can change it if people prefer so.
Why do I use autocompletion?
- because I'm spoiled by bash's and vim's completion features
- because I can't remember how exactly something is spelled
In these cases, including all would make sense. Also as a non-intrusive
learning aid ... to this day I do not know whether ObjectMemory has
a method snapshot (for overwriting the image file), because whenever
I typed, snapshot: appeared and I obviously can't be bothered to look
for it. Were all symbols included I'd be much smarter .-)
I also noted that each part of multi-keyword messages is suggested
regardless of whether it is available.
st> Object extend [ abc: abc def: def ghi: ghi [] ]
st> 9 gh<TAB>
st> 9 ghi:
While catching that seems to be non-trivial for me, as the line editor
would have to learn about gst, would it be possible (and desirable)
to suggest multi-keyword messages as one item?
st> 9 abc:<TAB>
st> 9 abc:def:ghi:
Filling out that "template" would be easy enough, since Alt-b ends up
in exactly the right place to start typing.
Thanks,
s.
--
Stefan Schmiedl
EDV-Beratung Schmiedl, Berghangstr. 5, D-93413 Cham
im Büro: 09971 9966 989, am Handy: 0160 9981 6278