Skip to content

Issue with terminology in Thinking in Nu page #1221

@TWSiO

Description

@TWSiO

In the "Nushell's environment is scoped" section of the Thinking in Nu page, it says that

In Nushell, blocks control their own environment. Changes to the environment are scoped to the block where they happen.

However, that's not really true for blocks technically, but it is for closures and command definitions. For example

if 1 > 0 { cd .. }

will change the current directory. You can also mutate other variables in blocks of course.


I've been trying to think up a good way to reword that section but I can't think of anything off the top of my head. It could say "commands and closures" rather than blocks, but that feels like it has less impact when talking about a significant design decision and might be a bit confusing before both concepts have really been introduced. I'm not sure there is a term or concept in Nushell at the moment that groups together commands and closures, but excludes blocks.

Anyone else have any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions