mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 07:41:17 +02:00
Rust 1.85, edition=2024 (#15741)
This commit is contained in:
@ -2,7 +2,7 @@ use crate::util::{get_plugin_dirs, modify_plugin_file};
|
||||
use nu_engine::command_prelude::*;
|
||||
use nu_plugin_engine::{GetPlugin, PersistentPlugin};
|
||||
use nu_protocol::{
|
||||
shell_error::io::IoError, PluginGcConfig, PluginIdentity, PluginRegistryItem, RegisteredPlugin,
|
||||
PluginGcConfig, PluginIdentity, PluginRegistryItem, RegisteredPlugin, shell_error::io::IoError,
|
||||
};
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
|
||||
|
@ -80,8 +80,7 @@ it was already previously registered with `plugin add`.
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description:
|
||||
"Load the commands for the `query` plugin from a custom plugin registry file",
|
||||
description: "Load the commands for the `query` plugin from a custom plugin registry file",
|
||||
example: r#"plugin use --plugin-config local-plugins.msgpackz query"#,
|
||||
result: None,
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
#[allow(deprecated)]
|
||||
use nu_engine::{command_prelude::*, current_dir};
|
||||
use nu_protocol::{engine::StateWorkingSet, shell_error::io::IoError, PluginRegistryFile};
|
||||
use nu_protocol::{PluginRegistryFile, engine::StateWorkingSet, shell_error::io::IoError};
|
||||
use std::{
|
||||
fs::{self, File},
|
||||
path::PathBuf,
|
||||
@ -15,7 +15,7 @@ fn get_plugin_registry_file_path(
|
||||
#[allow(deprecated)]
|
||||
let cwd = current_dir(engine_state, stack)?;
|
||||
|
||||
if let Some(ref custom_path) = custom_path {
|
||||
if let Some(custom_path) = custom_path {
|
||||
Ok(nu_path::expand_path_with(&custom_path.item, cwd, true))
|
||||
} else {
|
||||
engine_state
|
||||
|
Reference in New Issue
Block a user