From 07aceb3dd4755acdba88faea4d584ef81c08fc15 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 13 Feb 2021 12:58:40 +0000 Subject: [PATCH] Rename --- Cargo.lock | 28 ++++++++++++++-------------- Cargo.toml | 6 ++---- README.md | 2 +- hook.zsh | 6 +++--- src/main.rs | 22 +++++++++++----------- 5 files changed, 31 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cad5c2..4e7436f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,6 +41,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "atuin" +version = "0.1.1" +dependencies = [ + "chrono", + "directories", + "eyre", + "log", + "pretty_env_logger", + "rusqlite", + "shellexpand", + "structopt", +] + [[package]] name = "autocfg" version = "1.0.1" @@ -449,20 +463,6 @@ dependencies = [ "dirs", ] -[[package]] -name = "shync" -version = "0.1.1" -dependencies = [ - "chrono", - "directories", - "eyre", - "log", - "pretty_env_logger", - "rusqlite", - "shellexpand", - "structopt", -] - [[package]] name = "smallvec" version = "1.4.2" diff --git a/Cargo.toml b/Cargo.toml index 4985037..bc4d1df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "shync" +name = "atuin" version = "0.1.1" authors = ["Ellie Huxtable "] edition = "2018" license = "MIT" -description = "shync - sync your shell history" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +description = "atuin - sync your shell history" [dependencies] log = "0.4" diff --git a/README.md b/README.md index 7f0577a..030af67 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ Through the fathomless deeps of space swims the star turtle Great A’Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld. - `atuin` manages and synchronizes your shell history! + `atuin` manages and synchronizes your shell history! diff --git a/hook.zsh b/hook.zsh index dfdadf5..ae1ca7b 100644 --- a/hook.zsh +++ b/hook.zsh @@ -1,7 +1,7 @@ # Source this in your ~/.zshrc -_shync_preexec(){ - shync history add $1 +_atuin_preexec(){ + atuin history add $1 } -add-zsh-hook preexec _shync_preexec +add-zsh-hook preexec _atuin_preexec diff --git a/src/main.rs b/src/main.rs index 2ec14a5..a9b4b8a 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, #[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() }