mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
Merge pull request #3829 from niyaznigmatullin/cargo-lock-update
cargo +1.56.1 update
This commit is contained in:
commit
383291f5b4
15 changed files with 338 additions and 227 deletions
521
Cargo.lock
generated
521
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -402,7 +402,7 @@ hex-literal = "0.3.1"
|
||||||
rlimit = "0.8.3"
|
rlimit = "0.8.3"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dev-dependencies]
|
[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" }
|
rust-users = { version="0.11", package="users" }
|
||||||
unix_socket = "0.5.0"
|
unix_socket = "0.5.0"
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ allow = [
|
||||||
"BSD-3-Clause",
|
"BSD-3-Clause",
|
||||||
"CC0-1.0",
|
"CC0-1.0",
|
||||||
"MPL-2.0", # XXX considered copyleft?
|
"MPL-2.0", # XXX considered copyleft?
|
||||||
|
"Unicode-DFS-2016",
|
||||||
]
|
]
|
||||||
copyleft = "deny"
|
copyleft = "deny"
|
||||||
allow-osi-fsf-free = "neither"
|
allow-osi-fsf-free = "neither"
|
||||||
|
|
|
@ -147,22 +147,19 @@ fn gen_completions<T: uucore::Args>(
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("shell")
|
Arg::new("shell")
|
||||||
.value_parser(clap::builder::PossibleValuesParser::new(
|
.value_parser(clap::builder::EnumValueParser::<Shell>::new())
|
||||||
Shell::possible_values(),
|
|
||||||
))
|
|
||||||
.required(true),
|
.required(true),
|
||||||
)
|
)
|
||||||
.get_matches_from(std::iter::once(OsString::from("completion")).chain(args));
|
.get_matches_from(std::iter::once(OsString::from("completion")).chain(args));
|
||||||
|
|
||||||
let utility = matches.value_of("utility").unwrap();
|
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" {
|
let mut command = if utility == "coreutils" {
|
||||||
gen_coreutils_app(util_map)
|
gen_coreutils_app(util_map)
|
||||||
} else {
|
} else {
|
||||||
util_map.get(utility).unwrap().1()
|
util_map.get(utility).unwrap().1()
|
||||||
};
|
};
|
||||||
let shell: Shell = shell.parse().unwrap();
|
|
||||||
let bin_name = std::env::var("PROG_PREFIX").unwrap_or_default() + utility;
|
let bin_name = std::env::var("PROG_PREFIX").unwrap_or_default() + utility;
|
||||||
|
|
||||||
clap_complete::generate(shell, &mut command, bin_name, &mut io::stdout());
|
clap_complete::generate(shell, &mut command, bin_name, &mut io::stdout());
|
||||||
|
|
|
@ -22,7 +22,7 @@ uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=[
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
unix_socket = "0.5.0"
|
unix_socket = "0.5.0"
|
||||||
nix = { version = "0.24.2", default-features = false }
|
nix = { version = "0.25", default-features = false }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cat"
|
name = "cat"
|
||||||
|
|
|
@ -16,7 +16,7 @@ path = "src/kill.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
|
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"] }
|
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["signals"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
|
@ -23,7 +23,7 @@ unicode-width = "0.1.7"
|
||||||
unicode-segmentation = "1.9.0"
|
unicode-segmentation = "1.9.0"
|
||||||
|
|
||||||
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
|
[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]]
|
[[bin]]
|
||||||
name = "more"
|
name = "more"
|
||||||
|
|
|
@ -18,6 +18,7 @@ use std::{
|
||||||
extern crate nix;
|
extern crate nix;
|
||||||
|
|
||||||
use clap::{crate_version, Arg, Command};
|
use clap::{crate_version, Arg, Command};
|
||||||
|
use crossterm::event::KeyEventKind;
|
||||||
use crossterm::{
|
use crossterm::{
|
||||||
event::{self, Event, KeyCode, KeyEvent, KeyModifiers},
|
event::{self, Event, KeyCode, KeyEvent, KeyModifiers},
|
||||||
execute, queue,
|
execute, queue,
|
||||||
|
@ -229,13 +230,21 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
|
||||||
let mut wrong_key = None;
|
let mut wrong_key = None;
|
||||||
if event::poll(Duration::from_millis(10)).unwrap() {
|
if event::poll(Duration::from_millis(10)).unwrap() {
|
||||||
match event::read().unwrap() {
|
match event::read().unwrap() {
|
||||||
|
Event::Key(KeyEvent {
|
||||||
|
kind: KeyEventKind::Release,
|
||||||
|
..
|
||||||
|
}) => continue,
|
||||||
Event::Key(KeyEvent {
|
Event::Key(KeyEvent {
|
||||||
code: KeyCode::Char('q'),
|
code: KeyCode::Char('q'),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
kind: KeyEventKind::Press,
|
||||||
|
..
|
||||||
})
|
})
|
||||||
| Event::Key(KeyEvent {
|
| Event::Key(KeyEvent {
|
||||||
code: KeyCode::Char('c'),
|
code: KeyCode::Char('c'),
|
||||||
modifiers: KeyModifiers::CONTROL,
|
modifiers: KeyModifiers::CONTROL,
|
||||||
|
kind: KeyEventKind::Press,
|
||||||
|
..
|
||||||
}) => {
|
}) => {
|
||||||
reset_term(stdout);
|
reset_term(stdout);
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
|
@ -243,10 +252,12 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
|
||||||
Event::Key(KeyEvent {
|
Event::Key(KeyEvent {
|
||||||
code: KeyCode::Down,
|
code: KeyCode::Down,
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
..
|
||||||
})
|
})
|
||||||
| Event::Key(KeyEvent {
|
| Event::Key(KeyEvent {
|
||||||
code: KeyCode::Char(' '),
|
code: KeyCode::Char(' '),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
..
|
||||||
}) => {
|
}) => {
|
||||||
if pager.should_close() {
|
if pager.should_close() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
@ -257,12 +268,14 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
|
||||||
Event::Key(KeyEvent {
|
Event::Key(KeyEvent {
|
||||||
code: KeyCode::Up,
|
code: KeyCode::Up,
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
..
|
||||||
}) => {
|
}) => {
|
||||||
pager.page_up();
|
pager.page_up();
|
||||||
}
|
}
|
||||||
Event::Key(KeyEvent {
|
Event::Key(KeyEvent {
|
||||||
code: KeyCode::Char('j'),
|
code: KeyCode::Char('j'),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
..
|
||||||
}) => {
|
}) => {
|
||||||
if pager.should_close() {
|
if pager.should_close() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
@ -273,6 +286,7 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
|
||||||
Event::Key(KeyEvent {
|
Event::Key(KeyEvent {
|
||||||
code: KeyCode::Char('k'),
|
code: KeyCode::Char('k'),
|
||||||
modifiers: KeyModifiers::NONE,
|
modifiers: KeyModifiers::NONE,
|
||||||
|
..
|
||||||
}) => {
|
}) => {
|
||||||
pager.prev_line();
|
pager.prev_line();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ path = "src/nice.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
|
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
|
||||||
libc = "0.2.126"
|
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" }
|
uucore = { version=">=0.0.11", package="uucore", path="../../uucore" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
|
@ -26,7 +26,7 @@ winapi = { version="0.3", features=["fileapi", "handleapi", "processthreadsapi",
|
||||||
winapi-util = { version="0.1.5" }
|
winapi-util = { version="0.1.5" }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix = { version = "0.24.2", features = ["fs"] }
|
nix = { version = "0.25", features = ["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "tail"
|
name = "tail"
|
||||||
|
|
|
@ -17,7 +17,7 @@ path = "src/timeout.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
|
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
|
||||||
libc = "0.2.126"
|
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"] }
|
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["process", "signals"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
|
@ -22,7 +22,7 @@ utf-8 = "0.7.6"
|
||||||
unicode-width = "0.1.8"
|
unicode-width = "0.1.8"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix = { version = "0.24.2", default-features = false }
|
nix = { version = "0.25", default-features = false }
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
|
@ -20,7 +20,7 @@ libc = "0.2.126"
|
||||||
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["pipes"] }
|
uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=["pipes"] }
|
||||||
|
|
||||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
[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]]
|
[[bin]]
|
||||||
name = "yes"
|
name = "yes"
|
||||||
|
|
|
@ -38,7 +38,7 @@ os_display = "0.1.3"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
walkdir = { version="2.3.2", optional=true }
|
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]
|
[dev-dependencies]
|
||||||
clap = "3.2"
|
clap = "3.2"
|
||||||
|
|
|
@ -28,7 +28,7 @@ fn all_minutes(from: DateTime<Local>, to: DateTime<Local>) -> Vec<String> {
|
||||||
let mut current = from;
|
let mut current = from;
|
||||||
while current < to {
|
while current < to {
|
||||||
vec.push(current.format(FORMAT).to_string());
|
vec.push(current.format(FORMAT).to_string());
|
||||||
current = current + Duration::minutes(1);
|
current += Duration::minutes(1);
|
||||||
}
|
}
|
||||||
vec
|
vec
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue