Add nushell README.md (#1224)

This commit is contained in:
Justin Ma 2022-06-10 12:16:41 +08:00 committed by GitHub
parent c8c5fe1789
commit 2710df4207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 2 deletions

View File

@ -723,6 +723,20 @@ set shell := ["zsh", "-uc"]
set shell := ["fish", "-c"]
```
##### Nushell
```make
set shell := ["nu", "-c"]
```
If you want to change the default table mode to `light`:
```make
set shell := ['nu', '-m', 'light', '-c']
```
*[Nushell](https://github.com/nushell/nushell) was written in Rust, and **has cross-platform support for Windows / macOS and Linux**.*
### Documentation Comments
Comments immediately preceding a recipe will appear in `just --list`:
@ -1492,6 +1506,11 @@ sh:
hello='Yo'
echo "$hello from a shell script!"
nu:
#!/usr/bin/env nu
let hello = 'Yo'
echo $"($hello) from a shell script!"
ruby:
#!/usr/bin/env ruby
puts "Hello from ruby!"

View File

@ -27,7 +27,7 @@
命令,在此也称为配方,存储在一个名为 `justfile` 的文件中,其语法受 `make` 启发:
![screenshot](screenshot.png)
![screenshot](https://raw.githubusercontent.com/casey/just/master/screenshot.png)
然后你可以用 `just RECIPE` 运行它们:
@ -719,6 +719,20 @@ set shell := ["zsh", "-uc"]
set shell := ["fish", "-c"]
```
##### Nushell
```make
set shell := ["nu", "-c"]
```
如果你想设置默认的表格显示模式为 `light`:
```make
set shell := ['nu', '-m', 'light', '-c']
```
*[Nushell](https://github.com/nushell/nushell) 使用 Rust 开发并且具备良好的跨平台能力,**支持 Windows / macOS 和各种 Linux 发行版***
### 文档注释
紧接着配方前面的注释将出现在 `just --list` 中:
@ -1489,6 +1503,11 @@ sh:
hello='Yo'
echo "$hello from a shell script!"
nu:
#!/usr/bin/env nu
let hello = 'Yo'
echo $"($hello) from a shell script!"
ruby:
#!/usr/bin/env ruby
puts "Hello from ruby!"
@ -1899,7 +1918,7 @@ bar
更新日志
---------
最新版本的更新日志可以在 [CHANGELOG.md](CHANGELOG.md) 中找到。以前版本的更新日志可在 [发布页](https://github.com/casey/just/releases) 找到。`just --changelog` 也可以用来使 `just` 二进制文件打印其更新日志。
最新版本的更新日志可以在 [CHANGELOG.md](https://raw.githubusercontent.com/casey/just/master/CHANGELOG.md) 中找到。以前版本的更新日志可在 [发布页](https://github.com/casey/just/releases) 找到。`just --changelog` 也可以用来使 `just` 二进制文件打印其更新日志。
杂项
-----------