diff --git a/Cargo.lock b/Cargo.lock index 2486e74..832f77e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -432,7 +432,7 @@ dependencies = [ [[package]] name = "navi" -version = "2.23.0" +version = "2.24.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 835c814..841ec56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "navi" -version = "2.23.0" +version = "2.24.0" authors = ["Denis Isidoro "] edition = "2021" description = "An interactive cheatsheet tool for the command-line" @@ -53,4 +53,4 @@ path = "src/lib.rs" [[bin]] name = "navi" path = "src/bin/main.rs" -bench = false \ No newline at end of file +bench = false diff --git a/scripts/dot b/scripts/dot index c9fad08..4f4c974 100755 --- a/scripts/dot +++ b/scripts/dot @@ -8,7 +8,17 @@ export CARGO_PATH="${NAVI_HOME}/core/Cargo.toml" # TODO: bump dotfiles + remove this fn log::note() { log::info "$@"; } -export -f log::note + +cargo() { + if [ "${1:-}" = "install" ] && [ "${2:-}" = "cross" ]; then + shift 2 || true + command cargo install cross --git https://github.com/cross-rs/cross "$@" + else + command cargo "$@" + fi +} + +export -f log::note cargo dot::clone() { git clone 'https://github.com/denisidoro/dotfiles' "$DOTFILES" @@ -24,4 +34,4 @@ dot::clone_if_necessary() { dot::clone_if_necessary -"${DOTFILES}/bin/dot" "$@" \ No newline at end of file +"${DOTFILES}/bin/dot" "$@" diff --git a/src/filesystem.rs b/src/filesystem.rs index b8c4a03..304629c 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -1,4 +1,4 @@ -pub use crate::common::fs::{create_dir, exe_string, read_lines, remove_dir, InvalidPath, UnreadableDir}; +pub use crate::common::fs::{create_dir, exe_string, read_lines, remove_dir}; use crate::env_var; use crate::parser::Parser; use crate::prelude::*; diff --git a/src/parser.rs b/src/parser.rs index 8b4dd10..bcdda8f 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -254,7 +254,9 @@ impl<'a> Parser<'a> { } // duplicate - if !item.tags.is_empty() && !item.comment.is_empty() {} + if !item.tags.is_empty() { + item.comment.is_empty(); + } // blank if line.is_empty() { if !item.snippet.is_empty() {