Skip to content

Commit

Permalink
deps: use terminal_size instead of termsize
Browse files Browse the repository at this point in the history
  • Loading branch information
niyaznigmatullin committed Aug 22, 2022
1 parent 212953e commit c9a81f5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 96 deletions.
124 changes: 31 additions & 93 deletions 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 src/uu/ls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ clap = { version = "3.2", features = ["wrap_help", "cargo", "env"] }
unicode-width = "0.1.8"
number_prefix = "0.4"
term_grid = "0.1.5"
termsize = "0.1.6"
terminal_size = "0.1"
glob = "0.3.0"
lscolors = { version = "0.12.0", features = ["ansi_term"] }
uucore = { version=">=0.0.15", package="uucore", path="../../uucore", features = ["entries", "fs"] }
Expand Down
4 changes: 2 additions & 2 deletions src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,8 @@ impl Config {
}
}
}
None => match termsize::get() {
Some(size) => size.cols,
None => match terminal_size::terminal_size() {
Some((width, _)) => width.0,
None => match std::env::var_os("COLUMNS") {
Some(columns) => match columns.to_str().and_then(|s| s.parse().ok()) {
Some(columns) => columns,
Expand Down

0 comments on commit c9a81f5

Please sign in to comment.