mirror of
https://github.com/nushell/nushell.git
synced 2025-05-02 17:14:27 +02:00
Fix some 'open' signature stuff (#583)
This commit is contained in:
parent
ca6baf7a46
commit
89a000a572
@ -20,17 +20,13 @@ impl Command for Open {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn usage(&self) -> &str {
|
||||||
"List the files in a directory."
|
"Opens a file."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn signature(&self) -> nu_protocol::Signature {
|
fn signature(&self) -> nu_protocol::Signature {
|
||||||
Signature::build("open")
|
Signature::build("open")
|
||||||
.required(
|
.required("filename", SyntaxShape::Filepath, "the filename to use")
|
||||||
"filename",
|
.switch("raw", "open file as raw binary", Some('r'))
|
||||||
SyntaxShape::GlobPattern,
|
|
||||||
"the glob pattern to use",
|
|
||||||
)
|
|
||||||
.switch("raw", "open file as binary", Some('r'))
|
|
||||||
.category(Category::FileSystem)
|
.category(Category::FileSystem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user