mirror of
https://github.com/nushell/nushell
synced 2024-12-30 15:03:25 +00:00
7a789d68a2
* Fix path when expanding tilde Expanding tilde with no other relative paths would result in: `$HOME/` instead of `$HOME`. This occurs when users run `cd` with no extra arguments. In that case, the user's PWD would include the trailing separator. This does not happen when explicitly passing a value, such as `cd ~`, because in that case, the path would be canonicalized. This happens because std::path::PathBuf::push always adds a separator, even if adding an empty path, which is what happens when `cd` is invoked. * Add test * Fix test on Windows Co-authored-by: Hristo Filaretov <h.filaretov@protonmail.com> |
||
---|---|---|
.. | ||
dots.rs | ||
expansions.rs | ||
helpers.rs | ||
lib.rs | ||
tilde.rs | ||
util.rs |