mirror of
https://github.com/nushell/nushell
synced 2025-01-24 02:45:31 +00:00
16 lines
492 B
Rust
16 lines
492 B
Rust
use crate::commands::command::SinkCommandArgs;
|
|
use crate::errors::ShellError;
|
|
use crate::format::VTableView;
|
|
use crate::prelude::*;
|
|
|
|
pub fn vtable(args: SinkCommandArgs) -> Result<(), ShellError> {
|
|
if args.input.len() > 0 {
|
|
let mut host = args.ctx.host.lock().unwrap();
|
|
let view = VTableView::from_list(&args.input);
|
|
if let Some(view) = view {
|
|
handle_unexpected(&mut *host, |host| crate::format::print_view(&view, host));
|
|
}
|
|
}
|
|
|
|
Ok(())
|
|
}
|