Skip to content

allow custom commands to show up in $nu.scope.commands better#8910

Merged
fdncred merged 2 commits intonushell:mainfrom
fdncred:add_custom_commands_to_our_nu_scope_commands
Apr 17, 2023
Merged

allow custom commands to show up in $nu.scope.commands better#8910
fdncred merged 2 commits intonushell:mainfrom
fdncred:add_custom_commands_to_our_nu_scope_commands

Conversation

@fdncred
Copy link
Copy Markdown
Contributor

@fdncred fdncred commented Apr 17, 2023

Description

This PR allows our custom commands to show up in $nu.scope.commands better. It still needs work because this PR hard code the input and output types as Type::Any but the reason they're being missed in the first place is that they are not assigned an input and output type.

This allows things like this now. Note the where is_custom == true
image

Another example.
image
image

User-Facing Changes

Tests + Formatting

After Submitting

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2023

Codecov Report

Merging #8910 (23d91f8) into main (3b20d68) will increase coverage by 0.38%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8910      +/-   ##
==========================================
+ Coverage   68.16%   68.55%   +0.38%     
==========================================
  Files         636      636              
  Lines      101691   101706      +15     
==========================================
+ Hits        69321    69724     +403     
+ Misses      32370    31982     -388     
Impacted Files Coverage Δ
crates/nu-engine/src/scope.rs 88.30% <100.00%> (+1.00%) ⬆️

... and 5 files with indirect coverage changes

@fdncred fdncred merged commit f0e0ab3 into nushell:main Apr 17, 2023
@fdncred fdncred deleted the add_custom_commands_to_our_nu_scope_commands branch April 17, 2023 16:19
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.

1 participant