mirror of
https://github.com/nushell/nushell.git
synced 2024-11-24 09:23:38 +01:00
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:
parent
5b0b2f1ddd
commit
5ca9e12b7f
@ -59,4 +59,3 @@ steps:
|
||||
- bash: cargo fmt --all -- --check
|
||||
condition: eq(variables['style'], 'fmt')
|
||||
displayName: Lint
|
||||
|
||||
|
@ -38,7 +38,7 @@ workflows:
|
||||
extra_build_args: --cache-from=quay.io/nushell/nu-base:devel
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
ignore:
|
||||
- master
|
||||
before_build:
|
||||
- pull_cache
|
||||
|
54
README.md
54
README.md
@ -13,15 +13,22 @@ A new type of shell.
|
||||
|
||||
# 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
|
||||
|
||||
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.
|
||||
|
||||
@ -107,11 +114,18 @@ The second container is a bit smaller if the size is important to you.
|
||||
|
||||
# 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
|
||||
|
||||
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 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
|
||||
```
|
||||
|
||||
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
|
||||
/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
|
||||
|
||||
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
|
||||
@ -210,19 +227,26 @@ To set one of these variables, you can use `config --set`. For example:
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
|
||||
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
|
||||
|
||||
@ -240,9 +264,9 @@ Nu adheres closely to a set of goals that make up its design philosophy. As feat
|
||||
|
||||
# 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
|
||||
|
||||
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.
|
||||
|
||||
|
@ -87,8 +87,8 @@ Here are some tips to help you get started.
|
||||
* help commands - list all available commands
|
||||
* 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
|
||||
in the pipeline works together to load, parse, and display information to you.
|
||||
Nushell works on the idea of a "pipeline". Pipelines are commands connected with the '|' character.
|
||||
Each stage in the pipeline works together to load, parse, and display information to you.
|
||||
|
||||
[Examples]
|
||||
|
||||
|
@ -80,7 +80,7 @@ fn pick(
|
||||
"No data to fetch.",
|
||||
format!("Couldn't pick column \"{}\"", column),
|
||||
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)
|
||||
}
|
||||
|
||||
|
2
crates/nu-cli/src/env/environment_syncer.rs
vendored
2
crates/nu-cli/src/env/environment_syncer.rs
vendored
@ -208,7 +208,7 @@ mod tests {
|
||||
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.
|
||||
let environment = actual.env.lock();
|
||||
|
||||
|
@ -67,7 +67,7 @@ fn nested_json_structures() {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"nested_json_structures.json",
|
||||
r#"
|
||||
[
|
||||
[
|
||||
{
|
||||
"name": "this is duplicated",
|
||||
"nesting": [ { "a": "a", "b": "b" },
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
## 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`,
|
||||
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.
|
||||
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,
|
||||
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.
|
||||
@ -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'?
|
||||
```
|
||||
|
||||
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
|
||||
- [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 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.
|
||||
- [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 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)
|
||||
- [Twitter](https://twitter.com/nu_shell)
|
@ -14,7 +14,7 @@ after building the image please run container:
|
||||
|
||||
```bash
|
||||
$ docker run -td --rm --name nushell_package_ubuntu_bionic nushell/package:ubuntu-bionic
|
||||
```
|
||||
```
|
||||
|
||||
and copy deb package from inside:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# append
|
||||
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
|
||||
- if you want to add something containing a whitespace character, you need to put it in quotation marks
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# average
|
||||
This command allows you to calculate the average of values in a column.
|
||||
# average
|
||||
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.
|
||||
|
||||
```shell
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
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 :
|
||||
* binary operators: +, -, *, /, % (remainder), ^ (power)
|
||||
@ -20,8 +20,8 @@ functions :
|
||||
constants:
|
||||
* pi
|
||||
* e
|
||||
|
||||
## Examples -
|
||||
|
||||
## Examples -
|
||||
|
||||
```
|
||||
> echo "1+2+3" | calc
|
||||
@ -53,62 +53,62 @@ constants:
|
||||
```
|
||||
❯ open abc.json
|
||||
───┬──────
|
||||
# │ size
|
||||
# │ size
|
||||
───┼──────
|
||||
0 │ 816
|
||||
1 │ 1627
|
||||
2 │ 1436
|
||||
3 │ 1573
|
||||
4 │ 935
|
||||
5 │ 52
|
||||
6 │ 999
|
||||
7 │ 1639
|
||||
0 │ 816
|
||||
1 │ 1627
|
||||
2 │ 1436
|
||||
3 │ 1573
|
||||
4 │ 935
|
||||
5 │ 52
|
||||
6 │ 999
|
||||
7 │ 1639
|
||||
───┴──────
|
||||
|
||||
❯ open abc.json | format "({size} + 500) * 4"
|
||||
───┬──────────────────
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
───┼──────────────────
|
||||
0 │ (816 + 500) * 4
|
||||
1 │ (1627 + 500) * 4
|
||||
2 │ (1436 + 500) * 4
|
||||
3 │ (1573 + 500) * 4
|
||||
4 │ (935 + 500) * 4
|
||||
5 │ (52 + 500) * 4
|
||||
6 │ (999 + 500) * 4
|
||||
7 │ (1639 + 500) * 4
|
||||
0 │ (816 + 500) * 4
|
||||
1 │ (1627 + 500) * 4
|
||||
2 │ (1436 + 500) * 4
|
||||
3 │ (1573 + 500) * 4
|
||||
4 │ (935 + 500) * 4
|
||||
5 │ (52 + 500) * 4
|
||||
6 │ (999 + 500) * 4
|
||||
7 │ (1639 + 500) * 4
|
||||
───┴──────────────────
|
||||
|
||||
❯ open abc.json | format "({size} + 500) * 4" | calc
|
||||
───┬───────────
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
───┼───────────
|
||||
0 │ 5264.0000
|
||||
1 │ 8508.0000
|
||||
2 │ 7744.0000
|
||||
3 │ 8292.0000
|
||||
4 │ 5740.0000
|
||||
5 │ 2208.0000
|
||||
6 │ 5996.0000
|
||||
7 │ 8556.0000
|
||||
0 │ 5264.0000
|
||||
1 │ 8508.0000
|
||||
2 │ 7744.0000
|
||||
3 │ 8292.0000
|
||||
4 │ 5740.0000
|
||||
5 │ 2208.0000
|
||||
6 │ 5996.0000
|
||||
7 │ 8556.0000
|
||||
───┴───────────
|
||||
|
||||
❯ open abc.json | format "({size} - 1000) * 4" | calc
|
||||
───┬────────────
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
───┼────────────
|
||||
0 │ -736.0000
|
||||
1 │ 2508.0000
|
||||
2 │ 1744.0000
|
||||
3 │ 2292.0000
|
||||
4 │ -260.0000
|
||||
5 │ -3792.0000
|
||||
6 │ -4.0000
|
||||
7 │ 2556.0000
|
||||
0 │ -736.0000
|
||||
1 │ 2508.0000
|
||||
2 │ 1744.0000
|
||||
3 │ 2292.0000
|
||||
4 │ -260.0000
|
||||
5 │ -3792.0000
|
||||
6 │ -4.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
|
||||
|
@ -7,7 +7,7 @@ This command allows us to filters out rows with empty columns. Other commands ar
|
||||
> [input-command] | compact [column-name]
|
||||
```
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
Let's say we have a table like this:
|
||||
|
||||
|
@ -7,42 +7,42 @@ This command counts the number of rows in a table.
|
||||
```shell
|
||||
> 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
|
||||
1 │ aur │ Directory │ │ 4.1 KB │ 4 hours ago │ 4 hours ago │ 4 hours 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
|
||||
...
|
||||
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
|
||||
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
|
||||
━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
|
||||
> ls | count
|
||||
━━━━━━━━━
|
||||
<value>
|
||||
<value>
|
||||
─────────
|
||||
77
|
||||
77
|
||||
━━━━━━━━━
|
||||
> ls | get name | count
|
||||
━━━━━━━━━
|
||||
<value>
|
||||
<value>
|
||||
─────────
|
||||
77
|
||||
77
|
||||
━━━━━━━━━
|
||||
> ls | where type == File | count
|
||||
━━━━━━━━━
|
||||
<value>
|
||||
<value>
|
||||
─────────
|
||||
29
|
||||
29
|
||||
━━━━━━━━━
|
||||
> ls | where type == Directory | count
|
||||
━━━━━━━━━
|
||||
<value>
|
||||
<value>
|
||||
─────────
|
||||
48
|
||||
48
|
||||
━━━━━━━━━
|
||||
> ls | where size > 2KB | count
|
||||
━━━━━━━━━
|
||||
<value>
|
||||
<value>
|
||||
─────────
|
||||
57
|
||||
57
|
||||
━━━━━━━━━
|
||||
```
|
||||
|
@ -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.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```
|
||||
❯ ls | first 2 | debug
|
||||
───┬──────────────────────────────────────────
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
───┼──────────────────────────────────────────
|
||||
0 │ (name=".azure"
|
||||
│ type="Dir"
|
||||
│ size=nothing
|
||||
│ modified=2020-02-09T05:31:39.950305440Z((B
|
||||
│ mdate))
|
||||
1 │ (name=".cargo"
|
||||
│ type="Dir"
|
||||
│ size=nothing
|
||||
│ modified=2020-01-06T05:45:30.933303081Z((B
|
||||
│ mdate))
|
||||
0 │ (name=".azure"
|
||||
│ type="Dir"
|
||||
│ size=nothing
|
||||
│ modified=2020-02-09T05:31:39.950305440Z((B
|
||||
│ mdate))
|
||||
1 │ (name=".cargo"
|
||||
│ type="Dir"
|
||||
│ size=nothing
|
||||
│ modified=2020-01-06T05:45:30.933303081Z((B
|
||||
│ mdate))
|
||||
───┴──────────────────────────────────────────
|
||||
❯ ls | last 8 | get type | debug
|
||||
───┬─────────
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
───┼─────────
|
||||
0 │ "Dir"
|
||||
1 │ "Dir"
|
||||
2 │ "File"
|
||||
3 │ "Dir"
|
||||
4 │ "File"
|
||||
5 │ "Dir"
|
||||
6 │ "Dir"
|
||||
7 │ "Dir"
|
||||
0 │ "Dir"
|
||||
1 │ "Dir"
|
||||
2 │ "File"
|
||||
3 │ "Dir"
|
||||
4 │ "File"
|
||||
5 │ "Dir"
|
||||
6 │ "Dir"
|
||||
7 │ "Dir"
|
||||
───┴─────────
|
||||
❯ open --raw Cargo.toml | size | debug
|
||||
(lines=271 words=955 chars=7855 max length=7856)
|
||||
|
@ -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]
|
||||
```
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
Let's say we have a table like this:
|
||||
|
||||
|
@ -7,20 +7,20 @@
|
||||
```shell
|
||||
> 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
|
||||
───┬──────────────┬──────────┬──────────┬─────────────────┬────────────────
|
||||
# │ 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
|
||||
───┬──────────┬──────────┬──────────
|
||||
# │ path │ apparent │ physical
|
||||
# │ path │ apparent │ physical
|
||||
───┼──────────┼──────────┼──────────
|
||||
0 │ build.rs │ 78 B │ 4.1 KB
|
||||
0 │ build.rs │ 78 B │ 4.1 KB
|
||||
───┴──────────┴──────────┴──────────
|
||||
```
|
@ -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.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
> 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
|
||||
1 │ coww.txt │ File │ │ 24 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
|
||||
4 │ youshouldeatmorecereal.txt │ File │ │ 768 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
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 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
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━
|
||||
> 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
|
||||
1 │ coww.txt │ File │ │ 24 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
|
||||
4 │ youshouldeatmorecereal.txt │ File │ │ 768 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
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 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
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼────────────────────────────────
|
||||
0 │ X │ filesystem │ /home/username/stuff/expr/stuff
|
||||
1 │ │ filesystem │ /
|
||||
0 │ X │ filesystem │ /home/username/stuff/expr/stuff
|
||||
1 │ │ filesystem │ /
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> shells | edit " " X | edit path /
|
||||
> shells | edit " " X | edit path /
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼──────
|
||||
0 │ X │ filesystem │ /
|
||||
1 │ X │ filesystem │ /
|
||||
0 │ X │ filesystem │ /
|
||||
1 │ X │ filesystem │ /
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all of them.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
> exit
|
||||
@ -11,19 +11,19 @@ Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all
|
||||
```
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼─────────────────────────────────────
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ │ filesystem │ /home
|
||||
2 │ X │ filesystem │ /usr
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ │ filesystem │ /home
|
||||
2 │ X │ filesystem │ /usr
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> exit
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼─────────────────────────────────────
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ X │ filesystem │ /home
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ X │ filesystem │ /home
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> exit --now
|
||||
exits both the shells
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 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
|
||||
|
||||
@ -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
|
||||
> mv pets.txt pets.csv
|
||||
|
@ -26,8 +26,8 @@ Syntax: `from-json {flags}`
|
||||
```shell
|
||||
> open command_from-json | from-json
|
||||
━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━
|
||||
title │ type │ flags
|
||||
title │ type │ flags
|
||||
───────────┼─────────┼───────
|
||||
from-json │ command │ Yes
|
||||
from-json │ command │ Yes
|
||||
━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━
|
||||
```
|
@ -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.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
```sh
|
||||
> open abc.ods
|
||||
─────────────────
|
||||
Sheet1
|
||||
Sheet1
|
||||
─────────────────
|
||||
[table 26 rows]
|
||||
[table 26 rows]
|
||||
─────────────────
|
||||
> open abc.ods --raw
|
||||
Length: 4816 (0x12d0) bytes
|
||||
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
|
||||
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
|
||||
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...`.....
|
||||
> open abc.ods --raw | from-ods
|
||||
─────────────────
|
||||
Sheet1
|
||||
Sheet1
|
||||
─────────────────
|
||||
[table 26 rows]
|
||||
[table 26 rows]
|
||||
─────────────────
|
||||
```
|
||||
|
@ -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.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
```sh
|
||||
> open abc.xlsx
|
||||
─────────────────
|
||||
Sheet1
|
||||
Sheet1
|
||||
─────────────────
|
||||
[table 26 rows]
|
||||
[table 26 rows]
|
||||
─────────────────
|
||||
> open abc.xlsx --raw
|
||||
Length: 6344 (0x18c8) bytes
|
||||
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
|
||||
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
|
||||
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.....
|
||||
> open abc.xlsx --raw | from-xlsx
|
||||
─────────────────
|
||||
Sheet1
|
||||
Sheet1
|
||||
─────────────────
|
||||
[table 26 rows]
|
||||
[table 26 rows]
|
||||
─────────────────
|
||||
```
|
||||
|
@ -5,39 +5,39 @@ Open given cells as text.
|
||||
Syntax: `get ...args`
|
||||
|
||||
### Parameters:
|
||||
|
||||
|
||||
* `args`: optionally return additional data by path
|
||||
|
||||
## 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
|
||||
> 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]
|
||||
users] │ ghz] │ │ │ │ │
|
||||
[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] │ │ │ │ │
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
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
|
||||
> 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
|
||||
> 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
|
||||
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 │ │ │
|
||||
1 │ │ │ │ │ SMP │ L14M2P21 │ 16.94503000000000
|
||||
0 │ 4 │ 1.500000000000000 │ 0.5000000000000000 │ 3.500000000000000 │ │ │
|
||||
1 │ │ │ │ │ SMP │ L14M2P21 │ 16.94503000000000
|
||||
━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
|
||||
```
|
@ -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:
|
||||
|
||||
```shell
|
||||
|
@ -1,7 +1,7 @@
|
||||
# help
|
||||
|
||||
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.
|
||||
|
||||
## Examples
|
||||
@ -20,19 +20,19 @@ You can also learn more at https://www.nushell.sh/book/
|
||||
```shell
|
||||
> help commands
|
||||
━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ name │ description
|
||||
# │ name │ description
|
||||
────┼──────────────┼────────────────────────────────────────────────────────────────────────────────────────
|
||||
0 │ add │ Add a new field to the table.
|
||||
1 │ autoview │ View the contents of the pipeline as a table or list.
|
||||
2 │ cd │ Change to a new path.
|
||||
3 │ config │ Configuration management.
|
||||
4 │ cp │ Copy files.
|
||||
5 │ date │ Get the current datetime.
|
||||
0 │ add │ Add a new field to the table.
|
||||
1 │ autoview │ View the contents of the pipeline as a table or list.
|
||||
2 │ cd │ Change to a new path.
|
||||
3 │ config │ Configuration management.
|
||||
4 │ cp │ Copy files.
|
||||
5 │ date │ Get the current datetime.
|
||||
...
|
||||
70 │ trim │ Trim leading and following whitespace from text data.
|
||||
71 │ version │ Display Nu version
|
||||
72 │ where │ Filter table to match the condition.
|
||||
73 │ which │ Finds a program file.
|
||||
70 │ trim │ Trim leading and following whitespace from text data.
|
||||
71 │ version │ Display Nu version
|
||||
72 │ where │ Filter table to match the condition.
|
||||
73 │ which │ Finds a program 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_numbers2.csv
|
||||
━━━━┯━━━━━━━━━━━━━━━━
|
||||
# │ random numbers
|
||||
# │ random numbers
|
||||
────┼────────────────
|
||||
0 │ 0
|
||||
1 │ 5
|
||||
2 │ 5
|
||||
0 │ 0
|
||||
1 │ 5
|
||||
2 │ 5
|
||||
...
|
||||
47 │ 0
|
||||
48 │ 2
|
||||
49 │ 4
|
||||
47 │ 0
|
||||
48 │ 2
|
||||
49 │ 4
|
||||
━━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
@ -36,30 +36,30 @@ If we now want to see how often the different numbers were generated, we can use
|
||||
```shell
|
||||
> open random_numbers2.csv | histogram "random numbers"
|
||||
━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ random numbers │ frequency
|
||||
# │ random numbers │ frequency
|
||||
───┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
0 │ 0 │ ****************************************************************************************************
|
||||
1 │ 1 │ ******************************
|
||||
2 │ 2 │ *************************************************************
|
||||
3 │ 3 │ *********************************************************************
|
||||
4 │ 4 │ *****************************************************
|
||||
5 │ 5 │ *********************************************************************
|
||||
0 │ 0 │ ****************************************************************************************************
|
||||
1 │ 1 │ ******************************
|
||||
2 │ 2 │ *************************************************************
|
||||
3 │ 3 │ *********************************************************************
|
||||
4 │ 4 │ *****************************************************
|
||||
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
|
||||
> open random_numbers2.csv | histogram "random numbers" probability
|
||||
━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ random numbers │ probability
|
||||
# │ random numbers │ probability
|
||||
───┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
0 │ 0 │ ****************************************************************************************************
|
||||
1 │ 1 │ ******************************
|
||||
2 │ 2 │ *************************************************************
|
||||
3 │ 3 │ *********************************************************************
|
||||
4 │ 4 │ *****************************************************
|
||||
5 │ 5 │ *********************************************************************
|
||||
0 │ 0 │ ****************************************************************************************************
|
||||
1 │ 1 │ ******************************
|
||||
2 │ 2 │ *************************************************************
|
||||
3 │ 3 │ *********************************************************************
|
||||
4 │ 4 │ *****************************************************
|
||||
5 │ 5 │ *********************************************************************
|
||||
━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
```
|
||||
@ -67,14 +67,14 @@ We can also set the name of the second column or sort the table:
|
||||
```shell
|
||||
> open random_numbers2.csv | histogram "random numbers" probability | sort-by probability
|
||||
━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ random numbers │ probability
|
||||
# │ random numbers │ probability
|
||||
───┼────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
0 │ 1 │ ******************************
|
||||
1 │ 4 │ *****************************************************
|
||||
2 │ 2 │ *************************************************************
|
||||
3 │ 3 │ *********************************************************************
|
||||
4 │ 5 │ *********************************************************************
|
||||
5 │ 0 │ ****************************************************************************************************
|
||||
0 │ 1 │ ******************************
|
||||
1 │ 4 │ *****************************************************
|
||||
2 │ 2 │ *************************************************************
|
||||
3 │ 3 │ *********************************************************************
|
||||
4 │ 5 │ *********************************************************************
|
||||
5 │ 0 │ ****************************************************************************************************
|
||||
━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
```
|
@ -7,11 +7,11 @@ Displays the last 100 commands.
|
||||
```shell
|
||||
> history
|
||||
━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
────┼───────────────────────────────────────────────────────────────────────────
|
||||
...
|
||||
97 │ ls
|
||||
98 │ ls | where accessed < 1d
|
||||
99 │ cd
|
||||
97 │ ls
|
||||
98 │ ls | where accessed < 1d
|
||||
99 │ cd
|
||||
━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
@ -7,15 +7,15 @@ This command increments the value of variable by one.
|
||||
```shell
|
||||
> open rustfmt.toml
|
||||
━━━━━━━━━
|
||||
edition
|
||||
edition
|
||||
─────────
|
||||
2018
|
||||
2018
|
||||
━━━━━━━━━
|
||||
> open rustfmt.toml | inc edition
|
||||
━━━━━━━━━
|
||||
edition
|
||||
edition
|
||||
─────────
|
||||
2019
|
||||
2019
|
||||
━━━━━━━━━
|
||||
```
|
||||
|
||||
|
@ -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.
|
||||
|
||||
@ -7,22 +7,22 @@ This command adds a column to any table output. The first parameter takes the he
|
||||
```shell
|
||||
> 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
|
||||
1 │ coww.txt │ File │ │ 24 B │ a day ago │ a day ago │ yes_obviously
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 B │ a day ago │ a day ago │ yes_obviously
|
||||
3 │ abaracadabra.txt │ File │ │ 401 B │ a day ago │ a day ago │ yes_obviously
|
||||
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ a day ago │ yes_obviously
|
||||
0 │ zeusiscrazy.txt │ File │ │ 556 B │ a day ago │ a day ago │ yes_obviously
|
||||
1 │ coww.txt │ File │ │ 24 B │ a day ago │ a day ago │ yes_obviously
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 B │ a day ago │ a day ago │ yes_obviously
|
||||
3 │ abaracadabra.txt │ File │ │ 401 B │ a day ago │ a day ago │ yes_obviously
|
||||
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a day ago │ a day ago │ yes_obviously
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> 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
|
||||
1 │ │ filesystem │ / │ linux_on_this_machine
|
||||
0 │ X │ filesystem │ /home/shaurya/stuff/expr/stuff │ linux_on_this_machine
|
||||
1 │ │ filesystem │ / │ linux_on_this_machine
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
@ -6,16 +6,16 @@ This command takes a string from a pipeline as input, and returns a table where
|
||||
> [input-command] | lines
|
||||
```
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
Basic usage:
|
||||
```shell
|
||||
> printf "Hello\nWorld!\nLove, nushell." | lines
|
||||
━━━┯━━━━━━━━━━━━━━━━
|
||||
# │ value
|
||||
# │ value
|
||||
───┼────────────────
|
||||
0 │ Hello
|
||||
1 │ World!
|
||||
2 │ Love, nushell.
|
||||
0 │ Hello
|
||||
1 │ World!
|
||||
2 │ Love, nushell.
|
||||
━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 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.
|
||||
|
||||
### Usage
|
||||
@ -15,27 +15,27 @@ If the number given is less than 0 or more than the number of rows, nothing is r
|
||||
```shell
|
||||
> 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
|
||||
1 │ .git │ Directory │ │ 4.1 KB │ 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
|
||||
0 │ Cargo.toml │ File │ │ 239 B │ 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
|
||||
3 │ src │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago
|
||||
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
|
||||
|
||||
> 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
|
||||
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
|
||||
# │ name │ type │ readonly │ size │ accessed │ modified
|
||||
# │ name │ type │ readonly │ size │ accessed │ modified
|
||||
───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
|
||||
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
|
||||
2 │ .gitignore │ File │ │ 19 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
|
||||
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
|
||||
|
||||
> ls | nth 5
|
||||
|
@ -7,47 +7,47 @@ This command displays only the column names passed on to it.
|
||||
```shell
|
||||
> 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
1 │ coww.txt
|
||||
2 │ randomweirdstuff.txt
|
||||
3 │ abaracadabra.txt
|
||||
4 │ youshouldeatmorecereal.txt
|
||||
0 │ zeusiscrazy.txt
|
||||
1 │ coww.txt
|
||||
2 │ randomweirdstuff.txt
|
||||
3 │ abaracadabra.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
|
||||
> ls | pick type name size
|
||||
━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━
|
||||
# │ type │ name │ size
|
||||
# │ type │ name │ size
|
||||
───┼──────┼────────────────────────────┼────────
|
||||
0 │ File │ zeusiscrazy.txt │ 556 B
|
||||
1 │ File │ coww.txt │ 24 B
|
||||
2 │ File │ randomweirdstuff.txt │ 197 B
|
||||
3 │ File │ abaracadabra.txt │ 401 B
|
||||
4 │ File │ youshouldeatmorecereal.txt │ 768 B
|
||||
0 │ File │ zeusiscrazy.txt │ 556 B
|
||||
1 │ File │ coww.txt │ 24 B
|
||||
2 │ File │ randomweirdstuff.txt │ 197 B
|
||||
3 │ File │ abaracadabra.txt │ 401 B
|
||||
4 │ File │ youshouldeatmorecereal.txt │ 768 B
|
||||
━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━
|
||||
> ls | pick size type name
|
||||
━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ size │ type │ name
|
||||
# │ size │ type │ name
|
||||
───┼────────┼──────┼────────────────────────────
|
||||
0 │ 556 B │ File │ zeusiscrazy.txt
|
||||
1 │ 24 B │ File │ coww.txt
|
||||
2 │ 197 B │ File │ randomweirdstuff.txt
|
||||
3 │ 401 B │ File │ abaracadabra.txt
|
||||
4 │ 768 B │ File │ youshouldeatmorecereal.txt
|
||||
0 │ 556 B │ File │ zeusiscrazy.txt
|
||||
1 │ 24 B │ File │ coww.txt
|
||||
2 │ 197 B │ File │ randomweirdstuff.txt
|
||||
3 │ 401 B │ File │ abaracadabra.txt
|
||||
4 │ 768 B │ File │ youshouldeatmorecereal.txt
|
||||
━━━┷━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
# prepend
|
||||
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
|
||||
- if you want to add something containing a whitespace character, you need to put it in quotation marks
|
||||
|
||||
|
@ -2,37 +2,37 @@
|
||||
|
||||
This command removes or rejects the columns passed to it.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
> 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a month ago │ a month ago │ a month ago
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
|
||||
> 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
4 │ youshouldeatmorecereal.txt │ File │ 768 B │ a month ago │ a month ago │ a month ago
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
|
||||
> 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
|
||||
1 │ coww.txt │ File │ 24 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
|
||||
4 │ youshouldeatmorecereal.txt │ File │ 768 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
|
||||
2 │ randomweirdstuff.txt │ File │ 197 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
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
|
||||
```
|
||||
|
@ -1,51 +1,51 @@
|
||||
# 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
|
||||
> 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
|
||||
1 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 17 minutes ago
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago
|
||||
3 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 30 seconds ago │ now
|
||||
4 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 18 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
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 minutes ago
|
||||
3 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 30 seconds ago │ now
|
||||
4 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 18 minutes ago
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
> 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
|
||||
1 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ 39 seconds ago │ 18 seconds 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
|
||||
4 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 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
|
||||
2 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 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
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> 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
|
||||
1 │ randomweirdstuff.txt │ File │ │ 197 B │ 21 minutes ago │ 18 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
|
||||
4 │ youshouldeatmorecereal.txt │ File │ │ 768 B │ a minute ago │ 26 seconds 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
|
||||
2 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 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
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
> 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
|
||||
1 │ zeusiscrazy.txt │ File │ │ 556 B │ 22 minutes ago │ 19 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
|
||||
4 │ coww.txt │ File │ │ 24 B │ 22 minutes ago │ 18 minutes 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
|
||||
2 │ abaracadabra.txt │ File │ │ 401 B │ 23 minutes ago │ 16 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
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
@ -7,20 +7,20 @@ Lists all the active nu shells with a number/index, a name and the path. Also ma
|
||||
```
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼─────────────────────────────────────
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ │ filesystem │ /usr
|
||||
2 │ X │ filesystem │ /home
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ │ filesystem │ /usr
|
||||
2 │ X │ filesystem │ /home
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```
|
||||
/> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼──────────────────────────────────────────────────┼─────────────────────────────────────
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ X │ {/home/jonathanturner/Source/nushell/Cargo.toml} │ /
|
||||
0 │ │ filesystem │ /home/jonathanturner/Source/nushell
|
||||
1 │ X │ {/home/jonathanturner/Source/nushell/Cargo.toml} │ /
|
||||
━━━┷━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
@ -7,14 +7,14 @@ This commands gives word count statistics on any text.
|
||||
```shell
|
||||
> 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
|
||||
━━━━━━━┯━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━
|
||||
lines │ words │ chars │ max length
|
||||
lines │ words │ chars │ max length
|
||||
───────┼───────┼────────┼────────────
|
||||
8935 │ 62352 │ 349459 │ 361771
|
||||
8935 │ 62352 │ 349459 │ 361771
|
||||
━━━━━━━┷━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━
|
||||
```
|
||||
|
@ -1,56 +1,56 @@
|
||||
|
||||
# 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 -
|
||||
|
||||
```shell
|
||||
```shell
|
||||
/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
|
||||
1 │ a │ File │ │ 18 B │ 4 minutes ago │ 38 minutes ago
|
||||
2 │ ad │ 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
|
||||
5 │ c │ File │ │ 102 B │ 35 minutes ago │ 35 minutes ago
|
||||
6 │ d │ File │ │ 189 B │ 35 minutes ago │ 34 minutes ago
|
||||
7 │ b │ File │ │ 349 B │ 35 minutes ago │ 35 minutes ago
|
||||
0 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
|
||||
1 │ a │ File │ │ 18 B │ 4 minutes ago │ 38 minutes ago
|
||||
2 │ ad │ 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
|
||||
5 │ c │ File │ │ 102 B │ 35 minutes ago │ 35 minutes ago
|
||||
6 │ d │ File │ │ 189 B │ 35 minutes ago │ 34 minutes ago
|
||||
7 │ b │ File │ │ 349 B │ 35 minutes ago │ 35 minutes ago
|
||||
━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
```shell
|
||||
/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
|
||||
1 │ ab │ 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
|
||||
4 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
|
||||
5 │ c │ File │ │ 102 B │ 36 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
|
||||
0 │ a │ File │ │ 18 B │ 4 minutes ago │ 39 minutes ago
|
||||
1 │ ab │ 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
|
||||
4 │ az │ File │ │ 18 B │ 4 minutes ago │ 4 minutes ago
|
||||
5 │ c │ File │ │ 102 B │ 36 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
|
||||
```
|
||||
|
||||
```
|
||||
/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
|
||||
1 │ c │ File │ │ 102 B │ 37 minutes ago │ 37 minutes ago
|
||||
2 │ d │ File │ │ 189 B │ 37 minutes ago │ 36 minutes ago
|
||||
3 │ a │ File │ │ 18 B │ 6 minutes ago │ 40 minutes ago
|
||||
4 │ ab │ 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
|
||||
7 │ az │ File │ │ 18 B │ 5 minutes ago │ 5 minutes ago
|
||||
0 │ b │ File │ │ 349 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
|
||||
3 │ a │ File │ │ 18 B │ 6 minutes ago │ 40 minutes ago
|
||||
4 │ ab │ 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
|
||||
7 │ az │ File │ │ 18 B │ 5 minutes ago │ 5 minutes ago
|
||||
━━━┷━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||
```
|
@ -6,7 +6,7 @@ Syntax: `split-column <separator> ...args{flags}`
|
||||
|
||||
### 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` ...
|
||||
|
||||
### Flags
|
||||
@ -36,18 +36,18 @@ We can build a table from it using the `split-column` command
|
||||
```shell
|
||||
> open coordinates.txt | lines | split-column " | "
|
||||
━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━
|
||||
# │ Column1 │ Column2 │ Column3
|
||||
# │ Column1 │ Column2 │ Column3
|
||||
───┼─────────────────────┼──────────────────────┼────────────────────
|
||||
0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726
|
||||
1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014
|
||||
2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602
|
||||
3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452
|
||||
4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535
|
||||
5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342
|
||||
6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068
|
||||
7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876
|
||||
8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424
|
||||
9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836
|
||||
0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726
|
||||
1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014
|
||||
2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602
|
||||
3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452
|
||||
4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535
|
||||
5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342
|
||||
6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068
|
||||
7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876
|
||||
8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424
|
||||
9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
@ -56,17 +56,17 @@ And give names to the columns
|
||||
```shell
|
||||
> open coordinates.txt | lines | split-column " | " x y z
|
||||
━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━
|
||||
# │ x │ y │ z
|
||||
# │ x │ y │ z
|
||||
───┼─────────────────────┼──────────────────────┼────────────────────
|
||||
0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726
|
||||
1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014
|
||||
2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602
|
||||
3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452
|
||||
4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535
|
||||
5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342
|
||||
6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068
|
||||
7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876
|
||||
8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424
|
||||
9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836
|
||||
0 │ 0.12643678160919541 │ 0.6851851851851852 │ 0.273972602739726
|
||||
1 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.6986301369863014
|
||||
2 │ 0.8045977011494253 │ 0.8148148148148148 │ 0.7397260273972602
|
||||
3 │ 0.28735632183908044 │ 0.09259259259259259 │ 0.547945205479452
|
||||
4 │ 0.6896551724137931 │ 0.7037037037037037 │ 1.2465753424657535
|
||||
5 │ 0.6896551724137931 │ 0.8333333333333334 │ 0.4657534246575342
|
||||
6 │ 0.9080459770114943 │ 1.3333333333333333 │ 0.4931506849315068
|
||||
7 │ 0.9310344827586207 │ 1.1296296296296295 │ 0.7123287671232876
|
||||
8 │ 0.3448275862068966 │ 0.018518518518518517 │ 0.6575342465753424
|
||||
9 │ 1.0459770114942528 │ 1.0925925925925926 │ 0.6164383561643836
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
@ -22,13 +22,13 @@ using the `split-row` command.
|
||||
```shell
|
||||
open table.txt | split-row ", "
|
||||
━━━┯━━━━━━━━━
|
||||
# │ <value>
|
||||
# │ <value>
|
||||
───┼─────────
|
||||
0 │ 4
|
||||
1 │ 0
|
||||
2 │ 2
|
||||
3 │ 0
|
||||
4 │ 7
|
||||
5 │ 8
|
||||
0 │ 4
|
||||
1 │ 0
|
||||
2 │ 2
|
||||
3 │ 0
|
||||
4 │ 7
|
||||
5 │ 8
|
||||
━━━┷━━━━━━━━━
|
||||
```
|
@ -1,7 +1,7 @@
|
||||
# sum
|
||||
This command allows you to calculate the sum of values in a column.
|
||||
# sum
|
||||
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.
|
||||
|
||||
```shell
|
||||
|
@ -7,22 +7,22 @@ Converts table data into json text.
|
||||
```shell
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼────────────────────────
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> shells | to-json
|
||||
[{" ":"X","name":"filesystem","path":"/home/shaurya"},{" ":" ","name":"filesystem","path":"/home/shaurya/Pictures"},{" ":" ","name":"filesystem","path":"/home/shaurya/Desktop"}]
|
||||
```
|
||||
|
||||
```shell
|
||||
> open sgml_description.json
|
||||
> open sgml_description.json
|
||||
━━━━━━━━━━━━━━━━
|
||||
glossary
|
||||
glossary
|
||||
────────────────
|
||||
[table: 1 row]
|
||||
[table: 1 row]
|
||||
━━━━━━━━━━━━━━━━
|
||||
> 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"}}}}}
|
||||
@ -31,9 +31,9 @@ We can also convert formats !
|
||||
```shell
|
||||
> open jonathan.xml
|
||||
━━━━━━━━━━━━━━━━
|
||||
rss
|
||||
rss
|
||||
────────────────
|
||||
[table: 1 row]
|
||||
[table: 1 row]
|
||||
━━━━━━━━━━━━━━━━
|
||||
> 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"]}]}]}]}
|
||||
|
@ -7,11 +7,11 @@ Converts table data into toml text.
|
||||
```shell
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼────────────────────────
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> shells | to-toml
|
||||
[[]]
|
||||
@ -34,9 +34,9 @@ path = "/home/shaurya/Desktop"
|
||||
```shell
|
||||
> 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
|
||||
[dependencies]
|
||||
|
@ -7,63 +7,63 @@ Converts table data into tsv text.
|
||||
```shell
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼────────────────────────
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> shells |to-tsv
|
||||
name path
|
||||
X filesystem /home/shaurya
|
||||
|
||||
|
||||
```
|
||||
|
||||
```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_
|
||||
│ │ │ │ │ │ │ │ │ │ │ weight
|
||||
# │ importer │ shipper │ tariff_item │ name │ origin │ shipped_at │ arrived_at │ net_weight │ fob_price │ cif_price │ cif_per_net_
|
||||
│ │ │ │ │ │ │ │ │ │ │ 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
|
||||
│ RIVAL CIA │ │ │ CALCIO TIPO │ │ │ │ │ │ │
|
||||
│ LTDA │ │ │ CALCIPORE │ │ │ │ │ │ │
|
||||
│ │ │ │ 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
|
||||
│ 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
|
||||
│ 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
|
||||
│ RIVAL CIA │ ENDUSTRIYEL │ │ CARBONATE │ │ │ │ │ │ │
|
||||
│ LTDA │ HAMMADDELER │ │ ANADOLU │ │ │ │ │ │ │
|
||||
│ │ DIS TCARET │ │ ANDCARB CT-1 │ │ │ │ │ │ │
|
||||
│ │ 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
|
||||
│ COMERCIAL │ │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ QUIMICIAL │ │ │ │ │ │ │ │ │ │
|
||||
│ 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
|
||||
│ PLASTICOS │ S.A │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ INDUSTRIALES │ │ │ │ │ │ │ │ │ │
|
||||
│ 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
|
||||
│ S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │
|
||||
│ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │
|
||||
│ │ │ │ ESTEARICO │ │ │ │ │ │ │
|
||||
│ │ │ │ OMYA CARB 1T │ │ │ │ │ │ │
|
||||
│ │ │ │ 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
|
||||
│ ANDINOS │ COLOMBIA SAS │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ QUIMANDI │ │ │ RECUBIERTO │ │ │ │ │ │ │
|
||||
│ 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
|
||||
│ ECUADOR S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ ECUATIGRE │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │
|
||||
│ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │
|
||||
│ │ │ │ ESTEARICO │ │ │ │ │ │ │
|
||||
│ │ │ │ OMYACARB 1T │ │ │ │ │ │ │
|
||||
│ │ │ │ CG BPA 25 NO │ │ │ │ │ │ │
|
||||
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 │ │ │ │ │ │ │
|
||||
│ LTDA │ │ │ CALCIPORE │ │ │ │ │ │ │
|
||||
│ │ │ │ 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
|
||||
│ 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
|
||||
│ 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
|
||||
│ RIVAL CIA │ ENDUSTRIYEL │ │ CARBONATE │ │ │ │ │ │ │
|
||||
│ LTDA │ HAMMADDELER │ │ ANADOLU │ │ │ │ │ │ │
|
||||
│ │ DIS TCARET │ │ ANDCARB CT-1 │ │ │ │ │ │ │
|
||||
│ │ 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
|
||||
│ COMERCIAL │ │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ QUIMICIAL │ │ │ │ │ │ │ │ │ │
|
||||
│ 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
|
||||
│ PLASTICOS │ S.A │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ INDUSTRIALES │ │ │ │ │ │ │ │ │ │
|
||||
│ 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
|
||||
│ S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │
|
||||
│ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │
|
||||
│ │ │ │ ESTEARICO │ │ │ │ │ │ │
|
||||
│ │ │ │ OMYA CARB 1T │ │ │ │ │ │ │
|
||||
│ │ │ │ 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
|
||||
│ ANDINOS │ COLOMBIA SAS │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ QUIMANDI │ │ │ RECUBIERTO │ │ │ │ │ │ │
|
||||
│ 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
|
||||
│ ECUADOR S.A. │ S.A NIT │ │ CALCIO │ │ │ │ │ │ │
|
||||
│ ECUATIGRE │ 830.027.386- │ │ RECUBIERTO │ │ │ │ │ │ │
|
||||
│ │ 6 │ │ CON ACIDO │ │ │ │ │ │ │
|
||||
│ │ │ │ ESTEARICO │ │ │ │ │ │ │
|
||||
│ │ │ │ OMYACARB 1T │ │ │ │ │ │ │
|
||||
│ │ │ │ CG BPA 25 NO │ │ │ │ │ │ │
|
||||
━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━
|
||||
> 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
|
||||
|
@ -7,28 +7,28 @@ Converts table data into url-formatted text.
|
||||
```shell
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼────────────────────────
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> shells | to-url
|
||||
━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ value
|
||||
# │ value
|
||||
───┼───────────────────────────────────────────────────────
|
||||
0 │ +=X&name=filesystem&path=%2Fhome%2Fshaurya
|
||||
1 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FPictures
|
||||
2 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FDesktop
|
||||
0 │ +=X&name=filesystem&path=%2Fhome%2Fshaurya
|
||||
1 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FPictures
|
||||
2 │ +=+&name=filesystem&path=%2Fhome%2Fshaurya%2FDesktop
|
||||
━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```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
|
||||
bread=baguette&cheese=comt%C3%A9&meat=ham&fat=butter
|
||||
|
@ -7,11 +7,11 @@ Converts table data into yaml text.
|
||||
```shell
|
||||
> shells
|
||||
━━━┯━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# │ │ name │ path
|
||||
# │ │ name │ path
|
||||
───┼───┼────────────┼────────────────────────
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
0 │ X │ filesystem │ /home/shaurya
|
||||
1 │ │ filesystem │ /home/shaurya/Pictures
|
||||
2 │ │ filesystem │ /home/shaurya/Desktop
|
||||
━━━┷━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
> shells | to-yaml
|
||||
---
|
||||
@ -27,11 +27,11 @@ Converts table data into yaml text.
|
||||
```
|
||||
|
||||
```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
|
||||
---
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
Outputs the nushell version.
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
> version
|
||||
━━━━━━━━━
|
||||
version
|
||||
version
|
||||
─────────
|
||||
0.6.0
|
||||
0.6.0
|
||||
━━━━━━━━━
|
||||
```
|
||||
|
@ -40,51 +40,51 @@ Where with the form `| where readonly` is used to check boolean values. For exam
|
||||
> [input-command] | where [condition]
|
||||
```
|
||||
|
||||
## Examples
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
> 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
|
||||
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
|
||||
0 │ Cargo.lock │ File │ 87.2 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago
|
||||
1 │ README.md │ File │ 19.5 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago
|
||||
2 │ Cargo.toml │ File │ 4.7 KB │ 7 hours ago │ 7 hours ago │ 7 hours ago
|
||||
━━━┷━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> ps | where cpu > 0
|
||||
━━━┯━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
|
||||
# │ pid │ name │ status │ cpu
|
||||
# │ pid │ name │ status │ cpu
|
||||
───┼───────┼───────────────────────┼──────────┼───────────────────
|
||||
0 │ 1546 │ Xorg │ Sleeping │ 10.65405000000000
|
||||
1 │ 1769 │ gnome-shell │ Sleeping │ 5.271094000000000
|
||||
2 │ 2153 │ gnome-terminal-server │ Sleeping │ 5.193664000000000
|
||||
3 │ 13556 │ nu_plugin_ps │ Sleeping │ 40.70250000000000
|
||||
0 │ 1546 │ Xorg │ Sleeping │ 10.65405000000000
|
||||
1 │ 1769 │ gnome-shell │ Sleeping │ 5.271094000000000
|
||||
2 │ 2153 │ gnome-terminal-server │ Sleeping │ 5.193664000000000
|
||||
3 │ 13556 │ nu_plugin_ps │ Sleeping │ 40.70250000000000
|
||||
━━━┷━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> 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
|
||||
1 │ target │ Directory │ 4.1 KB │ 2 days ago │ 2 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
|
||||
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
|
||||
6 │ TODO.md │ File │ 1.3 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
|
||||
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
|
||||
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
|
||||
6 │ TODO.md │ File │ 1.3 KB │ 2 days ago │ 2 days ago
|
||||
━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
```shell
|
||||
> 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
|
||||
━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user