lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2013-04-26 1:45 PM, "steve donovan" <steve.j.donovan@gmail.com> wrote:
>
> On Fri, Apr 26, 2013 at 6:56 PM, Coda Highland <chighland@gmail.com> wrote:
>>
>> I'm all for supporting really broad syntax, but I'd rather have the
>> "one wrong character" still error out -- or at the very least, prompt
>> "did you mean ___? y/n".
>
>
> I like Stefan's vision, and this interactivity is the only way to resolve ambiguous stuff - conversation is full of questions.  Such a system has to learn from the answers as well.
>
>  

The problem with "smart" shells is, as someone had pointed out already, they tend to be a little too smart:
$ rm *.o #let's remove any object files that may exist. This command should do nothing if there are no matching files...
> not found *.o, assuming you meant *.c #oh no!
Of course this is much less an issue if it asks what you meant instead of assuming, but it can still be annoying. (and you'd be surprised how many "smart" tools don't ask...)

What I'd find more useful than a smart shell is smart tab completion. E.g. I might start typing "SELECT " and hit tab, and have that turned into something like [[psql "SELECT "]], with the cursor keeping its position, and then further tab presses listing available databases and columns much like existing shells' tab complete lists directories.

Of course there's a good reason this doesn't exist (that I know of): it's difficult to do, and even more difficult to do well.