nushell/crates
Braulio Valdivielso Martínez 1794ad51bd
Sanitize arguments to external commands a bit better (#4157)
* fix #4140

We are passing commands into a shell underneath but we were not
escaping arguments correctly. This new version of the code also takes
into consideration the ";" and "&" characters, which have special
meaning in shells.

We would probably benefit from a more robust way to join arguments to
shell programs. Python's stdlib has shlex.join, and perhaps we can
take that implementation as a reference.

* clean up escaping of posix shell args

I believe the right place to do escaping of arguments was in the
spawn_sh_command function. Note that this change prevents things like:

^echo "$(ls)"

from executing the ls command. Instead, this will just print

$(ls)

The regex has been taken from the python stdlib implementation of shlex.quote

* fix non-literal parameters and single quotes

* address clippy's comments

* fixup! address clippy's comments

* test that subshell commands are sanitized properly
2021-11-29 09:46:42 -06:00
..
nu_plugin_binaryview Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_chart Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_from_bson upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_from_mp4 Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_from_sqlite upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_inc Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_match Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_query_json upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_s3 upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_selector Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_start Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_textview upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_to_bson Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu_plugin_to_sqlite upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_tree upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu_plugin_xpath upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu-ansi-term Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-cli upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu-command Sanitize arguments to external commands a bit better (#4157) 2021-11-29 09:46:42 -06:00
nu-completion Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-data upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu-engine save --append: create file if it doesn't exist (#4156) 2021-11-26 12:27:41 -06:00
nu-errors upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu-json Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-parser Correct spelling (#4152) 2021-11-25 11:11:20 -06:00
nu-path Correct spelling (#4152) 2021-11-25 11:11:20 -06:00
nu-plugin Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-pretty-hex Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-protocol Correct spelling (#4152) 2021-11-25 11:11:20 -06:00
nu-serde upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu-source Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-stream Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-table Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
nu-test-support upgrading dependencies (#4135) 2021-11-20 07:11:11 -06:00
nu-value-ext Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
README.md Correct spelling (#4152) 2021-11-25 11:11:20 -06: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.