forked from extern/nushell
[wasi] Update time & instant crates (#2645)
* [wasi] Update time & instant crates In https://github.com/nushell/nushell/pull/2643 instant was updated by adding it as a hard dependency in Cargo.toml, but it's better to avoid it and only update in Cargo.lock via `cargo update -p ...`. Additionally, updated `time` crate so that now some basic commands like `ls` work too, although formatting is pretty bad. * Update default terminal width to 80 If termsize can't return anything, use 80 chars (e.g. on WASI).
This commit is contained in:
5
crates/nu-cli/src/env/host.rs
vendored
5
crates/nu-cli/src/env/host.rs
vendored
@ -126,9 +126,8 @@ impl Host for BasicHost {
|
||||
}
|
||||
|
||||
fn width(&self) -> usize {
|
||||
let (mut term_width, _) = term_size::dimensions().unwrap_or_else(|| (20, 20));
|
||||
term_width -= 1;
|
||||
std::cmp::max(term_width, 20)
|
||||
let (term_width, _) = term_size::dimensions().unwrap_or_else(|| (80, 20));
|
||||
term_width
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user