Skip to content
Permalink
Browse files

Added back changes lost from force push

I accidentally forced pushed and lost two commits.

Co-authored-by: mlvzk <mlvzk@pm.me>
Co-authored-by: Adam Thalhammer <ocisly@users.noreply.github.com>
  • Loading branch information...
3 people committed May 19, 2019
1 parent d9bfe81 commit 86c59b2b0a53a099e281df9c84fe55cafc6fa49f
Showing with 13 additions and 10 deletions.
  1. +1 −1 README.md
  2. +12 −9 src/main.rs
@@ -32,7 +32,7 @@ This is tokei running on its own directory
- [Fedora](#fedora)
- [FreeBSD](#freebsd)
- [Homebrew](#homebrew)
- [Nix/NixOS](#nix/nixos)
- [Nix/NixOS](#nixnixos)
- [Manual](#manual)
- [How to use Tokei](#how-to-use-tokei)
- [Options](#options)
@@ -47,15 +47,18 @@ fn main() -> Result<(), Box<Error>> {
process::exit(0);
}

let columns = cli.columns.or(config.columns).unwrap_or_else(|| {
if cli.files {
term_size::dimensions().map_or(FALLBACK_ROW_LEN, |(w, _)| {
w.max(FALLBACK_ROW_LEN)
})
} else {
FALLBACK_ROW_LEN
}
});
let columns = cli
.columns
.or(config.columns)
.or_else(|| {
if cli.files {
term_size::dimensions().map(|(w, _)| w)
} else {
None
}
})
.unwrap_or(FALLBACK_ROW_LEN)
.max(FALLBACK_ROW_LEN);


let row = "-".repeat(columns);

0 comments on commit 86c59b2

Please sign in to comment.
You can’t perform that action at this time.