Fix some 'open' signature stuff (#583)

This commit is contained in:
JT 2021-12-26 09:13:43 +11:00 committed by GitHub
parent ca6baf7a46
commit 89a000a572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,17 +20,13 @@ impl Command for Open {
}
fn usage(&self) -> &str {
"List the files in a directory."
"Opens a file."
}
fn signature(&self) -> nu_protocol::Signature {
Signature::build("open")
.required(
"filename",
SyntaxShape::GlobPattern,
"the glob pattern to use",
)
.switch("raw", "open file as binary", Some('r'))
.required("filename", SyntaxShape::Filepath, "the filename to use")
.switch("raw", "open file as raw binary", Some('r'))
.category(Category::FileSystem)
}