Skip to content

Commit

Permalink
Add env command (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamIsrael authored Jun 13, 2023
1 parent 0166cdc commit 61a43d4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"basename",
"dirname",
"echo",
"env",
"wc",
]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This began as, and continues to be, a learning exercise to better understand the
| dirname | :white_check_mark: |
| du | |
| echo | :white_check_mark: |
| env | |
| env | :white_check_mark: |
| expand | |
| expr | |
| factor | |
Expand Down
8 changes: 8 additions & 0 deletions env/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "env"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
5 changes: 5 additions & 0 deletions env/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fn main() {
for var in std::env::vars() {
println!("{}={}", var.0, var.1);
}
}

0 comments on commit 61a43d4

Please sign in to comment.