Move old plugins (#4721)

This commit is contained in:
JT
2022-03-04 09:36:03 -05:00
committed by GitHub
parent 89b7f4d57c
commit eef3de2d05
61 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,28 @@
use nu_errors::ShellError;
use nu_plugin::Plugin;
use nu_protocol::{CallInfo, ReturnValue, Signature, SyntaxShape};
use crate::start::Start;
impl Plugin for Start {
fn config(&mut self) -> Result<Signature, ShellError> {
Ok(Signature::build("start")
.desc("Opens each file/directory/URL using the default application")
.rest(
"rest",
SyntaxShape::String,
"files/urls/directories to open",
)
.named(
"application",
SyntaxShape::String,
"Specifies the application used for opening the files/directories/urls",
Some('a'),
)
.filter())
}
fn begin_filter(&mut self, call_info: CallInfo) -> Result<Vec<ReturnValue>, ShellError> {
self.parse(call_info)?;
self.exec().map(|_| Vec::new())
}
}