Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
konradsz committed Jan 29, 2023
1 parent 689b269 commit 2890b68
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v1.1.0 (2023-01-29)
***
- add error handling in case of editor process spawning failure
- improve performance by handling multiple file entries every redraw
- add support for Sublime Text, Micro, Intellij, Goland, Pycharm
- use `helix` as a binary name when `helix` is set as an editor of choice
- prefer $VISUAL variable over $EDITOR when determining text editor to use

## v1.0.0 (2023-01-08)
***
- add context viewer
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "igrep"
version = "1.0.0"
version = "1.1.0"
authors = ["Konrad Szymoniak <szymoniak.konrad@gmail.com>"]
license = "MIT"
description = "Interactive Grep"
Expand Down
4 changes: 2 additions & 2 deletions HomebrewFormula/igrep.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Igrep < Formula
version "1.0.0"
version "1.1.0"
desc "Interactive Grep"
homepage "https://github.com/konradsz/igrep"
url "https://github.com/konradsz/igrep/releases/download/v#{version}/igrep-v#{version}-x86_64-apple-darwin.tar.gz"
sha256 "9affe2ee1357c42ed2b295ed1b3dbfa9a5b2cc9797d1df85954d15d9e461c166"
sha256 "228616570faa857d7fb880c186b246598f7e79446356271d7e88b257cf6e8ee0"

def install
bin.install "ig"
Expand Down
6 changes: 3 additions & 3 deletions bucket/igrep.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"version": "1.0.0",
"version": "1.1.0",
"description": "Runs grep (ripgrep's library) and allows to interactively pick its results and open selected match in a text editor.",
"homepage": "https://github.com/konradsz/igrep",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/konradsz/igrep/releases/download/v1.0.0/igrep-v1.0.0-x86_64-pc-windows-msvc.zip",
"hash": "fee67fdffe9195944e1ba7f81387a99d0677f8b13cd85fa55412d98320c8c136"
"url": "https://github.com/konradsz/igrep/releases/download/v1.1.0/igrep-v1.1.0-x86_64-pc-windows-msvc.zip",
"hash": "126f250c2050ac3c2fff8f6d1bf4e9167f2d75433725333844dd20799c9690cd"
}
},
"bin": "ig.exe"
Expand Down
16 changes: 5 additions & 11 deletions src/ui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl App {
}
EntryType::Match(n, t, offsets) => {
let line_number =
Span::styled(format!(" {}: ", n), app.theme.line_number_color());
Span::styled(format!(" {n}: "), app.theme.line_number_color());

let mut spans = vec![line_number];

Expand Down Expand Up @@ -246,7 +246,7 @@ impl App {
let search_result = Span::raw(if app.ig.is_searching() {
"".into()
} else if let Some(err) = app.ig.last_error() {
format!(" {}", err)
format!(" {err}")
} else {
let total_no_of_matches = app.result_list.get_total_number_of_matches();
if total_no_of_matches == 0 {
Expand All @@ -263,15 +263,12 @@ impl App {

let filtered_count = app.result_list.get_filtered_matches_count();
let filtered_str = if filtered_count != 0 {
format!(" ({} filtered out)", filtered_count)
format!(" ({filtered_count} filtered out)")
} else {
String::default()
};

format!(
" Found {} {} in {} {}{}.",
total_no_of_matches, matches_str, no_of_files, files_str, filtered_str
)
format!(" Found {total_no_of_matches} {matches_str} in {no_of_files} {files_str}{filtered_str}.")
}
});

Expand All @@ -290,10 +287,7 @@ impl App {
let current_no_of_matches = app.result_list.get_current_number_of_matches();
let selected_info_text = {
let width = current_no_of_matches.to_string().len();
format!(
" | {: >width$}/{} ",
current_match_index, current_no_of_matches
)
format!(" | {current_match_index: >width$}/{current_no_of_matches} ")
};
let selected_info_length = selected_info_text.len();
let selected_info = Span::styled(selected_info_text, app.theme.bottom_bar_style());
Expand Down
3 changes: 1 addition & 2 deletions src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ impl Editor {
.map(Editor::to_string)
.join(", ");
anyhow!(e).context(format!(
"\"{}\" read from ${}, possible variants: [{}]",
env_value, env_name, possible_variants
"\"{env_value}\" read from ${env_name}, possible variants: [{possible_variants}]",
))
};

Expand Down

0 comments on commit 2890b68

Please sign in to comment.