Skip to content

Commit 20be872

Browse files
committed
Updates from review comments
1 parent 79f0e8d commit 20be872

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

book/moving_around.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The quoting techniques above are useful when constructing glob-literals, but you
127127

128128
## Creating a Directory
129129

130-
As with most other shells, the [`mkdir` command](/commands/docs/mkdir.md) is used to create a new directory. However, unlike some other `mkdir` implementations, Nushell's version:
130+
As with most other shells, the [`mkdir` command](/commands/docs/mkdir.md) is used to create new directories. One subtle difference is that Nushell's internal `mkdir` command operates like the Unix/Linux `mkdir -p` by default, in that it:
131131

132132
- Will create multiple directory levels automatically. For example:
133133

@@ -137,15 +137,6 @@ As with most other shells, the [`mkdir` command](/commands/docs/mkdir.md) is use
137137

138138
This will create all three directories even if none of them currently exists. On Linux/Unix, this requires `mkdir -p`.
139139

140-
::: tip
141-
A common mistake when coming to Nushell is to attempt to use `mkdir -p <directory>` as in the native Linux/Unix version. However, this will generate an `Unknown Flag` error on Nushell.
142-
143-
Just repeat the command without the `-p` to achieve the same effect.
144-
145-
```
146-
147-
```
148-
149140
- Will not error if the directory already exists. For example:
150141

151142
```nu
@@ -154,7 +145,11 @@ As with most other shells, the [`mkdir` command](/commands/docs/mkdir.md) is use
154145
# => No error
155146
```
156147

157-
These features greatly simplify directory creation in scripting.
148+
::: tip
149+
A common mistake when coming to Nushell is to attempt to use `mkdir -p <directory>` as in the native Linux/Unix version. However, this will generate an `Unknown Flag` error on Nushell.
150+
151+
Just repeat the command without the `-p` to achieve the same effect.
152+
:::
158153

159154
## Changing the Current Directory
160155

0 commit comments

Comments
 (0)