I5WVRUHGAQGWFZGX7YBKCGQKLHXZHZTCBWFIUCXVGY2WVFB77VQQC
/// Path to folder in which to store the history files
#[structopt(
short,
long,
default_value = into_str!(default_data_dir())
)]
data_dir: PathBuf,
#[structopt(flatten)]
socket_path: Socket,
}
#[derive(StructOpt, Debug)]
struct Import {
#[structopt(flatten)]
data_dir: DataDir,
/// Path to the existing histdb sqlite file
#[structopt(short, long, default_value = into_str!(default_histdb_sqlite_path()))]
import_file: PathBuf,
}
struct Socket {
/// Path to the socket for communication with the server
#[structopt(short, long, default_value = into_str!(default_socket_path()))]
socket_path: PathBuf,
struct DefaultArgs {
#[structopt(flatten)]
data_dir: DataDir,
/// How many entries to print
#[structopt(short, long, default_value = "25")]
entries_count: usize,
/// Path to folder in which to store the history files
#[structopt(
short,
long,
default_value = into_str!(default_data_dir())
)]
data_dir: PathBuf,
#[structopt(flatten)]
default_args: DefaultArgs,
SubCommand::ZSHAddHistory(o) => Self::run_zsh_add_history(o.command, o.socket_path),
SubCommand::Server(o) => Self::run_server(o.cache_path, o.socket_path, o.data_dir),
SubCommand::ZSHAddHistory(o) => {
Self::run_zsh_add_history(o.command, o.socket_path.socket_path)
}
SubCommand::Server(o) => {
Self::run_server(o.cache_path, o.socket_path.socket_path, o.data_dir.data_dir)
}