Skip to content
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

Fixing #460 changing .html links to .md links #1099

Merged
merged 1 commit into from
Oct 10, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ For more about escape and `^` see the [chapter about escapes](escaping.md).

## PATH configuration

In Nushell, [the PATH environment variable](<https://en.wikipedia.org/wiki/PATH_(variable)>) (Path on Windows) is a list of paths. To append a new path to it, you can use `$env.<var> = <val>` and [`append`](/commands/docs/append.html) in `env.nu`:
In Nushell, [the PATH environment variable](<https://en.wikipedia.org/wiki/PATH_(variable)>) (Path on Windows) is a list of paths. To append a new path to it, you can use `$env.<var> = <val>` and [`append`](/commands/docs/append.md) in `env.nu`:

```nu
$env.PATH = ($env.PATH | split row (char esep) | append '/some/path')
```

This will append `/some/path` to the end of PATH; you can also use [`prepend`](/commands/docs/prepend.html) to add entries to the start of PATH.
This will append `/some/path` to the end of PATH; you can also use [`prepend`](/commands/docs/prepend.md) to add entries to the start of PATH.

Note the `split row (char esep)` step. We need to add it because in `env.nu`, the environment variables inherited from the host process are still strings. The conversion step of environment variables to Nushell values happens after reading the config files (see also the [Environment](environment.html#environment-variable-conversions) section). After that, for example in the Nushell REPL when `PATH`/`Path` is a list , you can use [`append`](/commands/docs/append.md)/[`prepend`](/commands/docs/prepend.md) directly.

Expand Down
12 changes: 6 additions & 6 deletions book/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $env.Path = ($env.Path | prepend 'C:\path\you\want\to\add')
Here we've prepended our folder to the existing folders in the Path, so it will have the highest priority.
If you want to give it the lowest priority instead, you can use the [`append`](/commands/docs/append.md) command.

### [`load-env`](/commands/docs/load-env.html)
### [`load-env`](/commands/docs/load-env.md)

If you have more than one environment variable you'd like to set, you can use [`load-env`](/commands/docs/load-env.md) to create a table of name/value pairs and load multiple variables at the same time:

Expand Down Expand Up @@ -99,7 +99,7 @@ true

## Changing directory

Common task in a shell is to change directory with the [`cd`](/commands/docs/cd.html) command.
Common task in a shell is to change directory with the [`cd`](/commands/docs/cd.md) command.
In Nushell, calling [`cd`](/commands/docs/cd.md) is equivalent to setting the `PWD` environment variable.
Therefore, it follows the same rules as other environment variables (for example, scoping).

Expand All @@ -112,14 +112,14 @@ A common shorthand to set an environment variable once is available, inspired by
BAR
```

You can also use [`with-env`](/commands/docs/with-env.html) to do the same thing more explicitly:
You can also use [`with-env`](/commands/docs/with-env.md) to do the same thing more explicitly:

```nu
> with-env { FOO: BAR } { $env.FOO }
BAR
```

The [`with-env`](/commands/docs/with-env.html) command will temporarily set the environment variable to the value given (here: the variable "FOO" is given the value "BAR"). Once this is done, the [block](types_of_data.html#blocks) will run with this new environment variable set.
The [`with-env`](/commands/docs/with-env.md) command will temporarily set the environment variable to the value given (here: the variable "FOO" is given the value "BAR"). Once this is done, the [block](types_of_data.md#blocks) will run with this new environment variable set.

## Permanent environment variables

Expand All @@ -135,7 +135,7 @@ $env.FOO = 'BAR'
## Defining environment from custom commands

Due to the scoping rules, any environment variables defined inside a custom command will only exist inside the command's scope.
However, a command defined as [`def-env`](/commands/docs/def-env.html) instead of [`def`](/commands/docs/def.html) (it applies also to [`export def`](/commands/docs/export_def.md), see [Modules](modules.md)) will preserve the environment on the caller's side:
However, a command defined as [`def-env`](/commands/docs/def-env.md) instead of [`def`](/commands/docs/def.md) (it applies also to [`export def`](/commands/docs/export_def.md), see [Modules](modules.md)) will preserve the environment on the caller's side:

```nu
> def-env foo [] {
Expand Down Expand Up @@ -202,7 +202,7 @@ _(Important! The environment conversion string -> value happens **after** the en

## Removing environment variables

You can remove an environment variable only if it was set in the current scope via [`hide-env`](/commands/docs/hide_env.html):
You can remove an environment variable only if it was set in the current scope via [`hide-env`](/commands/docs/hide_env.md):

```nu
> $env.FOO = 'BAR'
Expand Down
2 changes: 1 addition & 1 deletion book/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Nu's plugin documentation is a work in progress. If you're unsure about somethin

## More details

The [plugin chapter in the contributor book](/contributor-book/plugins.html) offers more details on the intricacies of how plugins work from a software developer point of view.
The [plugin chapter in the contributor book](/contributor-book/plugins.md) offers more details on the intricacies of how plugins work from a software developer point of view.
4 changes: 2 additions & 2 deletions de/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ features:

### Nu funktioniert mit existierenden Daten

Nu versteht [JSON, YAML, XML, Excel und noch mehr](/book/loading_data.html). Es ist einfach Daten in eine Nu Pipeline zu laden ganz egal ob diese in einer Datei, einer Datenbank oder einer Web-API liegen:
Nu versteht [JSON, YAML, XML, Excel und noch mehr](/book/loading_data.md). Es ist einfach Daten in eine Nu Pipeline zu laden ganz egal ob diese in einer Datei, einer Datenbank oder einer Web-API liegen:

<img src="https://www.nushell.sh/frontpage/fetch-example.png" alt="Screenshot zeigt das Laden von Daten von einer Web-API" class="hero"/>

Expand All @@ -30,7 +30,7 @@ Nu arbeitet mit typisierten Daten, wodurch Fehler abgefangen werden, die andere

## Nu installieren

Nushell ist verfügbar [als kompiliertes Programm](https://github.com/nushell/nushell/releases), [von einem Packetmanager](https://repology.org/project/nushell/versions), und als [Source Code](https://github.com/nushell/nushell). Die detaillierten Installationsanweisungen sind [hier](/de/book/installation.html) zu finden. Oder direkt loslegen:
Nushell ist verfügbar [als kompiliertes Programm](https://github.com/nushell/nushell/releases), [von einem Packetmanager](https://repology.org/project/nushell/versions), und als [Source Code](https://github.com/nushell/nushell). Die detaillierten Installationsanweisungen sind [hier](/de/book/installation.md) zu finden. Oder direkt loslegen:

#### macOS / Linux:

Expand Down
16 changes: 8 additions & 8 deletions de/book/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Eine häufige Aufgabe in einer Shell ist die Kontrolle der Umgebung, in der die
da die Umgebung dem externen programm mitgegeben wird, wenn es gestartet wird. Manchmal jedoch will man eine genauere Kontrolle darüber,
welche Umgebungsvariablen ein Programm sehen kann.

Die aktuellen Umbegungsvariablen werden mit dem [`env`](/commands/docs/env.html) Befehl ausgegeben:
Die aktuellen Umbegungsvariablen werden mit dem [`env`](/commands/docs/env.md) Befehl ausgegeben:

```
# name type value raw
Expand Down Expand Up @@ -42,7 +42,7 @@ $env.PATH = ($env.PATH | prepend '/pfad/der/hinzu/kommt')
Mit `prepend` wird der Ordner an den Anfang von PATH gestellt und hat damit die höchste Priorität.
Soll der Pfad ans Ende angehängt werden, so wird `append` verwendet.

### [`load-env`](/commands/docs/load-env.html)
### [`load-env`](/commands/docs/load-env.md)

Wenn mehrere Umgebungsvariablen gesetzt werden sollen, so kann `load-env` eine ganze Tabelle mitgegeben werden.
Diese besteht aus name/value Paaren, welche alle auf einmal geladen werden:
Expand Down Expand Up @@ -83,7 +83,7 @@ true

## Verzeichnis Wechsel

Etwas was in einer Shell häufig vorkommt ist das wechseln des Verzeichnisses mit dem [`cd`](/commands/docs/cd.html) Befehl.
Etwas was in einer Shell häufig vorkommt ist das wechseln des Verzeichnisses mit dem [`cd`](/commands/docs/cd.md) Befehl.
In der Nushell ist dies identisch mit dem setzen der `PWD` Umgebungsvariablen.
Dies wiederum folgt den gleichen Regeln wie das setzen anderer Umgebungsvariablen (wie z.B. Gültigkeitsbereich)

Expand All @@ -96,14 +96,14 @@ Eine praktische Möglichkeit eine Umgebungsvariable einmalig zu setzen, ist insp
BAR
```

Es kann auch [`with-env`](/commands/docs/with-env.html) verwendet werden um expliziter zu sein:
Es kann auch [`with-env`](/commands/docs/with-env.md) verwendet werden um expliziter zu sein:

```
> with-env { FOO: BAR } { echo $env.FOO }
BAR
```

Der [`with-env`](/commands/docs/with-env.html) Befehl setzt die Umgebungsvariable temporär (hier wird die Variable "FOO" auf den Wert "BAR" gesetzt)
Der [`with-env`](/commands/docs/with-env.md) Befehl setzt die Umgebungsvariable temporär (hier wird die Variable "FOO" auf den Wert "BAR" gesetzt)

## Permanente Umgebungsvariablen

Expand All @@ -119,7 +119,7 @@ $env.FOO = 'BAR'
## Definition einer Umgebungsvariablen für selbst definierten Befehl

Aufgrund der Gültigkeitsregeln ist eine Umgebungsvariable, welche innerhalb eines selbstdefinierten Befehls gesetzt ist, auch nur in dessen Block gültig.
Wird sie jedoch mit [`dev-env`](/commands/docs/def-env.html) anstatt [`def`](/commands/docs/def.html) gesetzt, so wird sie beim verlassen des Blocks erhalten bleiben.
Wird sie jedoch mit [`dev-env`](/commands/docs/def-env.md) anstatt [`def`](/commands/docs/def.md) gesetzt, so wird sie beim verlassen des Blocks erhalten bleiben.
(Gilt auch für `export def`, siehe [Modules](modules.md))

```
Expand Down Expand Up @@ -188,7 +188,7 @@ So können wir überprüfen, ob die Konvertierung erfolgreich war.

Dieser Schritt kann auch manuell ausgelöst werden mit `do $env.ENV_CONVERSIONS.FOO.to_string [a b c]`

Zurückschauend auf den [`env`](/commands/docs/env.html) Befehl, die `raw` Spalte zeigt die Werte, die mit `ENV_CONVERSIONS.<name>.to_string` übersetzt wurden.
Zurückschauend auf den [`env`](/commands/docs/env.md) Befehl, die `raw` Spalte zeigt die Werte, die mit `ENV_CONVERSIONS.<name>.to_string` übersetzt wurden.
Die `value` Spalte zeigt die Werte, die Nushell benutzt (Das Resultat von `ENV_CONVERSIONS.<name>.from_string` wie bei `FOO`)
Wenn der Wert kein String ist und keine `to_string` Konvertierung angewendet wird, wird er nicht an einen externen Befehl weitergeleitet (siehe die `raw` Spalte von `PROMPT_COMMAND`)
Eine Ausnahme ist die `PATH` Variable (`Path` in Windows): Standardmässig wird diese von einem String in eine Liste konvertiert beim Start
Expand All @@ -199,7 +199,7 @@ Alle Umgebungsvariablen in env.nu und config.nu sind immer noch Strings solange

## Entfernen von Umgebungsvariablen

Umgebungsvariablen können im aktuellen Gültigkeitsbereich entfernt werden via [`hide`](/commands/docs/hide.html):
Umgebungsvariablen können im aktuellen Gültigkeitsbereich entfernt werden via [`hide`](/commands/docs/hide.md):

```
> $env.FOO = 'BAR'
Expand Down
4 changes: 2 additions & 2 deletions ja/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ features:

### Nu は既存のデータとの連携が可能

Nu はでは[JSON, YAML, XML, Excel and more](/book/loading_data.html)を標準サポートしています。ファイル、データベース、Web API など、どのようなデータでも簡単に Nu パイプラインに取り込むことができます。
Nu はでは[JSON, YAML, XML, Excel and more](/book/loading_data.md)を標準サポートしています。ファイル、データベース、Web API など、どのようなデータでも簡単に Nu パイプラインに取り込むことができます。

<img src="https://www.nushell.sh/frontpage/fetch-example.png" alt="Screenshot showing fetch with a web API" class="hero"/>

Expand All @@ -30,7 +30,7 @@ Nu は型付けされたデータを操作するので、他のシェルでは

## Nu をインストールする

Nushell は、[バイナリのダウンロード](https://github.com/nushell/nushell/releases)、[パッケージマネージャによるインストール](https://repology.org/project/nushell/versions)、[ソースコードによるインストール](https://github.com/nushell/nushell)を提供しています。 [詳細なインストール方法](/book/installation.html)を読むかもしくは、下記のようにインストールすることもできます。
Nushell は、[バイナリのダウンロード](https://github.com/nushell/nushell/releases)、[パッケージマネージャによるインストール](https://repology.org/project/nushell/versions)、[ソースコードによるインストール](https://github.com/nushell/nushell)を提供しています。 [詳細なインストール方法](/book/installation.md)を読むかもしくは、下記のようにインストールすることもできます。

#### macOS / Linux:

Expand Down
4 changes: 2 additions & 2 deletions zh-CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ features:

### Nu 可以与现有数据一起工作

Nu 开箱即用支持 [JSON、YAML、SQLite、Excel 等](/zh-CN/book/loading_data.html)。无论是文件、数据库还是网络 API 中的数据,都可以很容易地引入 Nu 管道:
Nu 开箱即用支持 [JSON、YAML、SQLite、Excel 等](/zh-CN/book/loading_data.md)。无论是文件、数据库还是网络 API 中的数据,都可以很容易地引入 Nu 管道:

<img src="https://www.nushell.sh/frontpage/fetch-example.png" alt="Screenshot showing fetch with a web API" class="hero"/>

Expand All @@ -30,7 +30,7 @@ Nu 在类型化的数据上操作,所以它能捕捉到其他 Shell 无法捕

## 获取 Nu

Nushell 可以通过 [你喜欢的软件包管理器](https://repology.org/project/nushell/versions) 来安装 [可下载的二进制文件](https://github.com/nushell/nushell/releases),可以在 [GitHub Action](https://github.com/marketplace/actions/setup-nu) 中使用,此外也可以以 [源码](https://github.com/nushell/nushell)方式获得。在此阅读 [详细的安装说明](/zh-CN/book/installation.html)或直接开始:
Nushell 可以通过 [你喜欢的软件包管理器](https://repology.org/project/nushell/versions) 来安装 [可下载的二进制文件](https://github.com/nushell/nushell/releases),可以在 [GitHub Action](https://github.com/marketplace/actions/setup-nu) 中使用,此外也可以以 [源码](https://github.com/nushell/nushell)方式获得。在此阅读 [详细的安装说明](/zh-CN/book/installation.md)或直接开始:

#### macOS / Linux:

Expand Down
16 changes: 8 additions & 8 deletions zh-CN/book/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Shell 中的一个常见任务是控制外部应用程序将使用的环境变量。这通常是自动完成的,因为环境被打包,并在外部应用程序启动时提供给它。但有时,我们希望更精确地控制一个应用程序看到的环境变量。

你可以使用[`env`](/commands/docs/env.html)命令查看当前环境变量:
你可以使用[`env`](/commands/docs/env.md)命令查看当前环境变量:

```
# name type value raw
Expand Down Expand Up @@ -42,7 +42,7 @@ $env.PATH = ($env.PATH | prepend '/path/you/want/to/add')
在这里,我们把指定文件夹前置添加到`PATH`中的现有路径中,所以它将有最高的优先级。
如果你想给它最低的优先级,你可以使用`append`命令。

### [`load-env`](/commands/docs/load-env.html)
### [`load-env`](/commands/docs/load-env.md)

如果你有一个以上的环境变量需要设置,你可以使用`load-env`并创建一个键/值对记录(Record),以用于加载多个环境变量:

Expand Down Expand Up @@ -91,7 +91,7 @@ true

## 目录切换

Shell 中常见的任务是用[`cd`](/commands/docs/cd.html)命令来改变目录。
Shell 中常见的任务是用[`cd`](/commands/docs/cd.md)命令来改变目录。
在 Nushell 中,调用`cd`等同于设置`PWD`环境变量。
因此,它遵循与其他环境变量相同的规则(例如,作用域)。

Expand All @@ -104,14 +104,14 @@ Shell 中常见的任务是用[`cd`](/commands/docs/cd.html)命令来改变目
BAR
```

你也可以使用[`with-env`](/commands/docs/with-env.html)来更明确地做同样的事情:
你也可以使用[`with-env`](/commands/docs/with-env.md)来更明确地做同样的事情:

```nu
> with-env { FOO: BAR } { echo $env.FOO }
BAR
```

[`with-env`](/commands/docs/with-env.html)命令将暂时把环境变量设置为给定的值(这里:变量 "FOO" 被赋为 "BAR" 值)。一旦这样做了,[块](types_of_data.html#块) 将在这个新的环境变量设置下运行。
[`with-env`](/commands/docs/with-env.md)命令将暂时把环境变量设置为给定的值(这里:变量 "FOO" 被赋为 "BAR" 值)。一旦这样做了,[块](types_of_data.html#块) 将在这个新的环境变量设置下运行。

## 永久性环境变量

Expand All @@ -127,7 +127,7 @@ $env.FOO = 'BAR'
## 从自定义命令中定义环境变量

由于作用域规则,在自定义命令中定义的任何环境变量都只存在于该命令的作用域内。
然而,用[`def-env`](/commands/docs/def-env.html)而不是[`def`](/commands/docs/def.html)定义的命令(它也适用于`export def`,见 [模块](modules.md))将在调用者一方保留环境设置:
然而,用[`def-env`](/commands/docs/def-env.md)而不是[`def`](/commands/docs/def.md)定义的命令(它也适用于`export def`,见 [模块](modules.md))将在调用者一方保留环境设置:

```nu
> def-env foo [] {
Expand Down Expand Up @@ -190,15 +190,15 @@ a-b-c
用`nu -c`运行命令不会加载配置文件,因此`FOO`的环境转换没有了,它被显示为一个普通的字符串 —— 这样我们可以验证转换是否成功。
你也可以通过`do $env.ENV_CONVERSIONS.FOO.to_string [a b c]`手动运行这个步骤。

如果我们回头看一下[`env`](/commands/docs/env.html)命令,`raw`列显示由`ENV_CONVERSIONS.<name>.to_string`翻译的值,`value`列显示 Nushell 中使用的值(在`FOO`的情况下是`ENV_CONVERSIONS.<name>.from_string`的结果)。
如果我们回头看一下[`env`](/commands/docs/env.md)命令,`raw`列显示由`ENV_CONVERSIONS.<name>.to_string`翻译的值,`value`列显示 Nushell 中使用的值(在`FOO`的情况下是`ENV_CONVERSIONS.<name>.from_string`的结果)。
如果这个值不是字符串,并且没有`to_string`的转换,它就不会被传递给外部(见`PROMPT_COMMAND`的`raw`列)。
一个例外是`PATH`(Windows 上的`Path`)。默认情况下,它在启动时将字符串转换为列表,在运行外部程序时,如果没有指定手动转换,则从列表转换为字符串。

_(重要! 环境转换字符串->值发生在 `env.nu` 和 `config.nu` 被运行**之后**。`env.nu` 和 `config.nu` 中的所有环境变量仍然是字符串,除非你手动将它们设置为一些其他的值。)_

## 删除环境变量

只有当一个环境变量被设置在当前作用域中时,你才能通过 [`hide`](/commands/docs/hide.html) 命令“删除”它:
只有当一个环境变量被设置在当前作用域中时,你才能通过 [`hide`](/commands/docs/hide.md) 命令“删除”它:

```nu
> $env.FOO = 'BAR'
Expand Down