mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:55:55 +02:00
Bump deps and touchup (#2066)
This commit is contained in:
@ -22,13 +22,13 @@ nu-table = {version = "0.15.1", path = "../nu-table"}
|
||||
ansi_term = "0.12.1"
|
||||
app_dirs = "1.2.1"
|
||||
async-recursion = "0.3.1"
|
||||
async-trait = "0.1.31"
|
||||
async-trait = "0.1.36"
|
||||
directories = "2.0.2"
|
||||
base64 = "0.12.1"
|
||||
base64 = "0.12.3"
|
||||
bigdecimal = { version = "0.1.2", features = ["serde"] }
|
||||
bson = { version = "0.14.1", features = ["decimal128"] }
|
||||
byte-unit = "3.1.3"
|
||||
bytes = "0.5.4"
|
||||
bytes = "0.5.5"
|
||||
calamine = "0.16"
|
||||
cfg-if = "0.1"
|
||||
chrono = { version = "0.4.11", features = ["serde"] }
|
||||
@ -37,7 +37,7 @@ csv = "1.1"
|
||||
ctrlc = "3.1.4"
|
||||
derive-new = "0.5.8"
|
||||
dirs = "2.0.2"
|
||||
dunce = "1.0.0"
|
||||
dunce = "1.0.1"
|
||||
eml-parser = "0.1.0"
|
||||
filesize = "0.2.0"
|
||||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||
@ -50,15 +50,15 @@ hex = "0.4"
|
||||
htmlescape = "0.3.1"
|
||||
ical = "0.6.*"
|
||||
ichwh = "0.3.4"
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
itertools = "0.9.0"
|
||||
codespan-reporting = "0.9.4"
|
||||
codespan-reporting = "0.9.5"
|
||||
log = "0.4.8"
|
||||
meval = "0.2"
|
||||
natural = "0.5.0"
|
||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||
num-traits = "0.2.11"
|
||||
parking_lot = "0.10.2"
|
||||
parking_lot = "0.11.0"
|
||||
pin-utils = "0.1.0"
|
||||
pretty-hex = "0.1.1"
|
||||
pretty_env_logger = "0.4.0"
|
||||
@ -66,13 +66,13 @@ ptree = {version = "0.2" }
|
||||
query_interface = "0.3.5"
|
||||
rand = "0.7"
|
||||
regex = "1"
|
||||
roxmltree = "0.11.0"
|
||||
roxmltree = "0.13.0"
|
||||
rustyline = "6.2.0"
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
serde-hjson = "0.9.1"
|
||||
serde_bytes = "0.11.4"
|
||||
serde_bytes = "0.11.5"
|
||||
serde_ini = "0.2.0"
|
||||
serde_json = "1.0.53"
|
||||
serde_json = "1.0.55"
|
||||
serde_urlencoded = "0.6.1"
|
||||
serde_yaml = "0.8"
|
||||
shellexpand = "2.0.0"
|
||||
@ -80,18 +80,18 @@ strip-ansi-escapes = "0.1.0"
|
||||
tempfile = "3.1.0"
|
||||
term = "0.5.2"
|
||||
termcolor = "1.1.0"
|
||||
textwrap = {version = "0.11.0", features = ["term_size"]}
|
||||
term_size = "0.3.2"
|
||||
toml = "0.5.6"
|
||||
typetag = "0.1.4"
|
||||
typetag = "0.1.5"
|
||||
umask = "1.0.0"
|
||||
unicode-xid = "0.2.0"
|
||||
unicode-xid = "0.2.1"
|
||||
uuid_crate = { package = "uuid", version = "0.8.1", features = ["v4"] }
|
||||
which = "4.0.1"
|
||||
|
||||
trash = { version = "1.0.1", optional = true }
|
||||
clipboard = { version = "0.5", optional = true }
|
||||
starship = "0.42.0"
|
||||
rayon = "1.3.0"
|
||||
starship = "0.43.0"
|
||||
rayon = "1.3.1"
|
||||
encoding_rs = "0.8.23"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
|
@ -106,6 +106,7 @@ pub async fn autoview(context: RunnableContext) -> Result<OutputStream, ShellErr
|
||||
};
|
||||
|
||||
let (mut input_stream, context) = RunnableContextWithoutInput::convert(context);
|
||||
let term_width = context.host.lock().width();
|
||||
|
||||
if let Some(x) = input_stream.next().await {
|
||||
match input_stream.next().await {
|
||||
@ -263,7 +264,7 @@ pub async fn autoview(context: RunnableContext) -> Result<OutputStream, ShellErr
|
||||
.iter()
|
||||
.fold(0usize, |acc, len| acc + len.len())
|
||||
+ row.entries.iter().count() * 2)
|
||||
> textwrap::termwidth()) =>
|
||||
> term_width) =>
|
||||
{
|
||||
let mut entries = vec![];
|
||||
for (key, value) in row.entries.iter() {
|
||||
@ -286,7 +287,7 @@ pub async fn autoview(context: RunnableContext) -> Result<OutputStream, ShellErr
|
||||
let table =
|
||||
nu_table::Table::new(vec![], entries, nu_table::Theme::compact());
|
||||
|
||||
nu_table::draw_table(&table, textwrap::termwidth());
|
||||
nu_table::draw_table(&table, term_width);
|
||||
}
|
||||
|
||||
Value {
|
||||
|
@ -241,7 +241,7 @@ async fn table(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputSt
|
||||
|
||||
let mut delay_slot = None;
|
||||
|
||||
let termwidth = std::cmp::max(textwrap::termwidth(), 20);
|
||||
let term_width = args.host.lock().width();
|
||||
|
||||
while !finished {
|
||||
let mut new_input: VecDeque<Value> = VecDeque::new();
|
||||
@ -294,7 +294,7 @@ async fn table(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputSt
|
||||
if !input.is_empty() {
|
||||
let t = from_list(&input, start_number);
|
||||
|
||||
draw_table(&t, termwidth);
|
||||
draw_table(&t, term_width);
|
||||
}
|
||||
|
||||
start_number += input.len();
|
||||
|
4
crates/nu-cli/src/env/host.rs
vendored
4
crates/nu-cli/src/env/host.rs
vendored
@ -120,7 +120,9 @@ impl Host for BasicHost {
|
||||
}
|
||||
|
||||
fn width(&self) -> usize {
|
||||
std::cmp::max(textwrap::termwidth(), 20)
|
||||
let (mut term_width, _) = term_size::dimensions().unwrap_or_else(|| (20, 20));
|
||||
term_width -= 1;
|
||||
std::cmp::max(term_width, 20)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user