Skip to content

Commit 0a3a85f

Browse files
committed
Update hook links to use relative paths for better documentation navigation
1 parent 355e07d commit 0a3a85f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cookbook/setup.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Because you can append a list of paths, you can append multiple at once. You can
3232
$env.PATH ++= [ '~/.local/bin', ($env.CARGO_HOME | path join "bin") ]
3333
```
3434

35-
Because PATH order makes a difference, you may want to *prepend* your paths instead, so that they take precedence over other executables with the same name:
35+
Because PATH order makes a difference, you may want to _prepend_ your paths instead, so that they take precedence over other executables with the same name:
3636

3737
```
3838
use std/util "path add"
@@ -84,6 +84,7 @@ You should now be able to run `config nu` or `config env` and edit those files e
8484
```nu
8585
$env.APPDATA
8686
```
87+
8788
---
8889

8990
### Use hooks to export state via environment variables
@@ -95,7 +96,7 @@ To be most compatible, the `starship` binary will run every prompt render and
9596
is absolute stateless.
9697
Nushell, however, is very stateful in a single instance.
9798

98-
[Hooks](https://www.nushell.sh/book/hooks.html#hooks) allow registration of
99+
[Hooks](../book/hooks) allow registration of
99100
custom callback functions.
100101
In this case, the `pre_prompt` hook is very useful.
101102
With it, we can export state information as an environment variable, for

zh-CN/cookbook/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $env.APPDATA
9595
并且是绝对无状态的。
9696
然而,Nushell 在单个实例中是非常有状态的。
9797

98-
[钩子](https://www.nushell.sh/book/hooks.html#hooks) 允许注册自定义回调函数。
98+
[钩子](../book/hooks) 允许注册自定义回调函数。
9999
在这种情况下,`pre_prompt` 钩子非常有用。
100100
有了它,我们可以将状态信息导出为环境变量,例如,当前激活了哪些 [覆层](https://www.nushell.sh/book/overlays.html)
101101

0 commit comments

Comments
 (0)