mirror of
https://github.com/nushell/nushell.git
synced 2025-08-24 17:46:22 +02:00
9ed2ca792fc011ba8aeff1bd7473a00cad83da3c
9782 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
77f10eb270 |
Fix the test which fails on windows (#11478)
- related PR: #11463 # Description Currently, `commands::complete::basic` fails on Windows without git bash. This pr fixes it. # User-Facing Changes (none) # Tests + Formatting - [x] (on Windows) `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] (on Windows) `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - [x] (on Windows without git bash, Windows with git bash and Ubuntu) `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - on my Windows with Japanese lang pack: 1 test still fails. (see #11463) - [x] (on Windows and Ubuntu) `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library # After Submitting (none) |
||
|
42bb42a2e1 |
Fix rm for symlinks pointing to directory on windows (issue #11461) (#11463)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> - this PR closes #11461 # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> Using `std::fs::remove_dir` instead of `std::fs::remove_file` when try remove symlinks pointing to a directory on Windows. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> none # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> - [x] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - [x] `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - I got 2 test fails on my Windows devenv; these fails in main branch too - `commands::complete::basic` : passed on Ubuntu, failed on Windows (a bug?) - `commands::cp::copy_file_with_read_permission`: failed on Windows with Japanese environment (This test refers error message, so that fails on environments using a language except for english.) - [x] `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> This fix has no changes to user-facing interface. |
||
|
f597380112 |
Bump lsp-types from 0.94.1 to 0.95.0 (#11457)
Bumps [lsp-types](https://github.com/gluon-lang/lsp-types) from 0.94.1 to 0.95.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/gluon-lang/lsp-types/blob/master/CHANGELOG.md">lsp-types's changelog</a>.</em></p> <blockquote> <h2>v0.95.0 (2023-12-12)</h2> <p><!-- raw HTML omitted --><!-- raw HTML omitted --></p> <h3>v0.94.2 (2023-12-12)</h3> <p><!-- raw HTML omitted --><!-- raw HTML omitted --></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
b92b4120dc |
Bump crate-ci/typos from 1.16.25 to 1.16.26 (#11458)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.25 to 1.16.26. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/releases">crate-ci/typos's releases</a>.</em></p> <blockquote> <h2>v1.16.26</h2> <h2>[1.16.26] - 2023-12-27</h2> <h3>Fixes</h3> <ul> <li>Apply <code>extend-ignore-re</code> to file names in addition to file content</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's changelog</a>.</em></p> <blockquote> <h2>[1.16.26] - 2023-12-27</h2> <h3>Fixes</h3> <ul> <li>Apply <code>extend-ignore-re</code> to file names in addition to file content</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
de5ad5de19 |
Revert "Return external file completions if not empty (#10898)" (#11446)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> This reverts #10898 which breaks external completion. Not having file completion fallback on empty result is **intentional** as this indicates that there is nothing to complete at this position. To have nushell fallback to file completion the external completer can simply return *nothing*. `NO RECORDS FOUND`: ```nushell let external_completer = {|spans| [] } ``` Fallback to file completion: ```nushell let external_completer = {|spans| } ``` # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
|
64695cd67c |
bump rust toolchain to 1.73.0 (#11445)
This PR bumps the nushell rust toolchain from 1.72.1 to 1.73.0 since 1.75.0 was released recently. # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
|
21b3eeed99 |
Allow spreading arguments to commands (#11289)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> Finishes implementing https://github.com/nushell/nushell/issues/10598, which asks for a spread operator in lists, in records, and when calling commands. # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> This PR will allow spreading arguments to commands (both internal and external). It will also deprecate spreading arguments automatically when passing to external commands. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> - Users will be able to use `...` to spread arguments to custom/builtin commands that have rest parameters or allow unknown arguments, or to any external command - If a custom command doesn't have a rest parameter and it doesn't allow unknown arguments either, the spread operator will not be allowed - Passing lists to external commands without `...` will work for now but will cause a deprecation warning saying that it'll stop working in 0.91 (is 2 versions enough time?) Here's a function to help with demonstrating some behavior: ```nushell > def foo [ a, b, c?, d?, ...rest ] { [$a $b $c $d $rest] | to nuon } ``` You can pass a list of arguments to fill in the `rest` parameter using `...`: ```nushell > foo 1 2 3 4 ...[5 6] [1, 2, 3, 4, [5, 6]] ``` If you don't use `...`, the list `[5 6]` will be treated as a single argument: ```nushell > foo 1 2 3 4 [5 6] # Note the double [[]] [1, 2, 3, 4, [[5, 6]]] ``` You can omit optional parameters before the spread arguments: ```nushell > foo 1 2 3 ...[4 5] # d is omitted here [1, 2, 3, null, [4, 5]] ``` If you have multiple lists, you can spread them all: ```nushell > foo 1 2 3 ...[4 5] 6 7 ...[8] ...[] [1, 2, 3, null, [4, 5, 6, 7, 8]] ``` Here's the kind of error you get when you try to spread arguments to a command with no rest parameter:  And this is the warning you get when you pass a list to an external now (without `...`):  # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> Added tests to cover the following cases: - Spreading arguments to a command that doesn't have a rest parameter (unexpected spread argument error) - Spreading arguments to a command that doesn't have a rest parameter *but* there's also a missing positional argument (missing positional error) - Spreading arguments to a command that doesn't have a rest parameter but does allow unknown arguments, such as `exec` (allowed) - Spreading a list literal containing arguments of the wrong type (parse error) - Spreading a non-list value, both to internal and external commands - Having named arguments in the middle of rest arguments - `explain`ing a command call that spreads its arguments # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> # Examples Suppose you have multiple tables: ```nushell let people = [[id name age]; [0 alice 100] [1 bob 200] [2 eve 300]] let evil_twins = [[id name age]; [0 ecila 100] [-1 bob 200] [-2 eve 300]] ``` Maybe you often find yourself needing to merge multiple tables and want a utility to do that. You could write a function like this: ```nushell def merge_all [ ...tables ] { $tables | reduce { |it, acc| $acc | merge $it } } ``` Then you can use it like this: ```nushell > merge_all ...([$people $evil_twins] | each { |$it| $it | select name age }) ╭───┬───────┬─────╮ │ # │ name │ age │ ├───┼───────┼─────┤ │ 0 │ ecila │ 100 │ │ 1 │ bob │ 200 │ │ 2 │ eve │ 300 │ ╰───┴───────┴─────╯ ``` Except they had duplicate columns, so now you first want to suffix every column with a number to tell you which table the column came from. You can make a command for that: ```nushell def select_and_merge [ --cols: list<string>, ...tables ] { let renamed_tables = $tables | enumerate | each { |it| $it.item | select $cols | rename ...($cols | each { |col| $col + ($it.index | into string) }) }; merge_all ...$renamed_tables } ``` And call it like this: ```nushell > select_and_merge --cols [name age] $people $evil_twins ╭───┬───────┬──────┬───────┬──────╮ │ # │ name0 │ age0 │ name1 │ age1 │ ├───┼───────┼──────┼───────┼──────┤ │ 0 │ alice │ 100 │ ecila │ 100 │ │ 1 │ bob │ 200 │ bob │ 200 │ │ 2 │ eve │ 300 │ eve │ 300 │ ╰───┴───────┴──────┴───────┴──────╯ ``` --- Suppose someone's made a command to search for APT packages: ```nushell # The main command def search-pkgs [ --install # Whether to install any packages it finds log_level: int # Pretend it's a good idea to make this a required positional parameter exclude?: list<string> # Packages to exclude repositories?: list<string> # Which repositories to look in (searches in all if not given) ...pkgs # Package names to search for ] { { install: $install, log_level: $log_level, exclude: ($exclude | to nuon), repositories: ($repositories | to nuon), pkgs: ($pkgs | to nuon) } } ``` It has a lot of parameters to configure it, so you might make your own helper commands to wrap around it for specific cases. Here's one example: ```nushell # Only look for packages locally def search-pkgs-local [ --install # Whether to install any packages it finds log_level: int exclude?: list<string> # Packages to exclude ...pkgs # Package names to search for ] { # All required and optional positional parameters are given search-pkgs --install=$install $log_level [] ["<local URI or something>"] ...$pkgs } ``` And you can run it like this: ```nushell > search-pkgs-local --install=false 5 ...["python2.7" "vim"] ╭──────────────┬──────────────────────────────╮ │ install │ false │ │ log_level │ 5 │ │ exclude │ [] │ │ repositories │ ["<local URI or something>"] │ │ pkgs │ ["python2.7", vim] │ ╰──────────────┴──────────────────────────────╯ ``` One thing I realized when writing this was that if we decide to not allow passing optional arguments using the spread operator, then you can (mis?)use the spread operator to skip optional parameters. Here, I didn't want to give `exclude` explicitly, so I used a spread operator to pass the packages to install. Without it, I would've needed to do `search-pkgs-local --install=false 5 [] "python2.7" "vim"` (explicitly pass `[]` (or `null`, in the general case) to `exclude`). There are probably more idiomatic ways to do this, but I just thought it was something interesting. If you're a virologist of the [xkcd](https://xkcd.com/350/) kind, another helper command you might make is this: ```nushell # Install any packages it finds def live-dangerously [ ...pkgs ] { # One optional argument was given (exclude), while another was not (repositories) search-pkgs 0 [] ...$pkgs --install # Flags can go after spread arguments } ``` Running it: ```nushell > live-dangerously "git" "*vi*" # *vi* because I don't feel like typing out vim and neovim ╭──────────────┬─────────────╮ │ install │ true │ │ log_level │ 0 │ │ exclude │ [] │ │ repositories │ null │ │ pkgs │ [git, *vi*] │ ╰──────────────┴─────────────╯ ``` Here's an example that uses the spread operator more than once within the same command call: ```nushell let extras = [ chrome firefox python java git ] def search-pkgs-curated [ ...pkgs ] { (search-pkgs 1 [emacs] ["example.com", "foo.com"] vim # A must for everyone! ...($pkgs | filter { |p| not ($p | str contains "*") }) # Remove packages with globs python # Good tool to have ...$extras --install=false python3) # I forget, did I already put Python in extras? } ``` Running it: ```nushell > search-pkgs-curated "git" "*vi*" ╭──────────────┬───────────────────────────────────────────────────────────────────╮ │ install │ false │ │ log_level │ 1 │ │ exclude │ [emacs] │ │ repositories │ [example.com, foo.com] │ │ pkgs │ [vim, git, python, chrome, firefox, python, java, git, "python3"] │ ╰──────────────┴───────────────────────────────────────────────────────────────────╯ ``` |
||
|
a86a7e6c29 |
Allow http commands' automatic redirect-following to be disabled (#11329)
Intends to close #8920 This PR suggests a new flag for the `http` commands, `--redirect-mode`, which enables users to choose between different redirect handling modes. The current behaviour of letting ureq silently follow redirects remains the default, but two new options are introduced here, following the lead of [JavaScript's `fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/fetch#redirect): "manual", where any 3xx response to a request is simply returned as the command's result, and "error", where any 3xx response causes a network error like those caused by 4xx and 5xx responses. This PR is a draft. Tests have not been added or run, the flag is currently only implemented for the `http get` command, and design tweaks are likely to be appropriate. Most notably, it's not obvious to me whether a single flag which can take one of three values is the nicest solution here. We might instead consider two binary flags (like `--no-following-redirects` and `--disallow-redirects`, although I'm bad at naming things so I need help with that anyway), or completely drop the "error" option if it's not deemed useful enough. (I personally think it has some merit, especially since 4xx and 5xx responses are already treated as errors by default; So this would allow users to treat only immediate 2xx responses as success) # User-facing changes New options for the `http [method]` commands. Behaviour remains unchanged when the command line flag introduced here is not used.  |
||
|
15421dc45e |
Fix the bug for "bytes remove --end" . (#11428)
This PR should close #11426 . # Description > ### Describe the bug > When using the `--end` option of bytes remove, nushell panics if the provided bytes don't exist. This doesn't seem to affect `bytes remove` w/o flag or `bytes remove --all`. # User-Facing Changes Nushell doesn`t panic anymore. # Tests + Formatting Behavior before fixing the bug:  Behavior after fixing the bug:  |
||
|
9522052063 |
More specific errors for missing values in records (#11423)
# Description Currently, when writing a record, if you don't give the value for a field, the syntax error highlights the entire record instead of pinpointing the issue. Here's some examples: ```nushell > { a: 2, 3 } # Missing colon (and value) Error: nu::parser::parse_mismatch × Parse mismatch during operation. ╭─[entry #2:1:1] 1 │ { a: 2, 3 } · ─────┬───── · ╰── expected record ╰──── > { a: 2, 3: } # Missing value Error: nu::parser::parse_mismatch × Parse mismatch during operation. ╭─[entry #3:1:1] 1 │ { a: 2, 3: } · ──────┬───── · ╰── expected record ╰──── > { a: 2, 3 4 } # Missing colon Error: nu::parser::parse_mismatch × Parse mismatch during operation. ╭─[entry #4:1:1] 1 │ { a: 2, 3 4 } · ──────┬────── · ╰── expected record ╰──── ``` In all of them, the entire record is highlighted red because an `Expr::Garbage` is returned covering that whole span:  This PR is for highlighting only the part inside the record that could not be parsed. If the record literal is big, an error message pointing to the start of where the parser thinks things went wrong should help people fix their code. # User-Facing Changes Below are screenshots of the new errors: If there's a stray record key right before the record ends, it highlights only that key and tells the user it expected a colon after it:  If the record ends before the value for the last field was given, it highlights the key and colon of that field and tells the user it expected a value after the colon:  If there are two consecutive expressions without a colon between them, it highlights everything from the second expression to the end of the record and tells the user it expected a colon. I was tempted to add a help message suggesting adding a colon in between, but that may not always be the right thing to do.  # Tests + Formatting # After Submitting |
||
|
ba880277bf |
Remove unnecessary replace_in_variable (#11424)
# Description `Expression::replace_in_variable` is only called in one place, and it is called with `new_var_id` = `IN_VARIABLE_ID`. So, it ends up doing nothing. E.g., adding `debug_assert_eq!(new_var_id, IN_VARIABLE_ID)` in `replace_in_variable` does not trigger any panic. # User-Facing Changes Breaking change for `nu_protocol`. |
||
|
40241e9be6 |
Revert "Bump reedline development version" (#11425)
Reverts nushell/nushell#11406 This PR https://github.com/nushell/reedline/pull/688 is causing clear screens to happen at strange times. Documented here https://github.com/nushell/nushell/pull/11406#issuecomment-1869591405 |
||
|
34f3da7150 |
Don't panic when http_client fails (#11422)
# Description This PR makes `http_client` return `Result<ureq::Agent, ShellError>`, so errors can be propagated to the caller. |
||
|
534287ed65 |
Don't create a thread if stderr_stream is None (#11421)
# Description There is no need to create a thread if `stderr_stream` is `None`. |
||
|
913c2b8d1c |
Bump ical from 0.8.0 to 0.9.0 (#11419)
Bumps [ical](https://github.com/Peltoche/ical-rs) from 0.8.0 to 0.9.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Peltoche/ical-rs/releases">ical's releases</a>.</em></p> <blockquote> <h2>v0.9.0</h2> <h2>What's Changed</h2> <ul> <li>Add the github actions by <a href="https://github.com/Peltoche"><code>@Peltoche</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/35">Peltoche/ical-rs#35</a></li> <li>Use thiserror instead of failure by <a href="https://github.com/Peltoche"><code>@Peltoche</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/36">Peltoche/ical-rs#36</a></li> <li>Accept lowercase vCards by <a href="https://github.com/link2xt"><code>@link2xt</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/37">Peltoche/ical-rs#37</a></li> <li>Parse multiline attributes with tabs correctly by <a href="https://github.com/FliegendeWurst"><code>@FliegendeWurst</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/41">Peltoche/ical-rs#41</a></li> <li>Ical serde by <a href="https://github.com/daladim"><code>@daladim</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/44">Peltoche/ical-rs#44</a></li> <li>Set the license to Apache 2 by <a href="https://github.com/Peltoche"><code>@Peltoche</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/47">Peltoche/ical-rs#47</a></li> <li>Update README.md by <a href="https://github.com/Zearin"><code>@Zearin</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/51">Peltoche/ical-rs#51</a></li> <li>Adding ical-output support by <a href="https://github.com/migmedia"><code>@migmedia</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/49">Peltoche/ical-rs#49</a></li> <li>Improve documentation of builders. by <a href="https://github.com/migmedia"><code>@migmedia</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/52">Peltoche/ical-rs#52</a></li> <li>Add access functions for properties by <a href="https://github.com/reedts"><code>@reedts</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/53">Peltoche/ical-rs#53</a></li> <li>Fix README by <a href="https://github.com/westy92"><code>@westy92</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/55">Peltoche/ical-rs#55</a></li> <li>Handle the case were a line contains non-utf8 characters by <a href="https://github.com/Peltoche"><code>@Peltoche</code></a> in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/57">Peltoche/ical-rs#57</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/link2xt"><code>@link2xt</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/37">Peltoche/ical-rs#37</a></li> <li><a href="https://github.com/FliegendeWurst"><code>@FliegendeWurst</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/41">Peltoche/ical-rs#41</a></li> <li><a href="https://github.com/daladim"><code>@daladim</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/44">Peltoche/ical-rs#44</a></li> <li><a href="https://github.com/Zearin"><code>@Zearin</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/51">Peltoche/ical-rs#51</a></li> <li><a href="https://github.com/migmedia"><code>@migmedia</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/49">Peltoche/ical-rs#49</a></li> <li><a href="https://github.com/reedts"><code>@reedts</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/53">Peltoche/ical-rs#53</a></li> <li><a href="https://github.com/westy92"><code>@westy92</code></a> made their first contribution in <a href="https://redirect.github.com/Peltoche/ical-rs/pull/55">Peltoche/ical-rs#55</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/Peltoche/ical-rs/compare/0.6.0...v0.9.0">https://github.com/Peltoche/ical-rs/compare/0.6.0...v0.9.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Peltoche/ical-rs/commits/v0.9.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
aeffa188f0 |
Fix an infinite loop if the input stream and output stream are the same (#11384)
# Description Fixes #11382 # User-Facing Changes * before ```console nushell/test ( |
||
|
543a25599c |
Simplify the feature gates for stor commands (#11416)
All of them depend on feature `sqlite` so just conditionally `use` the parent module. |
||
|
7ad0e5541e |
Make polars deps optional for cargo test --all (#11415)
As `--workspace/--all` pulls in all crates in the workspace for `cargo test --workspace` let's make sure that the `polars` family of dependencies are also feature gated so they only build for `--features dataframe`. The test modules themselves also depend on the feature. Should speed up a bare `cargo test --workspace` |
||
|
c1cc1c82cc |
Lock out new direct construction of Record (#11414)
# Description With #11386 we don't have any nushell-internal code directly accessing the `vals` field of `Record`, so let's make it private so everyone in the future uses the checked ways guaranteeing matching cols/vals. The `cols` feel has to remain pub for now as `rename` still directly mutates this field. See #11020 for challenges for this refactor. # Plugin-Author-Facing Changes This is a breaking change for outside plugins that relied on the `pub` fields. |
||
|
b0b4c3dffd |
Check for clean repo after tests (#11409)
Goal: detect problems like adressed by #11407 or missing `Cargo.lock` update early Try to fail when there is a non clear `git status` message |
||
|
f3de373c59 |
Bump reedline development version (#11406)
Fix for #11399 Provided by nushell/reedline#688 |
||
|
df1fecd2cb |
Fix sandboxing of redirection tests (#11407)
When running `cargo test --workspace` a file `crates/nu-command/a.txt` remained which we also saw as an accidential additions in some commits. Searching for `a.txt` narrowed it down that `redirection_keep_exit_codes` was not sandboxed in a temporary directory and created this file. Went through redirection tests and placed them in a `Playground` to get sandboxing `dirs` for `nu!(cwd:`. For those tests where redirection fails and no file should be created now I added a check that no file is created on accident. - Sandbox `redirection_keep_exit_codes` test - Sandbox `no_duplicate_redirection` test - Check that no redirect file is created on error - Sandbox `redirection_should_have_a_target` test |
||
|
9620e27e4f |
fix: prevent greedy matching of directory names (#11403)
Fixes #11396 # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> If a directory name is an exact match, the completer stops greedily matching directories with the same prefix. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> Completions should work as described in #11396. # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
|
072ecec8ca | Bump unsafe-libyaml from 0.2.9 to 0.2.10 (#11391) | ||
|
748d82cec1 |
Bump windows from 0.48.0 to 0.52.0 (#11325)
# Description Bump `windows` to 0.52.0 and fix `is_admin` https://github.com/microsoft/windows-rs/pull/2476 # User-Facing Changes N/A --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
5e5d1ea81b |
Bump fancy-regex to single 0.12.0 version (#11389)
Supersedes #11039 that was broken due to dependabot not correctly taking the workspace into account (this bug has been worked around in #11387) |
||
|
bb570e42be | Bump lscolors from 0.15.0 to 0.16.0 (#11359) | ||
|
3a050864df |
Simplify SIGQUIT handling (#11381)
# Description Simplifies `SIGQUIT` protection to a single `signal` ignore system call. # User-Facing Changes `SIGQUIT` is no longer blocked if nushell is in non-interactive mode (signals should not be blocked in non-interactive mode). Also a breaking API change for `nu_protocol`. # Tests + Formatting Should come after #11178 for testing. |
||
|
8cfa96b4c0 |
Construct Record s only through checked helpers (#11386)
# Description Constructing the internals of `Record` without checking the lengths is bad. (also incompatible with changes to how we store records) - Use `Record::from_raw_cols_vals` in dataframe code - Use `record!` macro in dataframe test - Use `record!` in `nu-color-config` tests - Stop direct record construction in `nu-command` - Refactor table construction in `from nuon` # User-Facing Changes None # Tests + Formatting No new tests, updated tests in equal fashion |
||
|
6f384da57e |
Make Call::get_flag_expr return Expression by ref (#11388)
# Description A small refactor that eliminates some `Expression` cloning. # User-Facing Changes Breaking change for `nu_protocol`. |
||
|
f8e63328d8 |
Expand the workspace members in Cargo.toml (#11387)
While the `cargo` tools will include crates we depend on in the directory into the workspace, I observed dependabot not taking all of our crates into account in its version bump attempts leading to duplication of outside dependencies. e.g. - https://github.com/nushell/nushell/pull/11039 |
||
|
5d98a727ca |
Deprecate --flag: bool in custom command (#11365)
# Description While #11057 is merged, it's hard to tell the difference between `--flag: bool` and `--flag`, and it makes user hard to read custom commands' signature, and hard to use them correctly. After discussion, I think we can deprecate `--flag: bool` usage, and encourage using `--flag` instead. # User-Facing Changes The following code will raise warning message, but don't stop from running. ```nushell ❯ def florb [--dry-run: bool, --another-flag] { "aaa" }; florb Error: × Deprecated: --flag: bool ╭─[entry #7:1:1] 1 │ def florb [--dry-run: bool, --another-flag] { "aaa" }; florb · ──┬─ · ╰── `--flag: bool` is deprecated. Please use `--flag` instead, more info: https://www.nushell.sh/book/custom_commands.html ╰──── aaa ``` cc @kubouch # Tests + Formatting Done # After Submitting - [ ] Add more information under https://www.nushell.sh/book/custom_commands.html to indicate `--dry-run: bool` is not allowed, - [ ] remove `: bool` from custom commands between 0.89 and 0.90 --------- Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com> |
||
|
109f629cb6 |
📝 Update str trim CLI help doc (#11383)
# Description Hi! I updated the samples of `str trim` because there were repeated and clarified the explanations # User-Facing Changes Yes! I send the details here:  (`old` is version `88.1` not the latest main) # Tests + Formatting ~~I ran `toolkit check pr` successfully~~ There was a tiny problem, a test I never touched now it's failing ```nu (^echo a | complete) == {stdout: "a\n", exit_code: 0} ``` should output `true` but outputs `false`, both in my running `nu` version and in my PR version This make the test `nu-command::main commands::complete::basic` fail located in `crates\nu-command\tests\commands\complete.rs` # After Submitting I'm not sure if I need to update nushell.github.io, some of the help is auto-generated, but maybe not all? I can file a PR if needed |
||
|
ff6a67d293 |
Remove Expr::MatchPattern (#11367)
# Description Following from #11356, it looks like `Expr::MatchPattern` is no longer used in any way. This PR removes `Expr::MatchPattern` alongside `Type::MatchPattern` and `SyntaxShape::MatchPattern`. # User-Facing Changes Breaking API change for `nu_protocol`. |
||
|
03ae01f11e |
Bump itertools from 0.11.0 to 0.12.0 (#11360)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.11.0 to 0.12.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md">itertools's changelog</a>.</em></p> <blockquote> <h2>0.12.0</h2> <h3>Breaking</h3> <ul> <li>Made <code>take_while_inclusive</code> consume iterator by value (<a href="https://redirect.github.com/rust-itertools/itertools/issues/709">#709</a>)</li> <li>Added <code>Clone</code> bound to <code>Unique</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/777">#777</a>)</li> </ul> <h3>Added</h3> <ul> <li>Added <code>Itertools::try_len</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/723">#723</a>)</li> <li>Added free function <code>sort_unstable</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/796">#796</a>)</li> <li>Added <code>GroupMap::fold_with</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/778">#778</a>, <a href="https://redirect.github.com/rust-itertools/itertools/issues/785">#785</a>)</li> <li>Added <code>PeekNth::{peek_mut, peek_nth_mut}</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/716">#716</a>)</li> <li>Added <code>PeekNth::{next_if, next_if_eq}</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/734">#734</a>)</li> <li>Added conversion into <code>(Option<A>,Option<B>)</code> to <code>EitherOrBoth</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/713">#713</a>)</li> <li>Added conversion from <code>Either<A, B></code> to <code>EitherOrBoth<A, B></code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/715">#715</a>)</li> <li>Implemented <code>ExactSizeIterator</code> for <code>Tuples</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/761">#761</a>)</li> <li>Implemented <code>ExactSizeIterator</code> for <code>(Circular)TupleWindows</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/752">#752</a>)</li> <li>Made <code>EitherOrBoth<T></code> a shorthand for <code>EitherOrBoth<T, T></code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/719">#719</a>)</li> </ul> <h3>Changed</h3> <ul> <li>Added missing <code>#[must_use]</code> annotations on iterator adaptors (<a href="https://redirect.github.com/rust-itertools/itertools/issues/794">#794</a>)</li> <li>Made <code>Combinations</code> lazy (<a href="https://redirect.github.com/rust-itertools/itertools/issues/795">#795</a>)</li> <li>Made <code>Intersperse(With)</code> lazy (<a href="https://redirect.github.com/rust-itertools/itertools/issues/797">#797</a>)</li> <li>Made <code>Permutations</code> lazy (<a href="https://redirect.github.com/rust-itertools/itertools/issues/793">#793</a>)</li> <li>Made <code>Product</code> lazy (<a href="https://redirect.github.com/rust-itertools/itertools/issues/800">#800</a>)</li> <li>Made <code>TupleWindows</code> lazy (<a href="https://redirect.github.com/rust-itertools/itertools/issues/602">#602</a>)</li> <li>Specialized <code>Combinations::{count, size_hint}</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/729">#729</a>)</li> <li>Specialized <code>CombinationsWithReplacement::{count, size_hint}</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/737">#737</a>)</li> <li>Specialized <code>Powerset::fold</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/765">#765</a>)</li> <li>Specialized <code>Powerset::count</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/735">#735</a>)</li> <li>Specialized <code>TupleCombinations::{count, size_hint}</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/763">#763</a>)</li> <li>Specialized <code>TupleCombinations::fold</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/775">#775</a>)</li> <li>Specialized <code>WhileSome::fold</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/780">#780</a>)</li> <li>Specialized <code>WithPosition::fold</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/772">#772</a>)</li> <li>Specialized <code>ZipLongest::fold</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/774">#774</a>)</li> <li>Changed <code>{min, max}_set*</code> operations require <code>alloc</code> feature, instead of <code>std</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/760">#760</a>)</li> <li>Improved documentation of <code>tree_fold1</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/787">#787</a>)</li> <li>Improved documentation of <code>permutations</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/724">#724</a>)</li> <li>Fixed typo in documentation of <code>multiunzip</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/770">#770</a>)</li> </ul> <h3>Notable Internal Changes</h3> <ul> <li>Improved specialization tests (<a href="https://redirect.github.com/rust-itertools/itertools/issues/799">#799</a>, <a href="https://redirect.github.com/rust-itertools/itertools/issues/786">#786</a>, <a href="https://redirect.github.com/rust-itertools/itertools/issues/782">#782</a>)</li> <li>Simplified implementation of <code>Permutations</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/739">#739</a>, <a href="https://redirect.github.com/rust-itertools/itertools/issues/748">#748</a>, <a href="https://redirect.github.com/rust-itertools/itertools/issues/790">#790</a>)</li> <li>Combined <code>Merge</code>/<code>MergeBy</code>/<code>MergeJoinBy</code> implementations (<a href="https://redirect.github.com/rust-itertools/itertools/issues/736">#736</a>)</li> <li>Simplified <code>Permutations::size_hint</code> (<a href="https://redirect.github.com/rust-itertools/itertools/issues/739">#739</a>)</li> <li>Fix wrapping arithmetic in benchmarks (<a href="https://redirect.github.com/rust-itertools/itertools/issues/770">#770</a>)</li> <li>Enforced <code>rustfmt</code> in CI (<a href="https://redirect.github.com/rust-itertools/itertools/issues/751">#751</a>)</li> <li>Disallowed compile warnings in CI (<a href="https://redirect.github.com/rust-itertools/itertools/issues/720">#720</a>)</li> <li>Used <code>cargo hack</code> to check MSRV (<a href="https://redirect.github.com/rust-itertools/itertools/issues/754">#754</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
697f3c03f1 |
enable flag value type checking (#11311)
# Description Fixes: #11310 # User-Facing Changes After the change, the following code will go to error: ```nushell > def a [--x: int = 3] { "aa" } > let y = "aa" > a --x=$y Error: nu::parser::type_mismatch × Type mismatch. ╭─[entry #32:2:1] 2 │ let y = "aa" 3 │ a --x=$y · ─┬ · ╰── expected int, found string ╰──── ``` |
||
|
1cecb37628 |
Bump shadow-rs from 0.24.1 to 0.25.0 (#11282)
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 0.24.1 to 0.25.0. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
89436e978b |
add special emoji handling for debug --raw (#11368)
# Description This PR add special handling in `debug -r` for emoji's so that it prints the code points. ### Before ```nushell ❯ emoji --list | where name =~ farmer | reject utf8_bytes | get 0.emoji | debug -r String { val: "🧑\u{200d}🌾", internal_span: Span { start: 0, end: 0, }, } ``` ### After ```nushell ❯ emoji --list | where name =~ farmer | reject utf8_bytes | get 0.emoji | debug -r String { val: "\\u{1f9d1}\\u{200d}\\u{1f33e}", internal_span: Span { start: 0, end: 0, }, } ``` # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
|
cd0a52cf00 |
Fix build for BSDs (#11372)
# Description This PR fixes build for BSD variants (including FreeBSD and NetBSD). Currently, `procfs` only support linux, android and l4re, and |
||
|
c6043eb500 |
improve completions of use and overlay use (#11330)
# Description this PR is two-fold - make `use` and `overlay use` use the same completion algorithm in |
||
|
729373aba0 |
fix(cd): on android/termux fails to cd into /sdcard (#10329)
fix on android/termux fails to cd into /sdcard or any directory that user has access via group fixes #8095 I am not aware how this works on other platform so feel free to modify this pr or even close it if it is not correct # Description on android or on linux to check if the user belongs to given directory group, use `libc::getgroups` function # User-Facing Changes NA |
||
|
f59a6990dc |
Refactor group-by with closure grouper (#11370)
# Description Refactors `group_closure` in `group_by.rs` as suggested by the TODO comment. |
||
|
0f9094ead2 |
Bump crate-ci/typos from 1.16.24 to 1.16.25 (#11358)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.24 to 1.16.25. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/releases">crate-ci/typos's releases</a>.</em></p> <blockquote> <h2>v1.16.25</h2> <h2>[1.16.25] - 2023-12-13</h2> <h3>Fixes</h3> <ul> <li>Have correction in <code>extend-words</code> match the original word's case</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's changelog</a>.</em></p> <blockquote> <h2>[1.16.25] - 2023-12-13</h2> <h3>Fixes</h3> <ul> <li>Have correction in <code>extend-words</code> match the original word's case</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
70f7db14d4 |
Only run $env.PROMPT_COMMAND once per prompt (copy of #10986) (#11366)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> This PR is basically a copy of #10986 by @CAD97, which made `$env.PROMPT_COMMAND` only run once per prompt, but @fdncred found an issue where hitting Enter would make the transient prompt appear and be immediately overwritten by the regular prompt, so it was [reverted](https://github.com/nushell/nushell/pull/11340). https://github.com/nushell/nushell/pull/10788 was also made to do the same thing as #10986 but that ended up having the same issue. For some reason, this branch doesn't have that problem, although I haven't figured out why yet. @CAD97, if you have any inputs or want to make your own PR, let me know. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> When hitting enter, the prompt shouldn't blink in place anymore. # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
|
0cba269d80 |
Fix build on NetBSD (#11364)
- this PR should close #11354 # Description Allow building on NetBSD. # User-Facing Changes NA |
||
|
ec2593efb8 |
nu-cli repl get_command_finished_marker() does not need to be pub (#11362)
```rust fn get_command_finished_marker ``` does not need to be public so just doing a little code cleanup |
||
|
c2283596ac |
Rename extra's format to format pattern (#11355)
This removes the naming conflict, introduced by `fd77114` (#11334), when the `extra` feature is enabled. |
||
|
c9399f5142 | Downgrade openssl-src to fix riscv64 build target, close #11345 (#11353) | ||
|
c9c93f5b4d |
Remove Value::MatchPattern (#11356)
# Description `Value::MatchPattern` implies that `MatchPattern`s are first-class values. This PR removes this case, and commands must now instead use `Expr::MatchPattern` to extract `MatchPattern`s just like how the `match` command does using `Expr::MatchBlock`. # User-Facing Changes Breaking API change for `nu_protocol` crate. |
||
|
2264682443 |
fix shell integration markers (#11352)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> Fixes #11260 # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> Note: my issue description was a bit wrong. Issue one can't be reproduced without a config (`shell_integration` isn't on by default, so..), however the issue itself is still valid For issue 1, the default prompt needs to know about the `shell_integration` config, and the markers are added around the default prompt when that's on. For issue 2, this is actually related to transient prompts. When rendering, the markers weren't added like for normal prompts. After the fix the output do now contain the proper markers: Reproducing the minimum config here for convenience: ```nu $env.config = { show_banner: false shell_integration: true } # $env.PROMPT_COMMAND = {|| "> " } ``` For issue 1, the output looks like: ``` [2.3490236,"o","\u001b[?25l\u001b[21;1H\u001b[21;1H\u001b[J\u001b[38;5;10m\u001b]133;A\u001b\\/home/steven\u001b]133;B\u001b\\\u001b[38;5;14m\u001b[38;5;5m\u001b7\u001b[21;84H12/16/2023 03:31:58 PM\u001b8\u001b[0m\u001b[0m\u001b[1;36mecho\u001b[0m\u001b7\u001b8\u001b[?25h"] [2.5676293,"o","\u001b[6n"] [2.571353,"o","\u001b[?25l\u001b[21;1H\u001b[21;1H\u001b[J\u001b[38;5;10m\u001b]133;A\u001b\\\u001b]133;A\u001b\\/home/steven\u001b]133;B\u001b\\\u001b]133;B\u001b\\\u001b[38;5;14m\u001b[38;5;5m\u001b7\u001b[21;84H12/16/2023 03:31:59 PM\u001b8\u001b[0m\u001b[0m\u001b[1;36mecho\u001b[0m\u001b7\u001b8\u001b[?25h\u001b[21;1H\r\n\u001b[21;1H"] [2.571436,"o","\u001b[?2004l"] [2.5714657,"o","\u001b]133;C\u001b\\"] ``` in line 3, where enter is pressed, `133 A` and `B` are present. Same for issue 2 (uncomment the `PROMPT_COMMAND` line in the config): ``` [1.9585224,"o","\u001b[?25l\u001b[21;1H\u001b[21;1H\u001b[J\u001b[38;5;10m\u001b]133;A\u001b\\> \u001b]133;B\u001b\\\u001b[38;5;14m\u001b[38;5;5m\u001b7\u001b[21;84H12/16/2023 03:32:15 PM\u001b8\u001b[0m\u001b[0m\u001b[1;36mecho\u001b[0m\u001b7\u001b8\u001b[?25h"] [2.453972,"o","\u001b[6n"] [2.4585786,"o","\u001b[?25l\u001b[21;1H\u001b[21;1H\u001b[J\u001b[38;5;10m\u001b]133;A\u001b\\\u001b]133;A\u001b\\> \u001b]133;B\u001b\\\u001b]133;B\u001b\\\u001b[38;5;14m\u001b[38;5;5m\u001b7\u001b[21;84H12/16/2023 03:32:15 PM\u001b8\u001b[0m\u001b[0m\u001b[1;36mecho\u001b[0m\u001b7\u001b8\u001b[?25h\u001b[21;1H\r\n\u001b[21;1H\u001b[?2004l\u001b]133;C\u001b\\\r\n\u001b]133;D;0\u001b\\\u001b]7;file://Aostro-5468/home/steven\u001b\\\u001b]2;~\u0007\u001b[?1l"] [2.4669976,"o","\u001b[?2004h\u001b[6n"] [2.4703515,"o","\u001b[6n"] [2.4736586,"o","\u001b[?25l\u001b[21;1H\u001b[21;1H\u001b[J\u001b[38;5;10m\u001b]133;A\u001b\\> \u001b]133;B\u001b\\\u001b[38;5;14m\u001b[38;5;5m\u001b7\u001b[21;84H12/16/2023 03:32:15 PM\u001b8\u001b[0m\u001b[0m\u001b7\u001b8\u001b[?25h"] ``` # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> None user facing changes other than that prompt markers are working # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |