From e93e815bc4754b4e2066fed621d5c58592880ec0 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sun, 4 Apr 2021 09:17:53 +0530 Subject: [PATCH] Add upgrade instructions for incompatibility error --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 3 ++- src/app.rs | 23 +++++++++++++---------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 366c687..84afa4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1671,7 +1671,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "xplr" -version = "0.2.14" +version = "0.2.15" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index ffea74b..c2925e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xplr" -version = "0.2.14" # Update app.rs +version = "0.2.15" # Update app.rs authors = ["Arijit Basu "] edition = "2018" description = "A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf" diff --git a/README.md b/README.md index 36629bd..64e395a 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,11 @@ A hackable, minimal, fast TUI file explorer, stealing ideas from -[Features] [Quickstart] +[Features] [Plugins] [Documentation] +[Upgrade Guide] [TODO] diff --git a/src/app.rs b/src/app.rs index fb22232..f041590 100644 --- a/src/app.rs +++ b/src/app.rs @@ -14,7 +14,7 @@ use std::fs; use std::io; use std::path::PathBuf; -pub const VERSION: &str = "v0.2.14"; // Update Cargo.toml +pub const VERSION: &str = "v0.2.15"; // Update Cargo.toml pub const TEMPLATE_TABLE_ROW: &str = "TEMPLATE_TABLE_ROW"; @@ -396,7 +396,6 @@ impl ExplorerConfig { #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] pub enum ExternalMsg { - /// Explore the present working directory and register the filtered nodes. /// This operation is expensive. So, try avoiding using it too often. /// Once exploration is done, it will auto `Refresh` the state. @@ -437,10 +436,10 @@ pub enum ExternalMsg { /// Focus on the first node. FocusFirst, - + /// Focus on the last node. FocusLast, - + /// Focus on the given path. /// /// Example: `FocusPath: /tmp` @@ -453,10 +452,10 @@ pub enum ExternalMsg { /// /// Example: `FocusByIndex: 2` FocusByIndex(usize), - + /// Focus on the absolute `n`th node where `n` is read from the input buffer. FocusByIndexFromInput, - + /// Focus on the file by name from the present working directory. /// /// Example: `FocusByFileName: README.md` @@ -509,7 +508,7 @@ pub enum ExternalMsg { /// Select the focused node. Select, - + /// Unselect the focused node. UnSelect, @@ -544,7 +543,7 @@ pub enum ExternalMsg { /// Log information message. Stored in `$XPLR_LOGS`. /// - /// Example: `LogInfo: launching satellite` + /// Example: `LogInfo: launching satellite` LogInfo(String), /// Log a success message. Stored in `$XPLR_LOGS`. @@ -717,9 +716,13 @@ impl App { if config.version != VERSION { bail!( - "incompatible config version {} in {}", + "incompatible configuration version in {} + You config version is : {} + Required version is : {} + Visit https://github.com/sayanarijit/xplr/wiki/Upgrade-Guide", + config_file.to_string_lossy().to_string(), config.version, - config_file.to_string_lossy().to_string() + VERSION, ) } else { let mode = config