Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions _layouts/command.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!doctype html>
<html lang="{{ site.lang | default: "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">

{% seo %}
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<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' | relative_url }}"></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' | relative_url }}">
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

</head>
<body>
<div id="header">
{% include navigation.html %}
</div><!-- end header -->

<div class="wrapper">

<section>
<div id="title">
<h1>{{ page.title }}</h1>
<hr>

</div>

{{ content }}

</section>

</div>

{% if site.google_analytics %}
<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', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>

<footer>
<div>
<center>
If you found an error in this command documentation or want to adapt it <a href="https://github.com/nushell/nushell/blob/master/docs/commands/{{page.title}}.md">please go here</a>
</center>
</div>
</footer>

</html>
9 changes: 9 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,14 @@ <h3><center>{{ site.description | default: site.github.project_tagline }}</cente
ga('send', 'pageview');
</script>
{% endif %}

<footer>
<div>
<center>
If you have suggestions or want to change something please give us <a href="https://github.com/nushell/nushell.github.io">feedback</a>
</center>
</div>
</footer>

</body>
</html>
9 changes: 9 additions & 0 deletions _layouts/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,13 @@ <h1>{{ page.title }}</h1>
</script>
{% endif %}
</body>

<footer>
<div>
<center>
If you have suggestions or want to change something please give us <a href="https://github.com/nushell/nushell.github.io">feedback</a>
</center>
</div>
</footer>

</html>
4 changes: 2 additions & 2 deletions _sass/jekyll-theme-midnight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ table {
list-style: none;
display: inline;
color: white;
line-height: 20px;
line-height: min-content;
text-shadow: 0px 1px 0px rgba(0,0,0,.2);
font-size: 14px;
margin-top: 10px;
Expand All @@ -199,7 +199,7 @@ table {
word-spacing: 2px;
background-color: #418305;
padding: 4px 4px;
padding-top: 8px;
padding-top: 4px;
padding-bottom: 4px;
font-size:15px;
text-align:center;
Expand Down
4 changes: 4 additions & 0 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
layout: about
title: about
---
If you have suggestions or things you want to change on this site please feel free to send us some [feedback](https://github.com/nushell/nushell.github.io).

Found things to change in the other projects please go to the specific pages for them:
[book](https://github.com/nushell/book), [contributors book](https://github.com/nushell/contributor-book), [cookbook](https://github.com/nushell/cookbook).
11 changes: 11 additions & 0 deletions commands/00_newtable.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[add](/commands/add.html) | [fetch](/commands/fetch.html) | [pick](/commands/pick.html) | [tags](/commands/tags.html)
[append](/commands/append.html) | [first](/commands/first.html) | [pivot](/commands/pivot.html) | [to-csv](/commands/to-csv.html)
[average](/commands/average.html) | [from-csv](/commands/from-csv.html) | [prepend](/commands/prepend.html) | [to-json](/commands/to-json.html)
[cd](/commands/cd.html) | [from-toml](/commands/from-toml.html) | [reject](/commands/reject.html) | [to-toml](/commands/to-toml.html)
[count](/commands/count.html) | [group-by](/commands/group-by.html) | [reverse](/commands/reverse.html) | [to-tsv](/commands/to-tsv.html)
[date](/commands/date.html) | [help](/commands/help.html) | [shells](/commands/shells.html) | [to-url](/commands/to-url.html)
[echo](/commands/echo.html) | [inc](/commands/inc.html) | [size](/commands/size.html) | [to-yaml](/commands/to-yaml.html)
[edit](/commands/edit.html) | [last](/commands/last.html) | [sort-by](/commands/sort-by.html) | [trim](/commands/trim.html)
[enter](/commands/enter.html) | [lines](/commands/lines.html) | [str](/commands/str.html) | [version](/commands/version.html)
[env](/commands/env.html) | [nth](/commands/nth.html) | [sum](/commands/sum.html) | [where](/commands/where.html)
[exit](/commands/exit.html) | [open](/commands/open.html) | [sys](/commands/sys.html) |
5 changes: 4 additions & 1 deletion commands/add.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# add
---
title: add
layout: command
---

This command adds a column to any table output. The first parameter takes the heading, the second parameter takes the value for all the rows.

Expand Down
6 changes: 5 additions & 1 deletion commands/append.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# append
---
title: append
layout: command
---

This command allows you to append the given row to the table.

**Note**:
Expand Down
6 changes: 5 additions & 1 deletion commands/average.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# average
---
title: average
layout: command
---

This command allows you to calculate the average of values in a column.

## Examples
Expand Down
5 changes: 4 additions & 1 deletion commands/cd.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# cd
---
title: cd
layout: command
---

If you didn't already know, the `cd` command is very simple. It stands for 'change directory' and it does exactly that. It changes the current directory to the one specified. If no directory is specified, it takes you to the home directory. Additionally, using `cd ..` takes you to the parent directory.

Expand Down
5 changes: 4 additions & 1 deletion commands/count.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# count
---
title: count
layout: command
---

This command counts the number of rows in a table.

Expand Down
5 changes: 4 additions & 1 deletion commands/date.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# date
---
title: date
layout: command
---

Use `date` to get the current date and time. Defaults to local timezone but you can get it in UTC too.

Expand Down
7 changes: 5 additions & 2 deletions commands/echo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# echo
---
title: echo
layout: command
---

Use `echo` to repeat arguments back to the user

Expand All @@ -9,4 +12,4 @@ Use `echo` to repeat arguments back to the user
Hello world
> echo "Hello, world!"
Hello, world!
```
```
5 changes: 4 additions & 1 deletion commands/edit.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# edit
---
title: edit
layout: command
---

Edits an existing column on a table. First parameter is the column to edit and the second parameter is the value to put.

Expand Down
5 changes: 4 additions & 1 deletion commands/enter.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# enter
---
title: enter
layout: command
---

This command creates a new shell and begin at this path.

Expand Down
5 changes: 4 additions & 1 deletion commands/env.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# env
---
title: env
layout: command
---

The `env` command prints to terminal the environment of nushell

Expand Down
5 changes: 4 additions & 1 deletion commands/exit.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# exit
---
title: exit
layout: command
---

Exits the nu shell. If you have multiple nu shells, use `exit --now` to exit all of them.

Expand Down
7 changes: 5 additions & 2 deletions commands/fetch.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# fetch
---
title: fetch
layout: command
---

This command loads from a URL into a cell, convert it to table if possible (avoid by appending `--raw` flag)

Expand Down Expand Up @@ -29,4 +32,4 @@ This command loads from a URL into a cell, convert it to table if possible (avoi
────────────────
[table: 1 row]
━━━━━━━━━━━━━━━━
```
```
5 changes: 4 additions & 1 deletion commands/first.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# first
---
title: first
layout: command
---

Use `first` to retrieve the first "n" rows of a table. `first` has a required amount parameter that indicates how many rows you would like returned. If more than one row is returned, an index column will be included showing the row number.

Expand Down
5 changes: 4 additions & 1 deletion commands/from-csv.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# from-csv
---
title: from-csv
layout: command
---

Converts csv data into table. Use this when nushell cannot dertermine the input file extension.

Expand Down
7 changes: 5 additions & 2 deletions commands/from-toml.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# from-toml
---
title: from-toml
layout: command
---
Converts toml data into table. Use this when nushell cannot dertermine the input file extension.

## Example
Expand All @@ -20,4 +23,4 @@ The "Cargo.lock" file is actually a .toml file, but the file extension isn't .to
────────────────┼───────────────────
[table: 1 row] │ [table: 154 rows]
━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
```
```
5 changes: 4 additions & 1 deletion commands/group-by.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# group-by
---
title: group-by
layout: command
---

This command creates a new table with the data from the table rows grouped by the column given.

Expand Down
5 changes: 4 additions & 1 deletion commands/help.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# help
---
title: help
layout: command
---

Use `help` for more information on a command.
Use `help commands` to list all availble commands.
Expand Down
7 changes: 5 additions & 2 deletions commands/inc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# inc
---
title: inc
layout: command
---

This command increments the value of variable by one.

Expand Down Expand Up @@ -28,4 +31,4 @@ This command increments the value of variable by one.
0.2.0
> open Cargo.toml | inc package.version --patch | get package.version
0.1.4
```
```
5 changes: 4 additions & 1 deletion commands/last.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# last
---
title: last
layout: command
---

Use `last` to retrieve the last "n" rows of a table. `last` has a required amount parameter that indicates how many rows you would like returned. If more than one row is returned, an index column will be included showing the row number. `last` does not alter the order of the rows of the table.

Expand Down
5 changes: 4 additions & 1 deletion commands/lines.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# lines
---
title: lines
layout: command
---
This command takes a string from a pipeline as input, and returns a table where each line of the input string is a row in the table. Empty lines are ignored. This command is capable of feeding other commands, such as `nth`, with its output.

## Usage
Expand Down
7 changes: 5 additions & 2 deletions commands/nth.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# nth
---
title: nth
layout: command
---

This command returns the nth row of a table, starting from 0.
If the number given is less than 0 or more than the number of rows, nothing is returned.
Expand Down Expand Up @@ -28,4 +31,4 @@ If the number given is less than 0 or more than the number of rows, nothing is r
━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━

> ls | nth 5
```
```
7 changes: 5 additions & 2 deletions commands/open.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# open
---
title: open
layout: command
---

Loads a file into a cell, convert it to table if possible (avoid by appending `--raw` flag)

Expand Down Expand Up @@ -92,4 +95,4 @@ Loads a file into a cell, convert it to table if possible (avoid by appending `-
"Country": "Germany"
}
]
```
```
5 changes: 4 additions & 1 deletion commands/pick.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# pick
---
title: pick
layout: command
---

This command displays only the column names passed on to it.

Expand Down
6 changes: 4 additions & 2 deletions commands/pivot.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pivot

---
title: pivot
layout: command
---
Pivots the table contents so rows become columns and columns become rows.

## Examples
Expand Down
Loading