nushell/crates/nu-parser/src
Jakub Žádník 808e523adc
Disable alias recursion (#8397)
# Description

Prevents alias from aliasing itself. It allows a commonly requested
pattern similar to `alias ls = ls -l`.

One small issue is that the syntax highlighting is a bit off:

![alias_itself_no_color](https://user-images.githubusercontent.com/25571562/224545129-8a3ff535-347b-4a4e-b686-11493bb2a33b.png)

Fixes https://github.com/nushell/nushell/issues/8246

# User-Facing Changes

Shouldn't be a breaking change.

# 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 -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# 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.
2023-03-13 06:16:26 +13:00
..
deparse.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
errors.rs Allow aliasing parser keywords (#8250) 2023-03-10 23:20:31 +02:00
eval.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
flatten.rs Support redirect err and out to different streams (#7685) 2023-01-12 10:22:30 +01:00
known_external.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
lex.rs fix: fix lexing of comments, such that a#b becomes a coherent Item (#8151) 2023-02-22 12:59:47 +00:00
lib.rs Small parser refactors (#7568) 2022-12-22 13:41:44 +02:00
lite_parser.rs Fix multi-line redirection inside a block (#7808) 2023-01-23 06:32:56 +13:00
parse_keywords.rs Disable alias recursion (#8397) 2023-03-13 06:16:26 +13:00
parser.rs Allow aliasing parser keywords (#8250) 2023-03-10 23:20:31 +02:00
type_check.rs fix: allow subtraction of durations from dates (#8247) 2023-02-27 21:17:58 +01:00