nushell/crates
Eugeen Sablin 9e1e2a4320
provide env to commands and try to start provided path (#10302)
fixes #8551

# Description
Use `open::commands` function to get list of command available for
starting given path. run commands directly, providing environment, until
one of them is successful.

example of output if start was not successful:
```
~\code\nushell> start ..\nustart\a.myext                                                                    09/12/2023 01:37:55 PM
Error: nu:🐚:external_command

  × External command failed
   ╭─[entry #1:1:1]
 1 │ start ..\nustart\a.myext
   ·       ─────────┬────────
   ·                ╰── No command found to start with this path
   ╰────
  help: Try different path or install appropriate command

        Command `cmd /c start "" "..\nustart\a.myext"` failed with exit code: 1
```

# User-Facing Changes
`start` command now provides environment to the external command. This
is how it worked in `nu 0.72`, see linked issue.

# Tests + Formatting
`start` command didn't have any tests and this PR does not add any.
Integration-level tests will require setup specific to OS and
potentially change global environment on testing machine. For unit-level
test it is possible to test `try_commands` function. But is still runs
external commands, and robust test will require apriori knowledge which
commands are necessary successful to run and which are not.
2023-09-12 14:03:41 +02:00
..
nu_plugin_custom_values Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_example Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_formats Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_gstat Bump git2 from 0.17.2 to 0.18.0 (#10207) 2023-09-04 21:10:25 +00:00
nu_plugin_inc Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cli Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
nu-cmd-base Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-dataframe Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-extra Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-cmd-lang Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-color-config rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
nu-command provide env to commands and try to start provided path (#10302) 2023-09-12 14:03:41 +02:00
nu-engine Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-explore Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-glob bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-json Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-parser Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-path Support Termux (#10013) 2023-08-28 09:53:25 +03:00
nu-plugin Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-pretty-hex Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-protocol Rename into decimal to into float (#9979) 2023-09-12 13:02:47 +02:00
nu-std Rename into decimal to into float (#9979) 2023-09-12 13:02:47 +02:00
nu-system Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-table Update crates-ci/typos and fix new typos (#10313) 2023-09-11 12:37:06 +02:00
nu-term-grid bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-test-support Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
nu-utils Make cursor_shape optional (#10289) 2023-09-09 13:42:36 -05: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.