From abfb31ca1ba1ba2a80a4fb0fde37685eabb50733 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Mon, 2 Dec 2024 16:17:26 -0500 Subject: [PATCH 01/10] Activate command line completions. --- Cargo.lock | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + src/main.rs | 8 +++++++- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 503cd9a..a8daa40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,6 +164,18 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_complete" +version = "4.5.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" +dependencies = [ + "clap", + "clap_lex", + "is_executable", + "shlex", +] + [[package]] name = "clap_derive" version = "4.5.18" @@ -510,6 +522,15 @@ dependencies = [ "log", ] +[[package]] +name = "is_executable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" +dependencies = [ + "winapi", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -776,6 +797,7 @@ dependencies = [ "assert_fs", "clap", "clap-verbosity-flag", + "clap_complete", "console", "env_logger", "home", @@ -928,6 +950,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae4c63bdcc11eea49b562941b914d5ac30d42cad982e3f6e846a513ee6a3ce7e" +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -1213,6 +1241,22 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.9" @@ -1222,6 +1266,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-sys" version = "0.52.0" diff --git a/Cargo.toml b/Cargo.toml index a50f53a..c60283b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ categories = ["command-line-utilities", "science"] [dependencies] clap = { version = "4.5.21", features = ["derive", "env"] } clap-verbosity-flag = "3.0.1" +clap_complete = { version = "4.5.38", features = ["unstable-dynamic"] } console = "0.15.8" env_logger = "0.11.5" home = "0.5.9" diff --git a/src/main.rs b/src/main.rs index 8be5be6..0b5b588 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,8 @@ #![warn(clippy::pedantic)] -use clap::Parser; +use clap::{CommandFactory, Parser}; +use clap_complete::env::CompleteEnv; use clap_verbosity_flag::log::LevelFilter; use indicatif::{MultiProgress, ProgressDrawTarget}; use indicatif_log_bridge::LogWrapper; @@ -22,6 +23,11 @@ use row::MultiProgressContainer; use ui::MultiProgressWriter; fn main_detail() -> Result<(), Box> { + // Autocomplete + CompleteEnv::with_factory(Options::command) + .complete(); + + // Normal execution let instant = Instant::now(); let options = Options::parse(); From 6eb5af08b3527d6bc18b5a00b04a4c5852d60dab Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 10:44:20 -0500 Subject: [PATCH 02/10] Autocomplete init --directory as a directory. --- src/cli/init.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/init.rs b/src/cli/init.rs index 19c6fe4..543427f 100644 --- a/src/cli/init.rs +++ b/src/cli/init.rs @@ -2,6 +2,7 @@ // Part of row, released under the BSD 3-Clause License. use clap::Args; +use clap_complete::ValueHint; use log::{debug, info, trace, warn}; use path_absolutize::Absolutize; use std::fmt::Write as _; @@ -23,7 +24,7 @@ pub struct Arguments { workspace: String, /// Directory to initialize. - #[arg(display_order = 0)] + #[arg(display_order = 0, value_hint=ValueHint::DirPath)] directory: PathBuf, } From 24a2e5e42f8b7247a991955696a0ce5c88e1943b Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 10:44:38 -0500 Subject: [PATCH 03/10] Autocomplete --action --- src/cli.rs | 1 + src/cli/autocomplete.rs | 18 ++++++++++++++++++ src/cli/directories.rs | 6 ++++-- src/cli/scan.rs | 6 ++++-- src/cli/status.rs | 6 ++++-- src/cli/submit.rs | 6 ++++-- src/main.rs | 3 +-- 7 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 src/cli/autocomplete.rs diff --git a/src/cli.rs b/src/cli.rs index 9524da0..61a671d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,6 +1,7 @@ // Copyright (c) 2024 The Regents of the University of Michigan. // Part of row, released under the BSD 3-Clause License. +pub mod autocomplete; pub mod clean; pub mod cluster; pub mod directories; diff --git a/src/cli/autocomplete.rs b/src/cli/autocomplete.rs new file mode 100644 index 0000000..72e6387 --- /dev/null +++ b/src/cli/autocomplete.rs @@ -0,0 +1,18 @@ +// Copyright (c) 2024 The Regents of the University of Michigan. +// Part of row, released under the BSD 3-Clause License. + +use clap_complete::CompletionCandidate; +use row::workflow::Workflow; + +/// List the actions in the current workflow. +pub fn get_action_candidates() -> Vec { + let Ok(workflow) = Workflow::open() else { + return Vec::new(); + }; + + workflow + .action + .into_iter() + .map(|a| CompletionCandidate::new(a.name())) + .collect::>() +} diff --git a/src/cli/directories.rs b/src/cli/directories.rs index 04c5a9f..a1f176f 100644 --- a/src/cli/directories.rs +++ b/src/cli/directories.rs @@ -2,6 +2,7 @@ // Part of row, released under the BSD 3-Clause License. use clap::Args; +use clap_complete::ArgValueCandidates; use console::Style; use log::{debug, warn}; use std::collections::HashSet; @@ -9,7 +10,7 @@ use std::error::Error; use std::io::Write; use std::path::PathBuf; -use crate::cli::{self, GlobalOptions}; +use crate::cli::{self, autocomplete, GlobalOptions}; use crate::ui::{Alignment, Item, Row, Table}; use row::project::Project; use row::MultiProgressContainer; @@ -21,7 +22,8 @@ pub struct Arguments { directories: Vec, /// Select directories that are included by the provided action. - #[arg(long, short, display_order = 0)] + #[arg(long, short, display_order = 0, + add=ArgValueCandidates::new(autocomplete::get_action_candidates))] action: Option, /// Hide the table header. diff --git a/src/cli/scan.rs b/src/cli/scan.rs index 9e1a150..410f360 100644 --- a/src/cli/scan.rs +++ b/src/cli/scan.rs @@ -2,6 +2,7 @@ // Part of row, released under the BSD 3-Clause License. use clap::Args; +use clap_complete::ArgValueCandidates; use log::{debug, info, trace, warn}; use postcard; use std::fs::{self, File}; @@ -9,7 +10,7 @@ use std::io::prelude::*; use std::path::PathBuf; use uuid::Uuid; -use crate::cli::{self, GlobalOptions}; +use crate::cli::{self, autocomplete, GlobalOptions}; use row::workflow::Workflow; use row::{ workspace, Error, MultiProgressContainer, COMPLETED_DIRECTORY_NAME, DATA_DIRECTORY_NAME, @@ -18,7 +19,8 @@ use row::{ #[derive(Args, Debug)] pub struct Arguments { /// Select the action to scan (defaults to all). - #[arg(short, long, display_order = 0)] + #[arg(short, long, display_order = 0, + add=ArgValueCandidates::new(autocomplete::get_action_candidates))] action: Option, /// Select directories to scan (defaults to all). Use 'scan -' to read from stdin. diff --git a/src/cli/status.rs b/src/cli/status.rs index ba47d3c..f05305a 100644 --- a/src/cli/status.rs +++ b/src/cli/status.rs @@ -2,6 +2,7 @@ // Part of row, released under the BSD 3-Clause License. use clap::Args; +use clap_complete::ArgValueCandidates; use console::Style; use indicatif::HumanCount; use log::{debug, trace, warn}; @@ -10,7 +11,7 @@ use std::io::Write; use std::path::PathBuf; use wildmatch::WildMatch; -use crate::cli::{self, GlobalOptions}; +use crate::cli::{self, autocomplete, GlobalOptions}; use crate::ui::{Alignment, Item, Row, Table}; use row::project::{Project, Status}; use row::workflow::ResourceCost; @@ -20,7 +21,8 @@ use row::MultiProgressContainer; #[derive(Args, Debug)] pub struct Arguments { /// Select the actions to summarize with a wildcard pattern. - #[arg(short, long, value_name = "pattern", default_value_t=String::from("*"), display_order=0)] + #[arg(short, long, value_name = "pattern", default_value_t=String::from("*"), display_order=0, + add=ArgValueCandidates::new(autocomplete::get_action_candidates))] action: String, /// Hide the table header. diff --git a/src/cli/submit.rs b/src/cli/submit.rs index 2460bc4..4319bf3 100644 --- a/src/cli/submit.rs +++ b/src/cli/submit.rs @@ -2,6 +2,7 @@ // Part of row, released under the BSD 3-Clause License. use clap::Args; +use clap_complete::ArgValueCandidates; use console::style; use indicatif::HumanCount; use log::{debug, info, trace, warn}; @@ -17,7 +18,7 @@ use std::sync::Arc; use std::time::Instant; use wildmatch::WildMatch; -use crate::cli::GlobalOptions; +use crate::cli::{autocomplete, GlobalOptions}; use row::format::HumanDuration; use row::project::Project; use row::workflow::{Action, ResourceCost}; @@ -26,7 +27,8 @@ use row::MultiProgressContainer; #[derive(Args, Debug)] pub struct Arguments { /// Select the actions to summarize with a wildcard pattern. - #[arg(short, long, value_name = "pattern", default_value_t=String::from("*"), display_order=0)] + #[arg(short, long, value_name = "pattern", default_value_t=String::from("*"), display_order=0, + add=ArgValueCandidates::new(autocomplete::get_action_candidates))] action: String, /// Select directories to summarize (defaults to all). diff --git a/src/main.rs b/src/main.rs index 0b5b588..3c871c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,8 +24,7 @@ use ui::MultiProgressWriter; fn main_detail() -> Result<(), Box> { // Autocomplete - CompleteEnv::with_factory(Options::command) - .complete(); + CompleteEnv::with_factory(Options::command).complete(); // Normal execution let instant = Instant::now(); From 10d03085cfd5d7b07c3a58b6599136d519f8f4f1 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 10:57:00 -0500 Subject: [PATCH 04/10] Autocomplete --cluster. --- src/cli.rs | 4 +++- src/cli/autocomplete.rs | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 61a671d..c2ff3a0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -12,6 +12,7 @@ pub mod status; pub mod submit; use clap::{Args, Parser, Subcommand, ValueEnum}; +use clap_complete::ArgValueCandidates; use clap_verbosity_flag::{Verbosity, WarnLevel}; use log::trace; use std::io; @@ -51,7 +52,8 @@ pub struct GlobalOptions { /// Check the job submission status on the given cluster. /// /// Autodetected by default. - #[arg(long, global = true, env = "ROW_CLUSTER", display_order = 2)] + #[arg(long, global = true, env = "ROW_CLUSTER", display_order = 2, + add=ArgValueCandidates::new(autocomplete::get_cluster_candidates))] cluster: Option, } diff --git a/src/cli/autocomplete.rs b/src/cli/autocomplete.rs index 72e6387..865f8be 100644 --- a/src/cli/autocomplete.rs +++ b/src/cli/autocomplete.rs @@ -2,6 +2,7 @@ // Part of row, released under the BSD 3-Clause License. use clap_complete::CompletionCandidate; +use row::cluster; use row::workflow::Workflow; /// List the actions in the current workflow. @@ -16,3 +17,16 @@ pub fn get_action_candidates() -> Vec { .map(|a| CompletionCandidate::new(a.name())) .collect::>() } + +/// List the clusters in the user's configuration +pub fn get_cluster_candidates() -> Vec { + let Ok(clusters) = cluster::Configuration::open() else { + return Vec::new(); + }; + + clusters + .cluster + .into_iter() + .map(|a| CompletionCandidate::new(a.name)) + .collect::>() +} From ebb9a925bd6cbb7137b3af46d1bb1e97fe50012b Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 11:30:31 -0500 Subject: [PATCH 05/10] Autocomplete directories. --- src/cli/autocomplete.rs | 29 ++++++++++++++++++++++++++--- src/cli/directories.rs | 1 + src/cli/scan.rs | 1 + src/cli/status.rs | 1 + src/cli/submit.rs | 1 + 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/cli/autocomplete.rs b/src/cli/autocomplete.rs index 865f8be..134f1e5 100644 --- a/src/cli/autocomplete.rs +++ b/src/cli/autocomplete.rs @@ -2,8 +2,11 @@ // Part of row, released under the BSD 3-Clause License. use clap_complete::CompletionCandidate; -use row::cluster; +use indicatif::{MultiProgress, ProgressDrawTarget}; + use row::workflow::Workflow; +use row::MultiProgressContainer; +use row::{cluster, workspace}; /// List the actions in the current workflow. pub fn get_action_candidates() -> Vec { @@ -15,7 +18,7 @@ pub fn get_action_candidates() -> Vec { .action .into_iter() .map(|a| CompletionCandidate::new(a.name())) - .collect::>() + .collect() } /// List the clusters in the user's configuration @@ -28,5 +31,25 @@ pub fn get_cluster_candidates() -> Vec { .cluster .into_iter() .map(|a| CompletionCandidate::new(a.name)) - .collect::>() + .collect() +} + +/// List the directories in the project's workspace +pub fn get_directory_candidates() -> Vec { + let multi_progress = MultiProgress::with_draw_target(ProgressDrawTarget::hidden()); + let mut multi_progress_container = MultiProgressContainer::new(multi_progress.clone()); + + let Ok(workflow) = Workflow::open() else { + return Vec::new(); + }; + + let Ok(directories) = workspace::list_directories(&workflow, &mut multi_progress_container) + else { + return Vec::new(); + }; + + directories + .into_iter() + .map(CompletionCandidate::new) + .collect() } diff --git a/src/cli/directories.rs b/src/cli/directories.rs index a1f176f..d9eeb16 100644 --- a/src/cli/directories.rs +++ b/src/cli/directories.rs @@ -19,6 +19,7 @@ use row::MultiProgressContainer; #[allow(clippy::struct_excessive_bools)] pub struct Arguments { /// Select directories to summarize (defaults to all). Use 'show directories -' to read from stdin. + #[arg(add=ArgValueCandidates::new(autocomplete::get_directory_candidates))] directories: Vec, /// Select directories that are included by the provided action. diff --git a/src/cli/scan.rs b/src/cli/scan.rs index 410f360..a0898fe 100644 --- a/src/cli/scan.rs +++ b/src/cli/scan.rs @@ -24,6 +24,7 @@ pub struct Arguments { action: Option, /// Select directories to scan (defaults to all). Use 'scan -' to read from stdin. + #[arg(add=ArgValueCandidates::new(autocomplete::get_directory_candidates))] directories: Vec, } diff --git a/src/cli/status.rs b/src/cli/status.rs index f05305a..c406c33 100644 --- a/src/cli/status.rs +++ b/src/cli/status.rs @@ -30,6 +30,7 @@ pub struct Arguments { no_header: bool, /// Select directories to summarize (defaults to all). Use 'status -' to read from stdin. + #[arg(add=ArgValueCandidates::new(autocomplete::get_directory_candidates))] directories: Vec, /// Show actions with completed directories. diff --git a/src/cli/submit.rs b/src/cli/submit.rs index 4319bf3..256395a 100644 --- a/src/cli/submit.rs +++ b/src/cli/submit.rs @@ -32,6 +32,7 @@ pub struct Arguments { action: String, /// Select directories to summarize (defaults to all). + #[arg(add=ArgValueCandidates::new(autocomplete::get_directory_candidates))] directories: Vec, /// Skip confirmation check. From da2c47975233529dbd00a52b7c2450e41f9a3382 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 11:30:48 -0500 Subject: [PATCH 06/10] Start counting time before processing completions. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3c871c7..fe59ab6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,11 +23,12 @@ use row::MultiProgressContainer; use ui::MultiProgressWriter; fn main_detail() -> Result<(), Box> { + let instant = Instant::now(); + // Autocomplete CompleteEnv::with_factory(Options::command).complete(); // Normal execution - let instant = Instant::now(); let options = Options::parse(); let log_style; From 0e9e3ba4688373c15e95fd95cf738060c2ccb712 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 11:34:25 -0500 Subject: [PATCH 07/10] Add clap_complete. --- THIRDPARTY.yaml | 573 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 564 insertions(+), 9 deletions(-) diff --git a/THIRDPARTY.yaml b/THIRDPARTY.yaml index e176803..c36e96b 100644 --- a/THIRDPARTY.yaml +++ b/THIRDPARTY.yaml @@ -1991,6 +1991,237 @@ third_party_libraries: Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +- package_name: clap_complete + package_version: 4.5.38 + repository: https://github.com/clap-rs/clap + license: MIT OR Apache-2.0 + licenses: + - license: MIT + text: | + The MIT License (MIT) + + Copyright (c) 2015-2022 Kevin B. Knapp and Clap Contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + - license: Apache-2.0 + text: |2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -4192,6 +4423,40 @@ third_party_libraries: licenses: - license: MIT text: NOT FOUND +- package_name: is_executable + package_version: 1.0.4 + repository: https://github.com/fitzgen/is_executable + license: Apache-2.0/MIT + licenses: + - license: Apache-2.0 + text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + - license: MIT + text: | + Copyright (c) 2015 The Rust Project Developers + + Permission is hereby granted, free of charge, to any + person obtaining a copy of this software and associated + documentation files (the "Software"), to deal in the + Software without restriction, including without + limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software + is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice + shall be included in all copies or substantial portions + of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED + TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT + SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR + IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. - package_name: is_terminal_polyfill package_version: 1.70.1 repository: https://github.com/polyfill-rs/is_terminal_polyfill @@ -7323,17 +7588,60 @@ third_party_libraries: Copyright [yyyy] [name of copyright owner] - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +- package_name: shlex + package_version: 1.3.0 + repository: https://github.com/comex/rust-shlex + license: MIT OR Apache-2.0 + licenses: + - license: MIT + text: | + The MIT License (MIT) + + Copyright (c) 2015 Nicholas Allegra (comex). + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + - license: Apache-2.0 + text: | + Copyright 2015 Nicholas Allegra (comex). + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. - package_name: signal-hook package_version: 0.3.17 repository: https://github.com/vorner/signal-hook @@ -10061,6 +10369,253 @@ third_party_libraries: licenses: - license: MIT text: "MIT License\r\n\r\nCopyright (c) 2020 Armin Becher\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n" +- package_name: winapi + package_version: 0.3.9 + repository: https://github.com/retep998/winapi-rs + license: MIT/Apache-2.0 + licenses: + - license: MIT + text: | + Copyright (c) 2015-2018 The winapi-rs Developers + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + - license: Apache-2.0 + text: |2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +- package_name: winapi-i686-pc-windows-gnu + package_version: 0.4.0 + repository: https://github.com/retep998/winapi-rs + license: MIT/Apache-2.0 + licenses: + - license: MIT + text: NOT FOUND + - license: Apache-2.0 + text: NOT FOUND +- package_name: winapi-x86_64-pc-windows-gnu + package_version: 0.4.0 + repository: https://github.com/retep998/winapi-rs + license: MIT/Apache-2.0 + licenses: + - license: MIT + text: NOT FOUND + - license: Apache-2.0 + text: NOT FOUND - package_name: windows-sys package_version: 0.52.0 repository: https://github.com/microsoft/windows-rs From f8d5c5c61516639953bbc0b6f09f0c7e898e7afc Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 12:35:48 -0500 Subject: [PATCH 08/10] Mention shell autocomplete. --- doc/src/release-notes.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/src/release-notes.md b/doc/src/release-notes.md index efd5d0d..79f169e 100644 --- a/doc/src/release-notes.md +++ b/doc/src/release-notes.md @@ -4,6 +4,18 @@ *Highlights:* +**Row** 0.4 expands the `command` templating functionality to improve support for +command line applications as actions. This removes the need for _shim_ scripts that +access the workspace path and/or directory values before invoking a subprocess. +`{workspace_path}` expands to the current project's workspace path and `{/JSON pointer}` +expands to the value of the given JSON pointer for the directory acted on. + +**Row** 0.4 also adds _shell autocompletion_. To enable, execute the appropriate +command in your shell's profile: +* Bash: `source <(COMPLETE=bash your_program)` +* Fish: `source (COMPLETE=fish your_program | psub)` +* Zsh: `source <(COMPLETE=zsh your_program)` + *Added:* * In job scripts, set the environment variable `ACTION_WORKSPACE_PATH` to the _relative_ @@ -12,6 +24,7 @@ _relative_ path to the current workspace. * `{/JSON pointer}` template parameter in `action.command` - replaced with the portion of the directory's value referenced by the given JSON pointer. +* Shell autocomplete. *Fixed:* From 5cdfce43397dee585e1f3b49f408fd85da3d806c Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 12:47:51 -0500 Subject: [PATCH 09/10] Document shell autocompletion. --- doc/src/guide/install.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/src/guide/install.md b/doc/src/guide/install.md index a933b16..9fbc5d0 100644 --- a/doc/src/guide/install.md +++ b/doc/src/guide/install.md @@ -58,3 +58,22 @@ cargo install --path row --locked ``` Ensure that `$HOME/.cargo/bin` is on your `$PATH`. + +## Configuring shell autocompletion + +Execute the appropriate command in your shell's profile: +* Bash: + ```shell + source <(COMPLETE=bash your_program) + ``` +* Fish: + ```shell + source (COMPLETE=fish your_program | psub) + ``` +* Zsh: + ```shell + source <(COMPLETE=zsh your_program) + ``` +For additional shell configurations, see [clap-complete's documentation]. + +[clap-complete's documentation]: https://docs.rs/clap_complete/latest/clap_complete/env/index.html From 6697cdb960ef8794423e69df0d0b9adffec1fa68 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Thu, 5 Dec 2024 09:21:11 -0500 Subject: [PATCH 10/10] Correctly document autocomplete command. --- doc/src/guide/install.md | 6 +++--- doc/src/release-notes.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/guide/install.md b/doc/src/guide/install.md index 9fbc5d0..3beb379 100644 --- a/doc/src/guide/install.md +++ b/doc/src/guide/install.md @@ -64,15 +64,15 @@ Ensure that `$HOME/.cargo/bin` is on your `$PATH`. Execute the appropriate command in your shell's profile: * Bash: ```shell - source <(COMPLETE=bash your_program) + source <(COMPLETE=bash row) ``` * Fish: ```shell - source (COMPLETE=fish your_program | psub) + source (COMPLETE=fish row | psub) ``` * Zsh: ```shell - source <(COMPLETE=zsh your_program) + source <(COMPLETE=zsh row) ``` For additional shell configurations, see [clap-complete's documentation]. diff --git a/doc/src/release-notes.md b/doc/src/release-notes.md index 79f169e..6b6992f 100644 --- a/doc/src/release-notes.md +++ b/doc/src/release-notes.md @@ -12,9 +12,9 @@ expands to the value of the given JSON pointer for the directory acted on. **Row** 0.4 also adds _shell autocompletion_. To enable, execute the appropriate command in your shell's profile: -* Bash: `source <(COMPLETE=bash your_program)` -* Fish: `source (COMPLETE=fish your_program | psub)` -* Zsh: `source <(COMPLETE=zsh your_program)` +* Bash: `source <(COMPLETE=bash row)` +* Fish: `source (COMPLETE=fish row | psub)` +* Zsh: `source <(COMPLETE=zsh row)` *Added:*