Home Explore Blog CI



nushell

2nd chunk of `blog/2020-02-18-nushell-0_10_0.md`
092d9949f3149d2a975cbe7355bc5c2c031199400924c3430000000100000e53
> nu hello_world.nu
hello
world
```

## Running commands from outside Nu (sophiajt)

Another fun features in this release is the ability to run a Nu command from outside of Nu. Just like shells like Bash and Windows CMD, you can now pass the `-c` flag and give the pipeline you want to run:

```sh
> ./nu -c "ls | get name"
─────┬───────────────────────────────
 #   │ <value>
─────┼───────────────────────────────
   0 │ .cargo-lock
   1 │ .fingerprint
   2 │ build
   3 │ deps
```

## Shorthand flags (Amanita-muscaria)

Tired of typing those long flags that every Nu command seems to have? Worry no more! You can now use short flags in many common Nu commands. For example:

Instead of:

```sh
> ls --full
```

You can now use:

```sh
> ls -f
```

The shorthand flags are listed as part of the updated help section

## Did someone say flags? (andrasio)

If you're coming to Nu from other CLIs, you might have wondered why you always had to put flags at the end. A little annoying, right? We fixed it.

```sh
> ls *.sh --full
```

and now:

```
> ls --full *.sh
```

Use whichever you like best.

## More plugins by default (andrasio)

We've extended the set of plugins installed with `cargo install nu --features=stable` to the whole set of stable plugins. This cuts down on the amount of extra plugins to install if you want the full set. It should also help cut down on the confusion when users expected a command to be available but wasn't installed by default. You can still install without these additional commands, if you like, and pick and choose the ones you want.

## `calc` command (coolshaurya)

There's a new `calc` command in development that can calculate the result of math expressions in a string.

```sh
> echo "2+3" | calc
5.000000000000000
```

## `kill` command (sandorex)

Nu now also has a cross-platform `kill` command, for killing processes.

## Command improvements

### External commands can access `$nu` (andrasio)

External commands commands can now access the `$nu` variable that holds internal values for Nu.

### Datetime parsing (Amanita-muscaria)

You can now parse datetime strings using the `str` command.

### `du` command now shows apparent and physical disk usage (Amanita-muscaria)

The `du` command now lets you see both the amount of space that directories appear to take as well as the amount of total actual space they take up on the disk.

### Better `help` message (sophiajt)

By default, the `help` command now prints a little more information by default to help you get started.

## Lots of bugfixes/improvements (thegedge, UltraWelfare, sophiajt, andrasio, avandesa, notryanb, coolshaurya, twitu)

Better errors for incorrect `mv` and incorrect flags, better performance running external commands, better code documentation, plugins can now have numbers in their names, test directories can now have spaces in their names, fixed some issues with `cp`, moved off of the "futures-preview" crate to "futures" official, fixes to working with external commands that don't send line endings, improvements to `textview` and more.

# Looking ahead

Adding the ability to run scripts gives Nu a lot more potential when used in larger tasks, and we're excited to continue to grow this support. This work comes out of the work to add aliases, which we're currently working on. It also opens up the possibility of running Nu from other hosts in the future.

Scripting also lends itself to needing more structure, variables, and more. We're looking ahead to those, too.

Title: Nushell 0.10.0: New Features, Improvements, and Bug Fixes
Summary
This section details the new features, improvements, and bug fixes in Nushell 0.10.0. Highlights include running commands from outside Nu, shorthand flags, flexible flag placement, expanded default plugins, a `calc` command for evaluating math expressions, a `kill` command, improvements to external command access, datetime parsing, `du` command enhancements, better `help` messages, and numerous bug fixes. The release also sets the stage for future scripting and language enhancements.