zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Better completion in quotes
Date: Mon, 31 May 1999 23:21:03 +0000	[thread overview]
Message-ID: <990531232104.ZM8980@candle.brasslantern.com> (raw)
In-Reply-To: <199905271110.NAA10649@beta.informatik.hu-berlin.de>

On May 27,  1:10pm, Sven Wischnowsky wrote:
} Subject: Re: Some possible bugs...
}
} > For example, when
} > the effective compctl says to complete file names, treat the entire
} > quoted string as one word and attempt to complete it as a file (this is
} > what bash appears to do); similary for command names or anything else
} > that normally results in a single shell "word"; otherwise, complete the
} > way it's presently done.
} 
} I think [splitting at spaces] wouldn't be enough. One example is the:
} 
}   % zsh -c "ls 'foo b<TAB>
} 
} I mentioned. This should complete to 'foo bar' if there is such a
} possible match.

Ideally, yes, but even knowing whether or not to split again at spaces,
and what context to complete in if not, is more than e.g. bash does.

The problem is that no context at all is causing zsh to make the wrong
assumption about how it should behave in a very common case.

} So we would need a way to `remove one level of
} quotes'. But the quotes may also contain things where we would need
} the whole lexing/parsing if we suddenly decide to work on the parts of 
} the quoted string.

True.  It'd have to re-parse the whole string after one level of quotes
was removed.  That may be overkill.

} > This so-called -1 option could apply to any other flag that followed it,
} 
} If we just let it work on all flags surrounding it, at least the
} parsing would be simple (of course).

That would be fine.

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


  reply	other threads:[~1999-05-31 23:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-27 11:10 Some possible bugs Sven Wischnowsky
1999-05-31 23:21 ` Bart Schaefer [this message]
1999-06-01 10:37 Better completion in quotes Sven Wischnowsky
1999-06-04  9:33 Sven Wischnowsky
1999-06-04  9:32 ` Peter Stephenson
1999-06-04 16:47 ` 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=990531232104.ZM8980@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).