Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bare word improvements #8066

Merged
merged 4 commits into from Feb 16, 2023
Merged

Bare word improvements #8066

merged 4 commits into from Feb 16, 2023

Conversation

sophiajt
Copy link
Member

Description

This does two fixes for bare words:

  • It changes completions for paths to wrap a path with backticks if it starts with a number. This helps bare words that start with numbers be separate from unit values
  • It allows bare words wrapped with backticks to be the name of a command. Backtick values in command positions are no longer treated as strings

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 -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 after the PR is merged, if necessary. This will help us keep the docs up to date.

@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #8066 (88b549e) into main (64b6c02) will decrease coverage by 0.34%.
The diff coverage is 9.09%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8066      +/-   ##
==========================================
- Coverage   54.90%   54.57%   -0.34%     
==========================================
  Files         605      608       +3     
  Lines       98847    99035     +188     
==========================================
- Hits        54272    54048     -224     
- Misses      44575    44987     +412     
Impacted Files Coverage Δ
crates/nu-cli/src/completions/file_completions.rs 0.00% <0.00%> (ø)
crates/nu-parser/src/parser.rs 74.39% <100.00%> (-0.17%) ⬇️
crates/nu-engine/src/eval.rs 52.95% <0.00%> (-3.77%) ⬇️
crates/nu-command/src/filters/rename.rs 79.28% <0.00%> (-2.31%) ⬇️
crates/nu-protocol/src/engine/stack.rs 75.83% <0.00%> (-1.03%) ⬇️
crates/nu-test-support/src/fs.rs 23.25% <0.00%> (-0.56%) ⬇️
crates/nu-parser/src/parse_keywords.rs 40.32% <0.00%> (-0.45%) ⬇️
crates/nu-protocol/src/value/mod.rs 47.48% <0.00%> (-0.38%) ⬇️
crates/nu-parser/src/type_check.rs 25.49% <0.00%> (-0.23%) ⬇️
crates/nu-command/src/viewers/table.rs 31.67% <0.00%> (-0.22%) ⬇️
... and 43 more

@sophiajt sophiajt marked this pull request as ready for review February 16, 2023 02:05
@sophiajt sophiajt added this pull request to the merge queue Feb 16, 2023
Merged via the queue into nushell:main with commit ade7bde Feb 16, 2023
@sophiajt sophiajt deleted the bare_word_fixes branch September 2, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant