Skip to content

Translate custom commands and aliases to zh-CN from commit: 218f600a9 #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module.exports = {
title: 'Nushell',
description: 'Um novo tipo de shell.',
},
'/zh-cn/': {
lang: 'zh-cn',
'/zh-CN/': {
lang: 'zh-CN',
title: 'Nushell',
description: '一种新型的外壳。.',
},
Expand Down Expand Up @@ -382,18 +382,18 @@ module.exports = {
// ],
},
},
'/zh-cn/': {
'/zh-CN/': {
selectText: '语言',
label: '中文',
editLinkText: '在GitHub上编辑此页面',
nav: [
{ text: '书', link: '/zh-cn/book/' },
{ text: '书', link: '/zh-CN/book/' },
// { text: "Contributor Book", link: "/contributor-book/" },
{ text: 'Cookbook', link: '/cookbook/' },
{ text: 'Blog', link: '/blog/' },
],
sidebar: {
'/zh-cn/book/': [
'/zh-CN/book/': [
{
title: '入门篇',
collapsable: false,
Expand All @@ -418,16 +418,22 @@ module.exports = {
],
},
{
title: '待续',
title: 'Nushell 编程',
collapsable: false,
children: [
'configuration',
'custom_commands',
'aliases',
'math',
'environment',
'metadata',
// 'operators',
// 'variables_and_subexpressions',
// 'scripts',
// 'modules',
],
},
{
title: '待续',
collapsable: false,
children: ['configuration', 'math', 'environment', 'metadata'],
},
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion book/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ And get the equivalent to having typed `ls -l -a`.

## Persisting

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).
For information about how to persist aliases so that they're visible when you start up Nushell, see the [configuration chapter](configuration.md).
2 changes: 1 addition & 1 deletion book/custom_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,4 @@ Now, if we call the above command later in a pipeline, we can see what it does w

## Persisting

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.
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.
27 changes: 27 additions & 0 deletions zh-CN/book/aliases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 别名

Nushell 中的别名提供了一种简单的文本替换方式,这允许你为一个较长的命令创建一个简写名称,包括其默认参数。

例如,让我们创建一个名为 `ll` 的别名,它将展开为 `ls -l`。

```bash
> alias ll = ls -l
```

我们可以通过别名来调用它:

```bash
> ll
```

一旦我们这样做了,就如同我们输入了 `ls -l` 一样。这也允许我们传入标志或位置参数。例如,我们现在也可以这样写:

```
> ll -a
```

可得到与输入了`ls -l -a`一样的结果。

## 持久化

关于如何持久化别名,以便在你启动 Nushell 时它们是可用的,请参考[配置章节](configuration.md)。
File renamed without changes.
File renamed without changes.
Loading