Skip to content

Commit 0605858

Browse files
committed
Merge branch 'main' into feature/docs
2 parents 8c0ba41 + 8943a68 commit 0605858

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4046
-3424
lines changed

.github/workflows/command-block.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
name: Comment on manual command changes
22
on:
3-
pull_request:
3+
pull_request_target:
44
paths:
55
- 'commands/docs/**'
6-
7-
# Fix Resource not accessible by integration (updatePullRequest)
8-
permissions:
9-
issues: write
10-
pull-requests: write
6+
- 'commands/categories/**'
117

128
jobs:
139
comment:
1410
runs-on: ubuntu-latest
15-
# If the docs was updated by hustcer, skip the commenting step
16-
if: ${{github.event.pull_request.user.login != 'hustcer'}}
11+
# Maintainers/Contributors can add themselves exempt from this bot if they regularly run the command doc generation.
12+
# If you are on this list, be careful about accidental changes!
13+
if: ${{!contains(fromJSON('["hustcer", "sholderbach"]'), github.event.pull_request.user.login)}}
1714
steps:
18-
- uses: peter-evans/create-or-update-comment@v4
15+
- uses: actions/[email protected]
1916
with:
20-
issue-number: ${{ github.event.pull_request.number }}
21-
body: |
22-
Awesome that you are trying to improve the documentation of a nushell command!
23-
24-
As we autogenerate these command pages from the help information defined with the command after each release:
25-
- If you already updated the command help, you are already done!
26-
- Else, please look for the command in the [source tree](https://github.com/nushell/nushell/tree/main/crates) and make your changes directly there.
27-
28-
Thanks for helping out!
17+
script: |
18+
github.rest.issues.createComment({
19+
issue_number: context.issue.number,
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
body: 'Awesome that you are trying to improve the documentation of a nushell command!\n\n' +
23+
'**You should not modify the files in `commands/docs` or `commands/categories`!**\n' +
24+
'We autogenerate these command pages from the `help` information defined by the command implementation, after each release. Thus:\n'+
25+
'- If you already updated the command help, you are already done and can close this PR!\n'+
26+
'- Else, please look for the command in the [source tree](https://github.com/nushell/nushell/tree/main/crates) and make your changes directly there in the `impl Command` and `Signature`.\n'+
27+
'- If you accidentally made a change in `commands/` while working on general documentation, please revert changes to `commands/`\n\n'+
28+
'Thanks for helping out!'
29+
})
30+
- run: |
31+
echo "This PR touched autogenerated command docs. If you are not a maintainer of the autogenerated docs, please revert changes to `commands/docs/**` and make the change on the nushell side"
32+
exit 1

blog/2024-12-04-configuration_preview.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Today, we're releasing two documentation items related to these changes:
1414

1515
- A guide to upgrading your configuration to take advantage of the enhancements (below). This will also be linked from the 0.101 Release Notes when it becomes available.
1616

17-
- A [preview of the new Configuration chapter](/book/configuration_preview.md) of the Book. This chapter has been rewritten to match the new functionality, as well as add some previously missing documentation on features like autoload dirs (and more). Once 0.101 releases, this will replace the previous configuration chapter. We welcome reviews of the updates, and any corrections or enhancements can be submitted to [the doc repository](https://github.com/nushell/nushell.github.io) if needed.
17+
- A [<s>preview of the</s> (now live) new Configuration chapter](/book/configuration) of the Book. This chapter has been rewritten to match the new functionality, as well as add some previously missing documentation on features like autoload dirs (and more). Once 0.101 releases, this will replace the previous configuration chapter. We welcome reviews of the updates, and any corrections or enhancements can be submitted to [the doc repository](https://github.com/nushell/nushell.github.io) if needed.
1818

1919
---
2020

@@ -126,8 +126,7 @@ $env.config.history = {
126126
- The commented, sample `default_env.nu` and `default_config.nu` in older releases was useful for learning about configuration options. Since these (long) files are no longer copied to the filesystem, you can access an enhanced version of this documentation using:
127127

128128
```nu
129-
config env --sample | nu-highlight | less -R
130-
config nu --sample | nu-highlight | less -R
129+
config nu --doc | nu-highlight | less -R
131130
```
132131

133132
- Skeleton config files (`env.nu` and `config.nu`) are automatically created when the default config directory is created. Usually this will be the first time Nushell is started. The user will no longer be asked whether or not to create the files.
@@ -136,8 +135,6 @@ $env.config.history = {
136135

137136
- An internal `default_env.nu` is loaded immediately before the user's `env.nu`. You can inspect its contents using `config env --default | nu-highlight | less -R`.
138137

139-
This means that, as with `config.nu`, you can also use your `env.nu` to just override the default environment variables if desired.
140-
141138
- Likewise, a `default_config.nu` is loaded immediately before the user's `config.nu`. View
142139
this file using `config nu --default | nu-highlight | less -R`.
143140

0 commit comments

Comments
 (0)