Skip to content

Commit 12e0a0c

Browse files
committed
Fix usages of CWD to PWD
1 parent 68bff55 commit 12e0a0c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

blog/2024-05-28-nushell_0_94_0.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ As part of this release, we also publish a set of optional plugins you can insta
2121
# Table of content
2222

2323
- [_Themes of this release / New features_](#themes-of-this-release-new-features-toc)
24-
- [_Fixing path and CWD handling_](#fixing-path-and-cwd-handling-toc)
24+
- [_Fixing path and PWD handling_](#fixing-path-and-pwd-handling-toc)
2525
- [_Case-preserving environment_](#case-preserving-environment-toc)
2626
- [_Streaming all the things_](#streaming-all-the-things-toc)
2727
- [_New language feature: raw strings_](#new-language-feature-raw-strings-toc)
@@ -50,7 +50,7 @@ As part of this release, we also publish a set of optional plugins you can insta
5050
- [_`from nuon` and `to nuon`_](#from-nuon-and-to-nuon-toc)
5151
- [_`save`_](#save-toc)
5252
- [_`hide-env`_](#hide-env-toc)
53-
- [_CWD fixes_](#cwd-fixes-toc)
53+
- [_PWD fixes_](#pwd-fixes-toc)
5454
- [_`nu-highlight`_](#nu-highlight-toc)
5555
- [_`into sqlite`_](#into-sqlite-toc)
5656
- [_`stor insert`_](#stor-insert-toc)
@@ -71,9 +71,9 @@ As part of this release, we also publish a set of optional plugins you can insta
7171

7272
# Themes of this release / New features [[toc](#table-of-content)]
7373

74-
## Fixing path and CWD handling [[toc](#table-of-content)]
74+
## Fixing path and PWD handling [[toc](#table-of-content)]
7575

76-
One of our contributors, [@YizhePKU](https://github.com/YizhePKU), has started an effort to refactor how Nushell internally handles the current working directory and paths in general. Namely, Nushell aggressively canonicalizes paths instead of using logical paths which can lead to unintuitive or annoying behavior ([#2175](https://github.com/nushell/nushell/issues/2175)). Thanks to their work, `$env.CWD` and the `pwd` command now support logical paths. With time, we intend to make similar to changes to other commands to make them more intuitive and consistent with the rest of Nushell. Another goal with these changes is to eliminate bugs in commands, as some commands incorrectly use the Nushell process's current working directory instead of `$env.CWD`. So far, the `grid`, `path type`, and `touch --reference` commands have been fixed, and we are aiming to bring more fixes in the next release. We kindly ask for your patience as we rework this part of Nushell, and we would appreciate if you would report any issues you encounter!
76+
One of our contributors, [@YizhePKU](https://github.com/YizhePKU), has started an effort to refactor how Nushell internally handles the current working directory and paths in general. Namely, Nushell aggressively canonicalizes paths instead of using logical paths which can lead to unintuitive or annoying behavior ([#2175](https://github.com/nushell/nushell/issues/2175)). Thanks to their work, `$env.PWD` and the `pwd` command now support logical paths. With time, we intend to make similar to changes to other commands to make them more intuitive and consistent with the rest of Nushell. Another goal with these changes is to eliminate bugs in commands, as some commands incorrectly use the Nushell process's current working directory instead of `$env.PWD`. So far, the `grid`, `path type`, and `touch --reference` commands have been fixed, and we are aiming to bring more fixes in the next release. We kindly ask for your patience as we rework this part of Nushell, and we would appreciate if you would report any issues you encounter!
7777

7878
## Case-preserving environment [[toc](#table-of-content)]
7979

@@ -307,7 +307,7 @@ This release changes a bunch of commands to stream where possible ([#12897](http
307307

308308
#### `cd` and `pwd` [[toc](#table-of-content)]
309309

310-
Thanks to [@YizhePKU](https://github.com/YizhePKU) in [#12603](https://github.com/nushell/nushell/pull/12603), the `cd` command now sets the `CWD` to a logical path by default. Instead, there is now a `--physical` flag for `cd` which will canonicalize the path before setting it as the `CWD`. Similarly, `pwd` now has a `--physical` flag to resolve symlinks before reporting the current working directory.
310+
Thanks to [@YizhePKU](https://github.com/YizhePKU) in [#12603](https://github.com/nushell/nushell/pull/12603), the `cd` command now sets `$env.PWD` to a logical path by default. Instead, there is now a `--physical` flag for `cd` which will canonicalize the path before setting it as the `PWD`. Similarly, `pwd` now has a `--physical` flag to resolve symlinks before reporting the current working directory.
311311

312312
#### `collect` [[toc](#table-of-content)]
313313

@@ -343,9 +343,9 @@ With [#12833](https://github.com/nushell/nushell/pull/12833), custom converters
343343

344344
A long-standing bug with `hide-env` is that it would not hide environment variables from external commands / child processes in certain cases. With [#12901](https://github.com/nushell/nushell/pull/12901), this issue has finally been fixed.
345345

346-
#### CWD fixes [[toc](#table-of-content)]
346+
#### PWD fixes [[toc](#table-of-content)]
347347

348-
Some commands are incorrectly using the current working directory of the shell process, instead of the internal `$env.CWD` tracked in the engine state. This release fixes a few of these commands:
348+
Some commands are incorrectly using the current working directory of the shell process, instead of the internal `$env.PWD` tracked in the engine state. This release fixes a few of these commands:
349349

350350
- `path type` ([#12975](https://github.com/nushell/nushell/pull/12975))
351351
- `touch --reference` ([#12976](https://github.com/nushell/nushell/pull/12976))

0 commit comments

Comments
 (0)