zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: _expand doesn't do brace expansion?
Date: Thu, 15 Jun 2000 15:08:29 +0000	[thread overview]
Message-ID: <1000615150829.ZM5560@candle.brasslantern.com> (raw)
In-Reply-To: <200006151045.MAA06788@beta.informatik.hu-berlin.de>
In-Reply-To: <200006151058.MAA06585@beta.informatik.hu-berlin.de>

Let me preface this by saying:  Don't feel obligated to do anything about
this at all; I'm just trying to make helpful suggestions.

On Jun 15, 12:45pm, Sven Wischnowsky wrote:
} Subject: Re: _expand doesn't do brace expansion?
}
} Bart Schaefer wrote:
} 
} > _complete manages to complete inside braces; why does the code that
} > understands braces stop taking them apart when there's a closed pair?
} 
} With `a{b,c}<TAB>' the completion code would have to generate the
} matches for `ab' and `ac', then built the intersection to get the
} suffixes (and prefixes if there's a suffix, i.e. the middle-strings)
} which are in both sets (in all n sets, actually).

Forget the intersection; complete the union.  With braces, it doesn't
matter if some of the results e.g. don't exist as files.

Usually I'm typing something like

	ln -s /usr{/local,}bin/blahblahblah

and what I want is to complete along *either* path, not along *both*,
because the thing I'm trying to complete only exists in one of them.

} And that mey be
} combined with arbitrarily complicated match specs. Frightening.

There at least I think you'd be justified to consider anything inside a
closed pair of braces in the prefix to be ineligible for comparison to
match specs -- essentially, ineligible for anything that would insert
characters anywhere other than at the cursor.

} About the other thing, a careful `eval exp=(...)' could do the job
} (avoiding error messages and such).

Quite probably.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2000-06-15 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-15 10:45 Sven Wischnowsky
2000-06-15 10:58 ` Sven Wischnowsky
2000-06-15 15:08   ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-06-15  9:20 Sven Wischnowsky
2000-06-15 10:22 ` Bart Schaefer
2000-06-15  9:09 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=1000615150829.ZM5560@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.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).