Skip to content

Commit

Permalink
Bug/e (#128)
Browse files Browse the repository at this point in the history
* fix bug in -e

* dont bump the version

* push new version

* update change log
  • Loading branch information
alexhallam authored May 12, 2022
1 parent 05b296e commit c8aa65b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
1.4.5 (2021-5-1)
==================

* **Bug 1** Though `-e` was added as an option I found that it was not overriding the `-n` argument. The fix was made with a simple if/else statement.

It may seem odd to bump the version with such a small bug, but I did not want to have something in the help file that was not functional in
the CLI.

1.4.4 (2021-5-02)
==================

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.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
authors = ["alexhallam <[email protected]>"]
categories = ["command-line-utilities"]
description = "Head, but for csvs and with color"
description = "Head, but for CSV files and with color"
edition = "2021"
keywords = ["csv", "pretty-print", "data-viewer", "tv", "tabular-data-viewer"]
keywords = ["csv", "pretty-print", "data-viewer", "tv", "tabular-data-viewer", "csv-viewer", "csv-pretty-print", "csv-cat", "csv-column"]
license = "Unlicense/MIT"
name = "tidy-viewer"
readme = "README.md"
repository = "https://github.com/alexhallam/tv"
version = "1.4.4"
version = "1.4.5"

[package.metadata.deb]
assets = [
Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,13 @@ fn main() {
}

let cols: usize = rdr[0].len();
let rows: usize = rdr.len().min(row_display_option + 1);
let rows_in_file: usize = rdr.len();
let rows: usize = if extend_option {
rdr.len().min(rows_in_file + 1)
} else {
rdr.len().min(row_display_option + 1)
};

let rows_remaining: usize = rows_in_file - rows;
let ellipsis = '\u{2026}'.to_string();
let row_remaining_text: String = format!("{} with {} more rows", ellipsis, rows_remaining);
Expand Down

0 comments on commit c8aa65b

Please sign in to comment.