zsh-users
 help / color / mirror / code / Atom feed
From: Joel David Elkins <jde@elkins.cx>
To: zsh-users@sunsite.dk
Subject: Re: completion within word
Date: Mon, 27 Sep 2004 15:34:24 -0500	[thread overview]
Message-ID: <20040927203424.GA335@elkins.cx> (raw)
In-Reply-To: <19431.1096297944@trentino.logica.co.uk>

Isn't the colon-variable completion problem simply solved by
redefining what a "word" is with something like select-word-style? The
sledge hammer approach is to define words just as bash does with the
following. There are more subtle ways to just exclude : from the list
of word characters; such methods are adequately documented in the
manual. Of course, this approach has other (IMO consistent therefore
desirable) effects besides completion, such as ^W behavior.

autoload -U select-word-style
select-word-style bash

$ BLA=/foo:/us<TAB>
$ BLA=/foo:/usr/

On Mon, Sep 27, 2004 at 05:12:24PM +0200, Oliver Kiddle wrote:
> Also note that you can simply use:
>   bindkey '^[f' _bash_complete-word
> 
> > I can tell you. It doesn't solve my original problem, which is that
> > 
> > BLA=/usr:/us<COMPLETE>
> 
> You can create a wrapper around _files to handle the colons:
> 
> _my_files() {
>   compset -P '*:'
>   compset -S ':*'
>   _files "$@"
> }
> 
> Oliver
> 

-- 
Joel Elkins <jde@elkins.cx>


      reply	other threads:[~2004-09-27 20:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-21 15:51 Matthias B.
2004-09-22  4:55 ` Thomas Köhler
2004-09-22  9:16   ` Peter Stephenson
2004-09-24 22:37   ` Matthias B.
2004-09-27  9:19     ` Oliver Kiddle
2004-09-27 14:00       ` Matthias B.
2004-09-27 14:18         ` Peter Stephenson
2004-09-27 14:43           ` Matthias B.
2004-09-27 14:46             ` Peter Stephenson
2004-09-27 15:12             ` Oliver Kiddle
2004-09-27 20:34               ` Joel David Elkins [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=20040927203424.GA335@elkins.cx \
    --to=jde@elkins.cx \
    --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).