2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-02-13 04:33:38 +00:00
nushell/crates
playdohface 059167ac96
Make error-message more helpful when user invokes a non-executable file ()
# Description

Fixes Issue  
This adds a check to see if a user is trying to invoke a
(non-executable) file as a command and returns a helpful error if so.
EDIT: this will not work on Windows, and is arguably not relevant there,
because of the different semantics of executables. I think the
equivalent on Windows would be if a user tries to invoke `./foo`, we
should look for `foo.exe` or `foo.bat` in the directory and recommend
that if it exists.

# User-Facing Changes

When a user invokes an unrecognized command that is the path to an
existing file, the error used to say:
`{name} is neither a Nushell built-in or a known external command` 
This PR proposes to change the message to:
`{name} refers to a file that is not executable. Did you forget to to
set execute permissions?`

# Tests + Formatting
Ran cargo fmt, clippy and test on the workspace. 
EDIT: added test asserting the new behavior
2024-08-12 14:21:08 +02:00
..
nu-cli Add --raw switch to print for binary data () 2024-08-12 17:29:25 +08:00
nu-cmd-base Path migration part 3: $nu paths () 2024-08-01 10:16:31 +02:00
nu-cmd-extra Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-cmd-lang Add type signature example for def command () 2024-08-06 21:40:30 -05:00
nu-cmd-plugin Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-color-config Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-command Make error-message more helpful when user invokes a non-executable file () 2024-08-12 14:21:08 +02:00
nu-derive-value Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-engine Rework help generation internals () 2024-08-05 22:44:24 +02:00
nu-explore Clean up key event handling () 2024-08-09 18:07:50 -07:00
nu-glob Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-json Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-lsp Add completions.sort option () 2024-08-05 20:30:10 -04:00
nu-parser Add parse error for external commands used in assignment without caret () 2024-08-12 10:24:23 +02:00
nu-path Path migration part 3: $nu paths () 2024-08-01 10:16:31 +02:00
nu-plugin fix: relay Signals reset to plugins () 2024-08-06 03:35:40 -07:00
nu-plugin-core Make pipeline metadata available to plugins () 2024-08-02 11:01:20 -07:00
nu-plugin-engine fix: relay Signals reset to plugins () 2024-08-06 03:35:40 -07:00
nu-plugin-protocol fix: relay Signals reset to plugins () 2024-08-06 03:35:40 -07:00
nu-plugin-test-support Bump similar from 2.5.0 to 2.6.0 () 2024-07-31 08:10:33 +00:00
nu-pretty-hex Clippy fixes from stable and nightly () 2024-07-31 20:37:40 +02:00
nu-protocol Add --raw switch to print for binary data () 2024-08-12 17:29:25 +08:00
nu-std fix: Make log respect use_ansi_coloring setting. () 2024-07-30 08:34:11 -05:00
nu-system Clippy fixes from stable and nightly () 2024-07-31 20:37:40 +02:00
nu-table Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-term-grid Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu-test-support Attempt to guess the content type of a file when opening with --raw () 2024-08-06 11:36:24 +02:00
nu-utils Add completions.sort option () 2024-08-05 20:30:10 -04:00
nu_plugin_custom_values Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu_plugin_example fix: relay Signals reset to plugins () 2024-08-06 03:35:40 -07:00
nu_plugin_formats Adding plist support () 2024-08-05 14:07:15 -07:00
nu_plugin_gstat Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu_plugin_inc Bump version to 0.96.2 () 2024-07-29 17:20:55 -07:00
nu_plugin_nu_example Make pipeline metadata available to plugins () 2024-08-02 11:01:20 -07:00
nu_plugin_polars Merge polars sink and polars to-* to polars save () 2024-08-08 09:46:45 -07:00
nu_plugin_python Make pipeline metadata available to plugins () 2024-08-02 11:01:20 -07:00
nu_plugin_query Bump scraper from 0.19.0 to 0.20.0 () 2024-08-07 09:07:19 +08:00
nu_plugin_stress_internals Make pipeline metadata available to plugins () 2024-08-02 11:01:20 -07:00
nuon Clippy fixes from stable and nightly () 2024-07-31 20:37:40 +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.