Skip to content

Conversation

NotTheDr01ds
Copy link
Contributor

@NotTheDr01ds NotTheDr01ds commented Sep 29, 2024

  • Implements Add def --env to Custom Commands chapter #1552 by adding information on def --env to the Custom Commands chapter. Moves some of it from the Environment chapter, but links between the two.
  • The "Command Signature" section was misplaced below quite a few other topics. Moved it into the Custom Commands chapter.
  • Extensive rework/rewording of much of the Custom Commands chapter.
    • Starts out with an explanation of why we call them "custom commands"
    • (Nit-pick) "Hello, " examples have proper capitalization and punctuation.
    • Adds information on implicit return. Before someone asks (because I did) - No, Rust does not have implicit return. It simply enforces expressions, which we don't.
    • Adds additional information and examples on return values - match, early return, ignore, and returning null.
    • Adds information on invalid command names
    • Groups all parameter information into an H2 for ToC purposes.
    • Oh yeah, adds a ToC since this is a long chapter
    • Adds information on multi-parameter commands
    • Adds information on non-type shapes that can be used for annotations (e.g., directory)
    • Uses multiple names from many countries as greet <name> examples
    • Adds a few "Cool!" callouts for features that should "Wow" the user (e.g., automatic help for custom commands).
    • Updates table examples to current default style.

@NotTheDr01ds NotTheDr01ds marked this pull request as draft September 30, 2024 11:01
@NotTheDr01ds NotTheDr01ds marked this pull request as ready for review September 30, 2024 11:19
Copy link
Member

@132ikl 132ikl left a comment

Choose a reason for hiding this comment

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

Thank you for this, this section has definitely needed some work 😄

@NotTheDr01ds NotTheDr01ds marked this pull request as draft September 30, 2024 16:29
@NotTheDr01ds
Copy link
Contributor Author

@132ikl Thanks! Converting to a draft while I revise based on your suggestions.

@NotTheDr01ds NotTheDr01ds marked this pull request as ready for review September 30, 2024 18:03
@fdncred
Copy link
Contributor

fdncred commented Sep 30, 2024

lgtm!

@fdncred fdncred merged commit b0ce793 into nushell:main Sep 30, 2024
2 checks passed
@NotTheDr01ds NotTheDr01ds deleted the custom-commands-env branch October 1, 2024 02:14
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.

3 participants