summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-02-13 12:58:40 +0000
committerEllie Huxtable <e@elm.sh>2021-02-13 12:58:40 +0000
commit07aceb3dd4755acdba88faea4d584ef81c08fc15 (patch)
treec89fa79eb4247c4ef2b6bb982450997dc30b3251 /src/main.rs
parente3661daf81b238b3167023e1554b5d5c75afd85d (diff)
Rename
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs
index 2ec14a50..a9b4b8af 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -20,16 +20,16 @@ use local::history::History;
version = "0.1.0",
about = "Keep your shell history in sync"
)]
-struct Shync {
+struct Atuin {
#[structopt(long, parse(from_os_str), help = "db file path")]
db: Option<PathBuf>,
#[structopt(subcommand)]
- shync: ShyncCmd,
+ atuin: AtuinCmd,
}
#[derive(StructOpt)]
-enum ShyncCmd {
+enum AtuinCmd {
#[structopt(
about="manipulate shell history",
aliases=&["h", "hi", "his", "hist", "histo", "histor"],
@@ -39,11 +39,11 @@ enum ShyncCmd {
#[structopt(about = "import shell history from file")]
Import,
- #[structopt(about = "start a shync server")]
+ #[structopt(about = "start a atuin server")]
Server,
}
-impl Shync {
+impl Atuin {
fn run(self) -> Result<()> {
let db_path = match self.db {
Some(db_path) => {
@@ -54,9 +54,9 @@ impl Shync {
PathBuf::from(path.as_ref())
}
None => {
- let project_dirs = ProjectDirs::from("bike", "ellie", "shync").ok_or(eyre!(
- "could not determine db file location\nspecify one using the --db flag"
- ))?;
+ let project_dirs = ProjectDirs::from("com", "elliehuxtable", "atuin").ok_or(
+ eyre!("could not determine db file location\nspecify one using the --db flag"),
+ )?;
let root = project_dirs.data_dir();
root.join("history.db")
}
@@ -64,8 +64,8 @@ impl Shync {
let db = SqliteDatabase::new(db_path)?;
- match self.shync {
- ShyncCmd::History(history) => history.run(db),
+ match self.atuin {
+ AtuinCmd::History(history) => history.run(db),
_ => Ok(()),
}
}
@@ -108,5 +108,5 @@ impl HistoryCmd {
fn main() -> Result<()> {
pretty_env_logger::init();
- Shync::from_args().run()
+ Atuin::from_args().run()
}