Skip to content

Commit 0b0389f

Browse files
authored
Translate custom commands and aliases to zh-CN from commit: 218f600 (#384)
* Translate custom commands and aliases to zh-CN from commit: 218f600 * Some proofreading and retouching * Change locale name * Add aliases translation
1 parent a555c8f commit 0b0389f

24 files changed

+404
-68
lines changed

.vuepress/config.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ module.exports = {
2525
title: 'Nushell',
2626
description: 'Um novo tipo de shell.',
2727
},
28-
'/zh-cn/': {
29-
lang: 'zh-cn',
28+
'/zh-CN/': {
29+
lang: 'zh-CN',
3030
title: 'Nushell',
3131
description: '一种新型的外壳。.',
3232
},
@@ -382,18 +382,18 @@ module.exports = {
382382
// ],
383383
},
384384
},
385-
'/zh-cn/': {
385+
'/zh-CN/': {
386386
selectText: '语言',
387387
label: '中文',
388388
editLinkText: '在GitHub上编辑此页面',
389389
nav: [
390-
{ text: '书', link: '/zh-cn/book/' },
390+
{ text: '书', link: '/zh-CN/book/' },
391391
// { text: "Contributor Book", link: "/contributor-book/" },
392392
{ text: 'Cookbook', link: '/cookbook/' },
393393
{ text: 'Blog', link: '/blog/' },
394394
],
395395
sidebar: {
396-
'/zh-cn/book/': [
396+
'/zh-CN/book/': [
397397
{
398398
title: '入门篇',
399399
collapsable: false,
@@ -418,16 +418,22 @@ module.exports = {
418418
],
419419
},
420420
{
421-
title: '待续',
421+
title: 'Nushell 编程',
422422
collapsable: false,
423423
children: [
424-
'configuration',
424+
'custom_commands',
425425
'aliases',
426-
'math',
427-
'environment',
428-
'metadata',
426+
// 'operators',
427+
// 'variables_and_subexpressions',
428+
// 'scripts',
429+
// 'modules',
429430
],
430431
},
432+
{
433+
title: '待续',
434+
collapsable: false,
435+
children: ['configuration', 'math', 'environment', 'metadata'],
436+
},
431437
],
432438
},
433439
},

book/aliases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ And get the equivalent to having typed `ls -l -a`.
2424

2525
## Persisting
2626

27-
For information about how to persist aliases so that they're visible when you start up Nushell, see the [configuration chapter](configuration.md#startup-commands).
27+
For information about how to persist aliases so that they're visible when you start up Nushell, see the [configuration chapter](configuration.md).

book/custom_commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,4 @@ Now, if we call the above command later in a pipeline, we can see what it does w
350350

351351
## Persisting
352352

353-
For information about how to persist custom commands so that they're visible when you start up Nushell, see the [configuration chapter](configuration.md#startup-commands) and add your startup script.
353+
For information about how to persist custom commands so that they're visible when you start up Nushell, see the [configuration chapter](configuration.md) and add your startup script.
File renamed without changes.
File renamed without changes.

zh-CN/book/aliases.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 别名
2+
3+
Nushell 中的别名提供了一种简单的文本替换方式,这允许你为一个较长的命令创建一个简写名称,包括其默认参数。
4+
5+
例如,让我们创建一个名为 `ll` 的别名,它将展开为 `ls -l`
6+
7+
```bash
8+
> alias ll = ls -l
9+
```
10+
11+
我们可以通过别名来调用它:
12+
13+
```bash
14+
> ll
15+
```
16+
17+
一旦我们这样做了,就如同我们输入了 `ls -l` 一样。这也允许我们传入标志或位置参数。例如,我们现在也可以这样写:
18+
19+
```
20+
> ll -a
21+
```
22+
23+
可得到与输入了`ls -l -a`一样的结果。
24+
25+
## 持久化
26+
27+
关于如何持久化别名,以便在你启动 Nushell 时它们是可用的,请参考[配置章节](configuration.md)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)