diff --git a/README.md b/README.md index f3d95291bc3..0ae8fc2e8ca 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,10 @@ $ nix profile install nixpkgs#nushell #### Windows: ```powershell +# Install to user scope (by default). winget install nushell +# Machine scope installation (Run as admin). +winget install nushell --scope machine ``` After installing, launch Nu by typing `nu`. diff --git a/book/hooks.md b/book/hooks.md index a29dcba2074..4a78f821cc0 100644 --- a/book/hooks.md +++ b/book/hooks.md @@ -203,7 +203,7 @@ An example for PWD env change hook: ```nu $env.config = ($env.config | upsert hooks.env_change.PWD {|config| - let val = ($config | get -i hooks.env_change.PWD) + let val = ($config | get -o hooks.env_change.PWD) if $val == null { $val | append {|before, after| print $"changing directory from ($before) to ($after)" } @@ -314,7 +314,6 @@ $env.config.hooks.command_not_found = { } ``` - ### `command_not_found` Hook in _Windows_ The following hook uses the `ftype` command, to find program paths in _Windows_ that might be relevant to the user for `alias`-ing. diff --git a/book/installation.md b/book/installation.md index bb88d2cf0ce..b5826b31d6e 100644 --- a/book/installation.md +++ b/book/installation.md @@ -3,6 +3,7 @@ next: text: Default Shell link: /book/default_shell.md --- + # Installing Nu 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 For Windows: -- [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) (`winget install nushell`) +- [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) + + - Machine scope installation: `winget install nushell --scope machine` + - Machine scope upgrade: `winget update nushell` + - User scope installation: `winget install nushell` or `winget install nushell --scope user` + - 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. + - [Chocolatey](https://chocolatey.org/) (`choco install nushell`) - [Scoop](https://scoop.sh/) (`scoop install nu`)