From f10390b1be78b70dedcc76837c1bf6d15a9c39d9 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sat, 30 Nov 2019 14:24:39 +1300 Subject: [PATCH] Update some command docs --- docs/commands/exit.md | 34 +++++++++++++++++----------------- docs/commands/inc.md | 12 ++++++------ docs/commands/shells.md | 26 +++++++++++++------------- docs/commands/version.md | 2 +- docs/commands/where.md | 33 ++++++++++++++++----------------- 5 files changed, 53 insertions(+), 54 deletions(-) diff --git a/docs/commands/exit.md b/docs/commands/exit.md index 0238204f28..b51011d7d6 100644 --- a/docs/commands/exit.md +++ b/docs/commands/exit.md @@ -9,22 +9,22 @@ Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all ``` ``` -/home/username/stuff/books> shells ----+---+------------+---------------------------- - # | | name | path ----+---+------------+---------------------------- - 0 | | filesystem | /home/username/stuff/notes - 1 | | filesystem | /home/username/stuff/videos - 2 | X | filesystem | /home/username/stuff/books ----+---+------------+---------------------------- -/home/username/stuff/books> exit -/home/username/stuff/videos> shells ----+---+------------+---------------------------- - # | | name | path ----+---+------------+---------------------------- - 0 | | filesystem | /home/username/stuff/notes - 1 | X | filesystem | /home/username/stuff/videos ----+---+------------+---------------------------- -/home/username/stuff/videos> exit --now +> shells +━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + # │ │ name │ path +───┼───┼────────────┼───────────────────────────────────── + 0 │ │ filesystem │ /home/jonathanturner/Source/nushell + 1 │ │ filesystem │ /home + 2 │ X │ filesystem │ /usr +━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +> exit +> shells +━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + # │ │ name │ path +───┼───┼────────────┼───────────────────────────────────── + 0 │ │ filesystem │ /home/jonathanturner/Source/nushell + 1 │ X │ filesystem │ /home +━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +> exit --now exits both the shells ``` diff --git a/docs/commands/inc.md b/docs/commands/inc.md index c6dcb8d806..f1924fedf9 100644 --- a/docs/commands/inc.md +++ b/docs/commands/inc.md @@ -6,17 +6,17 @@ This command increments the value of variable by one. ```shell > open rustfmt.toml ---------- +━━━━━━━━━ edition ---------- +───────── 2018 ---------- +━━━━━━━━━ > open rustfmt.toml | inc edition ---------- +━━━━━━━━━ edition ---------- +───────── 2019 ---------- +━━━━━━━━━ ``` ```shell diff --git a/docs/commands/shells.md b/docs/commands/shells.md index b9fde457b3..7bcdc3fe9d 100644 --- a/docs/commands/shells.md +++ b/docs/commands/shells.md @@ -6,21 +6,21 @@ Lists all the active nu shells with a number/index, a name and the path. Also ma ``` > shells ----+---+------------+--------------- - # | | name | path ----+---+------------+--------------- - 0 | | filesystem | /usr - 1 | | filesystem | /home - 2 | X | filesystem | /home/username ----+---+------------+--------------- +━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + # │ │ name │ path +───┼───┼────────────┼───────────────────────────────────── + 0 │ │ filesystem │ /home/jonathanturner/Source/nushell + 1 │ │ filesystem │ /usr + 2 │ X │ filesystem │ /home +━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ``` ``` /> shells ----+---+-------------------------------------------------+------------------------------------ - # | | name | path ----+---+-------------------------------------------------+------------------------------------ - 0 | | filesystem | /Users/username/Code/nushell - 1 | X | {/Users/username/Code/nushell/Cargo.toml} | / ----+---+-------------------------------------------------+------------------------------------ +━━━┯━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + # │ │ name │ path +───┼───┼──────────────────────────────────────────────────┼───────────────────────────────────── + 0 │ │ filesystem │ /home/jonathanturner/Source/nushell + 1 │ X │ {/home/jonathanturner/Source/nushell/Cargo.toml} │ / +━━━┷━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ``` diff --git a/docs/commands/version.md b/docs/commands/version.md index d0b8828990..28b364109a 100644 --- a/docs/commands/version.md +++ b/docs/commands/version.md @@ -9,6 +9,6 @@ Outputs the nushell version. ━━━━━━━━━ version ───────── - 0.3.0 + 0.6.0 ━━━━━━━━━ ``` diff --git a/docs/commands/where.md b/docs/commands/where.md index bda044354e..3252ec943e 100644 --- a/docs/commands/where.md +++ b/docs/commands/where.md @@ -44,26 +44,25 @@ Where with the form `| where readonly` is used to check boolean values. For exam ```shell > ls | where size > 4kb -----+----------------+------+----------+----------+----------------+---------------- - # | name | type | readonly | size | accessed | modified -----+----------------+------+----------+----------+----------------+---------------- - 0 | IMG_1291.jpg | File | | 115.5 KB | a month ago | 4 months ago - 1 | README.md | File | | 11.1 KB | 2 days ago | 2 days ago - 2 | IMG_1291.png | File | | 589.0 KB | a month ago | a month ago - 3 | IMG_1381.jpg | File | | 81.0 KB | a month ago | 4 months ago - 4 | butterfly.jpeg | File | | 4.2 KB | a month ago | a month ago - 5 | Cargo.lock | File | | 199.6 KB | 22 minutes ago | 22 minutes ago +━━━┯━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━ + # │ name │ type │ size │ created │ accessed │ modified +───┼────────────┼──────┼─────────┼─────────────┼─────────────┼───────────── + 0 │ Cargo.lock │ File │ 87.2 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago + 1 │ README.md │ File │ 19.5 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago + 2 │ Cargo.toml │ File │ 4.7 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago +━━━┷━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━ ``` ```shell -> ps | where cpu > 10 ----+-------+----------+-------+----------------------------- - # | pid | status | cpu | name ----+-------+----------+-------+----------------------------- - 0 | 1992 | Sleeping | 44.52 | /usr/bin/gnome-shell - 1 | 1069 | Sleeping | 16.15 | - 2 | 24116 | Sleeping | 13.70 | /opt/google/chrome/chrome - 3 | 21976 | Sleeping | 12.67 | /usr/share/discord/Discord +> ps | where cpu > 0 +━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━ + # │ pid │ name │ status │ cpu +───┼───────┼───────────────────────┼──────────┼─────────────────── + 0 │ 1546 │ Xorg │ Sleeping │ 10.65405000000000 + 1 │ 1769 │ gnome-shell │ Sleeping │ 5.271094000000000 + 2 │ 2153 │ gnome-terminal-server │ Sleeping │ 5.193664000000000 + 3 │ 13556 │ nu_plugin_ps │ Sleeping │ 40.70250000000000 +━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━ ``` ```shell