Skip to content

Conversation

@VasanthakumarV
Copy link
Contributor

$nu.home-path was renamed to $nu.home-dir in the latest nushell 0.110 release (nushell/nushell#17129).

This PR replaces $nu.home-path with ~, so that both old and new versions of nushell remain compatible.

~ is a shorthand for $nu.home-dir, as per nushell's doc.

Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

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

LGTM, but when was this ~ shorthand introduced? I'm curious about how compatible we can be when it comes to this (for fish we have explicitly used old syntax I think, for example).

@VasanthakumarV
Copy link
Contributor Author

LGTM, but when was this ~ shorthand introduced? I'm curious about how compatible we can be when it comes to this (for fish we have explicitly used old syntax I think, for example).

0.1 version of nu was published to crates.io on May-2019.
Good support for substituting ~ with the home-directory came on Dec-2019 (NiklasJonsson/nushell@219b7e6).

The different `source` and `path add` commands we
add to `config.nu`, `env.nu` & user-help-messages
no longer use the $nu.home-path variable 

for e.g. in `env.nu`,
path add $"($nu.home-path)/.cargo/bin"
changes to,
path add "~/.cargo/bin"

In `config.nu`,
source $"($nu.home-path)/.cargo/env.nu"
changes to,
source "~/.cargo/env.nu"
@rami3l rami3l added this pull request to the merge queue Feb 3, 2026
@rami3l rami3l removed this pull request from the merge queue due to a manual request Feb 3, 2026
@rami3l rami3l added this pull request to the merge queue Feb 3, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 3, 2026
@djc djc added this pull request to the merge queue Feb 3, 2026
Merged via the queue into rust-lang:main with commit b5dbd77 Feb 3, 2026
29 checks passed
@VasanthakumarV VasanthakumarV deleted the nu-home-path branch February 3, 2026 14:31
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