zsh-users
 help / color / mirror / code / Atom feed
* output from 'builtin' command not redirectable
@ 2003-01-03 17:31 Ian Macdonald
  2003-01-03 17:52 ` Zefram
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Macdonald @ 2003-01-03 17:31 UTC (permalink / raw)
  To: zsh-users

Hi,

Observe the following:

$ builtin foo &>/dev/null
zsh: no such builtin: foo

No matter what I do, I can't redirect the output of the 'builtin'
command.

I want to use this in a script, where the command passed to builtin
sometimes causes an error. Since I'm only interested in the return
value, I don't want the error to be displayed.

Should I file this as a bug somewhere? I couldn't quickly locate the
place to do this.

Ian
-- 
Ian Macdonald               | Ginsburg's Law:  At the precise moment you 
ian@caliban.org             | take off your shoe in a shoe store, your 
                            | big toe will pop out of your sock to see
                            | what's going on. 
                            | 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: output from 'builtin' command not redirectable
  2003-01-03 17:31 output from 'builtin' command not redirectable Ian Macdonald
@ 2003-01-03 17:52 ` Zefram
  0 siblings, 0 replies; 2+ messages in thread
From: Zefram @ 2003-01-03 17:52 UTC (permalink / raw)
  To: Ian Macdonald; +Cc: zsh-users

Ian Macdonald wrote:
>$ builtin foo &>/dev/null
>zsh: no such builtin: foo
>
>No matter what I do, I can't redirect the output of the 'builtin'
>command.

{ builtin foo; } &>/dev/null

Unfortunately this technique isn't portable to every shell, but it works
just as you'd expect in zsh.

-zefram


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-03 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-03 17:31 output from 'builtin' command not redirectable Ian Macdonald
2003-01-03 17:52 ` Zefram

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).