Skip to content

Commit a4e00cc

Browse files
authored
Update winget install guide (nushell#1993)
* Update winget install guide * ci skip * ci skip
1 parent 4ee5c35 commit a4e00cc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ $ nix profile install nixpkgs#nushell
4949
#### Windows:
5050

5151
```powershell
52+
# Install to user scope (by default).
5253
winget install nushell
54+
# Machine scope installation (Run as admin).
55+
winget install nushell --scope machine
5356
```
5457

5558
After installing, launch Nu by typing `nu`.

book/hooks.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ An example for PWD env change hook:
203203

204204
```nu
205205
$env.config = ($env.config | upsert hooks.env_change.PWD {|config|
206-
let val = ($config | get -i hooks.env_change.PWD)
206+
let val = ($config | get -o hooks.env_change.PWD)
207207
208208
if $val == null {
209209
$val | append {|before, after| print $"changing directory from ($before) to ($after)" }
@@ -314,7 +314,6 @@ $env.config.hooks.command_not_found = {
314314
}
315315
```
316316

317-
318317
### `command_not_found` Hook in _Windows_
319318

320319
The following hook uses the `ftype` command, to find program paths in _Windows_ that might be relevant to the user for `alias`-ing.

book/installation.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ next:
33
text: Default Shell
44
link: /book/default_shell.md
55
---
6+
67
# Installing Nu
78

89
There are lots of ways to get Nu up and running. You can download pre-built binaries from our [release page](https://github.com/nushell/nushell/releases), [use your favourite package manager](https://repology.org/project/nushell/versions), or build from source.
@@ -27,7 +28,13 @@ For macOS and Linux, [Homebrew](https://brew.sh/) is a popular choice (`brew ins
2728

2829
For Windows:
2930

30-
- [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) (`winget install nushell`)
31+
- [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/)
32+
33+
- Machine scope installation: `winget install nushell --scope machine`
34+
- Machine scope upgrade: `winget update nushell`
35+
- User scope installation: `winget install nushell` or `winget install nushell --scope user`
36+
- User scope upgrade: Due to [winget-cli issue #3011](https://github.com/microsoft/winget-cli/issues/3011), running `winget update nushell` will unexpectedly install the latest version to `C:\Program Files\nu`. To work around this, run `winget install nushell` again to install the latest version in the user scope.
37+
3138
- [Chocolatey](https://chocolatey.org/) (`choco install nushell`)
3239
- [Scoop](https://scoop.sh/) (`scoop install nu`)
3340

0 commit comments

Comments
 (0)