zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Peter Stephenson <pws@ifh.de>,
	zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: PATCH: expand-or-complete-prefix
Date: Sat, 21 Feb 1998 09:09:20 -0800	[thread overview]
Message-ID: <980221090920.ZM8254@candle.brasslantern.com> (raw)
In-Reply-To: <199802211000.LAA23094@sgi.ifh.de>

On Feb 21, 11:00am, Peter Stephenson wrote:
} Subject: Re: PATCH: expand-or-complete-prefix
}
} "Bart Schaefer" wrote:
} > I've just been testing this, and it breaks on menu completion:
} > 
} > zagzig% bindkey '\t' expand-or-complete-prefix 
} > zagzig% setopt menucomplete 
} > zagzig% ls zlc
} >              ^ with cursor here, press TAB, and you get
} > zagzig% ls zle_bindings.oc
} >                          ^ press TAB again
} > zagzig% ls zle_hist.oc
} >                      ^ press TAB again
} > zagzig% ls zle_hist.proc
} >                        ^ and so forth
} 
} Is that really a bug?  The prefix is 'zl', and that's what you're
} completing

Oh, of course; silly me.  I was misled by (with-out- menucomplete):

zagzig% ls zlc
             ^ with cursor here, press TAB, and you get
zagzig% ls zle_c
               ^ press h then TAB again
zagzig% ls zle_hist.c

But the reason it stopped there is because "zle_hist." is an ambiguous
completion (a prefix of both zle_hist.o and zle_hist.pro), not because
it matched the file zle_hist.c, which is what I thought caused it to
stop.

So you're right, there's no bug there.

Although I do notice one thing:

zagzig% zlc
          ^ with cursor here, press TAB, and I get
zagzig% zless c
             ^ note space before cursor

But in this case:

zagzig% zc
zagzig% zcatc
            ^ note no space
zagzig% zdumpc
zagzig% zlessc

I realize that's an artifact of the way a unique completion works, so I'm
not prepared to suggest changing it yet, but it's not like e.g. bash:

zagzig% bash -f
[schaefer@zagzig zsh-3.0.5-build]$ zlc
                                     ^
[schaefer@zagzig zsh-3.0.5-build]$ zlessc
                                        ^
[schaefer@zagzig zsh-3.0.5-build]$ zl
                                     ^
[schaefer@zagzig zsh-3.0.5-build]$ zless 
                                         ^
                                     Space inserted only if at end of line

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


      reply	other threads:[~1998-02-21 17:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199802200231.TAA11243@empire.Central.Sun.COM>
1998-02-20 14:00 ` Peter Stephenson
1998-02-20 17:16   ` Bart Schaefer
1998-02-20 17:26     ` Bart Schaefer
1998-02-20 17:50       ` Adam Spiers
1998-02-21 10:02         ` Peter Stephenson
1998-02-21 13:48           ` PATCH: complete-history Adam Spiers
1998-02-21 10:00       ` PATCH: expand-or-complete-prefix Peter Stephenson
1998-02-21 17:09         ` Bart Schaefer [this message]

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=980221090920.ZM8254@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@ifh.de \
    --cc=zsh-workers@math.gatech.edu \
    /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).