Created
July 17, 2020 00:34
-
-
Save arashout/7a4c0892355dbe2c7d0d6eeab980146d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en-US"> | |
<link rel="icon" type="image/png" href="https://www.nushell.sh/images/link.png"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- Begin Jekyll SEO tag v2.5.0 --> | |
<title>Documentation | Nushell</title> | |
<meta name="generator" content="Jekyll v3.8.5" /> | |
<meta property="og:title" content="Documentation" /> | |
<meta property="og:locale" content="en_US" /> | |
<meta name="description" content="A new type of shell." /> | |
<meta property="og:description" content="A new type of shell." /> | |
<link rel="canonical" href="http://localhost:4000/documentation.html" /> | |
<meta property="og:url" content="http://localhost:4000/documentation.html" /> | |
<meta property="og:site_name" content="Nushell" /> | |
<script type="application/ld+json"> | |
{"description":"A new type of shell.","@type":"WebPage","headline":"Documentation","url":"http://localhost:4000/documentation.html","@context":"http://schema.org"}</script> | |
<!-- End Jekyll SEO tag --> | |
<link rel="stylesheet" href="/assets/css/style.css?v=1ed739368bab5f3572f597f4eb7c756725946ee0"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<script src="https://code.jquery.com/jquery-1.12.4.min.js" | |
integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script> | |
<script src="/assets/js/respond.js"></script> | |
<!--[if lt IE 9]> | |
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<!--[if lt IE 8]> | |
<link rel="stylesheet" href="/assets/css/ie.css"> | |
<![endif]--> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<div id="header"> | |
<nav> | |
<a class="nu" href="/">nu</a> | |
<a class=" active " href="/documentation.html"><span class="no-mobile">Documentation</span><span class="mobile">Docs</span></a> | |
<a class="" href="/contribute.html">Contribute</a> | |
<a class="" href="/about.html">About</a> | |
<a href="http://blog.nushell.sh">Blog</a> | |
<div class="right"> | |
<a href="/installation.html" class="button">Install<span class="no-mobile"> Nushell</span></a> | |
</div> | |
</nav> | |
</div><!-- end header --> | |
<div class="wrapper"> | |
<section> | |
<div id="title"> | |
<h1>Documentation</h1> | |
</div> | |
<p>We have a few good resources for you to get started with Nu.</p> | |
<p>At the bottom of this page you can also find quick references to the commands provided by Nu Shell if you need quick support.</p> | |
<h1 id="books">Books</h1> | |
<h2 id="nu-book">Nu Book</h2> | |
<p>You can read our <a href="https://www.nushell.sh/book">book</a> to learn more about the core concepts behind Nu. It covers the basic and contains a lot of examples which will help you to have an easy start.</p> | |
<h2 id="contributor-book">Contributor Book</h2> | |
<p>In the <a href="https://www.nushell.sh/contributor-book">contributors book</a> you can find further information. It attempts to cover the basics of how Nu works internally, to get a solid understanding. You will learn how data is treated, what kind of data types Nu supports and how you can write plugins for it.</p> | |
<h2 id="cookbook">Cookbook</h2> | |
<p><a href="https://www.nushell.sh/cookbook/">Nu Cookbook</a> is a collection of examples to help you get the most out of using Nushell. It offers multiple ways of expressing the same pipelines so you can become familiar with all the commands.</p> | |
<h1 id="quick-command-references">Quick command references</h1> | |
<style> | |
.flex-grid { | |
display: flex; | |
flex-wrap: wrap; | |
align-items: center; | |
} | |
.item { | |
border: 2px solid black; | |
border-radius: 25px; | |
margin: 5px; | |
display: flex; | |
justify-content: center; | |
min-width: 200px; | |
flex-shrink: 0; | |
} | |
.stack { | |
margin-left:auto; | |
margin-right:auto; | |
padding: 10px; | |
display: flex; | |
align-items: center; | |
flex-direction: column; | |
} | |
.row { | |
display: flex; | |
flex-direction: row; | |
align-items: center; | |
} | |
.row__item { | |
margin-left: 10px; | |
} | |
.hidden { | |
display: none; | |
} | |
</style> | |
<script> | |
function toggleVisible(divID){ | |
console.log(divID); | |
$( "#" + divID ).toggleClass( "hidden" ) | |
} | |
</script> | |
<div class="flex-grid"> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">alias</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/alias.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('alias-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="alias-usage" class="hidden"> | |
<pre class="documentation"><code>Define a shortcut for another command. | |
Usage: | |
> alias {flags} | |
Parameters: | |
the name of the alias | |
the arguments to the alias | |
the block to run as the body of the alias | |
Flags: | |
-h, --help: Display this help message | |
-s, --save: save the alias to your config | |
Examples: | |
An alias without parameters | |
> alias say-hi [] { echo 'Hello!' } | |
An alias with a single parameter | |
> alias l [x] { ls $x } | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">ansi</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('ansi-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="ansi-usage" class="hidden"> | |
<pre class="documentation"><code>Output ANSI codes to change color | |
Usage: | |
> ansi {flags} | |
Parameters: | |
the name of the color to use or 'reset' to reset the color | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Change color to green | |
> ansi green | |
Reset the color | |
> ansi reset | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">append</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/append.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('append-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="append-usage" class="hidden"> | |
<pre class="documentation"><code>Append the given row to the table | |
Usage: | |
> append {flags} | |
Parameters: | |
the value of the row to append to the table | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Add something to the end of a list or table | |
> echo [1 2 3] | append 4 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">autoenv</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('autoenv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="autoenv-usage" class="hidden"> | |
<pre class="documentation"><code>Manage directory specific environment variables and scripts. Create a file called .nu-env in any directory and run 'autoenv trust' to let nushell read it when entering the directory. | |
The file can contain several optional sections: | |
env: environment variables to set when visiting the directory. The variables are unset after leaving the directory and any overwritten values are restored. | |
scriptvars: environment variables that should be set to the return value of a script. After they have been set, they behave in the same way as variables set in the env section. | |
scripts: scripts to run when entering the directory or leaving it. Note that exitscripts are not run in the directory they are declared in. | |
Usage: | |
> autoenv {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Example .nu-env file | |
> cat .nu-env | |
[env] | |
mykey = "myvalue" | |
[scriptvars] | |
myscript = "echo myval" | |
[scripts] | |
entryscripts = ["touch hello.txt", "touch hello2.txt"] | |
exitscripts = ["touch bye.txt"] | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">autoenv trust</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('autoenv-trust-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="autoenv-trust-usage" class="hidden"> | |
<pre class="documentation"><code>Trust a .nu-env file in the current or given directory | |
Usage: | |
> autoenv trust (dir) {flags} | |
Parameters: | |
(dir) Directory to allow | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Allow .nu-env file in current directory | |
> autoenv trust | |
Allow .nu-env file in directory foo | |
> autoenv trust foo | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">autoenv untrust</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('autoenv-untrust-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="autoenv-untrust-usage" class="hidden"> | |
<pre class="documentation"><code>Untrust a .nu-env file in the current or given directory | |
Usage: | |
> autoenv untrust (dir) {flags} | |
Parameters: | |
(dir) Directory to disallow | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Disallow .nu-env file in current directory | |
> autoenv untrust | |
Disallow .nu-env file in directory foo | |
> autoenv untrust foo | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">autoview</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/autoview.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('autoview-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="autoview-usage" class="hidden"> | |
<pre class="documentation"><code>View the contents of the pipeline as a table or list. | |
Usage: | |
> autoview {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Automatically view the results | |
> ls | autoview | |
Autoview is also implied. The above can be written as | |
> ls | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">binaryview</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('binaryview-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="binaryview-usage" class="hidden"> | |
<pre class="documentation"><code>Autoview of binary data. | |
Usage: | |
> binaryview {flags} | |
Flags: | |
-h, --help: Display this help message | |
-l, --lores: use low resolution output mode | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">build-string</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('build-string-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="build-string-usage" class="hidden"> | |
<pre class="documentation"><code>Builds a string from the arguments | |
Usage: | |
> build-string ...args{flags} | |
Parameters: | |
...args: all values to form into the string | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Builds a string from a string and a number, without spaces between them | |
> build-string 'foo' 3 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">cal</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/cal.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('cal-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="cal-usage" class="hidden"> | |
<pre class="documentation"><code>Display a calendar. | |
Usage: | |
> cal {flags} | |
Flags: | |
-h, --help: Display this help message | |
-y, --year: Display the year column | |
-q, --quarter: Display the quarter column | |
-m, --month: Display the month column | |
--full-year : Display a year-long calendar for the specified year | |
--week-start : Display the calendar with the specified day as the first day of the week | |
--month-names: Display the month names instead of integers | |
Examples: | |
This month's calendar | |
> cal | |
The calendar for all of 2012 | |
> cal --full-year 2012 | |
This month's calendar with the week starting on monday | |
> cal --week-start monday | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">calc</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/calc.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('calc-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="calc-usage" class="hidden"> | |
<pre class="documentation"><code>Parse a math expression into a number | |
Usage: | |
> calc {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Calculate math in the pipeline | |
> echo '10 / 4' | calc | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">cd</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/cd.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('cd-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="cd-usage" class="hidden"> | |
<pre class="documentation"><code>Change to a new path. | |
Usage: | |
> cd (directory) {flags} | |
Parameters: | |
(directory) the directory to change to | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Change to a new directory called 'dirname' | |
> cd dirname | |
Change to your home directory | |
> cd | |
Change to your home directory (alternate version) | |
> cd ~ | |
Change to the previous directory | |
> cd - | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">char</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('char-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="char-usage" class="hidden"> | |
<pre class="documentation"><code>Output special characters (eg. 'newline') | |
Usage: | |
> ansi {flags} | |
Parameters: | |
the name of the character to output | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Output newline | |
> char newline | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">clear</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('clear-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="clear-usage" class="hidden"> | |
<pre class="documentation"><code>clears the terminal | |
Usage: | |
> clear {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Clear the screen | |
> clear | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">clip</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('clip-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="clip-usage" class="hidden"> | |
<pre class="documentation"><code>Copy the contents of the pipeline to the copy/paste buffer | |
Usage: | |
> clip {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Save text to the clipboard | |
> echo 'secret value' | clip | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">compact</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/compact.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('compact-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="compact-usage" class="hidden"> | |
<pre class="documentation"><code>Creates a table with non-empty rows | |
Usage: | |
> compact ...args{flags} | |
Parameters: | |
...args: the columns to compact from the table | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Filter out all null entries in a list | |
> echo [1 2 $null 3 $null $null] | compact | |
Filter out all directory entries having no 'target' | |
> ls -af | compact target | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">config</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/config.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-usage" class="hidden"> | |
<pre class="documentation"><code>Configuration management. | |
Usage: | |
> config {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">config clear</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-clear-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-clear-usage" class="hidden"> | |
<pre class="documentation"><code>clear the config | |
Usage: | |
> config clear {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Clear the config (be careful!) | |
> config clear | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">config get</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-get-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-get-usage" class="hidden"> | |
<pre class="documentation"><code>Gets a value from the config | |
Usage: | |
> config get {flags} | |
Parameters: | |
value to get from the config | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the current startup commands | |
> config get startup | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">config load</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-load-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-load-usage" class="hidden"> | |
<pre class="documentation"><code>Loads the config from the path given | |
Usage: | |
> config load {flags} | |
Parameters: | |
Path to load the config from | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">config path</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-path-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-path-usage" class="hidden"> | |
<pre class="documentation"><code>return the path to the config file | |
Usage: | |
> config path {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the path to the current config file | |
> config path | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">config remove</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-remove-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-remove-usage" class="hidden"> | |
<pre class="documentation"><code>Removes a value from the config | |
Usage: | |
> config remove {flags} | |
Parameters: | |
remove a value from the config | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Remove the startup commands | |
> config --remove startup | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">config set</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-set-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-set-usage" class="hidden"> | |
<pre class="documentation"><code>Sets a value in the config | |
Usage: | |
> config set {flags} | |
Parameters: | |
variable name to set | |
value to use | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Set completion_mode to circular | |
> config set [completion_mode circular] | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">config set_into</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('config-set_into-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="config-set_into-usage" class="hidden"> | |
<pre class="documentation"><code>Sets a value in the config | |
Usage: | |
> config set_into {flags} | |
Parameters: | |
sets a variable from values in the pipeline | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Store the contents of the pipeline as a path | |
> echo ['/usr/bin' '/bin'] | config set_into path | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">count</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/count.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('count-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="count-usage" class="hidden"> | |
<pre class="documentation"><code>Show the total number of rows or items. | |
Usage: | |
> count {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Count the number of entries in a list | |
> echo [1 2 3 4 5] | count | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">cp</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('cp-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="cp-usage" class="hidden"> | |
<pre class="documentation"><code>Copy files. | |
Usage: | |
> cp {flags} | |
Parameters: | |
the place to copy from | |
the place to copy to | |
Flags: | |
-h, --help: Display this help message | |
-r, --recursive: copy recursively through subdirectories | |
Examples: | |
Copy myfile to dir_b | |
> cp myfile dir_b | |
Recursively copy dir_a to dir_b | |
> cp -r dir_a dir_b | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">date</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/date.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('date-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="date-usage" class="hidden"> | |
<pre class="documentation"><code>Get the current datetime. | |
Usage: | |
> date {flags} | |
Flags: | |
-h, --help: Display this help message | |
-u, --utc: use universal time (UTC) | |
-l, --local: use the local time | |
-f, --format : report datetime in supplied strftime format | |
-r, --raw: print date without tables | |
Examples: | |
Get the current local time and date | |
> date | |
Get the current UTC time and date | |
> date --utc | |
Get the current time and date and report it based on format | |
> date --format '%Y-%m-%d %H:%M:%S.%f %z' | |
Get the current time and date and report it without a table | |
> date --format '%Y-%m-%d %H:%M:%S.%f %z' --raw | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">debug</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/debug.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('debug-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="debug-usage" class="hidden"> | |
<pre class="documentation"><code>Print the Rust debug representation of the values | |
Usage: | |
> debug {flags} | |
Flags: | |
-h, --help: Display this help message | |
-r, --raw: Prints the raw value representation. | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">default</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/default.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('default-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="default-usage" class="hidden"> | |
<pre class="documentation"><code>Sets a default row's column if missing. | |
Usage: | |
> default {flags} | |
Parameters: | |
the name of the column | |
the value of the column to default | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Give a default 'target' to all file entries | |
> ls -af | default target 'nothing' | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">describe</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('describe-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="describe-usage" class="hidden"> | |
<pre class="documentation"><code>Describes the objects in the stream. | |
Usage: | |
> describe {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">do</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('do-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="do-usage" class="hidden"> | |
<pre class="documentation"><code>Runs a block, optionally ignoring errors | |
Usage: | |
> do {flags} | |
Parameters: | |
the block to run | |
Flags: | |
-h, --help: Display this help message | |
-i, --ignore_errors: ignore errors as the block runs | |
Examples: | |
Run the block | |
> do { echo hello } | |
Run the block and ignore errors | |
> do -i { thisisnotarealcommand } | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">drop</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('drop-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="drop-usage" class="hidden"> | |
<pre class="documentation"><code>Drop the last number of rows. | |
Usage: | |
> drop (rows) {flags} | |
Parameters: | |
(rows) starting from the back, the number of rows to drop | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Remove the last item of a list/table | |
> echo [1 2 3] | drop | |
Remove the last 2 items of a list/table | |
> echo [1 2 3] | drop 2 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">du</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/du.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('du-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="du-usage" class="hidden"> | |
<pre class="documentation"><code>Find disk usage sizes of specified items | |
Usage: | |
> du (path) {flags} | |
Parameters: | |
(path) starting directory | |
Flags: | |
-h, --help: Display this help message | |
-a, --all: Output file sizes as well as directory sizes | |
-r, --deref: Dereference symlinks to their targets for size | |
-x, --exclude : Exclude these file names | |
-d, --max-depth : Directory recursion limit | |
-m, --min-size : Exclude files below this size | |
Examples: | |
Disk usage of the current directory | |
> du | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">each</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('each-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="each-usage" class="hidden"> | |
<pre class="documentation"><code>Run a block on each row of the table. | |
Usage: | |
> each {flags} | |
Parameters: | |
the block to run on each row | |
Flags: | |
-h, --help: Display this help message | |
-n, --numbered: returned a numbered item ($it.index and $it.item) | |
Examples: | |
Echo the sum of each row | |
> echo [[1 2] [3 4]] | each { echo $it | math sum } | |
Echo the square of each integer | |
> echo [1 2 3] | each { echo $(= $it * $it) } | |
Number each item and echo a message | |
> echo ['bob' 'fred'] | each --numbered { echo `{{$it.index}} is {{$it.item}}` } | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">echo</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/echo.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('echo-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="echo-usage" class="hidden"> | |
<pre class="documentation"><code>Echo the arguments back to the user. | |
Usage: | |
> echo ...args{flags} | |
Parameters: | |
...args: the values to echo | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Put a hello message in the pipeline | |
> echo 'hello' | |
Print the value of the special '$nu' variable | |
> echo $nu | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">empty?</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('empty?-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="empty?-usage" class="hidden"> | |
<pre class="documentation"><code>Checks emptiness. The last value is the replacement value for any empty column(s) given to check against the table. | |
Usage: | |
> empty? ...args{flags} | |
Parameters: | |
...args: the names of the columns to check emptiness followed by the replacement value. | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">enter</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/enter.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('enter-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="enter-usage" class="hidden"> | |
<pre class="documentation"><code>Create a new shell and begin at this path. | |
Multiple encodings are supported for reading text files by using | |
the '--encoding ' parameter. Here is an example of a few: | |
big5, euc-jp, euc-kr, gbk, iso-8859-1, utf-16, cp1252, latin5 | |
For a more complete list of encodings please refer to the encoding_rs | |
documentation link at https://docs.rs/encoding_rs/0.8.23/encoding_rs/#statics | |
Usage: | |
> enter {flags} | |
Parameters: | |
the location to create a new shell from | |
Flags: | |
-h, --help: Display this help message | |
-e, --encoding : encoding to use to open file | |
Examples: | |
Enter a path as a new shell | |
> enter ../projectB | |
Enter a file as a new shell | |
> enter package.json | |
Enters file with iso-8859-1 encoding | |
> enter file.csv --encoding iso-8859-1 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">every</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/every.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('every-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="every-usage" class="hidden"> | |
<pre class="documentation"><code>Show (or skip) every n-th row, starting from the first one. | |
Usage: | |
> every {flags} | |
Parameters: | |
how many rows to skip between (and including) each row returned | |
Flags: | |
-h, --help: Display this help message | |
-s, --skip: skip the rows that would be returned, instead of selecting them | |
Examples: | |
Get every second row | |
> echo [1 2 3 4 5] | every 2 | |
Skip every second row | |
> echo [1 2 3 4 5] | every 2 --skip | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">exit</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/exit.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('exit-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="exit-usage" class="hidden"> | |
<pre class="documentation"><code>Exit the current shell (or all shells) | |
Usage: | |
> exit {flags} | |
Flags: | |
-h, --help: Display this help message | |
-n, --now: exit out of the shell immediately | |
Examples: | |
Exit the current shell | |
> exit | |
Exit all shells (exiting Nu) | |
> exit --now | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">fetch</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/fetch.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('fetch-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="fetch-usage" class="hidden"> | |
<pre class="documentation"><code>Load from a URL into a cell, convert to table if possible (avoid by appending '--raw') | |
Usage: | |
> fetch {flags} | |
Parameters: | |
the URL to fetch the contents from | |
Flags: | |
-h, --help: Display this help message | |
-u, --user : the username when authenticating | |
-p, --password : the password when authenticating | |
-r, --raw: fetch contents as text rather than a table | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">first</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/first.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('first-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="first-usage" class="hidden"> | |
<pre class="documentation"><code>Show only the first number of rows. | |
Usage: | |
> first (rows) {flags} | |
Parameters: | |
(rows) starting from the front, the number of rows to return | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Return the first item of a list/table | |
> echo [1 2 3] | first | |
Return the first 2 items of a list/table | |
> echo [1 2 3] | first 2 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">format</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/format.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('format-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="format-usage" class="hidden"> | |
<pre class="documentation"><code>Format columns into a string using a simple pattern. | |
Usage: | |
> format {flags} | |
Parameters: | |
the pattern to output. Eg) "{foo}: {bar}" | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Print filenames with their sizes | |
> ls | format '{name}: {size}' | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">from</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-usage" class="hidden"> | |
<pre class="documentation"><code>Parse content (string or binary) as a table (input format based on subcommand, like csv, ini, json, toml) | |
Usage: | |
> from {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">from bson</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-bson-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-bson-usage" class="hidden"> | |
<pre class="documentation"><code>Parse binary as .bson and create table. | |
Usage: | |
> from bson {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Convert bson data to a table | |
> open file.bin | from bson | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from csv</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-csv.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-csv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-csv-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .csv and create table. | |
Usage: | |
> from csv {flags} | |
Flags: | |
-h, --help: Display this help message | |
-s, --separator : a character to separate columns, defaults to ',' | |
--headerless: don't treat the first row as column names | |
Examples: | |
Convert comma-separated data to a table | |
> open data.txt | from csv | |
Convert comma-separated data to a table, ignoring headers | |
> open data.txt | from csv --headerless | |
Convert semicolon-separated data to a table | |
> open data.txt | from csv --separator ';' | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from db</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-db-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-db-usage" class="hidden"> | |
<pre class="documentation"><code>Parse binary data as db and create table. | |
Usage: | |
> from db {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from eml</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-eml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-eml-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .eml and create table. | |
Usage: | |
> from eml {flags} | |
Flags: | |
-h, --help: Display this help message | |
-b, --preview-body : How many bytes of the body to preview | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from ics</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-ics.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-ics-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-ics-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .ics and create table. | |
Usage: | |
> from ics {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from ini</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-ini.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-ini-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-ini-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .ini and create table | |
Usage: | |
> from ini {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from json</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-json.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-json-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-json-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .json and create table. | |
Usage: | |
> from json {flags} | |
Flags: | |
-h, --help: Display this help message | |
-o, --objects: treat each line as a separate value | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from ods</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-ods.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-ods-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-ods-usage" class="hidden"> | |
<pre class="documentation"><code>Parse OpenDocument Spreadsheet(.ods) data and create table. | |
Usage: | |
> from ods {flags} | |
Flags: | |
-h, --help: Display this help message | |
--headerless: don't treat the first row as column names | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from sqlite</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-sqlite-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-sqlite-usage" class="hidden"> | |
<pre class="documentation"><code>Parse binary data as sqlite .db and create table. | |
Usage: | |
> from sqlite {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from ssv</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-ssv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-ssv-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2. | |
Usage: | |
> from ssv {flags} | |
Flags: | |
-h, --help: Display this help message | |
--headerless: don't treat the first row as column names | |
-a, --aligned-columns: assume columns are aligned | |
-m, --minimum-spaces : the minimum spaces to separate columns | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from toml</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-toml.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-toml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-toml-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .toml and create table. | |
Usage: | |
> from toml {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from tsv</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-tsv.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-tsv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-tsv-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .tsv and create table. | |
Usage: | |
> from tsv {flags} | |
Flags: | |
-h, --help: Display this help message | |
--headerless: don't treat the first row as column names | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from url</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-url.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-url-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-url-usage" class="hidden"> | |
<pre class="documentation"><code>Parse url-encoded string as a table. | |
Usage: | |
> from url {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from vcf</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-vcf.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-vcf-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-vcf-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .vcf and create table. | |
Usage: | |
> from vcf {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from xlsx</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-xlsx.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-xlsx-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-xlsx-usage" class="hidden"> | |
<pre class="documentation"><code>Parse binary Excel(.xlsx) data and create table. | |
Usage: | |
> from xlsx {flags} | |
Flags: | |
-h, --help: Display this help message | |
--headerless: don't treat the first row as column names | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from xml</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-xml.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-xml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-xml-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .xml and create table. | |
Usage: | |
> from xml {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from yaml</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/from-yaml.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-yaml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-yaml-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .yaml/.yml and create table. | |
Usage: | |
> from yaml {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">from yml</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('from-yml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="from-yml-usage" class="hidden"> | |
<pre class="documentation"><code>Parse text as .yaml/.yml and create table. | |
Usage: | |
> from yml {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">get</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/get.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('get-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="get-usage" class="hidden"> | |
<pre class="documentation"><code>Open given cells as text. | |
Usage: | |
> get ...args{flags} | |
Parameters: | |
...args: optionally return additional data by path | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Extract the name of files as a list | |
> ls | get name | |
Extract the cpu list from the sys information | |
> sys | get cpu | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">group-by</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/group-by.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('group-by-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="group-by-usage" class="hidden"> | |
<pre class="documentation"><code>Creates a new table with the data from the table rows grouped by the column given. | |
Usage: | |
> group-by (column_name) {flags} | |
Parameters: | |
(column_name) the name of the column to group by | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Group items by type | |
> ls | group-by type | |
Group items by their value | |
> echo [1 3 1 3 2 1 1] | group-by | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">group-by date</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('group-by-date-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="group-by-date-usage" class="hidden"> | |
<pre class="documentation"><code>Creates a new table with the data from the table rows grouped by the column given. | |
Usage: | |
> group-by date (column_name) {flags} | |
Parameters: | |
(column_name) the name of the column to group by | |
Flags: | |
-h, --help: Display this help message | |
-f, --format : Specify date and time formatting | |
Examples: | |
Group files by type | |
> ls | group-by date --format '%d/%m/%Y' | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">headers</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/headers.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('headers-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="headers-usage" class="hidden"> | |
<pre class="documentation"><code>Use the first row of the table as column names | |
Usage: | |
> headers {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Create headers for a raw string | |
> echo "a b c|1 2 3" | split row "|" | split column " " | headers | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">help</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/help.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('help-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="help-usage" class="hidden"> | |
<pre class="documentation"><code>Display help information about commands. | |
Usage: | |
> help ...args{flags} | |
Parameters: | |
...args: the name of command to get help on | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">histogram</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/histogram.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('histogram-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="histogram-usage" class="hidden"> | |
<pre class="documentation"><code>Creates a new table with a histogram based on the column name passed in. | |
Usage: | |
> histogram ...args{flags} | |
Parameters: | |
the name of the column to graph by | |
...args: column name to give the histogram's frequency column | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get a histogram for the types of files | |
> ls | histogram type | |
Get a histogram for the types of files, with frequency column named count | |
> ls | histogram type count | |
Get a histogram for a list of numbers | |
> echo [1 2 3 1 1 1 2 2 1 1] | histogram | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">history</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/history.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('history-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="history-usage" class="hidden"> | |
<pre class="documentation"><code>Display command history. | |
Usage: | |
> history {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">if</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('if-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="if-usage" class="hidden"> | |
<pre class="documentation"><code>Filter table to match the condition. | |
Usage: | |
> if {flags} | |
Parameters: | |
the condition that must match | |
block to run if condition is true | |
block to run if condition is false | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Run a block if a condition is true | |
> echo 10 | if $it > 5 { echo 'greater than 5' } { echo 'less than or equal to 5' } | |
Run a block if a condition is false | |
> echo 1 | if $it > 5 { echo 'greater than 5' } { echo 'less than or equal to 5' } | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">inc</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/inc.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('inc-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="inc-usage" class="hidden"> | |
<pre class="documentation"><code>Increment a value or version. Optionally use the column of a table. | |
Usage: | |
> inc ...args{flags} | |
Parameters: | |
...args: the column(s) to update | |
Flags: | |
-h, --help: Display this help message | |
-M, --major: increment the major version (eg 1.2.1 -> 2.0.0) | |
-m, --minor: increment the minor version (eg 1.2.1 -> 1.3.0) | |
-p, --patch: increment the patch version (eg 1.2.1 -> 1.2.2) | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">insert</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/insert.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('insert-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="insert-usage" class="hidden"> | |
<pre class="documentation"><code>Insert a new column with a given value. | |
Usage: | |
> insert {flags} | |
Parameters: | |
the column name to insert | |
the value to give the cell(s) | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">keep</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('keep-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="keep-usage" class="hidden"> | |
<pre class="documentation"><code>Keep the number of rows only | |
Usage: | |
> keep (rows) {flags} | |
Parameters: | |
(rows) starting from the front, the number of rows to keep | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Keep the first row | |
> echo [1 2 3] | keep | |
Keep the first four rows | |
> echo [1 2 3 4 5] | keep 4 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">keep-until</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('keep-until-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="keep-until-usage" class="hidden"> | |
<pre class="documentation"><code>Keeps rows until the condition matches. | |
Usage: | |
> keep-until {flags} | |
Parameters: | |
the condition that must be met to stop keeping rows | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">keep-while</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('keep-while-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="keep-while-usage" class="hidden"> | |
<pre class="documentation"><code>Keeps rows while the condition matches. | |
Usage: | |
> keep-while {flags} | |
Parameters: | |
the condition that must be met to keep rows | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">kill</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('kill-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="kill-usage" class="hidden"> | |
<pre class="documentation"><code>Kill a process using the process id. | |
Usage: | |
> kill ...args{flags} | |
Parameters: | |
process id of process that is to be killed | |
...args: rest of processes to kill | |
Flags: | |
-h, --help: Display this help message | |
-f, --force: forcefully kill the process | |
-q, --quiet: won't print anything to the console | |
Examples: | |
Kill the pid using the most memory | |
> ps | sort-by mem | last | kill $it.pid | |
Force kill a given pid | |
> kill --force 12345 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">last</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/last.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('last-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="last-usage" class="hidden"> | |
<pre class="documentation"><code>Show only the last number of rows. | |
Usage: | |
> last (rows) {flags} | |
Parameters: | |
(rows) starting from the back, the number of rows to return | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the last row | |
> echo [1 2 3] | last | |
Get the last three rows | |
> echo [1 2 3 4 5] | last 3 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">lines</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/lines.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('lines-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="lines-usage" class="hidden"> | |
<pre class="documentation"><code>Split single string into rows, one per line. | |
Usage: | |
> lines {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Split multi-line string into lines | |
> ^echo "two\nlines" | lines | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">ls</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('ls-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="ls-usage" class="hidden"> | |
<pre class="documentation"><code>View the contents of the current or given path. | |
Usage: | |
> ls (path) {flags} | |
Parameters: | |
(path) a path to get the directory contents from | |
Flags: | |
-h, --help: Display this help message | |
-a, --all: also show hidden files | |
-f, --full: list all available columns for each entry | |
-s, --short-names: only print the file names and not the path | |
-w, --with-symlink-targets: display the paths to the target files that symlinks point to | |
-d, --du: display the apparent directory size in place of the directory metadata size | |
Examples: | |
List all files in the current directory | |
> ls | |
List all files in a subdirectory | |
> ls subdir | |
List all rust files | |
> ls *.rs | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">match</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('match-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="match-usage" class="hidden"> | |
<pre class="documentation"><code>filter rows by regex | |
Usage: | |
> match {flags} | |
Parameters: | |
the column name to match | |
the regex to match with | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">math</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/math.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-usage" class="hidden"> | |
<pre class="documentation"><code>Use mathematical functions as aggregate functions on a list of numbers or tables | |
Usage: | |
> math {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">math avg</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-avg-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-avg-usage" class="hidden"> | |
<pre class="documentation"><code>Finds the average of a list of numbers or tables | |
Usage: | |
> math avg {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the average of a list of numbers | |
> echo [-50 100.0 25] | math avg | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">math max</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-max-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-max-usage" class="hidden"> | |
<pre class="documentation"><code>Finds the maximum within a list of numbers or tables | |
Usage: | |
> math max {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Find the maximum of list of numbers | |
> echo [-50 100 25] | math max | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">math median</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-median-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-median-usage" class="hidden"> | |
<pre class="documentation"><code>Gets the median of a list of numbers | |
Usage: | |
> math median {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the median of a list of numbers | |
> echo [3 8 9 12 12 15] | math median | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">math min</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-min-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-min-usage" class="hidden"> | |
<pre class="documentation"><code>Finds the minimum within a list of numbers or tables | |
Usage: | |
> math min {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the minimum of a list of numbers | |
> echo [-50 100 25] | math min | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">math mode</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-mode-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-mode-usage" class="hidden"> | |
<pre class="documentation"><code>Gets the most frequent element(s) from a list of numbers or tables | |
Usage: | |
> math mode {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the mode(s) of a list of numbers | |
> echo [3 3 9 12 12 15] | math mode | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">math sum</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('math-sum-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="math-sum-usage" class="hidden"> | |
<pre class="documentation"><code>Finds the sum of a list of numbers or tables | |
Usage: | |
> math sum {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Sum a list of numbers | |
> echo [1 2 3] | math sum | |
Get the disk usage for the current directory | |
> ls --all --du | get size | math sum | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">merge</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('merge-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="merge-usage" class="hidden"> | |
<pre class="documentation"><code>Merge a table. | |
Usage: | |
> merge {flags} | |
Parameters: | |
the block to run and merge into the table | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Merge a 1-based index column with some ls output | |
> ls | select name | keep 3 | merge { echo [1 2 3] | wrap index } | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">mkdir</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('mkdir-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="mkdir-usage" class="hidden"> | |
<pre class="documentation"><code>Make directories, creates intermediary directories as required. | |
Usage: | |
> mkdir ...args{flags} | |
Parameters: | |
...args: the name(s) of the path(s) to create | |
Flags: | |
-h, --help: Display this help message | |
-s, --show-created-paths: show the path(s) created. | |
Examples: | |
Make a directory named foo | |
> mkdir foo | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">move</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('move-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="move-usage" class="hidden"> | |
<pre class="documentation"><code>moves across desired subcommand. | |
Usage: | |
> move {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">move column</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('move-column-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="move-column-usage" class="hidden"> | |
<pre class="documentation"><code>Move columns. | |
Usage: | |
> move column ...args{flags} | |
Parameters: | |
...args: the columns to move | |
Flags: | |
-h, --help: Display this help message | |
--after : the column that will precede the columns moved | |
--before : the column that will be next the columns moved | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">mv</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('mv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="mv-usage" class="hidden"> | |
<pre class="documentation"><code>Move files or directories. | |
Usage: | |
> mv {flags} | |
Parameters: | |
the location to move files/directories from | |
the location to move files/directories to | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Rename a file | |
> mv before.txt after.txt | |
Move a file into a directory | |
> mv test.txt my/subdirectory | |
Move many files into a directory | |
> mv *.txt my/subdirectory | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">n</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('n-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="n-usage" class="hidden"> | |
<pre class="documentation"><code>Go to next shell. | |
Usage: | |
> n {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">nth</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/nth.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('nth-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="nth-usage" class="hidden"> | |
<pre class="documentation"><code>Return only the selected rows | |
Usage: | |
> nth ...args{flags} | |
Parameters: | |
the number of the row to return | |
...args: Optionally return more rows | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get the second row | |
> echo [first second third] | nth 1 | |
Get the first and third rows | |
> echo [first second third] | nth 0 2 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">open</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/open.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('open-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="open-usage" class="hidden"> | |
<pre class="documentation"><code>Load a file into a cell, convert to table if possible (avoid by appending '--raw'). | |
Multiple encodings are supported for reading text files by using | |
the '--encoding ' parameter. Here is an example of a few: | |
big5, euc-jp, euc-kr, gbk, iso-8859-1, utf-16, cp1252, latin5 | |
For a more complete list of encodings please refer to the encoding_rs | |
documentation link at https://docs.rs/encoding_rs/0.8.23/encoding_rs/#statics | |
Usage: | |
> open {flags} | |
Parameters: | |
the file path to load values from | |
Flags: | |
-h, --help: Display this help message | |
-r, --raw: load content as a string instead of a table | |
-e, --encoding : encoding to use to open file | |
Examples: | |
Opens "users.csv" and creates a table from the data | |
> open users.csv | |
Opens file with iso-8859-1 encoding | |
> open file.csv --encoding iso-8859-1 | from csv | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">p</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('p-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="p-usage" class="hidden"> | |
<pre class="documentation"><code>Go to previous shell. | |
Usage: | |
> p {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">parse</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('parse-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="parse-usage" class="hidden"> | |
<pre class="documentation"><code>Parse columns from string data using a simple pattern. | |
Usage: | |
> parse {flags} | |
Parameters: | |
the pattern to match. Eg) "{foo}: {bar}" | |
Flags: | |
-h, --help: Display this help message | |
-r, --regex: use full regex syntax for patterns | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">pivot</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/pivot.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('pivot-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="pivot-usage" class="hidden"> | |
<pre class="documentation"><code>Pivots the table contents so rows become columns and columns become rows. | |
Usage: | |
> pivot ...args{flags} | |
Parameters: | |
...args: the names to give columns once pivoted | |
Flags: | |
-h, --help: Display this help message | |
-r, --header-row: treat the first row as column names | |
-i, --ignore-titles: don't pivot the column names into values | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">post</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('post-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="post-usage" class="hidden"> | |
<pre class="documentation"><code>Post content to a url and retrieve data as a table if possible. | |
Usage: | |
> post {flags} | |
Parameters: | |
the URL to post to | |
the contents of the post body | |
Flags: | |
-h, --help: Display this help message | |
-u, --user : the username when authenticating | |
-p, --password : the password when authenticating | |
-t, --content-type : the MIME type of content to post | |
-l, --content-length : the length of the content being posted | |
-r, --raw: return values as a string instead of a table | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">prepend</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/prepend.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('prepend-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="prepend-usage" class="hidden"> | |
<pre class="documentation"><code>Prepend the given row to the front of the table | |
Usage: | |
> prepend {flags} | |
Parameters: | |
the value of the row to prepend to the table | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Add something to the beginning of a list or table | |
> echo [2 3 4] | prepend 1 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">ps</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/ps.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('ps-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="ps-usage" class="hidden"> | |
<pre class="documentation"><code>View information about system processes. | |
Usage: | |
> ps {flags} | |
Flags: | |
-h, --help: Display this help message | |
-f, --full: list all available columns for each entry | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">pwd</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/pwd.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('pwd-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="pwd-usage" class="hidden"> | |
<pre class="documentation"><code>Output the current working directory. | |
Usage: | |
> pwd {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Print the current working directory | |
> pwd | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">random</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/random.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('random-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="random-usage" class="hidden"> | |
<pre class="documentation"><code>Generate random values | |
Usage: | |
> random {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">random bool</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('random-bool-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="random-bool-usage" class="hidden"> | |
<pre class="documentation"><code>Generate a random boolean value | |
Usage: | |
> random bool {flags} | |
Flags: | |
-h, --help: Display this help message | |
-b, --bias : Adjusts the probability of a "true" outcome | |
Examples: | |
Generate a random boolean value | |
> random bool | |
Generate a random boolean value with a 75% chance of "true" | |
> random bool --bias 0.75 | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">random dice</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('random-dice-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="random-dice-usage" class="hidden"> | |
<pre class="documentation"><code>Generate a random dice roll | |
Usage: | |
> random dice {flags} | |
Flags: | |
-h, --help: Display this help message | |
-d, --dice : The amount of dice being rolled | |
-s, --sides : The amount of sides a die has | |
Examples: | |
Roll 1 dice with 6 sides each | |
> random dice | |
Roll 10 dice with 12 sides each | |
> random dice -d 10 -s 12 | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">random uuid</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('random-uuid-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="random-uuid-usage" class="hidden"> | |
<pre class="documentation"><code>Generate a random uuid4 string | |
Usage: | |
> random uuid {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Generate a random uuid4 string | |
> random uuid | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">range</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('range-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="range-usage" class="hidden"> | |
<pre class="documentation"><code>Return only the selected rows | |
Usage: | |
> range {flags} | |
Parameters: | |
range of rows to return: Eg) 4..7 (=> from 4 to 7) | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">reject</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/reject.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('reject-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="reject-usage" class="hidden"> | |
<pre class="documentation"><code>Remove the given columns from the table. | |
Usage: | |
> reject ...args{flags} | |
Parameters: | |
...args: the names of columns to remove | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Lists the files in a directory without showing the modified column | |
> ls | reject modified | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">rename</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/rename.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('rename-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="rename-usage" class="hidden"> | |
<pre class="documentation"><code>Creates a new table with columns renamed. | |
Usage: | |
> rename ...args{flags} | |
Parameters: | |
the new name for the first column | |
...args: the new name for additional columns | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Rename a column | |
> echo "{a: 1, b: 2, c: 3}" | from json | rename my_column | |
Rename many columns | |
> echo "{a: 1, b: 2, c: 3}" | from json | rename spam eggs cars | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">reverse</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/reverse.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('reverse-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="reverse-usage" class="hidden"> | |
<pre class="documentation"><code>Reverses the table. | |
Usage: | |
> reverse {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Sort list of numbers in descending file size | |
> echo [3 1 2 19 0] | reverse | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">rm</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('rm-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="rm-usage" class="hidden"> | |
<pre class="documentation"><code>Remove file(s) | |
Usage: | |
> rm ...args{flags} | |
Parameters: | |
...args: the file path(s) to remove | |
Flags: | |
-h, --help: Display this help message | |
-t, --trash: use the platform's recycle bin instead of permanently deleting | |
-p, --permanent: don't use recycle bin, delete permanently | |
-r, --recursive: delete subdirectories recursively | |
Examples: | |
Delete or move a file to the system trash (depending on 'rm_always_trash' config option) | |
> rm file.txt | |
Move a file to the system trash | |
> rm --trash file.txt | |
Delete a file permanently | |
> rm --permanent file.txt | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">run_external</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('run_external-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="run_external-usage" class="hidden"> | |
<pre class="documentation"><code> | |
Usage: | |
> run_external ...args{flags} | |
Parameters: | |
...args: external command arguments | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">save</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/save.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('save-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="save-usage" class="hidden"> | |
<pre class="documentation"><code>Save the contents of the pipeline to a file. | |
Usage: | |
> save (path) {flags} | |
Parameters: | |
(path) the path to save contents to | |
Flags: | |
-h, --help: Display this help message | |
-r, --raw: treat values as-is rather than auto-converting based on file extension | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">select</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/select.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('select-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="select-usage" class="hidden"> | |
<pre class="documentation"><code>Down-select table to only these columns. | |
Usage: | |
> select ...args{flags} | |
Parameters: | |
...args: the columns to select from the table | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Select just the name column | |
> ls | select name | |
Select the name and size columns | |
> ls | select name size | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">shells</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/shells.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('shells-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="shells-usage" class="hidden"> | |
<pre class="documentation"><code>Display the list of current shells. | |
Usage: | |
> shells {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">shuffle</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/shuffle.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('shuffle-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="shuffle-usage" class="hidden"> | |
<pre class="documentation"><code>Shuffle rows randomly. | |
Usage: | |
> shuffle {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">size</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/size.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('size-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="size-usage" class="hidden"> | |
<pre class="documentation"><code>Gather word count statistics on the text. | |
Usage: | |
> size {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Count the number of words in a string | |
> echo "There are seven words in this sentence" | size | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">skip</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/skip.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('skip-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="skip-usage" class="hidden"> | |
<pre class="documentation"><code>Skip some number of rows. | |
Usage: | |
> skip (rows) {flags} | |
Parameters: | |
(rows) how many rows to skip | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Skip the first 5 rows | |
> echo [1 2 3 4 5 6 7] | skip 5 | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">skip-until</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('skip-until-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="skip-until-usage" class="hidden"> | |
<pre class="documentation"><code>Skips rows until the condition matches. | |
Usage: | |
> skip-until {flags} | |
Parameters: | |
the condition that must be met to stop skipping | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">skip-while</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/skip-while.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('skip-while-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="skip-while-usage" class="hidden"> | |
<pre class="documentation"><code>Skips rows while the condition matches. | |
Usage: | |
> skip-while {flags} | |
Parameters: | |
the condition that must be met to continue skipping | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">sort-by</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/sort-by.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('sort-by-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="sort-by-usage" class="hidden"> | |
<pre class="documentation"><code>Sort by the given columns, in increasing order. | |
Usage: | |
> sort-by ...args{flags} | |
Parameters: | |
...args: the column(s) to sort by | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Sort list by increasing value | |
> echo [4 2 3 1] | sort-by | |
Sort output by increasing file size | |
> ls | sort-by size | |
Sort output by type, and then by file size for each type | |
> ls | sort-by type size | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">split</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('split-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="split-usage" class="hidden"> | |
<pre class="documentation"><code>split contents across desired subcommand (like row, column) via the separator. | |
Usage: | |
> split {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">split chars</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('split-chars-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="split-chars-usage" class="hidden"> | |
<pre class="documentation"><code>splits a string's characters into separate rows | |
Usage: | |
> split chars {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Split the string's characters into separate rows | |
> echo 'hello' | split chars | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">split column</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/split-column.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('split-column-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="split-column-usage" class="hidden"> | |
<pre class="documentation"><code>splits contents across multiple columns via the separator. | |
Usage: | |
> split column ...args{flags} | |
Parameters: | |
the character that denotes what separates columns | |
...args: column names to give the new columns | |
Flags: | |
-h, --help: Display this help message | |
-c, --collapse-empty: remove empty columns | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">split row</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/split-row.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('split-row-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="split-row-usage" class="hidden"> | |
<pre class="documentation"><code>splits contents over multiple rows via the separator. | |
Usage: | |
> split row {flags} | |
Parameters: | |
the character that denotes what separates rows | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">split-by</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('split-by-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="split-by-usage" class="hidden"> | |
<pre class="documentation"><code>Creates a new table with the data from the inner tables split by the column given. | |
Usage: | |
> split-by (column_name) {flags} | |
Parameters: | |
(column_name) the name of the column within the nested table to split by | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">start</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/start.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('start-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="start-usage" class="hidden"> | |
<pre class="documentation"><code>Opens each file/directory/URL using the default application | |
Usage: | |
> start ...args{flags} | |
Parameters: | |
...args: files/urls/directories to open | |
Flags: | |
-h, --help: Display this help message | |
-a, --application : Specifies the application used for opening the files/directories/urls | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">str</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/str.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-usage" class="hidden"> | |
<pre class="documentation"><code>Apply string function. | |
Usage: | |
> str ...args{flags} | |
Parameters: | |
...args: optionally convert by column paths | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">str capitalize</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-capitalize-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-capitalize-usage" class="hidden"> | |
<pre class="documentation"><code>capitalizes text | |
Usage: | |
> str capitalize ...args{flags} | |
Parameters: | |
...args: optionally capitalize text by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Capitalize contents | |
> echo 'good day' | str capitalize | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str collect</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-collect-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-collect-usage" class="hidden"> | |
<pre class="documentation"><code>collects a list of strings into a string | |
Usage: | |
> str collect {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Collect a list of string | |
> echo ['a' 'b' 'c'] | str collect | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str downcase</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-downcase-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-downcase-usage" class="hidden"> | |
<pre class="documentation"><code>downcases text | |
Usage: | |
> str downcase ...args{flags} | |
Parameters: | |
...args: optionally downcase text by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Downcase contents | |
> echo 'NU' | str downcase | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str find-replace</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-find-replace-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-find-replace-usage" class="hidden"> | |
<pre class="documentation"><code>finds and replaces text | |
Usage: | |
> str find-replace ...args{flags} | |
Parameters: | |
the pattern to find | |
the replacement pattern | |
...args: optionally find and replace text by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Find and replace contents with capture group | |
> echo 'my_library.rb' | str find-replace '(.+).rb' '$1.nu' | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str from</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-from-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-from-usage" class="hidden"> | |
<pre class="documentation"><code>Converts numeric types to strings. Trims trailing zeros unless decimals parameter is specified. | |
Usage: | |
> str from ...args{flags} | |
Parameters: | |
...args: optionally convert to string by column paths | |
Flags: | |
-h, --help: Display this help message | |
-d, --decimals : decimal digits to which to round | |
-g, --group-digits: group digits, currently by thousand with commas | |
Examples: | |
round to nearest integer | |
> = 1.7 | str from -d 0 | |
format large number with localized digit grouping | |
> = 1000000.2 | str from -g | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str length</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-length-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-length-usage" class="hidden"> | |
<pre class="documentation"><code>outputs the lengths of the strings in the pipeline | |
Usage: | |
> str length {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Return the lengths of multiple strings | |
> echo 'hello' | str length | |
Return the lengths of multiple strings | |
> echo 'hi' 'there' | str length | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str set</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-set-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-set-usage" class="hidden"> | |
<pre class="documentation"><code>sets text | |
Usage: | |
> str set ...args{flags} | |
Parameters: | |
the new string to set | |
...args: optionally set text by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Set contents with preferred string | |
> echo 'good day' | str set 'good bye' | |
Set the contents on preferred column paths | |
> open Cargo.toml | str set '255' package.version | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str substring</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-substring-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-substring-usage" class="hidden"> | |
<pre class="documentation"><code>substrings text | |
Usage: | |
> str substring ...args{flags} | |
Parameters: | |
the indexes to substring [start end] | |
...args: optionally substring text by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Get a substring from the text | |
> echo 'good nushell' | str substring [5 12] | |
Alternatively, you can use the form | |
> echo 'good nushell' | str substring '5,12' | |
Get the last characters from the string | |
> echo 'good nushell' | str substring ',-5' | |
Get the remaining characters from a starting index | |
> echo 'good nushell' | str substring '5,' | |
Get the characters from the beginning until ending index | |
> echo 'good nushell' | str substring ',7' | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str to-datetime</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-to-datetime-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-to-datetime-usage" class="hidden"> | |
<pre class="documentation"><code>converts text into datetime | |
Usage: | |
> str to-datetime ...args{flags} | |
Parameters: | |
...args: optionally convert text into datetime by column paths | |
Flags: | |
-h, --help: Display this help message | |
-f, --format : Specify date and time formatting | |
Examples: | |
Convert to datetime | |
> echo '16.11.1984 8:00 am +0000' | str to-datetime | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str to-decimal</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-to-decimal-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-to-decimal-usage" class="hidden"> | |
<pre class="documentation"><code>converts text into decimal | |
Usage: | |
> str to-decimal ...args{flags} | |
Parameters: | |
...args: optionally convert text into decimal by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Convert to decimal | |
> echo '3.1415' | str to-decimal | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str to-int</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-to-int-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-to-int-usage" class="hidden"> | |
<pre class="documentation"><code>converts text into integer | |
Usage: | |
> str to-int ...args{flags} | |
Parameters: | |
...args: optionally convert text into integer by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Convert to an integer | |
> echo '255' | str to-int | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str trim</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-trim-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-trim-usage" class="hidden"> | |
<pre class="documentation"><code>trims text | |
Usage: | |
> str trim ...args{flags} | |
Parameters: | |
...args: optionally trim text by column paths | |
Flags: | |
-h, --help: Display this help message | |
-c, --char : character to trim (default: whitespace) | |
Examples: | |
Trim whitespace | |
> echo 'Nu shell ' | str trim | |
Trim a specific character | |
> echo '=== Nu shell ===' | str trim -c '=' | str trim | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">str upcase</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('str-upcase-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="str-upcase-usage" class="hidden"> | |
<pre class="documentation"><code>upcases text | |
Usage: | |
> str upcase ...args{flags} | |
Parameters: | |
...args: optionally upcase text by column paths | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Upcase contents | |
> echo 'nu' | str upcase | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">sys</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/sys.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('sys-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="sys-usage" class="hidden"> | |
<pre class="documentation"><code>View information about the current system. | |
Usage: | |
> sys {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">table</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('table-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="table-usage" class="hidden"> | |
<pre class="documentation"><code>View the contents of the pipeline as a table. | |
Usage: | |
> table {flags} | |
Flags: | |
-h, --help: Display this help message | |
-n, --start_number : row number to start viewing from | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">tags</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/tags.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('tags-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="tags-usage" class="hidden"> | |
<pre class="documentation"><code>Read the tags (metadata) for values. | |
Usage: | |
> tags {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">textview</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('textview-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="textview-usage" class="hidden"> | |
<pre class="documentation"><code>Autoview of text data. | |
Usage: | |
> textview {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">to</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into an output format (based on subcommand, like csv, html, json, yaml). | |
Usage: | |
> to {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">to bson</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-bson-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-bson-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into .bson text. | |
Usage: | |
> to bson {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to csv</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to-csv.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-csv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-csv-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into .csv text | |
Usage: | |
> to csv {flags} | |
Flags: | |
-h, --help: Display this help message | |
-s, --separator : a character to separate columns, defaults to ',' | |
--headerless: do not output the columns names as the first row | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to db</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-db-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-db-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table to db data | |
Usage: | |
> to db {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to html</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-html-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-html-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into simple HTML | |
Usage: | |
> to html {flags} | |
Flags: | |
-h, --help: Display this help message | |
-t, --html_color: change ansi colors to html colors | |
-n, --no_color: remove all ansi colors in output | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to json</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to-json.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-json-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-json-usage" class="hidden"> | |
<pre class="documentation"><code>Converts table data into JSON text. | |
Usage: | |
> to json {flags} | |
Flags: | |
-h, --help: Display this help message | |
-p, --pretty : Formats the JSON text with the provided indentation setting | |
Examples: | |
Outputs an unformatted JSON string representing the contents of this table | |
> echo [1 2 3] | to json | |
Outputs a formatted JSON string representing the contents of this table with an indentation setting of 2 spaces | |
> echo [1 2 3] | to json --pretty 2 | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to md</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-md-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-md-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into simple Markdown | |
Usage: | |
> to md {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to sqlite</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-sqlite-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-sqlite-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table to sqlite .db binary data | |
Usage: | |
> to sqlite {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to toml</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to-toml.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-toml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-toml-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into .toml text | |
Usage: | |
> to toml {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to tsv</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to-tsv.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-tsv-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-tsv-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into .tsv text | |
Usage: | |
> to tsv {flags} | |
Flags: | |
-h, --help: Display this help message | |
--headerless: do not output the column names as the first row | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to url</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to-url.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-url-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-url-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into url-encoded text | |
Usage: | |
> to url {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
<div class="row"> | |
<h4 class="row__item">to yaml</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/to-yaml.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('to-yaml-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="to-yaml-usage" class="hidden"> | |
<pre class="documentation"><code>Convert table into .yaml/.yml text | |
Usage: | |
> to yaml {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">touch</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/touch.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('touch-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="touch-usage" class="hidden"> | |
<pre class="documentation"><code>creates a file | |
Usage: | |
> touch {flags} | |
Parameters: | |
the path of the file you want to create | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Creates "fixture.json" | |
> touch fixture.json | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">tree</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('tree-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="tree-usage" class="hidden"> | |
<pre class="documentation"><code>View the contents of the pipeline as a tree. | |
Usage: | |
> tree {flags} | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">trim</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/trim.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('trim-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="trim-usage" class="hidden"> | |
<pre class="documentation"><code>Trim leading and following whitespace from text data. | |
Usage: | |
> trim {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Trims surrounding whitespace and outputs "Hello world" | |
> echo " Hello world" | trim | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">uniq</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/uniq.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('uniq-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="uniq-usage" class="hidden"> | |
<pre class="documentation"><code>Return the unique rows | |
Usage: | |
> uniq {flags} | |
Flags: | |
-h, --help: Display this help message | |
-c, --count: Count the unique rows | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">update</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/update.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('update-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="update-usage" class="hidden"> | |
<pre class="documentation"><code>Update an existing column to have a new value. | |
Usage: | |
> update {flags} | |
Parameters: | |
the name of the column to update | |
the new value to give the cell(s) | |
Flags: | |
-h, --help: Display this help message | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">version</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/version.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('version-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="version-usage" class="hidden"> | |
<pre class="documentation"><code>Display Nu version | |
Usage: | |
> version {flags} | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Display Nu version | |
> version | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">where</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/where.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('where-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="where-usage" class="hidden"> | |
<pre class="documentation"><code>Filter table to match the condition. | |
Usage: | |
> where {flags} | |
Parameters: | |
the condition that must match | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
List all files in the current directory with sizes greater than 2kb | |
> ls | where size > 2kb | |
List only the files in the current directory | |
> ls | where type == File | |
List all files with names that contain "Car" | |
> ls | where name =~ "Car" | |
List all files that were modified in the last two months | |
> ls | where modified <= 2M | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">which</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/which.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('which-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="which-usage" class="hidden"> | |
<pre class="documentation"><code>Finds a program file. | |
Usage: | |
> which {flags} | |
Parameters: | |
application | |
Flags: | |
-h, --help: Display this help message | |
-a, --all: list all executables | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">with-env</h4> | |
<a class="row__item" href=""> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('with-env-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="with-env-usage" class="hidden"> | |
<pre class="documentation"><code>Runs a block with an environment set. Eg) with-env [NAME 'foo'] { echo $nu.env.NAME } | |
Usage: | |
> with-env {flags} | |
Parameters: | |
the environment variable to temporarily set | |
the block to run once the variable is set | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Set the MYENV environment variable | |
> with-env [MYENV "my env value"] { echo $nu.env.MYENV } | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="item"> | |
<div class="stack"> | |
<div class="row"> | |
<h4 class="row__item">wrap</h4> | |
<a class="row__item" href="https://github.com/nushell/nushell/blob/main/docs/commands/wrap.md"> <i class="fa fa-book"></i></a> | |
<a class="row__item" onclick="toggleVisible('wrap-usage')"><i class="fa fa-plus-square-o"></i></a> | |
</div> | |
<div id="wrap-usage" class="hidden"> | |
<pre class="documentation"><code>Wraps the given data in a table. | |
Usage: | |
> wrap (column) {flags} | |
Parameters: | |
(column) the name of the new column | |
Flags: | |
-h, --help: Display this help message | |
Examples: | |
Wrap a list into a table with the default column name | |
> echo [1 2 3] | wrap | |
Wrap a list into a table with a given column name | |
> echo [1 2 3] | wrap MyColumn | |
</code></pre> | |
<br /> | |
<div class="stack"> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
</div> | |
<footer> | |
<div class="centered"> | |
If you have suggestions or want to change something please give us <a | |
href="https://github.com/nushell/nushell.github.io">feedback</a> | |
</div> | |
</footer> | |
<script> | |
(function (i, s, o, g, r, a, m) { | |
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { | |
(i[r].q = i[r].q || []).push(arguments) | |
}, i[r].l = 1 * new Date(); a = s.createElement(o), | |
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) | |
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); | |
ga('create', 'UA-69474134-2', 'auto'); | |
ga('send', 'pageview'); | |
</script> | |
<script type="text/javascript"> | |
$('h1, h2, h3, h4, h5, h6').filter('[id]').each(function () { | |
var el = document.createElement('a'); | |
el.className = 'anchor'; | |
el.href = '#' + this.id; | |
this.prepend(el); | |
}); | |
$('pre code').each(function () { | |
// Box Drawings Light Vertical https://unicode-table.com/en/2502/ | |
this.innerHTML = this.innerHTML.replace(/\u2502/g, '<u>\u2502</u>'); | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment