With 0.9.0, we're returning to our earlier behavior and executing both binaries and shell scripts by calling to the platform-native shell when we call an external command. While this should largely be invisible as a user, more things should "just work" how they would in bash or Windows Terminal.
## New commands
### du (Amanita-muscaria)
Nu now has its own `du` command to show the disk usage of a part of the file system. This is a handy way of quickly looking for where all your free space went.
```
❯ du
───┬───────────────┬─────────┬────────────────
# │ name │ size │ contents
───┼───────────────┼─────────┼────────────────
0 │ .git │ 4.7 MB │ [table 6 rows]
1 │ .jekyll-cache │ 49.0 KB │ [table 1 rows]
2 │ _includes │ 881 B │
3 │ _layouts │ 4.3 KB │
4 │ _posts │ 82.4 KB │
5 │ _sass │ 21.5 KB │
6 │ _site │ 5.3 MB │ [table 4 rows]
7 │ assets │ 2.4 MB │ [table 1 rows]
8 │ images │ 2.4 MB │
───┴───────────────┴─────────┴────────────────
```
### clear (JesterOrNot)
Short, sweet, and to the point, you can now `clear` your screen with the new `clear` command. Like our other commands, this works across all the platforms Nu runs on.
## New welcome message (sophiajt)
```
Welcome to Nushell 0.9.0 (type 'help' for more info)
nushell on 📙 bump_to_0_9_0 is 📦 v0.9.0 via 🦀 v1.40.0
❯
```
The first time you open Nu now you'll be greeted by a brief message to tell you the version of Nu and a reminder to use the `help` command to learn more about Nu and how it works.
## Improved table streaming (sophiajt)
If you've used earlier versions of Nu, you may have wondered why every 50 rows we start a new table. This is where the implementation showed through a bit more than it should. As tables are printed, they are created and then displayed as enough rows are available. This means that output will spool to the screen and not wait for the table to finish processing before you see something. In general, it's good to see the tables earlier, but seeing a different shape of table every 50 rows can be annoying.
We've updated table output to be a lot cleaner, using this logic:
- If rows are being output quickly, build a larger table before outputting it
- If rows are being output slowly, buffer a smaller number of rows and display them (just as before)
- If rows change shape, switch to showing a different table. This helps you visually see when your data source is giving you a new kind of data
## Command improvements
### `ls` and `rm` now error when a path isn't found (Amanita-muscaria)
Adding a bit of polish this release, `ls` and `rm` will now error if you pass them a path they can't find.
### `ls` can optionally show just the filename (coolshaurya)
If you've used `ls` on your subdirectories, you might have noticed that the subdirectory becomes part of the filename. This can be great for building up a pipeline (and a script in the future), but sometimes all you care about is the filename. You can now pass `ls` the `--short-names` command flag to get just the filename.