Skip to content

Instantly share code, notes, and snippets.

@arashout
Created July 17, 2020 00:34
Show Gist options
  • Save arashout/7a4c0892355dbe2c7d0d6eeab980146d to your computer and use it in GitHub Desktop.
Save arashout/7a4c0892355dbe2c7d0d6eeab980146d to your computer and use it in GitHub Desktop.
<!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">&emsp;<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:
&gt; 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
&gt; alias say-hi [] { echo 'Hello!' }
An alias with a single parameter
&gt; 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="">&emsp;<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:
&gt; 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
&gt; ansi green
Reset the color
&gt; 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">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; autoenv {flags}
Flags:
-h, --help: Display this help message
Examples:
Example .nu-env file
&gt; 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="">&emsp;<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:
&gt; autoenv trust (dir) {flags}
Parameters:
(dir) Directory to allow
Flags:
-h, --help: Display this help message
Examples:
Allow .nu-env file in current directory
&gt; autoenv trust
Allow .nu-env file in directory foo
&gt; autoenv trust foo
</code></pre>
</div>
<div class="row">
<h4 class="row__item">autoenv untrust</h4>
<a class="row__item" href="">&emsp;<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:
&gt; autoenv untrust (dir) {flags}
Parameters:
(dir) Directory to disallow
Flags:
-h, --help: Display this help message
Examples:
Disallow .nu-env file in current directory
&gt; autoenv untrust
Disallow .nu-env file in directory foo
&gt; 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">&emsp;<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:
&gt; autoview {flags}
Flags:
-h, --help: Display this help message
Examples:
Automatically view the results
&gt; ls | autoview
Autoview is also implied. The above can be written as
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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">&emsp;<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:
&gt; 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
&gt; cal
The calendar for all of 2012
&gt; cal --full-year 2012
This month's calendar with the week starting on monday
&gt; 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">&emsp;<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:
&gt; calc {flags}
Flags:
-h, --help: Display this help message
Examples:
Calculate math in the pipeline
&gt; 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">&emsp;<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:
&gt; 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'
&gt; cd dirname
Change to your home directory
&gt; cd
Change to your home directory (alternate version)
&gt; cd ~
Change to the previous directory
&gt; 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="">&emsp;<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:
&gt; ansi {flags}
Parameters:
the name of the character to output
Flags:
-h, --help: Display this help message
Examples:
Output newline
&gt; 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="">&emsp;<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:
&gt; clear {flags}
Flags:
-h, --help: Display this help message
Examples:
Clear the screen
&gt; 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="">&emsp;<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:
&gt; clip {flags}
Flags:
-h, --help: Display this help message
Examples:
Save text to the clipboard
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [1 2 $null 3 $null $null] | compact
Filter out all directory entries having no 'target'
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; config clear {flags}
Flags:
-h, --help: Display this help message
Examples:
Clear the config (be careful!)
&gt; config clear
</code></pre>
</div>
<div class="row">
<h4 class="row__item">config get</h4>
<a class="row__item" href="">&emsp;<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:
&gt; config get {flags}
Parameters:
value to get from the config
Flags:
-h, --help: Display this help message
Examples:
Get the current startup commands
&gt; config get startup
</code></pre>
</div>
<div class="row">
<h4 class="row__item">config load</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; config path {flags}
Flags:
-h, --help: Display this help message
Examples:
Get the path to the current config file
&gt; config path
</code></pre>
</div>
<div class="row">
<h4 class="row__item">config remove</h4>
<a class="row__item" href="">&emsp;<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:
&gt; config remove {flags}
Parameters:
remove a value from the config
Flags:
-h, --help: Display this help message
Examples:
Remove the startup commands
&gt; config --remove startup
</code></pre>
</div>
<div class="row">
<h4 class="row__item">config set</h4>
<a class="row__item" href="">&emsp;<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:
&gt; config set {flags}
Parameters:
variable name to set
value to use
Flags:
-h, --help: Display this help message
Examples:
Set completion_mode to circular
&gt; config set [completion_mode circular]
</code></pre>
</div>
<div class="row">
<h4 class="row__item">config set_into</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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
&gt; 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">&emsp;<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:
&gt; count {flags}
Flags:
-h, --help: Display this help message
Examples:
Count the number of entries in a list
&gt; 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="">&emsp;<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:
&gt; 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
&gt; cp myfile dir_b
Recursively copy dir_a to dir_b
&gt; 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">&emsp;<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:
&gt; 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
&gt; date
Get the current UTC time and date
&gt; date --utc
Get the current time and date and report it based on format
&gt; date --format '%Y-%m-%d %H:%M:%S.%f %z'
Get the current time and date and report it without a table
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; do { echo hello }
Run the block and ignore errors
&gt; 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="">&emsp;<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:
&gt; 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
&gt; echo [1 2 3] | drop
Remove the last 2 items of a list/table
&gt; 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">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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
&gt; echo [[1 2] [3 4]] | each { echo $it | math sum }
Echo the square of each integer
&gt; echo [1 2 3] | each { echo $(= $it * $it) }
Number each item and echo a message
&gt; 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">&emsp;<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:
&gt; echo ...args{flags}
Parameters:
...args: the values to echo
Flags:
-h, --help: Display this help message
Examples:
Put a hello message in the pipeline
&gt; echo 'hello'
Print the value of the special '$nu' variable
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; enter ../projectB
Enter a file as a new shell
&gt; enter package.json
Enters file with iso-8859-1 encoding
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [1 2 3 4 5] | every 2
Skip every second row
&gt; 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">&emsp;<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:
&gt; exit {flags}
Flags:
-h, --help: Display this help message
-n, --now: exit out of the shell immediately
Examples:
Exit the current shell
&gt; exit
Exit all shells (exiting Nu)
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [1 2 3] | first
Return the first 2 items of a list/table
&gt; 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">&emsp;<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:
&gt; format {flags}
Parameters:
the pattern to output. Eg) "{foo}: {bar}"
Flags:
-h, --help: Display this help message
Examples:
Print filenames with their sizes
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; from bson {flags}
Flags:
-h, --help: Display this help message
Examples:
Convert bson data to a table
&gt; 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">&emsp;<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:
&gt; 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
&gt; open data.txt | from csv
Convert comma-separated data to a table, ignoring headers
&gt; open data.txt | from csv --headerless
Convert semicolon-separated data to a table
&gt; open data.txt | from csv --separator ';'
</code></pre>
</div>
<div class="row">
<h4 class="row__item">from db</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; ls | get name
Extract the cpu list from the sys information
&gt; 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">&emsp;<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:
&gt; 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
&gt; ls | group-by type
Group items by their value
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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">&emsp;<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:
&gt; headers {flags}
Flags:
-h, --help: Display this help message
Examples:
Create headers for a raw string
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; ls | histogram type
Get a histogram for the types of files, with frequency column named count
&gt; ls | histogram type count
Get a histogram for a list of numbers
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; echo 10 | if $it &gt; 5 { echo 'greater than 5' } { echo 'less than or equal to 5' }
Run a block if a condition is false
&gt; echo 1 | if $it &gt; 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">&emsp;<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:
&gt; 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 -&gt; 2.0.0)
-m, --minor: increment the minor version (eg 1.2.1 -&gt; 1.3.0)
-p, --patch: increment the patch version (eg 1.2.1 -&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; echo [1 2 3] | keep
Keep the first four rows
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; ps | sort-by mem | last | kill $it.pid
Force kill a given pid
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [1 2 3] | last
Get the last three rows
&gt; 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">&emsp;<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:
&gt; lines {flags}
Flags:
-h, --help: Display this help message
Examples:
Split multi-line string into lines
&gt; ^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="">&emsp;<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:
&gt; 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
&gt; ls
List all files in a subdirectory
&gt; ls subdir
List all rust files
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; math avg {flags}
Flags:
-h, --help: Display this help message
Examples:
Get the average of a list of numbers
&gt; 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="">&emsp;<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:
&gt; math max {flags}
Flags:
-h, --help: Display this help message
Examples:
Find the maximum of list of numbers
&gt; echo [-50 100 25] | math max
</code></pre>
</div>
<div class="row">
<h4 class="row__item">math median</h4>
<a class="row__item" href="">&emsp;<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:
&gt; math median {flags}
Flags:
-h, --help: Display this help message
Examples:
Get the median of a list of numbers
&gt; 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="">&emsp;<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:
&gt; math min {flags}
Flags:
-h, --help: Display this help message
Examples:
Get the minimum of a list of numbers
&gt; echo [-50 100 25] | math min
</code></pre>
</div>
<div class="row">
<h4 class="row__item">math mode</h4>
<a class="row__item" href="">&emsp;<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:
&gt; math mode {flags}
Flags:
-h, --help: Display this help message
Examples:
Get the mode(s) of a list of numbers
&gt; 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="">&emsp;<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:
&gt; math sum {flags}
Flags:
-h, --help: Display this help message
Examples:
Sum a list of numbers
&gt; echo [1 2 3] | math sum
Get the disk usage for the current directory
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; mv before.txt after.txt
Move a file into a directory
&gt; mv test.txt my/subdirectory
Move many files into a directory
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [first second third] | nth 1
Get the first and third rows
&gt; 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">&emsp;<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:
&gt; 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
&gt; open users.csv
Opens file with iso-8859-1 encoding
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; pwd {flags}
Flags:
-h, --help: Display this help message
Examples:
Print the current working directory
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; random bool
Generate a random boolean value with a 75% chance of "true"
&gt; random bool --bias 0.75
</code></pre>
</div>
<div class="row">
<h4 class="row__item">random dice</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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
&gt; random dice
Roll 10 dice with 12 sides each
&gt; random dice -d 10 -s 12
</code></pre>
</div>
<div class="row">
<h4 class="row__item">random uuid</h4>
<a class="row__item" href="">&emsp;<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:
&gt; random uuid {flags}
Flags:
-h, --help: Display this help message
Examples:
Generate a random uuid4 string
&gt; 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="">&emsp;<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:
&gt; range {flags}
Parameters:
range of rows to return: Eg) 4..7 (=&gt; 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">&emsp;<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:
&gt; 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
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo "{a: 1, b: 2, c: 3}" | from json | rename my_column
Rename many columns
&gt; 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">&emsp;<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:
&gt; reverse {flags}
Flags:
-h, --help: Display this help message
Examples:
Sort list of numbers in descending file size
&gt; 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="">&emsp;<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:
&gt; 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)
&gt; rm file.txt
Move a file to the system trash
&gt; rm --trash file.txt
Delete a file permanently
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; ls | select name
Select the name and size columns
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; size {flags}
Flags:
-h, --help: Display this help message
Examples:
Count the number of words in a string
&gt; 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">&emsp;<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:
&gt; skip (rows) {flags}
Parameters:
(rows) how many rows to skip
Flags:
-h, --help: Display this help message
Examples:
Skip the first 5 rows
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [4 2 3 1] | sort-by
Sort output by increasing file size
&gt; ls | sort-by size
Sort output by type, and then by file size for each type
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; split chars {flags}
Flags:
-h, --help: Display this help message
Examples:
Split the string's characters into separate rows
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; str capitalize ...args{flags}
Parameters:
...args: optionally capitalize text by column paths
Flags:
-h, --help: Display this help message
Examples:
Capitalize contents
&gt; echo 'good day' | str capitalize
</code></pre>
</div>
<div class="row">
<h4 class="row__item">str collect</h4>
<a class="row__item" href="">&emsp;<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:
&gt; str collect {flags}
Flags:
-h, --help: Display this help message
Examples:
Collect a list of string
&gt; echo ['a' 'b' 'c'] | str collect
</code></pre>
</div>
<div class="row">
<h4 class="row__item">str downcase</h4>
<a class="row__item" href="">&emsp;<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:
&gt; str downcase ...args{flags}
Parameters:
...args: optionally downcase text by column paths
Flags:
-h, --help: Display this help message
Examples:
Downcase contents
&gt; echo 'NU' | str downcase
</code></pre>
</div>
<div class="row">
<h4 class="row__item">str find-replace</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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
&gt; = 1.7 | str from -d 0
format large number with localized digit grouping
&gt; = 1000000.2 | str from -g
</code></pre>
</div>
<div class="row">
<h4 class="row__item">str length</h4>
<a class="row__item" href="">&emsp;<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:
&gt; str length {flags}
Flags:
-h, --help: Display this help message
Examples:
Return the lengths of multiple strings
&gt; echo 'hello' | str length
Return the lengths of multiple strings
&gt; echo 'hi' 'there' | str length
</code></pre>
</div>
<div class="row">
<h4 class="row__item">str set</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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
&gt; echo 'good day' | str set 'good bye'
Set the contents on preferred column paths
&gt; 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="">&emsp;<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:
&gt; 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
&gt; echo 'good nushell' | str substring [5 12]
Alternatively, you can use the form
&gt; echo 'good nushell' | str substring '5,12'
Get the last characters from the string
&gt; echo 'good nushell' | str substring ',-5'
Get the remaining characters from a starting index
&gt; echo 'good nushell' | str substring '5,'
Get the characters from the beginning until ending index
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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="">&emsp;<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:
&gt; 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
&gt; echo '255' | str to-int
</code></pre>
</div>
<div class="row">
<h4 class="row__item">str trim</h4>
<a class="row__item" href="">&emsp;<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:
&gt; 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
&gt; echo 'Nu shell ' | str trim
Trim a specific character
&gt; 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="">&emsp;<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:
&gt; str upcase ...args{flags}
Parameters:
...args: optionally upcase text by column paths
Flags:
-h, --help: Display this help message
Examples:
Upcase contents
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [1 2 3] | to json
Outputs a formatted JSON string representing the contents of this table with an indentation setting of 2 spaces
&gt; 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="">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; touch {flags}
Parameters:
the path of the file you want to create
Flags:
-h, --help: Display this help message
Examples:
Creates "fixture.json"
&gt; 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="">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; trim {flags}
Flags:
-h, --help: Display this help message
Examples:
Trims surrounding whitespace and outputs "Hello world"
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; 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">&emsp;<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:
&gt; version {flags}
Flags:
-h, --help: Display this help message
Examples:
Display Nu version
&gt; 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">&emsp;<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:
&gt; 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
&gt; ls | where size &gt; 2kb
List only the files in the current directory
&gt; ls | where type == File
List all files with names that contain "Car"
&gt; ls | where name =~ "Car"
List all files that were modified in the last two months
&gt; ls | where modified &lt;= 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">&emsp;<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:
&gt; 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="">&emsp;<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:
&gt; 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
&gt; 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">&emsp;<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:
&gt; 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
&gt; echo [1 2 3] | wrap
Wrap a list into a table with a given column name
&gt; 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