mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 15:11:52 +02:00
Remove --encoding
argument during register plugin (#6486)
* first implement new plugin protocol core logic * fix debug body construct * fix output message from plugin * finish plugin commands calling * fix tests and adjust plugin_custom_value call * fmt code * fmt code, fix clippy * add FIXME comment * change from FIXME to TODO
This commit is contained in:
@ -225,11 +225,11 @@ macro_rules! with_exe {
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! nu_with_plugins {
|
||||
(cwd: $cwd:expr, plugins: [$(($format:expr, $plugin_name:expr)),+$(,)?], $command:expr) => {{
|
||||
nu_with_plugins!($cwd, [$(($format, $plugin_name)),+], $command)
|
||||
(cwd: $cwd:expr, plugins: [$(($plugin_name:expr)),+$(,)?], $command:expr) => {{
|
||||
nu_with_plugins!($cwd, [$(("", $plugin_name)),+], $command)
|
||||
}};
|
||||
(cwd: $cwd:expr, plugin: ($format:expr, $plugin_name:expr), $command:expr) => {{
|
||||
nu_with_plugins!($cwd, [($format, $plugin_name)], $command)
|
||||
(cwd: $cwd:expr, plugin: ($plugin_name:expr), $command:expr) => {{
|
||||
nu_with_plugins!($cwd, [("", $plugin_name)], $command)
|
||||
}};
|
||||
|
||||
($cwd:expr, [$(($format:expr, $plugin_name:expr)),+$(,)?], $command:expr) => {{
|
||||
@ -254,8 +254,10 @@ macro_rules! nu_with_plugins {
|
||||
|
||||
$($crate::commands::ensure_binary_present($plugin_name);)+
|
||||
|
||||
// TODO: the `$format` is a dummy empty string, but `plugin_name` is repeatable
|
||||
// just keep it here for now. Need to find a way to remove it.
|
||||
let registrations = format!(
|
||||
concat!($(concat!("register -e ", $format, " {};")),+),
|
||||
concat!($(concat!("register ", $format, " {};")),+),
|
||||
$(
|
||||
nu_path::canonicalize_with(with_exe!($plugin_name), &test_bins)
|
||||
.unwrap_or_else(|e| {
|
||||
|
Reference in New Issue
Block a user