Fix whitespace and typos (#1481)

* Remove EOL whitespace in files other than docs

* Break paragraphs into lines

See http://rhodesmill.org/brandon/2012/one-sentence-per-line/ for the rationale

* Fix various typos

* Remove EOL whitespace in docs/commands/*.md
This commit is contained in:
Waldir Pimenta 2020-03-13 17:23:41 +00:00 committed by GitHub
parent 5b0b2f1ddd
commit 5ca9e12b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 532 additions and 505 deletions

View File

@ -59,4 +59,3 @@ steps:
- bash: cargo fmt --all -- --check - bash: cargo fmt --all -- --check
condition: eq(variables['style'], 'fmt') condition: eq(variables['style'], 'fmt')
displayName: Lint displayName: Lint

View File

@ -38,7 +38,7 @@ workflows:
extra_build_args: --cache-from=quay.io/nushell/nu-base:devel extra_build_args: --cache-from=quay.io/nushell/nu-base:devel
filters: filters:
branches: branches:
ignore: ignore:
- master - master
before_build: before_build:
- pull_cache - pull_cache

View File

@ -13,15 +13,22 @@ A new type of shell.
# Status # Status
This project has reached a minimum-viable product level of quality. While contributors dogfood it as their daily driver, it may be unstable for some commands. Future releases will work to fill out missing features and improve stability. Its design is also subject to change as it matures. This project has reached a minimum-viable product level of quality.
While contributors dogfood it as their daily driver, it may be unstable for some commands.
Future releases will work to fill out missing features and improve stability.
Its design is also subject to change as it matures.
Nu comes with a set of built-in commands (listed below). If a command is unknown, the command will shell-out and execute it (using cmd on Windows or bash on Linux and macOS), correctly passing through stdin, stdout, and stderr, so things like your daily git workflows and even `vim` will work just fine. Nu comes with a set of built-in commands (listed below).
If a command is unknown, the command will shell-out and execute it (using cmd on Windows or bash on Linux and macOS), correctly passing through stdin, stdout, and stderr, so things like your daily git workflows and even `vim` will work just fine.
# Learning more # Learning more
There are a few good resources to learn about Nu. There is a [book](https://www.nushell.sh/book/) about Nu that is currently in progress. The book focuses on using Nu and its core concepts. There are a few good resources to learn about Nu.
There is a [book](https://www.nushell.sh/book/) about Nu that is currently in progress.
The book focuses on using Nu and its core concepts.
If you're a developer who would like to contribute to Nu, we're also working on a [book for developers](https://www.nushell.sh/contributor-book/) to help you get started. There are also [good first issues](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to help you dive in. If you're a developer who would like to contribute to Nu, we're also working on a [book for developers](https://www.nushell.sh/contributor-book/) to help you get started.
There are also [good first issues](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to help you dive in.
We also have an active [Discord](https://discord.gg/NtAbbGn) and [Twitter](https://twitter.com/nu_shell) if you'd like to come and chat with us. We also have an active [Discord](https://discord.gg/NtAbbGn) and [Twitter](https://twitter.com/nu_shell) if you'd like to come and chat with us.
@ -107,11 +114,18 @@ The second container is a bit smaller if the size is important to you.
# Philosophy # Philosophy
Nu draws inspiration from projects like PowerShell, functional programming languages, and modern CLI tools. Rather than thinking of files and services as raw streams of text, Nu looks at each input as something with structure. For example, when you list the contents of a directory, what you get back is a table of rows, where each row represents an item in that directory. These values can be piped through a series of steps, in a series of commands called a 'pipeline'. Nu draws inspiration from projects like PowerShell, functional programming languages, and modern CLI tools.
Rather than thinking of files and services as raw streams of text, Nu looks at each input as something with structure.
For example, when you list the contents of a directory, what you get back is a table of rows, where each row represents an item in that directory.
These values can be piped through a series of steps, in a series of commands called a 'pipeline'.
## Pipelines ## Pipelines
In Unix, it's common to pipe between commands to split up a sophisticated command over multiple steps. Nu takes this a step further and builds heavily on the idea of _pipelines_. Just as the Unix philosophy, Nu allows commands to output from stdout and read from stdin. Additionally, commands can output structured data (you can think of this as a third kind of stream). Commands that work in the pipeline fit into one of three categories: In Unix, it's common to pipe between commands to split up a sophisticated command over multiple steps.
Nu takes this a step further and builds heavily on the idea of _pipelines_.
Just as the Unix philosophy, Nu allows commands to output from stdout and read from stdin.
Additionally, commands can output structured data (you can think of this as a third kind of stream).
Commands that work in the pipeline fit into one of three categories:
* Commands that produce a stream (eg, `ls`) * Commands that produce a stream (eg, `ls`)
* Commands that filter a stream (eg, `where type == "Directory"`) * Commands that filter a stream (eg, `where type == "Directory"`)
@ -135,13 +149,15 @@ Commands are separated by the pipe symbol (`|`) to denote a pipeline flowing lef
────┴───────────┴───────────┴──────────┴────────┴──────────────┴──────────────── ────┴───────────┴───────────┴──────────┴────────┴──────────────┴────────────────
``` ```
Because most of the time you'll want to see the output of a pipeline, `autoview` is assumed. We could have also written the above: Because most of the time you'll want to see the output of a pipeline, `autoview` is assumed.
We could have also written the above:
``` ```
/home/jonathan/Source/nushell(master)> ls | where type == Directory /home/jonathan/Source/nushell(master)> ls | where type == Directory
``` ```
Being able to use the same commands and compose them differently is an important philosophy in Nu. For example, we could use the built-in `ps` command as well to get a list of the running processes, using the same `where` as above. Being able to use the same commands and compose them differently is an important philosophy in Nu.
For example, we could use the built-in `ps` command as well to get a list of the running processes, using the same `where` as above.
```text ```text
/home/jonathan/Source/nushell(master)> ps | where cpu > 0 /home/jonathan/Source/nushell(master)> ps | where cpu > 0
@ -157,7 +173,8 @@ Being able to use the same commands and compose them differently is an important
## Opening files ## Opening files
Nu can load file and URL contents as raw text or as structured data (if it recognizes the format). For example, you can load a .toml file as structured data and explore it: Nu can load file and URL contents as raw text or as structured data (if it recognizes the format).
For example, you can load a .toml file as structured data and explore it:
``` ```
/home/jonathan/Source/nushell(master)> open Cargo.toml /home/jonathan/Source/nushell(master)> open Cargo.toml
@ -210,19 +227,26 @@ To set one of these variables, you can use `config --set`. For example:
## Shells ## Shells
Nu will work inside of a single directory and allow you to navigate around your filesystem by default. Nu also offers a way of adding additional working directories that you can jump between, allowing you to work in multiple directories at the same time. Nu will work inside of a single directory and allow you to navigate around your filesystem by default.
Nu also offers a way of adding additional working directories that you can jump between, allowing you to work in multiple directories at the same time.
To do so, use the `enter` command, which will allow you create a new "shell" and enter it at the specified path. You can toggle between this new shell and the original shell with the `p` (for previous) and `n` (for next), allowing you to navigate around a ring buffer of shells. Once you're done with a shell, you can `exit` it and remove it from the ring buffer. To do so, use the `enter` command, which will allow you create a new "shell" and enter it at the specified path.
You can toggle between this new shell and the original shell with the `p` (for previous) and `n` (for next), allowing you to navigate around a ring buffer of shells.
Once you're done with a shell, you can `exit` it and remove it from the ring buffer.
Finally, to get a list of all the current shells, you can use the `shells` command. Finally, to get a list of all the current shells, you can use the `shells` command.
## Plugins ## Plugins
Nu supports plugins that offer additional functionality to the shell and follow the same structured data model that built-in commands use. This allows you to extend nu for your needs. Nu supports plugins that offer additional functionality to the shell and follow the same structured data model that built-in commands use.
This allows you to extend nu for your needs.
There are a few examples in the `plugins` directory. There are a few examples in the `plugins` directory.
Plugins are binaries that are available in your path and follow a `nu_plugin_*` naming convention. These binaries interact with nu via a simple JSON-RPC protocol where the command identifies itself and passes along its configuration, which then makes it available for use. If the plugin is a filter, data streams to it one element at a time, and it can stream data back in return via stdin/stdout. If the plugin is a sink, it is given the full vector of final data and is given free reign over stdin/stdout to use as it pleases. Plugins are binaries that are available in your path and follow a `nu_plugin_*` naming convention.
These binaries interact with nu via a simple JSON-RPC protocol where the command identifies itself and passes along its configuration, which then makes it available for use.
If the plugin is a filter, data streams to it one element at a time, and it can stream data back in return via stdin/stdout.
If the plugin is a sink, it is given the full vector of final data and is given free reign over stdin/stdout to use as it pleases.
# Goals # Goals
@ -240,9 +264,9 @@ Nu adheres closely to a set of goals that make up its design philosophy. As feat
# Commands # Commands
You can find a list of Nu commands, complete with documentation, in [quick command references](https://www.nushell.sh/documentation.html#quick-command-references). You can find a list of Nu commands, complete with documentation, in [quick command references](https://www.nushell.sh/documentation.html#quick-command-references).
# License # License
The project is made available under the MIT license. See "LICENSE" for more information. The project is made available under the MIT license. See the `LICENSE` file for more information.

View File

@ -87,8 +87,8 @@ Here are some tips to help you get started.
* help commands - list all available commands * help commands - list all available commands
* help <command name> - display help about a particular command * help <command name> - display help about a particular command
Nushell works on the idea of a "pipeline". Pipelines are commands connected with the '|' character. Each stage Nushell works on the idea of a "pipeline". Pipelines are commands connected with the '|' character.
in the pipeline works together to load, parse, and display information to you. Each stage in the pipeline works together to load, parse, and display information to you.
[Examples] [Examples]

View File

@ -80,7 +80,7 @@ fn pick(
"No data to fetch.", "No data to fetch.",
format!("Couldn't pick column \"{}\"", column), format!("Couldn't pick column \"{}\"", column),
path_member_tried.span, path_member_tried.span,
format!("How about exploring it with \"get\"? Check the input is appropiate originating from here"), format!("How about exploring it with \"get\"? Check the input is appropriate originating from here"),
obj_source.tag.span) obj_source.tag.span)
} }

View File

@ -208,7 +208,7 @@ mod tests {
assert_eq!(actual, expected); assert_eq!(actual, expected);
}); });
// Now confirm in-memory environment variables synced appropiately // Now confirm in-memory environment variables synced appropriately
// including the newer one accounted for. // including the newer one accounted for.
let environment = actual.env.lock(); let environment = actual.env.lock();

View File

@ -67,7 +67,7 @@ fn nested_json_structures() {
sandbox.with_files(vec![FileWithContentToBeTrimmed( sandbox.with_files(vec![FileWithContentToBeTrimmed(
"nested_json_structures.json", "nested_json_structures.json",
r#" r#"
[ [
{ {
"name": "this is duplicated", "name": "this is duplicated",
"nesting": [ { "a": "a", "b": "b" }, "nesting": [ { "a": "a", "b": "b" },

View File

@ -2,14 +2,14 @@
## Overview ## Overview
The `nu-source` crate contains types and traits used for keeping track of _metadata_ about values being processed. The `nu-source` crate contains types and traits used for keeping track of _metadata_ about values being processed.
Nu uses `Tag`s to keep track of where a value came from, an `AnchorLocation`, Nu uses `Tag`s to keep track of where a value came from, an `AnchorLocation`,
as well as positional information about the value, a `Span`. as well as positional information about the value, a `Span`.
An `AchorLocation` can be a `Url`, `File`, or `Source` text that a value was parsed from. An `AnchorLocation` can be a `Url`, `File`, or `Source` text that a value was parsed from.
The source `Text` is special in that it is a type similar to a `String` that comes with the ability to be cheaply cloned. The source `Text` is special in that it is a type similar to a `String` that comes with the ability to be cheaply cloned.
A `Span` keeps track of a value's `start` and `end` positions. A `Span` keeps track of a value's `start` and `end` positions.
These types make up the metadata for a value and are wrapped up together in a `Tagged` struct, These types make up the metadata for a value and are wrapped up together in a `Tagged` struct,
which holds everything needed to track and locate a value. which holds everything needed to track and locate a value.
Nu's metadata system can be seen when reporting errors. Nu's metadata system can be seen when reporting errors.
@ -20,11 +20,15 @@ In the following example Nu is able to report to the user where the typo of a co
| ^^^ did you mean 'type'? | ^^^ did you mean 'type'?
``` ```
In addition to metadata tracking, `nu-source` also contains types and traits related to debugging, tracing, and formatting the metadata and values it processes. In addition to metadata tracking, `nu-source` also contains types and traits
related to debugging, tracing, and formatting the metadata and values it processes.
## Other Resources ## Other Resources
- [Nushell Github Project](https://github.com/nushell): Contains all projects in the Nushell ecosystem such as the source code to Nushell as well as website and books. - [Nushell Github Project](https://github.com/nushell):
- [Nushell Git Repository](https://github.com/nushell/nushell): A direct link to the source git repository for Nushell Contains all projects in the Nushell ecosystem such as the source code to Nushell as well as website and books.
- [Nushell Contributor Book](https://github.com/nushell/contributor-book): An overview of topics about Nushell to help you get started contributing to the project. - [Nushell Git Repository](https://github.com/nushell/nushell):
A direct link to the source git repository for Nushell
- [Nushell Contributor Book](https://github.com/nushell/contributor-book):
An overview of topics about Nushell to help you get started contributing to the project.
- [Discord Channel](https://discordapp.com/invite/NtAbbGn) - [Discord Channel](https://discordapp.com/invite/NtAbbGn)
- [Twitter](https://twitter.com/nu_shell) - [Twitter](https://twitter.com/nu_shell)

View File

@ -14,7 +14,7 @@ after building the image please run container:
```bash ```bash
$ docker run -td --rm --name nushell_package_ubuntu_bionic nushell/package:ubuntu-bionic $ docker run -td --rm --name nushell_package_ubuntu_bionic nushell/package:ubuntu-bionic
``` ```
and copy deb package from inside: and copy deb package from inside:

View File

@ -1,7 +1,7 @@
# append # append
This command allows you to append the given row to the table. This command allows you to append the given row to the table.
**Note**: **Note**:
- `append` does not change a file itself. If you want to save your changes, you need to run the `save` command - `append` does not change a file itself. If you want to save your changes, you need to run the `save` command
- if you want to add something containing a whitespace character, you need to put it in quotation marks - if you want to add something containing a whitespace character, you need to put it in quotation marks

View File

@ -1,7 +1,7 @@
# average # average
This command allows you to calculate the average of values in a column. This command allows you to calculate the average of values in a column.
## Examples ## Examples
To get the average of the file sizes in a directory, simply pipe the size column from the ls command to the average command. To get the average of the file sizes in a directory, simply pipe the size column from the ls command to the average command.
```shell ```shell

View File

@ -2,7 +2,7 @@
calc is a command that takes a math expression from the pipeline and calculates that into a number. calc is a command that takes a math expression from the pipeline and calculates that into a number.
This command supports the following operations - This command supports the following operations -
operations : operations :
* binary operators: +, -, *, /, % (remainder), ^ (power) * binary operators: +, -, *, /, % (remainder), ^ (power)
@ -20,8 +20,8 @@ functions :
constants: constants:
* pi * pi
* e * e
## Examples - ## Examples -
``` ```
> echo "1+2+3" | calc > echo "1+2+3" | calc
@ -53,62 +53,62 @@ constants:
``` ```
open abc.json open abc.json
───┬────── ───┬──────
# │ size # │ size
───┼────── ───┼──────
0 │ 816 0 │ 816
1 │ 1627 1 │ 1627
2 │ 1436 2 │ 1436
3 │ 1573 3 │ 1573
4 │ 935 4 │ 935
5 │ 52 5 │ 52
6 │ 999 6 │ 999
7 │ 1639 7 │ 1639
───┴────── ───┴──────
open abc.json | format "({size} + 500) * 4" open abc.json | format "({size} + 500) * 4"
───┬────────────────── ───┬──────────────────
# │ <value> # │ <value>
───┼────────────────── ───┼──────────────────
0 │ (816 + 500) * 4 0 │ (816 + 500) * 4
1 │ (1627 + 500) * 4 1 │ (1627 + 500) * 4
2 │ (1436 + 500) * 4 2 │ (1436 + 500) * 4
3 │ (1573 + 500) * 4 3 │ (1573 + 500) * 4
4 │ (935 + 500) * 4 4 │ (935 + 500) * 4
5 │ (52 + 500) * 4 5 │ (52 + 500) * 4
6 │ (999 + 500) * 4 6 │ (999 + 500) * 4
7 │ (1639 + 500) * 4 7 │ (1639 + 500) * 4
───┴────────────────── ───┴──────────────────
open abc.json | format "({size} + 500) * 4" | calc open abc.json | format "({size} + 500) * 4" | calc
───┬─────────── ───┬───────────
# │ <value> # │ <value>
───┼─────────── ───┼───────────
0 │ 5264.0000 0 │ 5264.0000
1 │ 8508.0000 1 │ 8508.0000
2 │ 7744.0000 2 │ 7744.0000
3 │ 8292.0000 3 │ 8292.0000
4 │ 5740.0000 4 │ 5740.0000
5 │ 2208.0000 5 │ 2208.0000
6 │ 5996.0000 6 │ 5996.0000
7 │ 8556.0000 7 │ 8556.0000
───┴─────────── ───┴───────────
open abc.json | format "({size} - 1000) * 4" | calc open abc.json | format "({size} - 1000) * 4" | calc
───┬──────────── ───┬────────────
# │ <value> # │ <value>
───┼──────────── ───┼────────────
0 │ -736.0000 0 │ -736.0000
1 │ 2508.0000 1 │ 2508.0000
2 │ 1744.0000 2 │ 1744.0000
3 │ 2292.0000 3 │ 2292.0000
4 │ -260.0000 4 │ -260.0000
5 │ -3792.0000 5 │ -3792.0000
6 │ -4.0000 6 │ -4.0000
7 │ 2556.0000 7 │ 2556.0000
───┴──────────── ───┴────────────
``` ```
Note that since `calc` uses floating-point numbers, the result may not always be precise. Note that since `calc` uses floating-point numbers, the result may not always be precise.
``` ```
> echo "floor(5999999999999999999/1000000000000000000)" | calc > echo "floor(5999999999999999999/1000000000000000000)" | calc

View File

@ -7,7 +7,7 @@ This command allows us to filters out rows with empty columns. Other commands ar
> [input-command] | compact [column-name] > [input-command] | compact [column-name]
``` ```
## Examples ## Examples
Let's say we have a table like this: Let's say we have a table like this:

View File

@ -7,42 +7,42 @@ This command counts the number of rows in a table.
```shell ```shell
> ls > ls
━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━ ━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ created │ accessed │ modified # │ name │ type │ readonly │ size │ created │ accessed │ modified
────┼──────────────────────────────┼───────────┼──────────┼─────────┼──────────────┼──────────────┼────────────── ────┼──────────────────────────────┼───────────┼──────────┼─────────┼──────────────┼──────────────┼──────────────
0 │ Desktop │ Directory │ │ 4.1 KB │ 2 months ago │ 2 months ago │ 2 months ago 0 │ Desktop │ Directory │ │ 4.1 KB │ 2 months ago │ 2 months ago │ 2 months ago
1 │ aur │ Directory │ │ 4.1 KB │ 4 hours ago │ 4 hours ago │ 4 hours ago 1 │ aur │ Directory │ │ 4.1 KB │ 4 hours ago │ 4 hours ago │ 4 hours ago
... ...
75 │ .emulator_console_auth_token │ File │ │ 16 B │ 2 months ago │ 2 months ago │ 2 months ago 75 │ .emulator_console_auth_token │ File │ │ 16 B │ 2 months ago │ 2 months ago │ 2 months ago
76 │ bin │ Directory │ │ 4.1 KB │ 2 months ago │ 2 months ago │ 2 months ago 76 │ bin │ Directory │ │ 4.1 KB │ 2 months ago │ 2 months ago │ 2 months ago
━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━ ━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
> ls | count > ls | count
━━━━━━━━━ ━━━━━━━━━
<value> <value>
───────── ─────────
77 77
━━━━━━━━━ ━━━━━━━━━
> ls | get name | count > ls | get name | count
━━━━━━━━━ ━━━━━━━━━
<value> <value>
───────── ─────────
77 77
━━━━━━━━━ ━━━━━━━━━
> ls | where type == File | count > ls | where type == File | count
━━━━━━━━━ ━━━━━━━━━
<value> <value>
───────── ─────────
29 29
━━━━━━━━━ ━━━━━━━━━
> ls | where type == Directory | count > ls | where type == Directory | count
━━━━━━━━━ ━━━━━━━━━
<value> <value>
───────── ─────────
48 48
━━━━━━━━━ ━━━━━━━━━
> ls | where size > 2KB | count > ls | where size > 2KB | count
━━━━━━━━━ ━━━━━━━━━
<value> <value>
───────── ─────────
57 57
━━━━━━━━━ ━━━━━━━━━
``` ```

View File

@ -2,36 +2,36 @@
`debug` prints a debugging view of the table data. It is useful when you want to get the specific types of the data and while investigating errors. `debug` prints a debugging view of the table data. It is useful when you want to get the specific types of the data and while investigating errors.
## Examples ## Examples
``` ```
ls | first 2 | debug ls | first 2 | debug
───┬────────────────────────────────────────── ───┬──────────────────────────────────────────
# │ <value> # │ <value>
───┼────────────────────────────────────────── ───┼──────────────────────────────────────────
0 │ (name=".azure" 0 │ (name=".azure"
│ type="Dir" │ type="Dir"
│ size=nothing │ size=nothing
│ modified=2020-02-09T05:31:39.950305440Z((B │ modified=2020-02-09T05:31:39.950305440Z((B
│ mdate)) │ mdate))
1 │ (name=".cargo" 1 │ (name=".cargo"
│ type="Dir" │ type="Dir"
│ size=nothing │ size=nothing
│ modified=2020-01-06T05:45:30.933303081Z((B │ modified=2020-01-06T05:45:30.933303081Z((B
│ mdate)) │ mdate))
───┴────────────────────────────────────────── ───┴──────────────────────────────────────────
ls | last 8 | get type | debug ls | last 8 | get type | debug
───┬───────── ───┬─────────
# │ <value> # │ <value>
───┼───────── ───┼─────────
0 │ "Dir" 0 │ "Dir"
1 │ "Dir" 1 │ "Dir"
2 │ "File" 2 │ "File"
3 │ "Dir" 3 │ "Dir"
4 │ "File" 4 │ "File"
5 │ "Dir" 5 │ "Dir"
6 │ "Dir" 6 │ "Dir"
7 │ "Dir" 7 │ "Dir"
───┴───────── ───┴─────────
open --raw Cargo.toml | size | debug open --raw Cargo.toml | size | debug
(lines=271 words=955 chars=7855 max length=7856) (lines=271 words=955 chars=7855 max length=7856)

View File

@ -7,7 +7,7 @@ This command sets a default row's column if missing. Other commands are capable
> [input-command] | default [column-name] [column-value] > [input-command] | default [column-name] [column-value]
``` ```
## Examples ## Examples
Let's say we have a table like this: Let's say we have a table like this:

View File

@ -7,20 +7,20 @@
```shell ```shell
> du src/commands > du src/commands
───┬──────────────┬──────────┬──────────┬──────────────── ───┬──────────────┬──────────┬──────────┬────────────────
# │ path │ apparent │ physical │ directories # │ path │ apparent │ physical │ directories
───┼──────────────┼──────────┼──────────┼──────────────── ───┼──────────────┼──────────┼──────────┼────────────────
0 │ src/commands │ 411.5 KB │ 647.2 KB │ [table 1 rows] 0 │ src/commands │ 411.5 KB │ 647.2 KB │ [table 1 rows]
───┴──────────────┴──────────┴──────────┴──────────────── ───┴──────────────┴──────────┴──────────┴────────────────
> du -a src/commands > du -a src/commands
───┬──────────────┬──────────┬──────────┬─────────────────┬──────────────── ───┬──────────────┬──────────┬──────────┬─────────────────┬────────────────
# │ path │ apparent │ physical │ files │ directories # │ path │ apparent │ physical │ files │ directories
───┼──────────────┼──────────┼──────────┼─────────────────┼──────────────── ───┼──────────────┼──────────┼──────────┼─────────────────┼────────────────
0 │ src/commands │ 411.5 KB │ 647.2 KB │ [table 95 rows] │ [table 1 rows] 0 │ src/commands │ 411.5 KB │ 647.2 KB │ [table 95 rows] │ [table 1 rows]
───┴──────────────┴──────────┴──────────┴─────────────────┴──────────────── ───┴──────────────┴──────────┴──────────┴─────────────────┴────────────────
> du *.rs > du *.rs
───┬──────────┬──────────┬────────── ───┬──────────┬──────────┬──────────
# │ path │ apparent │ physical # │ path │ apparent │ physical
───┼──────────┼──────────┼────────── ───┼──────────┼──────────┼──────────
0 │ build.rs │ 78 B │ 4.1 KB 0 │ build.rs │ 78 B │ 4.1 KB
───┴──────────┴──────────┴────────── ───┴──────────┴──────────┴──────────
``` ```

View File

@ -2,44 +2,44 @@
Edits an existing column on a table. First parameter is the column to edit and the second parameter is the value to put. Edits an existing column on a table. First parameter is the column to edit and the second parameter is the value to put.
## Examples ## Examples
```shell ```shell
> ls > ls
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼─────────── ───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼───────────
0 │ zeusiscrazy.txt │ File │ │ 556 B │ a day ago │ a day ago 0 │ zeusiscrazy.txt │ File │ │ 556 B │ a day ago │ a day ago
1 │ coww.txt │ File │ │ 24 B │ a day ago │ a day ago 1 │ coww.txt │ File │ │ 24 B │ a day ago │ a day ago
2 │ randomweirdstuff.txt │ File │ │ 197 B │ a day ago │ a day ago 2 │ randomweirdstuff.txt │ File │ │ 197 B │ a day ago │ a day ago
3 │ abaracadabra.txt │ File │ │ 401 B │ a day ago │ a day ago 3 │ abaracadabra.txt │ File │ │ 401 B │ a day ago │ a day ago
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ a day ago 4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ a day ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━
> ls | edit modified neverrrr > ls | edit modified neverrrr
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼────────── ───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼──────────
0 │ zeusiscrazy.txt │ File │ │ 556 B │ a day ago │ neverrrr 0 │ zeusiscrazy.txt │ File │ │ 556 B │ a day ago │ neverrrr
1 │ coww.txt │ File │ │ 24 B │ a day ago │ neverrrr 1 │ coww.txt │ File │ │ 24 B │ a day ago │ neverrrr
2 │ randomweirdstuff.txt │ File │ │ 197 B │ a day ago │ neverrrr 2 │ randomweirdstuff.txt │ File │ │ 197 B │ a day ago │ neverrrr
3 │ abaracadabra.txt │ File │ │ 401 B │ a day ago │ neverrrr 3 │ abaracadabra.txt │ File │ │ 401 B │ a day ago │ neverrrr
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ neverrrr 4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ neverrrr
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━
``` ```
```shell ```shell
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼──────────────────────────────── ───┼───┼────────────┼────────────────────────────────
0 │ X │ filesystem │ /home/username/stuff/expr/stuff 0 │ X │ filesystem │ /home/username/stuff/expr/stuff
1 │ │ filesystem │ / 1 │ │ filesystem │ /
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> shells | edit " " X | edit path / > shells | edit " " X | edit path /
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼────── ───┼───┼────────────┼──────
0 │ X │ filesystem │ / 0 │ X │ filesystem │ /
1 │ X │ filesystem │ / 1 │ X │ filesystem │ /
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━
``` ```

View File

@ -2,7 +2,7 @@
Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all of them. Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all of them.
## Examples ## Examples
```shell ```shell
> exit > exit
@ -11,19 +11,19 @@ Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all
``` ```
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼───────────────────────────────────── ───┼───┼────────────┼─────────────────────────────────────
0 │ │ filesystem │ /home/jonathanturner/Source/nushell 0 │ │ filesystem │ /home/jonathanturner/Source/nushell
1 │ │ filesystem │ /home 1 │ │ filesystem │ /home
2 │ X │ filesystem │ /usr 2 │ X │ filesystem │ /usr
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> exit > exit
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼───────────────────────────────────── ───┼───┼────────────┼─────────────────────────────────────
0 │ │ filesystem │ /home/jonathanturner/Source/nushell 0 │ │ filesystem │ /home/jonathanturner/Source/nushell
1 │ X │ filesystem │ /home 1 │ X │ filesystem │ /home
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> exit --now > exit --now
exits both the shells exits both the shells

View File

@ -1,6 +1,6 @@
# from-csv # from-csv
Converts csv data into table. Use this when nushell cannot dertermine the input file extension. Converts csv data into table. Use this when nushell cannot determine the input file extension.
## Example ## Example
@ -69,7 +69,7 @@ chameleon; Linda; 1
━━━┷━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━ ━━━┷━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━
``` ```
To use this command to open a csv with separators other than a comma, use the `--raw` switch of `open` to open the csv, othewise the csv will enter `from-csv` as a table split on commas rather than raw text. To use this command to open a csv with separators other than a comma, use the `--raw` switch of `open` to open the csv, otherwise the csv will enter `from-csv` as a table split on commas rather than raw text.
```shell ```shell
> mv pets.txt pets.csv > mv pets.txt pets.csv

View File

@ -26,8 +26,8 @@ Syntax: `from-json {flags}`
```shell ```shell
> open command_from-json | from-json > open command_from-json | from-json
━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━ ━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━
title │ type │ flags title │ type │ flags
───────────┼─────────┼─────── ───────────┼─────────┼───────
from-json │ command │ Yes from-json │ command │ Yes
━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━ ━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━
``` ```

View File

@ -1,29 +1,29 @@
# from-ods # from-ods
Parses OpenDocument Spreadsheet binary data into a table. `open` calls `from-ods` automatically when the file extension is `ods`. Use this command when `open` is unable to guess the file type from the extension. Parses OpenDocument Spreadsheet binary data into a table. `open` calls `from-ods` automatically when the file extension is `ods`. Use this command when `open` is unable to guess the file type from the extension.
## Examples ## Examples
```sh ```sh
> open abc.ods > open abc.ods
───────────────── ─────────────────
Sheet1 Sheet1
───────────────── ─────────────────
[table 26 rows] [table 26 rows]
───────────────── ─────────────────
> open abc.ods --raw > open abc.ods --raw
Length: 4816 (0x12d0) bytes Length: 4816 (0x12d0) bytes
0000: 50 4b 03 04 14 00 00 00 00 00 00 00 00 00 85 6c PK.............l 0000: 50 4b 03 04 14 00 00 00 00 00 00 00 00 00 85 6c PK.............l
0010: 39 8a 2e 00 00 00 2e 00 00 00 08 00 00 00 6d 69 9.............mi 0010: 39 8a 2e 00 00 00 2e 00 00 00 08 00 00 00 6d 69 9.............mi
0020: 6d 65 74 79 70 65 61 70 70 6c 69 63 61 74 69 6f metypeapplicatio 0020: 6d 65 74 79 70 65 61 70 70 6c 69 63 61 74 69 6f metypeapplicatio
... ...
12a0: 00 61 10 00 00 4d 45 54 41 2d 49 4e 46 2f 6d 61 .a...META-INF/ma 12a0: 00 61 10 00 00 4d 45 54 41 2d 49 4e 46 2f 6d 61 .a...META-INF/ma
12b0: 6e 69 66 65 73 74 2e 78 6d 6c 50 4b 05 06 00 00 nifest.xmlPK.... 12b0: 6e 69 66 65 73 74 2e 78 6d 6c 50 4b 05 06 00 00 nifest.xmlPK....
12c0: 00 00 06 00 06 00 5a 01 00 00 60 11 00 00 00 00 ......Z...`..... 12c0: 00 00 06 00 06 00 5a 01 00 00 60 11 00 00 00 00 ......Z...`.....
> open abc.ods --raw | from-ods > open abc.ods --raw | from-ods
───────────────── ─────────────────
Sheet1 Sheet1
───────────────── ─────────────────
[table 26 rows] [table 26 rows]
───────────────── ─────────────────
``` ```

View File

@ -1,29 +1,29 @@
# from-xlsx # from-xlsx
Parses MS Excel binary data into a table. `open` calls `from-xlsx` automatically when the file extension is `xlsx`. Use this command when `open` is unable to guess the file type from the extension. Parses MS Excel binary data into a table. `open` calls `from-xlsx` automatically when the file extension is `xlsx`. Use this command when `open` is unable to guess the file type from the extension.
## Examples ## Examples
```sh ```sh
> open abc.xlsx > open abc.xlsx
───────────────── ─────────────────
Sheet1 Sheet1
───────────────── ─────────────────
[table 26 rows] [table 26 rows]
───────────────── ─────────────────
> open abc.xlsx --raw > open abc.xlsx --raw
Length: 6344 (0x18c8) bytes Length: 6344 (0x18c8) bytes
0000: 50 4b 03 04 14 00 00 00 08 00 00 00 00 00 d5 5f PK............._ 0000: 50 4b 03 04 14 00 00 00 08 00 00 00 00 00 d5 5f PK............._
0010: a7 48 68 01 00 00 23 05 00 00 13 00 00 00 5b 43 .Hh...#.......[C 0010: a7 48 68 01 00 00 23 05 00 00 13 00 00 00 5b 43 .Hh...#.......[C
0020: 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d ontent_Types].xm 0020: 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d ontent_Types].xm
... ...
18a0: 6b 73 68 65 65 74 73 2f 73 68 65 65 74 31 2e 78 ksheets/sheet1.x 18a0: 6b 73 68 65 65 74 73 2f 73 68 65 65 74 31 2e 78 ksheets/sheet1.x
18b0: 6d 6c 50 4b 05 06 00 00 00 00 0a 00 0a 00 7f 02 mlPK............ 18b0: 6d 6c 50 4b 05 06 00 00 00 00 0a 00 0a 00 7f 02 mlPK............
18c0: 00 00 33 16 00 00 00 00 ..3..... 18c0: 00 00 33 16 00 00 00 00 ..3.....
> open abc.xlsx --raw | from-xlsx > open abc.xlsx --raw | from-xlsx
───────────────── ─────────────────
Sheet1 Sheet1
───────────────── ─────────────────
[table 26 rows] [table 26 rows]
───────────────── ─────────────────
``` ```

View File

@ -5,39 +5,39 @@ Open given cells as text.
Syntax: `get ...args` Syntax: `get ...args`
### Parameters: ### Parameters:
* `args`: optionally return additional data by path * `args`: optionally return additional data by path
## Examples ## Examples
If we run `sys` we recieve a table which contains tables itself: If we run `sys` we receive a table which contains tables itself:
```shell ```shell
> sys > sys
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
host │ cpu │ disks │ mem │ temp │ net │ battery host │ cpu │ disks │ mem │ temp │ net │ battery
────────────────────────────────────────┼────────────────────────────────────┼────────────────┼───────────────────────────────────────┼────────────────┼────────────────┼──────────────── ────────────────────────────────────────┼────────────────────────────────────┼────────────────┼───────────────────────────────────────┼────────────────┼────────────────┼────────────────
[row arch hostname name release uptime │ [row cores current ghz max ghz min │ [table 7 rows] │ [row free swap free swap total total] │ [table 6 rows] │ [table 3 rows] │ [table 1 rows] [row arch hostname name release uptime │ [row cores current ghz max ghz min │ [table 7 rows] │ [row free swap free swap total total] │ [table 6 rows] │ [table 3 rows] │ [table 1 rows]
users] │ ghz] │ │ │ │ │ users] │ ghz] │ │ │ │ │
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
``` ```
To access one of the embeded tables we can use the `get` command To access one of the embedded tables we can use the `get` command
```shell ```shell
> sys | get cpu > sys | get cpu
━━━━━━━┯━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━ ━━━━━━━┯━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
cores │ current ghz │ min ghz │ max ghz cores │ current ghz │ min ghz │ max ghz
───────┼───────────────────┼────────────────────┼─────────────────── ───────┼───────────────────┼────────────────────┼───────────────────
4 │ 1.530000000000000 │ 0.5000000000000000 │ 3.500000000000000 4 │ 1.530000000000000 │ 0.5000000000000000 │ 3.500000000000000
━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━ ━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
``` ```
```shell ```shell
> sys | get battery > sys | get battery
━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━ ━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━
vendor │ model │ mins to full vendor │ model │ mins to full
────────┼──────────┼────────────────── ────────┼──────────┼──────────────────
SMP │ L14M2P21 │ 16.7024000000000 SMP │ L14M2P21 │ 16.7024000000000
━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━ ━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━
``` ```
@ -46,9 +46,9 @@ There's also the ability to pass multiple parameters to `get` which results in a
```shell ```shell
sys | get cpu battery sys | get cpu battery
━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
# │ cores │ current ghz │ min ghz │ max ghz │ vendor │ model │ mins to full # │ cores │ current ghz │ min ghz │ max ghz │ vendor │ model │ mins to full
───┼───────┼───────────────────┼────────────────────┼───────────────────┼────────┼──────────┼─────────────────── ───┼───────┼───────────────────┼────────────────────┼───────────────────┼────────┼──────────┼───────────────────
0 │ 4 │ 1.500000000000000 │ 0.5000000000000000 │ 3.500000000000000 │ │ │ 0 │ 4 │ 1.500000000000000 │ 0.5000000000000000 │ 3.500000000000000 │ │ │
1 │ │ │ │ │ SMP │ L14M2P21 │ 16.94503000000000 1 │ │ │ │ │ SMP │ L14M2P21 │ 16.94503000000000
━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -37,7 +37,7 @@ We can use the `group-by` command on 'UN statistical region' to create a table p
━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━
``` ```
Now we can already get some informations like "which continental regions are there" and "how many countries are in each region". Now we can already get some information like "which continental regions are there" and "how many countries are in each region".
If we want to see only the countries in the continental region of Oceania we can type: If we want to see only the countries in the continental region of Oceania we can type:
```shell ```shell

View File

@ -1,7 +1,7 @@
# help # help
Use `help` for more information on a command. Use `help` for more information on a command.
Use `help commands` to list all availble commands. Use `help commands` to list all available commands.
Use `help <command name>` to display help about a particular command. Use `help <command name>` to display help about a particular command.
## Examples ## Examples
@ -20,19 +20,19 @@ You can also learn more at https://www.nushell.sh/book/
```shell ```shell
> help commands > help commands
━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ name │ description # │ name │ description
────┼──────────────┼──────────────────────────────────────────────────────────────────────────────────────── ────┼──────────────┼────────────────────────────────────────────────────────────────────────────────────────
0 │ add │ Add a new field to the table. 0 │ add │ Add a new field to the table.
1 │ autoview │ View the contents of the pipeline as a table or list. 1 │ autoview │ View the contents of the pipeline as a table or list.
2 │ cd │ Change to a new path. 2 │ cd │ Change to a new path.
3 │ config │ Configuration management. 3 │ config │ Configuration management.
4 │ cp │ Copy files. 4 │ cp │ Copy files.
5 │ date │ Get the current datetime. 5 │ date │ Get the current datetime.
... ...
70 │ trim │ Trim leading and following whitespace from text data. 70 │ trim │ Trim leading and following whitespace from text data.
71 │ version │ Display Nu version 71 │ version │ Display Nu version
72 │ where │ Filter table to match the condition. 72 │ where │ Filter table to match the condition.
73 │ which │ Finds a program file. 73 │ which │ Finds a program file.
━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -19,15 +19,15 @@ Let's say we have this file `random_numers.csv` which contains 50 random numbers
> open random_numbers.csv > open random_numbers.csv
open random_numbers2.csv open random_numbers2.csv
━━━━┯━━━━━━━━━━━━━━━━ ━━━━┯━━━━━━━━━━━━━━━━
# │ random numbers # │ random numbers
────┼──────────────── ────┼────────────────
0 │ 0 0 │ 0
1 │ 5 1 │ 5
2 │ 5 2 │ 5
... ...
47 │ 0 47 │ 0
48 │ 2 48 │ 2
49 │ 4 49 │ 4
━━━━┷━━━━━━━━━━━━━━━━ ━━━━┷━━━━━━━━━━━━━━━━
``` ```
@ -36,30 +36,30 @@ If we now want to see how often the different numbers were generated, we can use
```shell ```shell
> open random_numbers2.csv | histogram "random numbers" > open random_numbers2.csv | histogram "random numbers"
━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ random numbers │ frequency # │ random numbers │ frequency
───┼────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────── ───┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
0 │ 0 │ **************************************************************************************************** 0 │ 0 │ ****************************************************************************************************
1 │ 1 │ ****************************** 1 │ 1 │ ******************************
2 │ 2 │ ************************************************************* 2 │ 2 │ *************************************************************
3 │ 3 │ ********************************************************************* 3 │ 3 │ *********************************************************************
4 │ 4 │ ***************************************************** 4 │ 4 │ *****************************************************
5 │ 5 │ ********************************************************************* 5 │ 5 │ *********************************************************************
━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```
We can also set the name of the second column or sort the table: We can also set the name of the second column or sort the table:
```shell ```shell
> open random_numbers2.csv | histogram "random numbers" probability > open random_numbers2.csv | histogram "random numbers" probability
━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ random numbers │ probability # │ random numbers │ probability
───┼────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────── ───┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
0 │ 0 │ **************************************************************************************************** 0 │ 0 │ ****************************************************************************************************
1 │ 1 │ ****************************** 1 │ 1 │ ******************************
2 │ 2 │ ************************************************************* 2 │ 2 │ *************************************************************
3 │ 3 │ ********************************************************************* 3 │ 3 │ *********************************************************************
4 │ 4 │ ***************************************************** 4 │ 4 │ *****************************************************
5 │ 5 │ ********************************************************************* 5 │ 5 │ *********************************************************************
━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```
@ -67,14 +67,14 @@ We can also set the name of the second column or sort the table:
```shell ```shell
> open random_numbers2.csv | histogram "random numbers" probability | sort-by probability > open random_numbers2.csv | histogram "random numbers" probability | sort-by probability
━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ random numbers │ probability # │ random numbers │ probability
───┼────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────── ───┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
0 │ 1 │ ****************************** 0 │ 1 │ ******************************
1 │ 4 │ ***************************************************** 1 │ 4 │ *****************************************************
2 │ 2 │ ************************************************************* 2 │ 2 │ *************************************************************
3 │ 3 │ ********************************************************************* 3 │ 3 │ *********************************************************************
4 │ 5 │ ********************************************************************* 4 │ 5 │ *********************************************************************
5 │ 0 │ **************************************************************************************************** 5 │ 0 │ ****************************************************************************************************
━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -7,11 +7,11 @@ Displays the last 100 commands.
```shell ```shell
> history > history
━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ <value> # │ <value>
────┼─────────────────────────────────────────────────────────────────────────── ────┼───────────────────────────────────────────────────────────────────────────
... ...
97 │ ls 97 │ ls
98 │ ls | where accessed < 1d 98 │ ls | where accessed < 1d
99 │ cd 99 │ cd
━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -7,15 +7,15 @@ This command increments the value of variable by one.
```shell ```shell
> open rustfmt.toml > open rustfmt.toml
━━━━━━━━━ ━━━━━━━━━
edition edition
───────── ─────────
2018 2018
━━━━━━━━━ ━━━━━━━━━
> open rustfmt.toml | inc edition > open rustfmt.toml | inc edition
━━━━━━━━━ ━━━━━━━━━
edition edition
───────── ─────────
2019 2019
━━━━━━━━━ ━━━━━━━━━
``` ```

View File

@ -1,4 +1,4 @@
# insert # insert
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. 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.
@ -7,22 +7,22 @@ This command adds a column to any table output. The first parameter takes the he
```shell ```shell
> ls | insert is_on_a_computer yes_obviously > ls | insert is_on_a_computer yes_obviously
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified │ is_on_a_computer # │ name │ type │ readonly │ size │ accessed │ modified │ is_on_a_computer
───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼───────────┼────────────────── ───┼────────────────────────────┼──────┼──────────┼────────┼───────────┼───────────┼──────────────────
0 │ zeusiscrazy.txt │ File │ │ 556 B │ a day ago │ a day ago │ yes_obviously 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 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 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 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 4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ a day ago │ yes_obviously
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━
``` ```
```shell ```shell
> shells | insert os linux_on_this_machine > shells | insert os linux_on_this_machine
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path │ os # │ │ name │ path │ os
───┼───┼────────────┼────────────────────────────────┼─────────────────────── ───┼───┼────────────┼────────────────────────────────┼───────────────────────
0 │ X │ filesystem │ /home/shaurya/stuff/expr/stuff │ linux_on_this_machine 0 │ X │ filesystem │ /home/shaurya/stuff/expr/stuff │ linux_on_this_machine
1 │ │ filesystem │ / │ linux_on_this_machine 1 │ │ filesystem │ / │ linux_on_this_machine
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -6,16 +6,16 @@ This command takes a string from a pipeline as input, and returns a table where
> [input-command] | lines > [input-command] | lines
``` ```
## Examples ## Examples
Basic usage: Basic usage:
```shell ```shell
> printf "Hello\nWorld!\nLove, nushell." | lines > printf "Hello\nWorld!\nLove, nushell." | lines
━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━
# │ value # │ value
───┼──────────────── ───┼────────────────
0 │ Hello 0 │ Hello
1 │ World! 1 │ World!
2 │ Love, nushell. 2 │ Love, nushell.
━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━
``` ```

View File

@ -1,6 +1,6 @@
# nth # nth
This command returns the nth row of a table, starting from 0. This command returns the nth row of a table, starting from 0.
If the number given is less than 0 or more than the number of rows, nothing is returned. If the number given is less than 0 or more than the number of rows, nothing is returned.
### Usage ### Usage
@ -15,27 +15,27 @@ If the number given is less than 0 or more than the number of rows, nothing is r
```shell ```shell
> ls > ls
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────┼───────────┼──────────┼────────┼───────────────┼─────────────── ───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago 0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
1 │ .git │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago 1 │ .git │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago
2 │ .gitignore │ File │ │ 19 B │ 2 minutes ago │ 2 minutes ago 2 │ .gitignore │ File │ │ 19 B │ 2 minutes ago │ 2 minutes ago
3 │ src │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago 3 │ src │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
> ls | nth 0 > ls | nth 0
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────┼───────────┼──────────┼────────┼───────────────┼─────────────── ───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago 0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
> ls | nth 0 2 > ls | nth 0 2
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────┼───────────┼──────────┼────────┼───────────────┼─────────────── ───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago 0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
2 │ .gitignore │ File │ │ 19 B │ 2 minutes ago │ 2 minutes ago 2 │ .gitignore │ File │ │ 19 B │ 2 minutes ago │ 2 minutes ago
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
> ls | nth 5 > ls | nth 5

View File

@ -7,47 +7,47 @@ This command displays only the column names passed on to it.
```shell ```shell
> ls > ls
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ created │ accessed │ modified # │ name │ type │ readonly │ size │ created │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼─────────────┼─────────────┼───────────── ───┼────────────────────────────┼──────┼──────────┼────────┼─────────────┼─────────────┼─────────────
0 │ zeusiscrazy.txt │ File │ │ 556 B │ a month ago │ a month ago │ a month ago 0 │ zeusiscrazy.txt │ File │ │ 556 B │ a month ago │ a month ago │ a month ago
1 │ coww.txt │ File │ │ 24 B │ a month ago │ a month ago │ a month ago 1 │ coww.txt │ File │ │ 24 B │ a month ago │ a month ago │ a month ago
2 │ randomweirdstuff.txt │ File │ │ 197 B │ a month ago │ a month ago │ a month ago 2 │ randomweirdstuff.txt │ File │ │ 197 B │ a month ago │ a month ago │ a month ago
3 │ abaracadabra.txt │ File │ │ 401 B │ a month ago │ a month ago │ a month ago 3 │ abaracadabra.txt │ File │ │ 401 B │ a month ago │ a month ago │ a month ago
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a month ago │ a month ago │ a month ago 4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a month ago │ a month ago │ a month ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
> ls | pick name > ls | pick name
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ name # │ name
───┼──────────────────────────── ───┼────────────────────────────
0 │ zeusiscrazy.txt 0 │ zeusiscrazy.txt
1 │ coww.txt 1 │ coww.txt
2 │ randomweirdstuff.txt 2 │ randomweirdstuff.txt
3 │ abaracadabra.txt 3 │ abaracadabra.txt
4 │ youshouldeatmorecereal.txt 4 │ youshouldeatmorecereal.txt
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```
The order in which you put the column names matters: The order in which you put the column names matters:
```shell ```shell
> ls | pick type name size > ls | pick type name size
━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━ ━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━
# │ type │ name │ size # │ type │ name │ size
───┼──────┼────────────────────────────┼──────── ───┼──────┼────────────────────────────┼────────
0 │ File │ zeusiscrazy.txt │ 556 B 0 │ File │ zeusiscrazy.txt │ 556 B
1 │ File │ coww.txt │ 24 B 1 │ File │ coww.txt │ 24 B
2 │ File │ randomweirdstuff.txt │ 197 B 2 │ File │ randomweirdstuff.txt │ 197 B
3 │ File │ abaracadabra.txt │ 401 B 3 │ File │ abaracadabra.txt │ 401 B
4 │ File │ youshouldeatmorecereal.txt │ 768 B 4 │ File │ youshouldeatmorecereal.txt │ 768 B
━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━ ━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━
> ls | pick size type name > ls | pick size type name
━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ size │ type │ name # │ size │ type │ name
───┼────────┼──────┼──────────────────────────── ───┼────────┼──────┼────────────────────────────
0 │ 556 B │ File │ zeusiscrazy.txt 0 │ 556 B │ File │ zeusiscrazy.txt
1 │ 24 B │ File │ coww.txt 1 │ 24 B │ File │ coww.txt
2 │ 197 B │ File │ randomweirdstuff.txt 2 │ 197 B │ File │ randomweirdstuff.txt
3 │ 401 B │ File │ abaracadabra.txt 3 │ 401 B │ File │ abaracadabra.txt
4 │ 768 B │ File │ youshouldeatmorecereal.txt 4 │ 768 B │ File │ youshouldeatmorecereal.txt
━━━┷━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -1,7 +1,7 @@
# prepend # prepend
This command prepends the given row to the front of the table This command prepends the given row to the front of the table
**Note**: **Note**:
- `prepend` does not change a file itself. If you want to save your changes, you need to run the `save` command - `prepend` does not change a file itself. If you want to save your changes, you need to run the `save` command
- if you want to add something containing a whitespace character, you need to put it in quotation marks - if you want to add something containing a whitespace character, you need to put it in quotation marks

View File

@ -2,37 +2,37 @@
This command removes or rejects the columns passed to it. This command removes or rejects the columns passed to it.
## Examples ## Examples
```shell ```shell
> ls > ls
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ created │ accessed │ modified # │ name │ type │ readonly │ size │ created │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼─────────────┼─────────────┼───────────── ───┼────────────────────────────┼──────┼──────────┼────────┼─────────────┼─────────────┼─────────────
0 │ zeusiscrazy.txt │ File │ │ 556 B │ a month ago │ a month ago │ a month ago 0 │ zeusiscrazy.txt │ File │ │ 556 B │ a month ago │ a month ago │ a month ago
1 │ coww.txt │ File │ │ 24 B │ a month ago │ a month ago │ a month ago 1 │ coww.txt │ File │ │ 24 B │ a month ago │ a month ago │ a month ago
2 │ randomweirdstuff.txt │ File │ │ 197 B │ a month ago │ a month ago │ a month ago 2 │ randomweirdstuff.txt │ File │ │ 197 B │ a month ago │ a month ago │ a month ago
3 │ abaracadabra.txt │ File │ │ 401 B │ a month ago │ a month ago │ a month ago 3 │ abaracadabra.txt │ File │ │ 401 B │ a month ago │ a month ago │ a month ago
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a month ago │ a month ago │ a month ago 4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a month ago │ a month ago │ a month ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
> ls | reject readonly > ls | reject readonly
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━
# │ name │ type │ size │ created │ accessed │ modified # │ name │ type │ size │ created │ accessed │ modified
───┼────────────────────────────┼──────┼────────┼─────────────┼─────────────┼───────────── ───┼────────────────────────────┼──────┼────────┼─────────────┼─────────────┼─────────────
0 │ zeusiscrazy.txt │ File │ 556 B │ a month ago │ a month ago │ a month ago 0 │ zeusiscrazy.txt │ File │ 556 B │ a month ago │ a month ago │ a month ago
1 │ coww.txt │ File │ 24 B │ a month ago │ a month ago │ a month ago 1 │ coww.txt │ File │ 24 B │ a month ago │ a month ago │ a month ago
2 │ randomweirdstuff.txt │ File │ 197 B │ a month ago │ a month ago │ a month ago 2 │ randomweirdstuff.txt │ File │ 197 B │ a month ago │ a month ago │ a month ago
3 │ abaracadabra.txt │ File │ 401 B │ a month ago │ a month ago │ a month ago 3 │ abaracadabra.txt │ File │ 401 B │ a month ago │ a month ago │ a month ago
4 │ youshouldeatmorecereal.txt │ File │ 768 B │ a month ago │ a month ago │ a month ago 4 │ youshouldeatmorecereal.txt │ File │ 768 B │ a month ago │ a month ago │ a month ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
> ls | reject readonly accessed > ls | reject readonly accessed
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━
# │ name │ type │ size │ created │ modified # │ name │ type │ size │ created │ modified
───┼────────────────────────────┼──────┼────────┼─────────────┼───────────── ───┼────────────────────────────┼──────┼────────┼─────────────┼─────────────
0 │ zeusiscrazy.txt │ File │ 556 B │ a month ago │ a month ago 0 │ zeusiscrazy.txt │ File │ 556 B │ a month ago │ a month ago
1 │ coww.txt │ File │ 24 B │ a month ago │ a month ago 1 │ coww.txt │ File │ 24 B │ a month ago │ a month ago
2 │ randomweirdstuff.txt │ File │ 197 B │ a month ago │ a month ago 2 │ randomweirdstuff.txt │ File │ 197 B │ a month ago │ a month ago
3 │ abaracadabra.txt │ File │ 401 B │ a month ago │ a month ago 3 │ abaracadabra.txt │ File │ 401 B │ a month ago │ a month ago
4 │ youshouldeatmorecereal.txt │ File │ 768 B │ a month ago │ a month ago 4 │ youshouldeatmorecereal.txt │ File │ 768 B │ a month ago │ a month ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
``` ```

View File

@ -1,51 +1,51 @@
# reverse # reverse
This command reverses the order of the elements in a sorted table. This command reverses the order of the elements in a sorted table.
## Examples ## Examples
```shell ```shell
> ls | sort-by name > ls | sort-by name
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago 0 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago
1 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 17 minutes ago 1 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 17 minutes ago
2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago 2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago
3 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 30 seconds ago │ now 3 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 30 seconds ago │ now
4 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 18 minutes ago 4 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 18 minutes ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
> ls | sort-by name | reverse > ls | sort-by name | reverse
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 minutes ago 0 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 minutes ago
1 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 39 seconds ago │ 18 seconds ago 1 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 39 seconds ago │ 18 seconds ago
2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago 2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago
3 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes ago 3 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes ago
4 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago 4 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
``` ```
```shell ```shell
> ls | sort-by size > ls | sort-by size
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes ago 0 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes ago
1 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago 1 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago
2 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago 2 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago
3 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 minutes ago 3 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 minutes ago
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a minute ago │ 26 seconds ago 4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a minute ago │ 26 seconds ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
> ls | sort-by size | reverse > ls | sort-by size | reverse
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼────────────────────────────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a minute ago │ 32 seconds ago 0 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a minute ago │ 32 seconds ago
1 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 minutes ago 1 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 minutes ago
2 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago 2 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 minutes ago
3 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago 3 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago
4 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes ago 4 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes ago
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
``` ```

View File

@ -7,20 +7,20 @@ Lists all the active nu shells with a number/index, a name and the path. Also ma
``` ```
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼───────────────────────────────────── ───┼───┼────────────┼─────────────────────────────────────
0 │ │ filesystem │ /home/jonathanturner/Source/nushell 0 │ │ filesystem │ /home/jonathanturner/Source/nushell
1 │ │ filesystem │ /usr 1 │ │ filesystem │ /usr
2 │ X │ filesystem │ /home 2 │ X │ filesystem │ /home
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```
``` ```
/> shells /> shells
━━━┯━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼──────────────────────────────────────────────────┼───────────────────────────────────── ───┼───┼──────────────────────────────────────────────────┼─────────────────────────────────────
0 │ │ filesystem │ /home/jonathanturner/Source/nushell 0 │ │ filesystem │ /home/jonathanturner/Source/nushell
1 │ X │ {/home/jonathanturner/Source/nushell/Cargo.toml} │ / 1 │ X │ {/home/jonathanturner/Source/nushell/Cargo.toml} │ /
━━━┷━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -7,14 +7,14 @@ This commands gives word count statistics on any text.
```shell ```shell
> open lalala.txt | size > open lalala.txt | size
━━━━━━━┯━━━━━━━┯━━━━━━━┯━━━━━━━━━━━━ ━━━━━━━┯━━━━━━━┯━━━━━━━┯━━━━━━━━━━━━
lines │ words │ chars │ max length lines │ words │ chars │ max length
───────┼───────┼───────┼──────────── ───────┼───────┼───────┼────────────
4 │ 10 │ 72 │ 72 4 │ 10 │ 72 │ 72
━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━━━━━━ ━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━━━━━━
> open the_mysterious_affair_at_styles.txt | size > open the_mysterious_affair_at_styles.txt | size
━━━━━━━┯━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━ ━━━━━━━┯━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━
lines │ words │ chars │ max length lines │ words │ chars │ max length
───────┼───────┼────────┼──────────── ───────┼───────┼────────┼────────────
8935 │ 62352 │ 349459 │ 361771 8935 │ 62352 │ 349459 │ 361771
━━━━━━━┷━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━ ━━━━━━━┷━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━
``` ```

View File

@ -1,56 +1,56 @@
# sort-by # sort-by
The `sort-by` command sorts the table being displayed in the terminal by a chosen column(s). The `sort-by` command sorts the table being displayed in the terminal by a chosen column(s).
`sort-by` takes multiple arguments (being the names of columns) sorting by each argument in order. `sort-by` takes multiple arguments (being the names of columns) sorting by each argument in order.
## Examples - ## Examples -
```shell ```shell
/home/example> ls | sort-by size /home/example> ls | sort-by size
━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼──────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼──────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 0 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
1 │ a │ File │ │ 18 B │ 4 minutes ago │ 38 minutes ago 1 │ a │ File │ │ 18 B │ 4 minutes ago │ 38 minutes ago
2 │ ad │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 2 │ ad │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
3 │ ac │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 3 │ ac │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
4 │ ab │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 4 │ ab │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
5 │ c │ File │ │ 102 B │ 35 minutes ago │ 35 minutes ago 5 │ c │ File │ │ 102 B │ 35 minutes ago │ 35 minutes ago
6 │ d │ File │ │ 189 B │ 35 minutes ago │ 34 minutes ago 6 │ d │ File │ │ 189 B │ 35 minutes ago │ 34 minutes ago
7 │ b │ File │ │ 349 B │ 35 minutes ago │ 35 minutes ago 7 │ b │ File │ │ 349 B │ 35 minutes ago │ 35 minutes ago
━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
``` ```
```shell ```shell
/home/example> ls | sort-by size name /home/example> ls | sort-by size name
━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼──────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼──────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ a │ File │ │ 18 B │ 4 minutes ago │ 39 minutes ago 0 │ a │ File │ │ 18 B │ 4 minutes ago │ 39 minutes ago
1 │ ab │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 1 │ ab │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
2 │ ac │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 2 │ ac │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
3 │ ad │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 3 │ ad │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
4 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago 4 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
5 │ c │ File │ │ 102 B │ 36 minutes ago │ 35 minutes ago 5 │ c │ File │ │ 102 B │ 36 minutes ago │ 35 minutes ago
6 │ d │ File │ │ 189 B │ 35 minutes ago │ 35 minutes ago 6 │ d │ File │ │ 189 B │ 35 minutes ago │ 35 minutes ago
7 │ b │ File │ │ 349 B │ 36 minutes ago │ 36 minutes ago 7 │ b │ File │ │ 349 B │ 36 minutes ago │ 36 minutes ago
``` ```
``` ```
/home/example> ls | sort-by accessed /home/example> ls | sort-by accessed
━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━┯━━━━━━┯━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
# │ name │ type │ readonly │ size │ accessed │ modified # │ name │ type │ readonly │ size │ accessed │ modified
───┼──────┼──────┼──────────┼────────┼────────────────┼──────────────── ───┼──────┼──────┼──────────┼────────┼────────────────┼────────────────
0 │ b │ File │ │ 349 B │ 37 minutes ago │ 37 minutes ago 0 │ b │ File │ │ 349 B │ 37 minutes ago │ 37 minutes ago
1 │ c │ File │ │ 102 B │ 37 minutes ago │ 37 minutes ago 1 │ c │ File │ │ 102 B │ 37 minutes ago │ 37 minutes ago
2 │ d │ File │ │ 189 B │ 37 minutes ago │ 36 minutes ago 2 │ d │ File │ │ 189 B │ 37 minutes ago │ 36 minutes ago
3 │ a │ File │ │ 18 B │ 6 minutes ago │ 40 minutes ago 3 │ a │ File │ │ 18 B │ 6 minutes ago │ 40 minutes ago
4 │ ab │ File │ │ 18 B │ 6 minutes ago │ 6 minutes ago 4 │ ab │ File │ │ 18 B │ 6 minutes ago │ 6 minutes ago
5 │ ac │ File │ │ 18 B │ 6 minutes ago │ 6 minutes ago 5 │ ac │ File │ │ 18 B │ 6 minutes ago │ 6 minutes ago
6 │ ad │ File │ │ 18 B │ 5 minutes ago │ 5 minutes ago 6 │ ad │ File │ │ 18 B │ 5 minutes ago │ 5 minutes ago
7 │ az │ File │ │ 18 B │ 5 minutes ago │ 5 minutes ago 7 │ az │ File │ │ 18 B │ 5 minutes ago │ 5 minutes ago
━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
``` ```

View File

@ -6,7 +6,7 @@ Syntax: `split-column <separator> ...args{flags}`
### Parameters ### Parameters
* `<seperator>`: string that denotes what separates columns * `<separator>`: string that denotes what separates columns
* `args`: column names to give the new columns. If not specified they will be set to `Column1` `Column2` ... * `args`: column names to give the new columns. If not specified they will be set to `Column1` `Column2` ...
### Flags ### Flags
@ -36,18 +36,18 @@ We can build a table from it using the `split-column` command
```shell ```shell
> open coordinates.txt | lines | split-column " | " > open coordinates.txt | lines | split-column " | "
━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━
# │ Column1 │ Column2 │ Column3 # │ Column1 │ Column2 │ Column3
───┼─────────────────────┼──────────────────────┼──────────────────── ───┼─────────────────────┼──────────────────────┼────────────────────
0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726 0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726
1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014 1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014
2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602 2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602
3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452 3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452
4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535 4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535
5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342 5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342
6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068 6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068
7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876 7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876
8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424 8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424
9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836 9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836
━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━
``` ```
@ -56,17 +56,17 @@ And give names to the columns
```shell ```shell
> open coordinates.txt | lines | split-column " | " x y z > open coordinates.txt | lines | split-column " | " x y z
━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━
# │ x │ y │ z # │ x │ y │ z
───┼─────────────────────┼──────────────────────┼──────────────────── ───┼─────────────────────┼──────────────────────┼────────────────────
0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726 0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726
1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014 1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014
2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602 2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602
3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452 3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452
4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535 4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535
5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342 5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342
6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068 6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068
7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876 7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876
8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424 8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424
9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836 9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836
━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━
``` ```

View File

@ -22,13 +22,13 @@ using the `split-row` command.
```shell ```shell
open table.txt | split-row ", " open table.txt | split-row ", "
━━━┯━━━━━━━━━ ━━━┯━━━━━━━━━
# │ <value> # │ <value>
───┼───────── ───┼─────────
0 │ 4 0 │ 4
1 │ 0 1 │ 0
2 │ 2 2 │ 2
3 │ 0 3 │ 0
4 │ 7 4 │ 7
5 │ 8 5 │ 8
━━━┷━━━━━━━━━ ━━━┷━━━━━━━━━
``` ```

View File

@ -1,7 +1,7 @@
# sum # sum
This command allows you to calculate the sum of values in a column. This command allows you to calculate the sum of values in a column.
## Examples ## Examples
To get the sum of the file sizes in a directory, simply pipe the size column from the ls command to the sum command. To get the sum of the file sizes in a directory, simply pipe the size column from the ls command to the sum command.
```shell ```shell

View File

@ -7,22 +7,22 @@ Converts table data into json text.
```shell ```shell
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼──────────────────────── ───┼───┼────────────┼────────────────────────
0 │ X │ filesystem │ /home/shaurya 0 │ X │ filesystem │ /home/shaurya
1 │ │ filesystem │ /home/shaurya/Pictures 1 │ │ filesystem │ /home/shaurya/Pictures
2 │ │ filesystem │ /home/shaurya/Desktop 2 │ │ filesystem │ /home/shaurya/Desktop
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
> shells | to-json > shells | to-json
[{" ":"X","name":"filesystem","path":"/home/shaurya"},{" ":" ","name":"filesystem","path":"/home/shaurya/Pictures"},{" ":" ","name":"filesystem","path":"/home/shaurya/Desktop"}] [{" ":"X","name":"filesystem","path":"/home/shaurya"},{" ":" ","name":"filesystem","path":"/home/shaurya/Pictures"},{" ":" ","name":"filesystem","path":"/home/shaurya/Desktop"}]
``` ```
```shell ```shell
> open sgml_description.json > open sgml_description.json
━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━
glossary glossary
──────────────── ────────────────
[table: 1 row] [table: 1 row]
━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━
> open sgml_description.json | to-json > open sgml_description.json | to-json
{"glossary":{"title":"example glossary","GlossDiv":{"title":"S","GlossList":{"GlossEntry":{"ID":"SGML","SortAs":"SGML","GlossTerm":"Standard Generalized Markup Language","Acronym":"SGML","Abbrev":"ISO 8879:1986","Height":10,"GlossDef":{"para":"A meta-markup language, used to create markup languages such as DocBook.","GlossSeeAlso":["GML","XML"]},"Sections":[101,102],"GlossSee":"markup"}}}}} {"glossary":{"title":"example glossary","GlossDiv":{"title":"S","GlossList":{"GlossEntry":{"ID":"SGML","SortAs":"SGML","GlossTerm":"Standard Generalized Markup Language","Acronym":"SGML","Abbrev":"ISO 8879:1986","Height":10,"GlossDef":{"para":"A meta-markup language, used to create markup languages such as DocBook.","GlossSeeAlso":["GML","XML"]},"Sections":[101,102],"GlossSee":"markup"}}}}}
@ -31,9 +31,9 @@ We can also convert formats !
```shell ```shell
> open jonathan.xml > open jonathan.xml
━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━
rss rss
──────────────── ────────────────
[table: 1 row] [table: 1 row]
━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━
> open jonathan.xml | to-json > open jonathan.xml | to-json
{"rss":[{"channel":[{"title":["Jonathan Turner"]},{"link":["http://www.jonathanturner.org"]},{"link":[]},{"item":[{"title":["Creating crossplatform Rust terminal apps"]},{"description":["<p><img src=\"/images/pikachu.jpg\" alt=\"Pikachu animation in Windows\" /></p>\n\n<p><em>Look Mom, Pikachu running in Windows CMD!</em></p>\n\n<p>Part of the adventure is not seeing the way ahead and going anyway.</p>\n"]},{"pubDate":["Mon, 05 Oct 2015 00:00:00 +0000"]},{"link":["http://www.jonathanturner.org/2015/10/off-to-new-adventures.html"]},{"guid":["http://www.jonathanturner.org/2015/10/off-to-new-adventures.html"]}]}]}]} {"rss":[{"channel":[{"title":["Jonathan Turner"]},{"link":["http://www.jonathanturner.org"]},{"link":[]},{"item":[{"title":["Creating crossplatform Rust terminal apps"]},{"description":["<p><img src=\"/images/pikachu.jpg\" alt=\"Pikachu animation in Windows\" /></p>\n\n<p><em>Look Mom, Pikachu running in Windows CMD!</em></p>\n\n<p>Part of the adventure is not seeing the way ahead and going anyway.</p>\n"]},{"pubDate":["Mon, 05 Oct 2015 00:00:00 +0000"]},{"link":["http://www.jonathanturner.org/2015/10/off-to-new-adventures.html"]},{"guid":["http://www.jonathanturner.org/2015/10/off-to-new-adventures.html"]}]}]}]}

View File

@ -7,11 +7,11 @@ Converts table data into toml text.
```shell ```shell
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼──────────────────────── ───┼───┼────────────┼────────────────────────
0 │ X │ filesystem │ /home/shaurya 0 │ X │ filesystem │ /home/shaurya
1 │ │ filesystem │ /home/shaurya/Pictures 1 │ │ filesystem │ /home/shaurya/Pictures
2 │ │ filesystem │ /home/shaurya/Desktop 2 │ │ filesystem │ /home/shaurya/Desktop
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
> shells | to-toml > shells | to-toml
[[]] [[]]
@ -34,9 +34,9 @@ path = "/home/shaurya/Desktop"
```shell ```shell
> open cargo_sample.toml > open cargo_sample.toml
━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━
dependencies │ dev-dependencies │ package dependencies │ dev-dependencies │ package
────────────────┼──────────────────┼──────────────── ────────────────┼──────────────────┼────────────────
[table: 1 row] │ [table: 1 row] │ [table: 1 row] [table: 1 row] │ [table: 1 row] │ [table: 1 row]
━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
> open cargo_sample.toml | to-toml > open cargo_sample.toml | to-toml
[dependencies] [dependencies]

View File

@ -7,63 +7,63 @@ Converts table data into tsv text.
```shell ```shell
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼──────────────────────── ───┼───┼────────────┼────────────────────────
0 │ X │ filesystem │ /home/shaurya 0 │ X │ filesystem │ /home/shaurya
1 │ │ filesystem │ /home/shaurya/Pictures 1 │ │ filesystem │ /home/shaurya/Pictures
2 │ │ filesystem │ /home/shaurya/Desktop 2 │ │ filesystem │ /home/shaurya/Desktop
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
> shells |to-tsv > shells |to-tsv
name path name path
X filesystem /home/shaurya X filesystem /home/shaurya
``` ```
```shell ```shell
> open caco3_plastics.tsv > open caco3_plastics.tsv
━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━
# │ importer │ shipper │ tariff_item │ name │ origin │ shipped_at │ arrived_at │ net_weight │ fob_price │ cif_price │ cif_per_net_ # │ importer │ shipper │ tariff_item │ name │ origin │ shipped_at │ arrived_at │ net_weight │ fob_price │ cif_price │ cif_per_net_
│ │ │ │ │ │ │ │ │ │ │ weight │ │ │ │ │ │ │ │ │ │ │ weight
───┼──────────────┼──────────────┼─────────────┼──────────────┼──────────┼────────────┼────────────┼────────────┼───────────┼───────────┼────────────── ───┼──────────────┼──────────────┼─────────────┼──────────────┼──────────┼────────────┼────────────┼────────────┼───────────┼───────────┼──────────────
0 │ PLASTICOS │ S A REVERTE │ 2509000000 │ CARBONATO DE │ SPAIN │ 18/03/2016 │ 17/04/2016 │ 81,000.00 │ 14,417.58 │ 18,252.34 │ 0.23 0 │ PLASTICOS │ S A REVERTE │ 2509000000 │ CARBONATO DE │ SPAIN │ 18/03/2016 │ 17/04/2016 │ 81,000.00 │ 14,417.58 │ 18,252.34 │ 0.23
│ RIVAL CIA │ │ │ CALCIO TIPO │ │ │ │ │ │ │ │ RIVAL CIA │ │ │ CALCIO TIPO │ │ │ │ │ │ │
│ LTDA │ │ │ CALCIPORE │ │ │ │ │ │ │ │ LTDA │ │ │ CALCIPORE │ │ │ │ │ │ │
│ │ │ │ 160 T AL │ │ │ │ │ │ │ │ │ │ │ 160 T AL │ │ │ │ │ │ │
1 │ MEXICHEM │ OMYA ANDINA │ 2836500000 │ CARBONATO │ COLOMBIA │ 07/07/2016 │ 10/07/2016 │ 26,000.00 │ 7,072.00 │ 8,127.18 │ 0.31 1 │ MEXICHEM │ OMYA ANDINA │ 2836500000 │ CARBONATO │ COLOMBIA │ 07/07/2016 │ 10/07/2016 │ 26,000.00 │ 7,072.00 │ 8,127.18 │ 0.31
│ ECUADOR S.A. │ S A │ │ │ │ │ │ │ │ │ │ ECUADOR S.A. │ S A │ │ │ │ │ │ │ │ │
2 │ PLASTIAZUAY │ SA REVERTE │ 2836500000 │ CARBONATO DE │ SPAIN │ 27/07/2016 │ 09/08/2016 │ 81,000.00 │ 8,100.00 │ 11,474.55 │ 0.14 2 │ PLASTIAZUAY │ SA REVERTE │ 2836500000 │ CARBONATO DE │ SPAIN │ 27/07/2016 │ 09/08/2016 │ 81,000.00 │ 8,100.00 │ 11,474.55 │ 0.14
│ SA │ │ │ CALCIO │ │ │ │ │ │ │ │ SA │ │ │ CALCIO │ │ │ │ │ │ │
3 │ PLASTICOS │ AND │ 2836500000 │ CALCIUM │ TURKEY │ 04/10/2016 │ 11/11/2016 │ 100,000.00 │ 17,500.00 │ 22,533.75 │ 0.23 3 │ PLASTICOS │ AND │ 2836500000 │ CALCIUM │ TURKEY │ 04/10/2016 │ 11/11/2016 │ 100,000.00 │ 17,500.00 │ 22,533.75 │ 0.23
│ RIVAL CIA │ ENDUSTRIYEL │ │ CARBONATE │ │ │ │ │ │ │ │ RIVAL CIA │ ENDUSTRIYEL │ │ CARBONATE │ │ │ │ │ │ │
│ LTDA │ HAMMADDELER │ │ ANADOLU │ │ │ │ │ │ │ │ LTDA │ HAMMADDELER │ │ ANADOLU │ │ │ │ │ │ │
│ │ DIS TCARET │ │ ANDCARB CT-1 │ │ │ │ │ │ │ │ │ DIS TCARET │ │ ANDCARB CT-1 │ │ │ │ │ │ │
│ │ LTD.STI. │ │ │ │ │ │ │ │ │ │ │ LTD.STI. │ │ │ │ │ │ │ │ │
4 │ QUIMICA │ SA REVERTE │ 2836500000 │ CARBONATO DE │ SPAIN │ 24/06/2016 │ 12/07/2016 │ 27,000.00 │ 3,258.90 │ 5,585.00 │ 0.21 4 │ QUIMICA │ SA REVERTE │ 2836500000 │ CARBONATO DE │ SPAIN │ 24/06/2016 │ 12/07/2016 │ 27,000.00 │ 3,258.90 │ 5,585.00 │ 0.21
│ COMERCIAL │ │ │ CALCIO │ │ │ │ │ │ │ │ COMERCIAL │ │ │ CALCIO │ │ │ │ │ │ │
│ QUIMICIAL │ │ │ │ │ │ │ │ │ │ │ QUIMICIAL │ │ │ │ │ │ │ │ │ │
│ CIA. LTDA. │ │ │ │ │ │ │ │ │ │ │ CIA. LTDA. │ │ │ │ │ │ │ │ │ │
5 │ PICA │ OMYA ANDINA │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/01/1900 │ 18/01/2016 │ 66,500.00 │ 12,635.00 │ 18,670.52 │ 0.28 5 │ PICA │ OMYA ANDINA │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/01/1900 │ 18/01/2016 │ 66,500.00 │ 12,635.00 │ 18,670.52 │ 0.28
│ PLASTICOS │ S.A │ │ CALCIO │ │ │ │ │ │ │ │ PLASTICOS │ S.A │ │ CALCIO │ │ │ │ │ │ │
│ INDUSTRIALES │ │ │ │ │ │ │ │ │ │ │ INDUSTRIALES │ │ │ │ │ │ │ │ │ │
│ C.A. │ │ │ │ │ │ │ │ │ │ │ C.A. │ │ │ │ │ │ │ │ │ │
6 │ PLASTIQUIM │ OMYA ANDINA │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/01/1900 │ 25/10/2016 │ 33,000.00 │ 6,270.00 │ 9,999.00 │ 0.30 6 │ PLASTIQUIM │ OMYA ANDINA │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/01/1900 │ 25/10/2016 │ 33,000.00 │ 6,270.00 │ 9,999.00 │ 0.30
│ S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │ │ S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │
│ │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │ │ │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │
│ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │ │ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │
│ │ │ │ ESTEARICO │ │ │ │ │ │ │ │ │ │ │ ESTEARICO │ │ │ │ │ │ │
│ │ │ │ OMYA CARB 1T │ │ │ │ │ │ │ │ │ │ │ OMYA CARB 1T │ │ │ │ │ │ │
│ │ │ │ CG BBS 1000 │ │ │ │ │ │ │ │ │ │ │ CG BBS 1000 │ │ │ │ │ │ │
7 │ QUIMICOS │ SIBELCO │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/11/2016 │ 03/11/2016 │ 52,000.00 │ 8,944.00 │ 13,039.05 │ 0.25 7 │ QUIMICOS │ SIBELCO │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/11/2016 │ 03/11/2016 │ 52,000.00 │ 8,944.00 │ 13,039.05 │ 0.25
│ ANDINOS │ COLOMBIA SAS │ │ CALCIO │ │ │ │ │ │ │ │ ANDINOS │ COLOMBIA SAS │ │ CALCIO │ │ │ │ │ │ │
│ QUIMANDI │ │ │ RECUBIERTO │ │ │ │ │ │ │ │ QUIMANDI │ │ │ RECUBIERTO │ │ │ │ │ │ │
│ S.A. │ │ │ │ │ │ │ │ │ │ │ S.A. │ │ │ │ │ │ │ │ │ │
8 │ TIGRE │ OMYA ANDINA │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/01/1900 │ 28/10/2016 │ 66,000.00 │ 11,748.00 │ 18,216.00 │ 0.28 8 │ TIGRE │ OMYA ANDINA │ 3824909999 │ CARBONATO DE │ COLOMBIA │ 01/01/1900 │ 28/10/2016 │ 66,000.00 │ 11,748.00 │ 18,216.00 │ 0.28
│ ECUADOR S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │ │ ECUADOR S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │
│ ECUATIGRE │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │ │ ECUATIGRE │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │
│ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │ │ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │
│ │ │ │ ESTEARICO │ │ │ │ │ │ │ │ │ │ │ ESTEARICO │ │ │ │ │ │ │
│ │ │ │ OMYACARB 1T │ │ │ │ │ │ │ │ │ │ │ OMYACARB 1T │ │ │ │ │ │ │
│ │ │ │ CG BPA 25 NO │ │ │ │ │ │ │ │ │ │ │ CG BPA 25 NO │ │ │ │ │ │ │
━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━
> open caco3_plastics.tsv | to-tsv > open caco3_plastics.tsv | to-tsv
importer shipper tariff_item name origin shipped_at arrived_at net_weight fob_price cif_price cif_per_net_weight importer shipper tariff_item name origin shipped_at arrived_at net_weight fob_price cif_price cif_per_net_weight

View File

@ -7,28 +7,28 @@ Converts table data into url-formatted text.
```shell ```shell
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼──────────────────────── ───┼───┼────────────┼────────────────────────
0 │ X │ filesystem │ /home/shaurya 0 │ X │ filesystem │ /home/shaurya
1 │ │ filesystem │ /home/shaurya/Pictures 1 │ │ filesystem │ /home/shaurya/Pictures
2 │ │ filesystem │ /home/shaurya/Desktop 2 │ │ filesystem │ /home/shaurya/Desktop
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
> shells | to-url > shells | to-url
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# │ value # │ value
───┼─────────────────────────────────────────────────────── ───┼───────────────────────────────────────────────────────
0 │ +=X&name=filesystem&path=%2Fhome%2Fshaurya 0 │ +=X&name=filesystem&path=%2Fhome%2Fshaurya
1 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FPictures 1 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FPictures
2 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FDesktop 2 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FDesktop
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` ```
```shell ```shell
> open sample.url > open sample.url
━━━━━━━━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━ ━━━━━━━━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━
bread │ cheese │ meat │ fat bread │ cheese │ meat │ fat
──────────┼────────┼──────┼──────── ──────────┼────────┼──────┼────────
baguette │ comté │ ham │ butter baguette │ comté │ ham │ butter
━━━━━━━━━━┷━━━━━━━━┷━━━━━━┷━━━━━━━━ ━━━━━━━━━━┷━━━━━━━━┷━━━━━━┷━━━━━━━━
> open sample.url | to-url > open sample.url | to-url
bread=baguette&cheese=comt%C3%A9&meat=ham&fat=butter bread=baguette&cheese=comt%C3%A9&meat=ham&fat=butter

View File

@ -7,11 +7,11 @@ Converts table data into yaml text.
```shell ```shell
> shells > shells
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
# │ │ name │ path # │ │ name │ path
───┼───┼────────────┼──────────────────────── ───┼───┼────────────┼────────────────────────
0 │ X │ filesystem │ /home/shaurya 0 │ X │ filesystem │ /home/shaurya
1 │ │ filesystem │ /home/shaurya/Pictures 1 │ │ filesystem │ /home/shaurya/Pictures
2 │ │ filesystem │ /home/shaurya/Desktop 2 │ │ filesystem │ /home/shaurya/Desktop
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━ ━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
> shells | to-yaml > shells | to-yaml
--- ---
@ -27,11 +27,11 @@ Converts table data into yaml text.
``` ```
```shell ```shell
> open appveyor.yml > open appveyor.yml
━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━
image │ environment │ install │ build │ test_script │ cache image │ environment │ install │ build │ test_script │ cache
────────────────────┼────────────────┼─────────────────┼───────┼─────────────────┼───────────────── ────────────────────┼────────────────┼─────────────────┼───────┼─────────────────┼─────────────────
Visual Studio 2017 │ [table: 1 row] │ [table: 5 rows] │ │ [table: 2 rows] │ [table: 2 rows] Visual Studio 2017 │ [table: 1 row] │ [table: 5 rows] │ │ [table: 2 rows] │ [table: 2 rows]
━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━
> open appveyor.yml | to-yaml > open appveyor.yml | to-yaml
--- ---

View File

@ -2,13 +2,13 @@
Outputs the nushell version. Outputs the nushell version.
## Examples ## Examples
```shell ```shell
> version > version
━━━━━━━━━ ━━━━━━━━━
version version
───────── ─────────
0.6.0 0.6.0
━━━━━━━━━ ━━━━━━━━━
``` ```

View File

@ -40,51 +40,51 @@ Where with the form `| where readonly` is used to check boolean values. For exam
> [input-command] | where [condition] > [input-command] | where [condition]
``` ```
## Examples ## Examples
```shell ```shell
> ls | where size > 4kb > ls | where size > 4kb
━━━┯━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━
# │ name │ type │ size │ created │ accessed │ modified # │ name │ type │ size │ created │ accessed │ modified
───┼────────────┼──────┼─────────┼─────────────┼─────────────┼───────────── ───┼────────────┼──────┼─────────┼─────────────┼─────────────┼─────────────
0 │ Cargo.lock │ File │ 87.2 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago 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 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 2 │ Cargo.toml │ File │ 4.7 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago
━━━┷━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
``` ```
```shell ```shell
> ps | where cpu > 0 > ps | where cpu > 0
━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━ ━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
# │ pid │ name │ status │ cpu # │ pid │ name │ status │ cpu
───┼───────┼───────────────────────┼──────────┼─────────────────── ───┼───────┼───────────────────────┼──────────┼───────────────────
0 │ 1546 │ Xorg │ Sleeping │ 10.65405000000000 0 │ 1546 │ Xorg │ Sleeping │ 10.65405000000000
1 │ 1769 │ gnome-shell │ Sleeping │ 5.271094000000000 1 │ 1769 │ gnome-shell │ Sleeping │ 5.271094000000000
2 │ 2153 │ gnome-terminal-server │ Sleeping │ 5.193664000000000 2 │ 2153 │ gnome-terminal-server │ Sleeping │ 5.193664000000000
3 │ 13556 │ nu_plugin_ps │ Sleeping │ 40.70250000000000 3 │ 13556 │ nu_plugin_ps │ Sleeping │ 40.70250000000000
━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━ ━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
``` ```
```shell ```shell
> ls | where accessed <= 1w > ls | where accessed <= 1w
━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━ ━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━
# │ name │ type │ size │ accessed │ modified # │ name │ type │ size │ accessed │ modified
───┼───────────────┼───────────┼──────────┼────────────┼──────────── ───┼───────────────┼───────────┼──────────┼────────────┼────────────
0 │ Cargo.toml │ File │ 4.7 KB │ 2 days ago │ 2 days ago 0 │ Cargo.toml │ File │ 4.7 KB │ 2 days ago │ 2 days ago
1 │ target │ Directory │ 4.1 KB │ 2 days ago │ 2 days ago 1 │ target │ Directory │ 4.1 KB │ 2 days ago │ 2 days ago
2 │ Makefile.toml │ File │ 449 B │ 4 days ago │ 4 days ago 2 │ Makefile.toml │ File │ 449 B │ 4 days ago │ 4 days ago
3 │ README.md │ File │ 19.5 KB │ 2 days ago │ 2 days ago 3 │ README.md │ File │ 19.5 KB │ 2 days ago │ 2 days ago
4 │ Cargo.lock │ File │ 170.7 KB │ 2 days ago │ 2 days ago 4 │ Cargo.lock │ File │ 170.7 KB │ 2 days ago │ 2 days ago
5 │ crates │ Directory │ 4.1 KB │ 2 days ago │ 2 days ago 5 │ crates │ Directory │ 4.1 KB │ 2 days ago │ 2 days ago
6 │ TODO.md │ File │ 1.3 KB │ 2 days ago │ 2 days ago 6 │ TODO.md │ File │ 1.3 KB │ 2 days ago │ 2 days ago
━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━ ━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━
``` ```
```shell ```shell
> ls | where name =~ "yml" > ls | where name =~ "yml"
━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━ ━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━
name │ type │ size │ accessed │ modified name │ type │ size │ accessed │ modified
─────────────┼──────┼───────┼────────────┼──────────── ─────────────┼──────┼───────┼────────────┼────────────
.gitpod.yml │ File │ 780 B │ a week ago │ a week ago .gitpod.yml │ File │ 780 B │ a week ago │ a week ago
━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━ ━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━
``` ```