mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
e5145358eb
Fix https://github.com/nushell/nushell/issues/10136 # Description Current nushell only handle path containing '*' as match pattern and treat '?' as just normal path. This pr makes path containing '?' is also processed as pattern. 🔴 **Concerns: Need to design/comfirm a consistent rule to handle dirs/files with '?' in their names.** Currently: - if no dir has exactly same name with pattern, it will print the list of matched directories - if pattern exactly matches an empty dir's name, it will just print the empty dir's content ( i.e. `[]`) - if pattern exactly matches an dir's name, it will perform pattern match and print all the dir contains e.g. ```bash mkdir src ls s?c ``` | name | type | size | modified | | ---- | ---- | ------ | --------------------------------------------- | | src | dir | 1.1 KB | Tue, 29 Aug 2023 07:39:41 +0900 (9 hours ago) | ----------- ```bash mkdir src mkdir scc mkdir scs ls s?c ``` | name | type | size | modified | | ---- | ---- | ------ | ------------------------------------------------ | | scc | dir | 64 B | Tue, 29 Aug 2023 16:55:31 +0900 (14 seconds ago) | | src | dir | 1.1 KB | Tue, 29 Aug 2023 07:39:41 +0900 (9 hours ago) | ----------- ```bash mkdir s?c ls s?c ``` print empty (i.e. ls of dir `s?c`) ----------- ```bash mkdir -p s?c/test ls s?c ``` |name|type|size|modified| |-|-|-|-| |s?c/test|dir|64 B|Tue, 29 Aug 2023 16:47:53 +0900 (2 minutes ago)| |src/bytes|dir|480 B|Fri, 25 Aug 2023 17:43:52 +0900 (3 days ago)| |src/charting|dir|160 B|Fri, 25 Aug 2023 17:43:52 +0900 (3 days ago)| |src/conversions|dir|160 B|Fri, 25 Aug 2023 17:43:52 +0900 (3 days ago)| ----------- # User-Facing Changes User will be able to use '?' to match directory/file. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting None --------- Co-authored-by: Horasal <horsal@horsal.dev> |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-dataframe | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-color-config | ||
nu-command | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
README.md |
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.