zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Peter Stephenson <pws@csr.com>
Cc: zsh-users@sunsite.dk
Subject: Re: VMS Style auto command-complition
Date: Thu, 25 Nov 2004 12:31:41 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0411251224200.10283@toltec.zanshin.com> (raw)
In-Reply-To: <200411251946.iAPJklpi015080@news01.csr.com>

On Thu, 25 Nov 2004, Peter Stephenson wrote:

> autoload autoexec
> zle -N autoexec
> alias -A autoexpand accept-line

Er, surely you mean either

zle -N accept-line autoexec

or

zle -N autoexec
zle -A autoexec accept-line

> and deactivate it with
> 
> alias -A .accept-line accept-line

zle -A .accept-line accept-line

> Instead of trying to execute a command and failing if it finds
> multiple possibilities, it outputs an error message underneath and
> allows you to edit the line again.

Which is also what my conditional-accept-line function does, BTW, though
it makes no effort to reposition the cursor for you.

> for hash in aliases reswords functions builtins commands; do

I like my "whence -w" a lot better here ... it's questionable in the next
loop whether forking "whence -m" is faster, but it's sure more obvious,
and doesn't require the parameter module.

>     (( curpos = CURSOR ))
>     BUFFER[1,$len]="$expn"
>     (( curpos <= len )) && (( CURSOR = ${#expn[1]} ))

Hmm.


  reply	other threads:[~2004-11-25 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 18:29 Ziggy
2004-11-25 19:46 ` Peter Stephenson
2004-11-25 20:31   ` Bart Schaefer [this message]
2004-11-25 20:20 ` Bart Schaefer

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=Pine.LNX.4.61.0411251224200.10283@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@csr.com \
    --cc=zsh-users@sunsite.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).