Skip to content

Conversation

jexjws
Copy link
Contributor

@jexjws jexjws commented Aug 17, 2025

No description provided.

jexjws added 2 commits August 18, 2025 07:55
The image path was incorrect, using '../assets' instead of '../../assets'. This change corrects the relative path to ensure the image displays properly in the documentation.
@hustcer
Copy link
Contributor

hustcer commented Aug 18, 2025

Thanks for translating the Chinese document. There are quite a few changes in this PR, so I might need some extra time to go through it thoroughly. It'll probably take me a few days, so please be patient.

@jexjws

This comment was marked as resolved.

@@ -95,11 +96,11 @@ To be most compatible, the `starship` binary will run every prompt render and
is absolute stateless.
Nushell, however, is very stateful in a single instance.

[Hooks](https://www.nushell.sh/book/hooks.html#hooks) allow registration of
[Hooks](../book/hooks.md) allow registration of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use absolute path here: '/zh-CN/book/overlays.md'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any advantage to using absolute paths? I intentionally used relative paths for the sake of translation. For documents in different languages, the same URL (e.g., ../book/hooks.md ) can be used provided that the directory structure is maintained. Moreover, I only decided to use relative paths after noticing that some links in the article were already using them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The absolute path is more intuitive and stable, but if relative paths are used elsewhere, I'm fine with keeping things as they are.

custom callback functions.
In this case, the `pre_prompt` hook is very useful.
With it, we can export state information as an environment variable, for
example, what [overlays](https://www.nushell.sh/book/overlays.html) are
example, what [overlays](../book/overlays.md) are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'/zh-CN/book/overlays.md'


## 子命令

如[自定义命令](../custom_commands.md)中所述,子命令允许我们逻辑地分组命令。使用模块,可以通过两种方式完成此操作:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'/zh-CN/book/custom_commands.md'

@hustcer hustcer merged commit 5961ce6 into nushell:main Aug 26, 2025
2 checks passed
@hustcer
Copy link
Contributor

hustcer commented Aug 26, 2025

@jexjws The PR was merged, one more thing, the code snippet should not be translated here: https://www.nushell.sh/zh-CN/book/types_of_data.html#%E7%AE%80%E5%8D%95%E7%A4%BA%E4%BE%8B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants