Nushell 0.10.0

栏目: IT技术 · 发布时间: 4年前

内容简介:Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your commandline. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful commandl

Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your commandline. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful commandline pipelines.

Greetings and welcome to the 10th release of Nushell! Yes, that’s right this is the tenth release of Nu we’ve put out in the wild, and oh is this release wild. So let’s stop dilly-dallying and get right to it, shall we?

Where to get it

Nu 0.10.0 is available as pre-built binaries or from crates.io . If you have Rust installed you can install it using cargo install nu .

If you want more goodies, you can install cargo install nu --features=stable .

As part of this release, we also publish a set of plugins you can install and use with Nu. To install, use cargo install nu_plugin_<plugin name> .

What’s new

Scripts! (thegedge, jonathandturner)

Yes, you read that right, we’re just beginning to add support for running Nu scripts. So far, these scripts are simple things. Nu will go line by line and run each line. But we’re looking forward to building up support with more features as we go.

To run a script, you just call nu and pass in it the script file:

> cat hello_world.nu 
echo hello
echo world

> nu hello_world.nu
hello
world

Running commands from outside Nu (jonathandturner)

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:

> ./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:

> ls --full

You can now use:

> 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.

> 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.

> 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 (jonathandturner)

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

Lots of bugfixes/improvements (thegedge, UltraWelfare, jonathandturner, 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.


以上所述就是小编给大家介绍的《Nushell 0.10.0》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

信息架构

信息架构

[美] 路易斯·罗森菲尔德、[美] 彼得·莫尔维莱、[美] 豪尔赫·阿朗戈 / 樊旺斌、师蓉 / 电子工业出版社 / 2016-5-1 / 128.00元

本书的前三个版本都是信息架构领域的开山著作。其中描述了信息组织的普遍和永恒原则,这一原则也适用于不断增长的移动世界。在第4版中,作者运用大量最新的插图和例子为这些原则提供了当前实践中的情境,验证了那些与技术和供应商无关的工具,以及那些经受住时间考验的技术。一起来看看 《信息架构》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具