Git Product home page Git Product logo

nushell.github.io's Introduction

home heroImage heroText tagline actionText actionLink features
true
Nushell
A new type of shell
Get Started →
/book/
title details
Pipelines to control any OS
Nu works on Linux, macOS, BSD, and Windows. Learn it once, then use it anywhere.
title details
Everything is data
Nu pipelines use structured data so you can safely select, filter, and sort the same way every time. Stop parsing strings and start solving problems.
title details
Powerful plugins
It's easy to extend Nu using a powerful plugin system.

Screenshot showing using the ls command

Nu works with existing data

Nu speaks JSON, YAML, SQLite, Excel, and more out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API:

Screenshot showing fetch with a web API

Nu has great error messages

Nu operates on typed data, so it catches bugs that other shells don't. And when things break, Nu tells you exactly where and why:

Screenshot showing Nu catching a type error

Get Nu

Nushell is available as downloadable binaries, via your favourite package manager, in a GitHub Action, and as source code. Read the detailed installation instructions or dive right in:

macOS / Linux:

Homebrew
$ brew install nushell
Nix profile
$ nix profile install nixpkgs#nushell

Windows:

$ winget install nushell

After installing, launch Nu by typing nu.

Community

Join us on Discord if you have any questions about Nu!

You can help improve this site by giving us feedback or sending a PR.

nushell.github.io's People

Contributors

aloso avatar amtoine avatar andrasio avatar cad97 avatar chtenb avatar dependabot[bot] avatar devyn avatar elferherrera avatar fdncred avatar github-actions[bot] avatar hofer-julian avatar hustcer avatar ianmanske avatar ibraheemdev avatar joaquintrinanes avatar jzaefferer avatar kissaki avatar kubouch avatar maxim-uvarov avatar merelymyself avatar notthedr01ds avatar petrisch avatar rgwood avatar sholderbach avatar sophiajt avatar stormasm avatar waldyrious avatar webbedspace avatar windsoilder avatar yukitomoda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nushell.github.io's Issues

Better tables in examples

I noticed some people talking about how tables looked in different browsers on Reddit, and then when I checked nushell.sh I noticed a similar thing. Here's what I see in Firefox+Windows:

image

I wonder if there's a way to either render this the same across browsers, or if maybe we should just put an image there instead.

Not showing definition description on custom command --help

Based on Documenting your command, I can't create a top description on my custom commands.
In command line, when I press Enter my comment is simply ignored as expected, and in config.toml when I use multi-line comment ("""), still don't have it printed in my command --help.

# name os version kernel version
0 Ubuntu 20.04 5.8.0-44-generic
version 0.28.0
short_commit 22ae962b
commit_hash 22ae962b573e1cd9cdf8db5c0278759132c3b6f3
commit_date 2021-03-09 10:40:17
build_os linux-x86_64
rust_version rustc 1.50.0 (cb75ad5db 2021-02-10)
rust_channel stable-x86_64-unknown-linux-gnu (default)
cargo_version cargo 1.50.0 (f04e7fab7 2021-02-04)
pkg_version 0.28.0
build_time 2021-03-09 18:50:29
build_rust_channel release
features clipboard-cli, ctrlc, default, directories, dirs, ichwh, ptree, rustyline, term, trash, uuid, which, zip

PS: I restart nushell after each config.toml modification.

Old command output in command docs

A few commands need to have their outputs updated. I was looking at prepend, for example.

It shows:

> open continents.txt | lines
━━━┯━━━━━━━━━━━━━━━
 # │
───┼───────────────
 0 │ Africa
 1 │ South America
 2 │ Australia
 3 │ Europe
 4 │ Antarctica
━━━┷━━━━━━━━━━━━━━━

I believe this is old and should not use the mixed table drawing or the empty header.

This probably needs to be updated in the command docs on the main repo first, and then regenerated for the website.

Support the naked domain name

When I type nushell.sh (at least in Firefox on macOS Catalina), the page seems to end up sitting there waiting for a response. But if I type www.nushell.sh I get an instant response. My guess is the DNS records for nushell.sh weren't set up for a naked domain to either forward to www or to serve the same response as www.

Command reference shortcomings

What would really help me with getting into Nu is having any easy reference to all the commands.

This should be the place: https://www.nushell.sh/book/command_reference.html

But this page has some issues:-

  1. There's no index to each command at the top of the page. A section at the top with each command listed, and linked to the relevant section further down the page would be great. There could be multiple command names per line; it doesn't have to be a big, long vertical list.
  2. Scroll down a bit to the first command: alias. There is no anchor link to this command! I can't bookmark a link to it. This makes building a commands index hard, of course.
  3. There is an anchor link to the command's examples: https://www.nushell.sh/book/command_reference.html#examples But the trouble with this is that every command's Examples section has the exact same link! Scroll to the bottom of the page, and click on the for command's Examples anchor link (when the green # appears). You will be taken to the top of the page, to the first instance of what this link links to.
  4. Ditto for each command's for Usage, Parameters, Flags.
  5. It would be okay for each command to have links to its Examples, Usage, Parameters, Flags sections, so long as the links were specialized by the command name.
  6. What are str camel-case and for doing at the bottom of the page, and not in alpahbetical order like the others?
  7. Incidentally, str camel-case is an outlier (along with a few others) in that it has a repeated title, and the second one has an associated anchor link.
  8. All in-document links don't quite work correctly, in that clicking on them takes you to that section (e.g. "Flags"), but the heading (e.g. "Flags") is scolled off the top of the frame, so you're not quite sure what you're looking at. You have to scroll up a bit to check.

Make `each` easier to find.

When trying to find an analog for a Bash for, I searched for for, loop, and iteration in the Nushell docs, but came up short ... can we add something to make it a bit easier to find each?

Link to github for website

I was thinking we might want to link to this github from the bottom of pages in case people have things they want to change or suggest.

Table does quite line up on mobile

cc @Aloso who was working to improve this.

Looks like tables are a bit better, but not quite lined up, at least on my Samsung Galaxy S10.

Here's what it looks like for me:

Screenshot_20191129-172703_Chrome

Analytics

Add an analytics ID to the config file

Nu Book should have a section about strings

I was learning nu shell using Nu Book and noticed that documentation specific to strings is missing.

Nu Book should have a section about strings: "Working with strings" or "Working with text"
There are some examples of it but they are all scattered in topics about other subjects.

The idea is to show how nu could be used instead of sed/awk to do text processing.

Suggested topics:

  • trim
  • upper/lower case
  • substrings
  • spliting
  • string compare
  • regex matches and groups
  • parsing
  • type conversion to/from strings
  • ansi colors

RSS/Atom feed?

I just wanted to ask if there is support/if it would be possible to add support for RSS or atom on the blog? The old blog had support for that I think. I understand that this is probably rather niche and not a priority for the project if it is possible.

Provide more examples for `str` commands

The str commands are documented in the command_reference page starting here https://www.nushell.sh/book/command_reference.html#str-camel-case. There are simple examples on how to use it, with the only ones being documented are echo "sample text" | str command several of these commands list ...args as "...args: optionally command by column paths". There are no examples showing how one uses the optional arguments and how to use the command on structured data.

This issue was made because I wanted to list and then delete file names containing a substring I had tried the following.
ls | str contains 'old'
str contains 'old' ls.name
ls | get name | str contains 'old'
however, none of the solutions above worked. This is an example of using structured data and I don't know how to approach it.

Dark mode

It'd be nice if the websites could detect dark mode and switch to a dark theme if the mode was detected.

Improve documentation on strings

The current section on strings in the "Types of data" page could use some additions.

There are two existing issues that seem related to this:

  • #127, documenting the char command
  • #181, providing more examples for str

Both of these commands are commonly used with strings.

It seems to me that working with strings is a major part of a shell, should a top-level page about strings be created? It could contain the following topics:

  • Strings, quoted, bare, string interpolation
  • The char command
  • The str command
  • References to other relevant sections, such as "Loading data"

The current section on strings in "Types of data" could redirect the reader to the top-level page.

I'm interested in working on this.

More infos in README

It would be great if the README contained a brief explanation of

  • what this repo is
  • how to build it
  • which license is used

Document configuration setting for case-insensitive completions

Problem

There is an existing configuration setting to enable case-insensitive completions (source code):

[line_editor]
completion_match_method = "case-insensitive"

However, this setting is not currently documented on the Configuration page of the Nu Book.

Proposed solution

Add a row to the Line Editor section of the Configuration page - something like:

Name Purpose Value Type Options
completion_match_method Enable case-insensitive completions; completions are case-sensitive by default string case-insensitive

Questions

The header of the Line Editor section currently reads:

The [line_editor] section of the config.toml controls how our line editor, rustyline behaves. These configuration settings are specific to the rustyline crate we use.

The completion_match_method setting is not provided by rustyline - it's implemented directly by Nushell. Should the wording of the section header be changed, as well?

Move the books onto nushell.sh?

Right now we're publishing the Nu book through gitbooks, but we could look into publishing it differently, and also pull in the contributor book and cookbook.

feedback: cmd+f "install" on homepage comes up empty

Going to https://www.nushell.sh/ and searching for "install" came up empty. The top nav bar also doesn't include a link to "download". It's only now that after opening up this issue that I'm seeing the "get" link.

I think I was thrown off by the big green "blog" button, which feels like the main call to action in the navigation menu but didn't point me to what I wanted.

The reason why I'm bringing this up is because just like when logging in on a website I'll search for "login" on the page, when installing software I'll be looking for "install" on the page. Hope this is useful feedback!

error: Found argument '--all' - Documentation update

Tried to install the latest 0.9.0 Release according to the documentation https://www.nushell.sh/installation.html but got an error:

❯ cargo install nu --all --features=stable
error: Found argument '--all' which wasn't expected, or isn't valid in this context
	Did you mean --all-features?

USAGE:
    cargo install --all-features

For more information try --help

Command cargo install nu --all-features --features=stable works fine.

Please update the documentation page.

Document working with virtual environments

@elferherrera is currently working on adding Nushell support in Python's virtualenv and there's a general pattern for working with virtual environments, which was mentioned in the changelog.

We have some example scripts for that in the nu_scripts repo.

Right now, though, there's no way for users to discover those resources, unless they dig through old issues or follow updates in the nu_scripts repo.

I would like to document this in the Environment page in the Nu book.

I'm planning on:

  • documenting how to use load-env for activating and deactivating environments.
  • pointing to the nu_scripts repo for more examples
  • eventually adding a list of tools that officially support Nu (virtualenv will probably be the first of those)

Is there anything else anyone would like to have in the docs about virtual environments?

Asking Windows users to download Visual Studio Community Edition is inappropriate

From https://www.nushell.sh/book/en/installation.html:

For Rust to work properly, you’ll need to have a compatible compiler suite installed on your system. These are the recommended compiler suites:
. . .
. . .
. Windows: Visual Studio Community Edition
For Windows, when you install Visual Studio Community Edition, make sure to install the “C++ build tools” as what we need is link.exe which is provided as part of that optional install. With that, we’re ready to move to the next step.

Keep in mind that Visual Studio Community Edition with just the C++ build tools (unless I'm doing it incorrectly) is a 10.4 GB installation! I'll stick with Vim, thanks.

Since I used scoop.sh to install nu, I already have gcc installed. I'll see if I can just stick with that, but I would recommend that your directions remove such a big ask. It runs very counter to the entire philosophy of nu advertised on the website to ask newcomers to get such a massive dependency.

Some examples does not use the default setup

In the introduction section, the sys command output is:

> sys
─────────┬─────────────────────────────────────────
 host    │ [row 7 columns]
 cpu     │ [row cores current ghz max ghz min ghz]
 disks   │ [table 2 rows]
 mem     │ [row free swap free swap total total]
 net     │ [table 11 rows]
 battery │ [table 1 rows]
─────────┴─────────────────────────────────────────

But the output of sys on a fresh installation (0.33.1) with the default setup is:

> sys
───┬────────────┬───────────┬──────────┬────────────┬──────────┬───────────
 # │    host    │    cpu    │  disks   │    mem     │   temp   │    net
───┼────────────┼───────────┼──────────┼────────────┼──────────┼───────────
 0 │ [row name  │ [table 12 │ [table 2 │ [row       │ [table 4 │ [table 19
   │ os version │ rows]     │ rows]    │ total free │ rows]    │ rows]
   │ kernel     │           │          │ swap total │          │
   │ version    │           │          │ swap free] │          │
   │ hostname   │           │          │            │          │
   │ uptime     │           │          │            │          │
   │ sessions]  │           │          │            │          │
───┴────────────┴───────────┴──────────┴────────────┴──────────┴───────────

This is because pivot_mode by default never.
The book should probably use the default setup for its examples.

cd'ing to a directory with dots in it can cause a parse error in Windows

This happens if there's a backslash at the end of the directory (as is included by tab autocomplete).

Steps to replicate:

  • Navigate to a directory where you have write permissions
  • mkdir Thing.Stuff
  • cd Thing.Stuff\ (note the backslash at the end)

This can be worked around by removing the backslash at the end, but that also creates the issue that if you wanted to cd to Thing.Stuff\Misc, that will also cause a Parse error.

website footer doesn't point to where to provide feedback

hi!

https://www.nushell.sh/ says at the bottom

If you have suggestions or want to change something please give us feedback

it would be nice if it linked/pointed to where that is

I found it because I was looking for a place to ask some basic questions about nushell without filling an issue and only found that on the site.

If there's a community (discord/slack/forum) it could point there or to a page where it lists the best place to provide feedback for the site and for nushell

I'm willing to make a PR once I know what should be done, let me know :)

Layout improvements

I'd like to improve the page layout and am opening this issue to discuss the proposed changes.

Page size

  • Increase the width of the website from 650px to 900px and
  • Increase the font size from 16px to 18px

Navigation

  • Center the text vertically
  • Remove the (almost invisible) border
  • Increase the font size and horizontal padding of the right button
  • Make the button color less bright on hover
  • Make the nu> logo monospaced
  • Highlight the link for the current page with a green underline

Header

  • Increase font size
  • Make horizontal line thinner and lighter

<pre> blocks

  • Decrease the line height to remove these gaps in table lines:
    ━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━
              │          │ 
    ──────────┼──────────┼─────────────
              │          │     
    ━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━
  • Make horizontal and vertical padding consistent

Fonts

  • Currently the font variants in @font-face have the wrong weight and style, fix it.
  • Add local(...) to use system fonts instead of web fonts, if they are available in the client
  • Remove Open Sans Semibold and Open Sans Semibold Italic, since they aren't used. Then the remaining fonts are:
    • Open Sans Light, Open Sans Light Italic
    • Open Sans Regular, Open Sans Regular Italic
    • Open Sans Bold, Open Sans Bold Italic

About page

  • Make the github, discord and twitter icons larger, put them above the link text and center the links on the page

HTML, CSS

  • The viewport is defined as user-scalable=no, which is discouraged. Remove it
  • Add :focus CSS states for nicer keyboard navigation
  • The website uses deprecated elements, and it uses some elements incorrectly. Fix these issues

Screenshots

Docs

About

jq to nushell idioms

We should document the nu equivalents to jq idioms. As a deadline strapped developer I greatly appreciate this kind of focused documentation. It empowers me to solve a familiar problem in unfamiliar territory.

I love the "Coming from Bash" documentation and think long term a jq equivalent would be nice.
Then, folks could easily map from the 10 year old Stack Overflow answer to the brave nu world.

imagine post 1.x makes the most sense too. Once syntax and everything is stable enough!

bonus points

jq has an official tutorial. We could write an example in nu.

Cargo flags on installation page are wrong

On the installation page it says to run cargo install nu --all --features=stable for an "all bells and whistles" install. But it seems there is no --all flag in cargo. I'm new to Rust so not sure if this should be --all-features or --features=stable which both seem valid.
EDIT: I have copied the installation instructions from the book

Document the pathvar command

Some of the info in Coming from bash page and the Adding paths to your PATH page needs to be updated to include pathvar.

Documenting the `char` command

Is there a list of all the names of characters that char can print documented? Might be nice to have a handy reference.

Landing page refresh

nushell is gaining momentum, and I think it's time for our landing page to get a refresh. Let's modernize it, highlighting nushell's great features, and just making nushell really shine 🌟

Some ideas:

  • Modern layout (less mouse interaction, more vertical scrolling)
  • Highlight key features in an image/text side by side layout. For example:
    slack screen shot (source: https://slack.com/intl/en-ca/lp/three)
  • Maybe a softer colour palette? The high contrast may be befitting of an odler shell, but this is nushell 🙂
  • Unroll the tabular installation instructions into something really concise. For example: starship screen shot (source: https://starship.rs/)
  • More tasteful borders, fewer horizontal rules (and the ones we do have should be lower contrast).

Move Philosophy into Book

The book does a great job on the How. It explains well how Nushell works. But it lacks a bit on the Why. The Introduction hints on it but it seems to get lost on the surface, e.g. "modern style of development", "modern feel", "UX polish". New users tend to want to know the Why first before the How.

The Philosophy section of the Contributor Book does a great job on the Why. But it's usually read only long after the How and only by people interested in the underlying details.

I'd like to propose moving the Why before the How. This means moving the Philosophy section into the main book before any concrete "Usage" sections. It would probably make sense to put it just after the Installation section.

Example not working

The example in this page is not working: https://www.nushell.sh/cookbook/native_shell_programs.html

C:\Windows\system32> version
───┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────
 # │ version │ short_c │ commit_ │ commit_ │ build_o │ rust_ve │ rust_ch │ cargo_v │ pkg_ver │ build_t │ ...
   │         │  ommit  │  hash   │  date   │    s    │  rsion  │  annel  │ ersion  │  sion   │   ime   │
───┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────
 0 │ 0.38.0  │ e1ebd46 │ e1ebd46 │ 2021-10 │ windows │ rustc   │ stable- │ cargo   │ 0.38.0  │ 2021-10 │ ...
   │         │ 1       │ 1d24927 │ -05     │ -x86_64 │ 1.55.0  │ x86_64- │ 1.55.0  │         │ -05     │
   │         │         │ deb48ac │ 17:35:2 │         │ (c8dfcf │ pc-wind │ (32da73 │         │ 18:08:2 │
   │         │         │ 758f9b4 │ 5       │         │ e04     │ ows-msv │ ab1     │         │ 3       │
   │         │         │ 56a21b4 │ +00:00  │         │ 2021-09 │ c       │ 2021-08 │         │ +00:00  │
   │         │         │ 79065   │         │         │ -06)    │ (defaul │ -23)    │         │         │
   │         │         │         │         │         │         │ t)      │         │         │         │
───┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────

C:\Windows\system32> ^sc queryex eventlog | lines | trim | parse "{key}: {value}"
error: Command not found
   ┌─ shell:51:32
   │
51 │ ^sc queryex eventlog | lines | trim | parse "{key}: {value}"
   │                                ^^^^ command trim not found

Correct Winget installation instructions

The instructions to install nushell using Winget reference an incorrect package name nu.

The correct package name is nushell - the website and book documentation should be updated to reflect this.

Seeing issues with tables not aligning properly in some browsers

Here's a picture from one screenshot:

Eq4Q2IdVEAEqyqM

Asking around on twitter, I was told:

"Ok so I assumed this was ligatures from ---- not the actual characters for those lines. The misalignment on Android comes from the droid sans mono font not having those characters, causing it to fall back to noto sans symbols, which has different widths.

Which means font-variant-ligatures: none will have no effect, but using a web font to force it to use one of the other fonts in your list before it falls back to monospace will fix this for you"

So it sounds like we need to set better fallback fonts so that Android (and other browsers with the same issue) don't fallback to the wrong font.

cc @ibraheemdev

Overview of documents status?

I think we need to create a table to summarize the status of all the documents, so that we can translate the ones that are completed and relatively stable. Maybe a table like this:

name status zh-cn ja
aliases.md Finished Translated Untranslated
configuration.md In progress Being translated by @xyz Untranslated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.