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: Thu, 13 Jul 2000 21:46:12 -0700 (PDT)	[thread overview]
Message-ID: <20000714044612.7550.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: 1534 bytes --]

Talking about context and the "z" expansion flag.  It would be useful
if it was possible to somehow get context information about the words
that were created.

For example, if a word is
        in the command position
        a command separator
        an opening or closing syntax character
        the output/input to redirection.
        parameter assignment (e.g. before a command)
        etc.

I think it be useful if it was possible to get another array that provided
information/context about each of the words from an array created via ${(z)..} 

So it would be possible in this nifty new widget smart-insert-last-word,
to attempt matching the structure of the line rather than just the way
each word looks.

For example when using the "more" command,  it tends to always be the last
command on a command line.  So my command line looks like:'
        cmd1 -flags -flags filename | more
I really don't care about more.  I really would prefer to get to filename.
with this smart-insert-last-word command.

So if I could tell  it to ignore single word commands without args, and
command separators (|), it could find filename in a more reasonable way.

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.



-FR


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


             reply	other threads:[~2000-07-14  4:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-14  4:46 Felix Rosencrantz [this message]
2000-07-14  7:22 Sven Wischnowsky
2000-07-15  2:42 Felix Rosencrantz
2000-07-17  8:07 Sven Wischnowsky
2000-07-18  5:09 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=20000714044612.7550.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).