forked from extern/nushell
d6b9153ac5
This pr closes #10521. # Description The default prompt by nushell will replace `$nu.home-path` with `~`. E.g. for a user named `user`, `/home/user` would become `~`. This also works with sub paths, e.g. `/home/user/docs` would become `~/docs`. The issue is that this replacement was a tad overzealous. A path like `/home/user-with-suffix` would become `~-with-suffix`. This PR fixes the issue by updating the home path detection logic. # User-Facing Changes The bugged behavior no longer occurs. # Tests + Formatting * `cargo` checks were not performed as this does not touch rust. * The updated logic was tested against [elvish](https://github.com/elves/elvish)'s path replacement logic, for ~10,000 randomly selected folders on a linux server. All paths were processed the same. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
Cargo.toml | ||
LICENSE |