Skip to content

FEATURE: add a main command to toolkit.nu#9135

Merged
fdncred merged 1 commit intonushell:mainfrom
amtoine:feature/toolkit/add-main-command
May 8, 2023
Merged

FEATURE: add a main command to toolkit.nu#9135
fdncred merged 1 commit intonushell:mainfrom
amtoine:feature/toolkit/add-main-command

Conversation

@amtoine
Copy link
Copy Markdown
Member

@amtoine amtoine commented May 8, 2023

Description

until now, a call to toolkit alone would give

Error: nu::shell::external_command

  × External command failed
   ╭─[entry #2:1:1]
 1 │ toolkit
   · ───┬───
   ·    ╰── did you mean 'toolkit clippy'?
   ╰────
  help: No such file or directory (os error 2)

which i find confusing after a use toolkit.nu 🤔

this PR adds a main command to toolkit.nu which runs the help command on the module.

User-Facing Changes

now

> use toolkit.nu
> toolkit
Usage:
  > toolkit

Subcommands:
  toolkit check pr - run all the necessary checks and tests to submit a perfect PR
  toolkit clippy - check that you're using the standard code style
  toolkit fmt - check standard code formatting and apply the changes
  toolkit setup-git-hooks - set up git hooks to run:
- `toolkit fmt --check --verbose` on `git commit`
- `toolkit fmt --check --verbose` and `toolkit clippy --verbose` on `git push`
  toolkit test - check that all the tests pass
  toolkit test stdlib - run the tests for the standard library

Flags:
  -h, --help - Display the help message for this command

Tests + Formatting

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

After Submitting

$nothing

This commit allows a plain `toolkit` call to give the help of the
module.
@codecov
Copy link
Copy Markdown

codecov bot commented May 8, 2023

Codecov Report

Merging #9135 (720dffd) into main (0ea973b) will decrease coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9135      +/-   ##
==========================================
- Coverage   68.79%   68.79%   -0.01%     
==========================================
  Files         641      641              
  Lines      102104   102121      +17     
==========================================
+ Hits        70243    70254      +11     
- Misses      31861    31867       +6     

see 5 files with indirect coverage changes

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented May 8, 2023

thanks

@fdncred fdncred merged commit a5af77d into nushell:main May 8, 2023
@amtoine amtoine deleted the feature/toolkit/add-main-command branch May 8, 2023 11:52
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.

2 participants