Merge pull request #492 from jonathandturner/fix_sys

Fix the sys command
This commit is contained in:
Jonathan Turner 2019-08-28 04:49:27 +12:00 committed by GitHub
commit 3827ded43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ use futures::stream::StreamExt;
use heim::{disk, memory, net}; use heim::{disk, memory, net};
use nu::{ use nu::{
serve_plugin, CallInfo, Plugin, Primitive, ReturnSuccess, ReturnValue, ShellError, Signature, serve_plugin, CallInfo, Plugin, Primitive, ReturnSuccess, ReturnValue, ShellError, Signature,
SyntaxType, Tag, Tagged, TaggedDictBuilder, Value, Tag, Tagged, TaggedDictBuilder, Value,
}; };
use std::ffi::OsStr; use std::ffi::OsStr;
@ -250,7 +250,7 @@ async fn sysinfo(tag: Tag) -> Vec<Tagged<Value>> {
impl Plugin for Sys { impl Plugin for Sys {
fn config(&mut self) -> Result<Signature, ShellError> { fn config(&mut self) -> Result<Signature, ShellError> {
Ok(Signature::build("sys").rest(SyntaxType::Any)) Ok(Signature::build("sys").filter())
} }
fn begin_filter(&mut self, callinfo: CallInfo) -> Result<Vec<ReturnValue>, ShellError> { fn begin_filter(&mut self, callinfo: CallInfo) -> Result<Vec<ReturnValue>, ShellError> {