diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-01-10 00:14:25 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-01-10 00:14:25 -0500 |
commit | feb932105426a9c9f7ab861dbdf2c2ab813b1f6a (patch) | |
tree | 05d128d744e4104216f805305d30c5e97ce3e8df /src/parse/ast.rs | |
parent | f7ae4de810779c367f7d4cfa83c234ef138b44e0 (diff) | |
download | nbsh-feb932105426a9c9f7ab861dbdf2c2ab813b1f6a.tar.gz nbsh-feb932105426a9c9f7ab861dbdf2c2ab813b1f6a.zip |
add more readable aliases for std fds
Diffstat (limited to 'src/parse/ast.rs')
-rw-r--r-- | src/parse/ast.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parse/ast.rs b/src/parse/ast.rs index 37e7fe0..4c65c6a 100644 --- a/src/parse/ast.rs +++ b/src/parse/ast.rs @@ -242,7 +242,12 @@ impl Redirect { super::Direction::Out | super::Direction::Append => 1, } } else { - from.parse().unwrap() + match from { + "in" => 0, + "out" => 1, + "err" => 2, + _ => from.parse().unwrap(), + } }; Self { from, to, dir } } |