nushell/crates
Carson Riker d6b9153ac5
Fix Default Prompt Tilde Insertion Logic (#10539)
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.
2023-09-29 16:40:51 +02:00
..
nu_plugin_custom_values Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_example Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_formats Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_gstat Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_inc Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cli Fix editor config for reedline and config nu/env (#10535) 2023-09-29 16:36:03 +02:00
nu-cmd-base Fix editor config for reedline and config nu/env (#10535) 2023-09-29 16:36:03 +02:00
nu-cmd-dataframe Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cmd-extra Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cmd-lang Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-color-config fix magenta_reverse and friends (#10491) 2023-09-24 14:43:17 -05:00
nu-command Fix editor config for reedline and config nu/env (#10535) 2023-09-29 16:36:03 +02:00
nu-engine remove the $nothing variable (#10478) 2023-09-26 18:49:28 +02:00
nu-explore explore: highlight selected cell using background colour instead of cursor (#10533) 2023-09-28 20:17:56 -05:00
nu-glob Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-json Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-parser Docstring some intricacies around SyntaxShape (#10544) 2023-09-29 16:35:22 +02:00
nu-path Fix tilde-expansion for multi-byte unicode chars (#10434) 2023-09-21 04:04:28 +12:00
nu-plugin Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-pretty-hex Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-protocol Fix editor config for reedline and config nu/env (#10535) 2023-09-29 16:36:03 +02:00
nu-std std dt datetime-diff: fix uninitialized field ref when borrowing (#10466) 2023-09-24 10:53:56 +02:00
nu-system Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-table Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-term-grid Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-test-support Simplify nu! test macros. (#10403) 2023-09-21 20:11:56 +02:00
nu-utils Fix Default Prompt Tilde Insertion Logic (#10539) 2023-09-29 16:40:51 +02:00
README.md Remove old nushell/merge engine-q 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.