zsh-workers
 help / color / mirror / code / Atom feed
From: Felix Rosencrantz <f_rosencrantz@yahoo.com>
To: zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: Re: ZLE Widget: Insert last word (except &)
Date: Fri, 14 Jul 2000 19:42:09 -0700 (PDT)	[thread overview]
Message-ID: <20000715024209.9385.qmail@web1303.mail.yahoo.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 2665 bytes --]

>It would definetely be useful, but it's not trivial. ...

Yes, I attempted to do it with shell code, parsing just simple command lines
I use, and started to appreciate how difficult it would be to do.

>However: one of the things I want to try after 4.0 is moving more of
>ZLE  into shell code (optionally, as for completion). One of the
>things on my list is the C-code for completion, probably with a small
>new builtin for the pre- and post-widget code, but partly in shell
>code. The pre-code would allow to parse a string as if it were the
>command line and would return all the information completion widgets
>get in the special parameters. I hadn't thought about doing this by
>moving some code into the core and adding a new parameter expansion,
>though. I'm not sure where the code would end up anyway, because parts 
>of it wouldn't depend on the completion code, so they may be moved to
>zutil or something.
>
>Well, and that combined with a change to the completion system which
>can be used to generate the context without generating completions...

Not sure if it has to be a new parameter expansion flag, though that was
one possible solution. It would be useful if it could be performed
on full command lines (e.g. from history or a file.)

So what kind of things do you imagine would be possible with these new changes?

>>...
>> Or in the history completer/widget having context information would make it
>> a lot easier to look at command line structure, and prune away things that
>> are unwanted, or make it easier to find things that are useful.
>
>That sounds terribly slow ;-)
I was playing around with something that would accumulate frequency
information about the first command on a line using preexec. I was hoping
this information would be useful to add to something like Bart's predict
widget.  I suspect something similar could be used to track other interesting
words or relations (e.g. command X precedes command Y).

Though what I would really like in the end is better prediction, in hopes
that would cut down on typing.  For me the prediction widget is great
in certain circumstances, but other times it just gets my the way.
I feel that to improve it, would require better analysis of shell history,
which requires processing command lines. Or maybe another direction for
prediction is needed maybe someone would like to add something like rk,
reactive keyboard, as a module.  That way we might be able to get prediction
similar to what the various web browsers provide.

-FR


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/


             reply	other threads:[~2000-07-15  2:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-15  2:42 Felix Rosencrantz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-07-18  5:09 Felix Rosencrantz
2000-07-17  8:07 Sven Wischnowsky
2000-07-14  7:22 Sven Wischnowsky
2000-07-14  4:46 Felix Rosencrantz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000715024209.9385.qmail@web1303.mail.yahoo.com \
    --to=f_rosencrantz@yahoo.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).