1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

Merge pull request #3829 from niyaznigmatullin/cargo-lock-update

cargo +1.56.1 update
This commit is contained in:
Terts Diepraam 2022-08-17 15:58:48 +02:00 committed by GitHub
commit 383291f5b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 338 additions and 227 deletions

521
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -402,7 +402,7 @@ hex-literal = "0.3.1"
rlimit = "0.8.3"
[target.'cfg(unix)'.dev-dependencies]
nix = { version = "0.24.2", default-features = false, features = ["process", "signal", "user"] }
nix = { version = "0.25", default-features = false, features = ["process", "signal", "user"] }
rust-users = { version="0.11", package="users" }
unix_socket = "0.5.0"

View file

@ -30,6 +30,7 @@ allow = [
"BSD-3-Clause",
"CC0-1.0",
"MPL-2.0", # XXX considered copyleft?
"Unicode-DFS-2016",
]
copyleft = "deny"
allow-osi-fsf-free = "neither"

View file

@ -147,22 +147,19 @@ fn gen_completions<T: uucore::Args>(
)
.arg(
Arg::new("shell")
.value_parser(clap::builder::PossibleValuesParser::new(
Shell::possible_values(),
))
.value_parser(clap::builder::EnumValueParser::<Shell>::new())
.required(true),
)
.get_matches_from(std::iter::once(OsString::from("completion")).chain(args));
let utility = matches.value_of("utility").unwrap();
let shell = matches.value_of("shell").unwrap();
let shell = matches.get_one::<Shell>("shell").unwrap().to_owned();
let mut command = if utility == "coreutils" {
gen_coreutils_app(util_map)
} else {
util_map.get(utility).unwrap().1()
};
let shell: Shell = shell.parse().unwrap();
let bin_name = std::env::var("PROG_PREFIX").unwrap_or_default() + utility;
clap_complete::generate(shell, &mut command, bin_name, &mut io::stdout());

View file

@ -22,7 +22,7 @@ uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=[
[target.'cfg(unix)'.dependencies]
unix_socket = "0.5.0"
nix = { version = "0.24.2", default-features = false }
nix = { version = "0.25", default-features = false }
[[bin]]
name = "cat"

View file

@ -16,7 +16,7 @@ path = "src/kill.rs"
[dependencies]
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
nix = { version = "0.24.2", features = ["signal"] }
nix = { version = "0.25", features = ["signal"] }
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["signals"] }
[[bin]]

View file

@ -23,7 +23,7 @@ unicode-width = "0.1.7"
unicode-segmentation = "1.9.0"
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
nix = { version = "0.24.2", default-features = false }
nix = { version = "0.25", default-features = false }
[[bin]]
name = "more"

View file

@ -18,6 +18,7 @@ use std::{
extern crate nix;
use clap::{crate_version, Arg, Command};
use crossterm::event::KeyEventKind;
use crossterm::{
event::{self, Event, KeyCode, KeyEvent, KeyModifiers},
execute, queue,
@ -229,13 +230,21 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
let mut wrong_key = None;
if event::poll(Duration::from_millis(10)).unwrap() {
match event::read().unwrap() {
Event::Key(KeyEvent {
kind: KeyEventKind::Release,
..
}) => continue,
Event::Key(KeyEvent {
code: KeyCode::Char('q'),
modifiers: KeyModifiers::NONE,
kind: KeyEventKind::Press,
..
})
| Event::Key(KeyEvent {
code: KeyCode::Char('c'),
modifiers: KeyModifiers::CONTROL,
kind: KeyEventKind::Press,
..
}) => {
reset_term(stdout);
std::process::exit(0);
@ -243,10 +252,12 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
Event::Key(KeyEvent {
code: KeyCode::Down,
modifiers: KeyModifiers::NONE,
..
})
| Event::Key(KeyEvent {
code: KeyCode::Char(' '),
modifiers: KeyModifiers::NONE,
..
}) => {
if pager.should_close() {
return Ok(());
@ -257,12 +268,14 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
Event::Key(KeyEvent {
code: KeyCode::Up,
modifiers: KeyModifiers::NONE,
..
}) => {
pager.page_up();
}
Event::Key(KeyEvent {
code: KeyCode::Char('j'),
modifiers: KeyModifiers::NONE,
..
}) => {
if pager.should_close() {
return Ok(());
@ -273,6 +286,7 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
Event::Key(KeyEvent {
code: KeyCode::Char('k'),
modifiers: KeyModifiers::NONE,
..
}) => {
pager.prev_line();
}

View file

@ -17,7 +17,7 @@ path = "src/nice.rs"
[dependencies]
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
libc = "0.2.126"
nix = { version = "0.24.2", default-features = false }
nix = { version = "0.25", default-features = false }
uucore = { version=">=0.0.11", package="uucore", path="../../uucore" }
[[bin]]

View file

@ -26,7 +26,7 @@ winapi = { version="0.3", features=["fileapi", "handleapi", "processthreadsapi",
winapi-util = { version="0.1.5" }
[target.'cfg(unix)'.dependencies]
nix = { version = "0.24.2", features = ["fs"] }
nix = { version = "0.25", features = ["fs"] }
[[bin]]
name = "tail"

View file

@ -17,7 +17,7 @@ path = "src/timeout.rs"
[dependencies]
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
libc = "0.2.126"
nix = { version = "0.24.2", default-features = false, features = ["signal"] }
nix = { version = "0.25", default-features = false, features = ["signal"] }
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["process", "signals"] }
[[bin]]

View file

@ -22,7 +22,7 @@ utf-8 = "0.7.6"
unicode-width = "0.1.8"
[target.'cfg(unix)'.dependencies]
nix = { version = "0.24.2", default-features = false }
nix = { version = "0.25", default-features = false }
libc = "0.2"
[[bin]]

View file

@ -20,7 +20,7 @@ libc = "0.2.126"
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["pipes"] }
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
nix = { version = "0.24.2", default-features = false }
nix = { version = "0.25", default-features = false }
[[bin]]
name = "yes"

View file

@ -38,7 +38,7 @@ os_display = "0.1.3"
[target.'cfg(unix)'.dependencies]
walkdir = { version="2.3.2", optional=true }
nix = { version = "0.24.2", optional = true, default-features = false, features = ["fs", "uio", "zerocopy"] }
nix = { version = "0.25", optional = true, default-features = false, features = ["fs", "uio", "zerocopy"] }
[dev-dependencies]
clap = "3.2"

View file

@ -28,7 +28,7 @@ fn all_minutes(from: DateTime<Local>, to: DateTime<Local>) -> Vec<String> {
let mut current = from;
while current < to {
vec.push(current.format(FORMAT).to_string());
current = current + Duration::minutes(1);
current += Duration::minutes(1);
}
vec
}