mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 23:58:45 +08:00
Correct a comment
A comment claimed that 0 was STDOUT_FILENO. In fact this should be 1. Also default the fd for pipe_or_redir_t to -1, as 0 is not a sensible default.
This commit is contained in:
parent
6b2addd9f3
commit
eaa87ff885
|
@ -154,9 +154,9 @@ wcstring tok_first(const wcstring &str);
|
|||
/// Struct wrapping up a parsed pipe or redirection.
|
||||
struct pipe_or_redir_t {
|
||||
// The redirected fd, or -1 on overflow.
|
||||
// In the common case of a pipe, this is 0 (STDOUT_FILENO).
|
||||
// In the common case of a pipe, this is 1 (STDOUT_FILENO).
|
||||
// For example, in the case of "3>&1" this will be 3.
|
||||
int fd{0};
|
||||
int fd{-1};
|
||||
|
||||
// Whether we are a pipe (true) or redirection (false).
|
||||
bool is_pipe{false};
|
||||
|
|
Loading…
Reference in New Issue
Block a user