mirror of
https://github.com/nushell/nushell
synced 2024-12-28 14:03:09 +00:00
Fix path join argument type and a typo (#3441)
This commit is contained in:
parent
d0229cb96e
commit
08c0bf52bc
1 changed files with 4 additions and 4 deletions
|
@ -4,13 +4,13 @@ use nu_engine::WholeStreamCommand;
|
||||||
use nu_errors::ShellError;
|
use nu_errors::ShellError;
|
||||||
use nu_protocol::{ColumnPath, Signature, SyntaxShape, UntaggedValue, Value};
|
use nu_protocol::{ColumnPath, Signature, SyntaxShape, UntaggedValue, Value};
|
||||||
use nu_source::Tagged;
|
use nu_source::Tagged;
|
||||||
use std::path::Path;
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
pub struct PathJoin;
|
pub struct PathJoin;
|
||||||
|
|
||||||
struct PathJoinArguments {
|
struct PathJoinArguments {
|
||||||
rest: Vec<ColumnPath>,
|
rest: Vec<ColumnPath>,
|
||||||
append: Option<Tagged<String>>,
|
append: Option<Tagged<PathBuf>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PathSubcommandArguments for PathJoinArguments {
|
impl PathSubcommandArguments for PathJoinArguments {
|
||||||
|
@ -29,7 +29,7 @@ impl WholeStreamCommand for PathJoin {
|
||||||
.rest(SyntaxShape::ColumnPath, "Optionally operate by column path")
|
.rest(SyntaxShape::ColumnPath, "Optionally operate by column path")
|
||||||
.named(
|
.named(
|
||||||
"append",
|
"append",
|
||||||
SyntaxShape::String,
|
SyntaxShape::FilePath,
|
||||||
"Path to append to the input",
|
"Path to append to the input",
|
||||||
Some('a'),
|
Some('a'),
|
||||||
)
|
)
|
||||||
|
@ -41,7 +41,7 @@ impl WholeStreamCommand for PathJoin {
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_usage(&self) -> &str {
|
||||||
r#"Optionally, append an additional path to the result. It is designed to accept
|
r#"Optionally, append an additional path to the result. It is designed to accept
|
||||||
the output of 'path parse' and 'path split' subdommands."#
|
the output of 'path parse' and 'path split' subcommands."#
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
|
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||||
|
|
Loading…
Reference in a new issue