1pub use datui_cli::{
4 Args, CacheAction, Command, CompressionFormat, ConfigAction, FileFormat, FormatChoice,
5 FormatsAction, InferTypes, Lines, ReadMode, RemoteRead, Stored, Summary, ViewsAction,
6 completions, one_table, settings,
7};
8
9pub fn parse_args<I, T>(argv: I) -> Result<Args, String>
12where
13 I: IntoIterator<Item = T>,
14 T: Into<std::ffi::OsString> + Clone,
15{
16 use clap::Parser;
17 Args::try_parse_from(argv).map_err(|e| {
18 let text = e.to_string();
19 text.lines()
20 .next()
21 .unwrap_or_default()
22 .trim_start_matches("error: ")
23 .to_string()
24 })
25}