Skip to content

FIX: give same order in std help ... as in help ...#9034

Merged
fdncred merged 2 commits intonushell:mainfrom
amtoine:fix/stdlib/help-operators-order
Apr 28, 2023
Merged

FIX: give same order in std help ... as in help ...#9034
fdncred merged 2 commits intonushell:mainfrom
amtoine:fix/stdlib/help-operators-order

Conversation

@amtoine
Copy link
Copy Markdown
Member

@amtoine amtoine commented Apr 28, 2023

Should close on of the points in

Description

before this PR, we had a problem

cargo run -- -c '{
     modules: ((help modules | get name) == (std help modules | get name))
     aliases: ((help aliases | get name) == (std help aliases | get name))
     externs: ((help externs | get name) == (std help externs | get name))
     operators: ((help operators | get name) == (std help operators | get name))
     commands: ((help commands | get name) == (std help commands | get name))
}'

would give

╭───────────┬───────╮
│ modules   │ false │
│ aliases   │ true  │
│ externs   │ true  │
│ operators │ false │
│ commands  │ true  │
╰───────────┴───────╯

this PR removes the name sorting so that the orders are the same between the std implementation and the built-in one.

Note
run the same cargo run command as above and see

╭───────────┬──────╮
│ modules   │ true │
│ aliases   │ true │
│ externs   │ true │
│ operators │ true │
│ commands  │ true │
╰───────────┴──────╯

User-Facing Changes

the operators in std help ... will be sorted just as the built-in help ....

Tests + Formatting

  • 🟢 toolkit fmt
  • 🟢 toolkit clippy
  • toolkit test
  • toolkit test stdlib

After Submitting

$nothing

@amtoine amtoine added the A:std-library Defining and improving the standard library written in Nu label Apr 28, 2023
@amtoine amtoine requested a review from fdncred April 28, 2023 11:09
@amtoine amtoine self-assigned this Apr 28, 2023
@amtoine amtoine changed the title FIX: give same order in std help operators as in help operators FIX: give same order in std help ... as in help ... Apr 28, 2023
@amtoine amtoine marked this pull request as draft April 28, 2023 11:17
@amtoine amtoine marked this pull request as ready for review April 28, 2023 11:23
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 28, 2023

Codecov Report

Merging #9034 (2d6be47) into main (4c4c1f6) will increase coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9034      +/-   ##
==========================================
+ Coverage   68.75%   68.76%   +0.01%     
==========================================
  Files         640      640              
  Lines      101433   101433              
==========================================
+ Hits        69737    69749      +12     
+ Misses      31696    31684      -12     

see 1 file with indirect coverage changes

Copy link
Copy Markdown
Contributor

@fdncred fdncred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it looks good. thanks!

@fdncred fdncred merged commit dae4a9b into nushell:main Apr 28, 2023
@amtoine amtoine deleted the fix/stdlib/help-operators-order branch April 28, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:std-library Defining and improving the standard library written in Nu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants