pub use datui_cli::{
Args, CacheAction, Command, CompressionFormat, ConfigAction, FileFormat, FormatChoice,
FormatsAction, InferTypes, Lines, ReadMode, RemoteRead, Stored, Summary, ViewsAction,
completions, one_table, settings,
};
pub fn parse_args<I, T>(argv: I) -> Result<Args, String>
where
I: IntoIterator<Item = T>,
T: Into<std::ffi::OsString> + Clone,
{
use clap::Parser;
Args::try_parse_from(argv).map_err(|e| {
let text = e.to_string();
text.lines()
.next()
.unwrap_or_default()
.trim_start_matches("error: ")
.to_string()
})
}