zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Peter Stephenson" <pws@pwstephenson.fsnet.co.uk>,
	"Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: Arguments splitting (was: RE: PATCH: _cd not completing in $cdpath)
Date: Sat, 25 Dec 1999 13:57:17 +0300	[thread overview]
Message-ID: <000001bf4ec6$cf468660$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <E121GA8-0008Mh-00.1999-12-23-21-52-45@mail4.svr.pol.co.uk>

> _alternative re-evaluates arguments passed to it, so a string like
>  '\(/home/pws /home/pws/tex\)'
> isn't good enough as a path for _path_files -W because it gets split on
> spaces, whereas _path_files needs it as a single argument.  If that's the
> correct behaviour for _alternative --- and I suspect it is, because there
> are uses like
>   _alternative 'files:: _files' 'parameters:: _parameters'
> --- then _cd needs fixing.
>

It is correct, that arguments, that are command line, need splitting (to get at
this command line at all :-) But the current way to split them prevents any
arguments with embedded LFS characters.

What about something like

eval "action=( $action )"

Then we could define

_alternative 'files::_files -W "(a b c)"'

i.e. just use usual quoting.

Note, that this (possibly - I did not check the code) applies to _arguments,
_values etc - to any function, that is possibly using this format. It seems that
a single utility function/builtin to habdle such arguments is quite timely.

/andrej


      reply	other threads:[~1999-12-25 10:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-23 21:54 PATCH: _cd not completing in $cdpath Peter Stephenson
1999-12-25 10:57 ` Andrej Borsenkow [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='000001bf4ec6$cf468660$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=pws@pwstephenson.fsnet.co.uk \
    --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).