Hristo Filaretov 7a789d68a2
Don't include trailing separator when expanding tilde (#4974)
* 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>
2022-03-27 06:28:31 +13:00
..
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2021-12-19 10:00:31 +00:00
2022-03-23 07:32:03 +13:00
2022-03-23 09:25:38 +13:00
2022-03-23 09:25:38 +13:00
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2022-03-25 17:56:40 -05:00
2022-03-23 09:25:38 +13:00
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2022-03-23 07:32:03 +13:00
2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.