1
0
mirror of https://github.com/nushell/nushell.git synced 2025-08-26 02:45:24 +02:00
Files
.azure
.cargo
.circleci
.github
assets
debian
docker
docs
commands
README.md
add.md
cd.md
date.md
echo.md
edit.md
enter.md
env.md
exit.md
fetch.md
first.md
help.md
inc.md
last.md
lines.md
nth.md
open.md
reverse.md
shells.md
sum.md
sys.md
to-csv.md
to-json.md
to-toml.md
to-tsv.md
to-url.md
to-yaml.md
trim.md
version.md
where.md
docker.md
philosophy.md
images
src
tests
.editorconfig
.gitignore
.gitpod.Dockerfile
.gitpod.yml
CODE_OF_CONDUCT.md
Cargo.lock
Cargo.toml
LICENSE
Makefile.toml
README.md
build.rs
features.toml
rust-toolchain
rustfmt.toml
Shaurya Shubham 0505a9d6f7 Create docs for add command
Partial fix of issue 
2019-10-03 16:27:04 +05:30

2.7 KiB

add

This command adds a column to any table output. The first parameter takes the heading, the second parameter takes the value for all the rows.

Examples

> ls | add is_on_a_computer yes_obviously
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━
 # │ name                       │ type │ readonly │ size   │ accessed  │ modified  │ is_on_a_computer 
───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼───────────┼──────────────────
 0 │ zeusiscrazy.txt            │ File │          │ 556 B  │ a day ago │ a day ago │ yes_obviously 
 1 │ coww.txt                   │ File │          │  24 B  │ a day ago │ a day ago │ yes_obviously 
 2 │ randomweirdstuff.txt       │ File │          │ 197 B  │ a day ago │ a day ago │ yes_obviously 
 3 │ abaracadabra.txt           │ File │          │ 401 B  │ a day ago │ a day ago │ yes_obviously 
 4 │ youshouldeatmorecereal.txt │ File │          │ 768 B  │ a day ago │ a day ago │ yes_obviously 
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━
> shells | add os linux_on_this_machine
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━
 # │   │ name       │ path                           │ os 
───┼───┼────────────┼────────────────────────────────┼───────────────────────
 0 │ X │ filesystem │ /home/shaurya/stuff/expr/stuff │ linux_on_this_machine 
 1 │   │ filesystem │ /                              │ linux_on_this_machine 
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━