zsh-users
 help / color / mirror / code / Atom feed
From: Will Yardley <william@hq.newdream.net>
To: zsh-users@sunsite.dk
Subject: Re: globbing
Date: Sat, 11 Aug 2001 14:51:36 -0700	[thread overview]
Message-ID: <20010811145136.B30812@hq.newdream.net> (raw)
In-Reply-To: <1010811212358.ZM1092@candle.brasslantern.com>

Bart Schaefer wrote:
> You can, however, roll your own (but not in 3.0.x):
> 
>   bash-complete () {
>     emulate -L zsh
>     if [[ $RBUFFER = (|[[:space:]\;\&\|\>]*) ]]
>     then
>       zle complete-word         # Completing at end of word is not special
>     else
>       setopt noautomenu         # Cannot menu-complete the prefix, sorry
>       RBUFFER[1]=" $RBUFFER[1]" 
>       zle complete-word                  
>       RBUFFER[1,2]=$RBUFFER[2]           
>       if [[ $LBUFFER[-1] = $RBUFFER[1] ]]
>       then
> 	LBUFFER[-1]=''          # Suppress doubled slashes, for example
>       fi
>     fi
>   }
>   zle -N bash-complete
>   bindkey '\t' bash-complete
> 
> This could, I suppose, get added to the collection of bash-alike functions
> that PWS has created.  It does appear to work with `setopt bashautolist'.

That works _exactly_ how I wanted it to. Perhaps the normal way is better,
but old habits die hard.... thanks for going to the trouble of writing that
function too!

-- 
Sintax error in config file! (line 378)
aborted!


  reply	other threads:[~2001-08-11 21:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-10  7:20 globbing Will Yardley
2001-08-10  9:09 ` globbing Borsenkow Andrej
     [not found]   ` <20010810123418.H4701@hq.newdream.net>
2001-08-11 11:10     ` globbing Borsenkow Andrej
2001-08-11 21:23       ` globbing Bart Schaefer
2001-08-11 21:51         ` Will Yardley [this message]
2001-08-12  5:42           ` globbing Borsenkow Andrej
2001-08-10  9:43 ` globbing Oliver Kiddle
2005-07-21  2:48 globbing Tyler Spivey

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=20010811145136.B30812@hq.newdream.net \
    --to=william@hq.newdream.net \
    --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).