zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: Unexpected foo==bar errors
Date: Mon, 8 Feb 2016 20:16:58 +0100	[thread overview]
Message-ID: <CAHYJk3R6TPvc9mSRv8ERi5Uo=GKgzbAZBJ1V7uEt42QnsJUfQg@mail.gmail.com> (raw)
In-Reply-To: <160208104528.ZM12107@torch.brasslantern.com>

On Mon, Feb 8, 2016 at 7:45 PM, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Feb 8,  4:52am, Mikael Magnusson wrote:
> } > The only use of $tf as far as I can see is to do lookups in the cache.
> }
> } Presumably at some point the given filename has to be interpreted so
> } that it can give any completions at all, even if it's not cached?
>
> On closer inspection yes, I'm wrong about this, $tf is passed to "tar -tf"
> to list the contents of the tar file even if not found in the cache.
>
> } I wonder if there's anywhere in the completion system that depends on
> } EQUALS being set... But maybe we should just 2> /dev/null the
> } assignment since tilde expansion also prints errors. (_zattr and _zip
> } also have this issue, presumably there are other places as well).
>
> Redirecting error would still leave $tf empty.  But there's no way to
> cause process substitution [that is, <(...) >(...) and =(...) syntax]
> to be applied to the result of parameter expansion, except by using
> "eval" -- and of course globbing won't happen without GLOB_ASSIGN, so
> the only reason for tf=${~words[3]} (and the other assignments in _tar
> from lines 66-82) is to do tilde and equals expansion.

Well, considering that something simple as foo*.tar (expanding only to
one file) also leaves $tf empty, I'd say it's better to leave $tf
empty for any weird command substitutions as well, but suppress the
error messages.

-- 
Mikael Magnusson


  reply	other threads:[~2016-02-08 19:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-07 15:57 Mikael Magnusson
2016-02-07 19:06 ` Peter Stephenson
2016-02-08  7:09   ` Bart Schaefer
2016-02-08  9:49     ` Peter Stephenson
2016-02-07 19:16 ` Bart Schaefer
2016-02-08  3:52   ` Mikael Magnusson
2016-02-08 18:45     ` Bart Schaefer
2016-02-08 19:16       ` Mikael Magnusson [this message]
2016-02-14 20:10         ` Failed process substitution on x=$~y (Re: Unexpected foo==bar errors) 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='CAHYJk3R6TPvc9mSRv8ERi5Uo=GKgzbAZBJ1V7uEt42QnsJUfQg@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).