mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Accept filenames in other plugin management commands (#12639)
# Description This allows the following commands to all accept a filename instead of a plugin name: - `plugin use` - `plugin rm` - `plugin stop` Slightly complicated because of the need to also check against `NU_PLUGIN_DIRS`, but I also fixed some issues with that at the same time Requested by @fdncred # User-Facing Changes The new commands are updated as described. # Tests + Formatting Tests for `NU_PLUGIN_DIRS` handling also made more robust. - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting - [ ] Double check new docs to make sure they describe this capability
This commit is contained in:
@ -72,6 +72,17 @@ fn plugin_process_exits_after_stop() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_stop_can_find_by_filename() {
|
||||
let result = nu_with_plugins!(
|
||||
cwd: ".",
|
||||
plugin: ("nu_plugin_inc"),
|
||||
r#"plugin stop (plugin list | where name == inc).0.filename"#
|
||||
);
|
||||
assert!(result.status.success());
|
||||
assert!(result.err.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_process_exits_when_nushell_exits() {
|
||||
let out = nu_with_plugins!(
|
||||
|
Reference in New Issue
Block a user