zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: forwarded bug report
Date: Mon, 31 May 1999 18:33:45 +0000	[thread overview]
Message-ID: <990531183346.ZM5712@candle.brasslantern.com> (raw)
In-Reply-To: <199905311312.PAA18094@beta.informatik.hu-berlin.de>
In-Reply-To: <rsqiu99cnj9.fsf@crane.jaist.ac.jp>

On May 31,  3:12pm, Sven Wischnowsky wrote:
} Subject: Re: forwarded bug report
} 
} Markus F.X.J. Oberhumer wrote:
} >   compctl -s "\$(cat [tT]his-file-does-not-exist)" foo
} 
} When expanding the -s-string, we explicitly switch NULL_GLOB on so
} that `compctl -s "*.c \$(< foo)"' works without producing an error if
} there is no `*.c'.

That's not the only reason, is it?  We want the list of completion matches
to be empty when the glob pattern fails; if the only concern was for the
error, we could use NO_NOMATCH instead.

} Of course, this makes it fail in cases like the one above... (where
} the cat tries to start reading and never finishes).
} 
} Does anyone have an idea how we could make this safe?

Seems as if we need a variant of NULL_GLOB that actually replaces the
unmatched patterns with empty strings, rather than deleting them from the
command entirely.

On May 31, 11:38pm, Tanaka Akira wrote:
} Subject: Re: forwarded bug report
}
} I think that zsh can prevents hanging by redirecting stdin to /dev/null.

That's probably a good idea, but it doesn't solve the more general problem
of commands being invoked with a different-than-expected number of args.

(Providing a closed stdin as if <&- might be a better idea for most cases,
though it causes "cat" to complain about bad file descriptors.)

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


  reply	other threads:[~1999-05-31 18:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-31 13:12 Sven Wischnowsky
1999-05-31 13:05 ` Peter Stephenson
1999-05-31 13:42   ` Andrej Borsenkow
1999-05-31 14:38 ` Tanaka Akira
1999-05-31 18:33   ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-06-04  9:54 Sven Wischnowsky
1999-06-04  9:40 ` Peter Stephenson
1999-06-04 13:15   ` Tanaka Akira
1999-06-04 10:33 ` Bart Schaefer
1999-05-31 11:40 Peter Stephenson

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=990531183346.ZM5712@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).