Skip to content

Commit

Permalink
Merge pull request #2135 from jqnatividad/v0.134.0-completions
Browse files Browse the repository at this point in the history
`contrib(completions)`: update completions for qsv v0.134.0 and fix subcommand options
  • Loading branch information
jqnatividad authored Sep 12, 2024
2 parents 3a113d0 + ed44466 commit 410ee69
Show file tree
Hide file tree
Showing 26 changed files with 7,089 additions and 408 deletions.
1,588 changes: 1,423 additions & 165 deletions contrib/completions/examples/qsv.bash

Large diffs are not rendered by default.

645 changes: 644 additions & 1 deletion contrib/completions/examples/qsv.elv

Large diffs are not rendered by default.

1,619 changes: 1,572 additions & 47 deletions contrib/completions/examples/qsv.fig.js

Large diffs are not rendered by default.

705 changes: 589 additions & 116 deletions contrib/completions/examples/qsv.fish

Large diffs are not rendered by default.

633 changes: 632 additions & 1 deletion contrib/completions/examples/qsv.nu

Large diffs are not rendered by default.

737 changes: 727 additions & 10 deletions contrib/completions/examples/qsv.ps1

Large diffs are not rendered by default.

1,394 changes: 1,375 additions & 19 deletions contrib/completions/examples/qsv.zsh

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions contrib/completions/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use crate::cmd::{
fetchpost::fetchpost_cmd, fill::fill_cmd, fixlengths::fixlengths_cmd, flatten::flatten_cmd,
fmt::fmt_cmd, foreach::foreach_cmd, frequency::frequency_cmd, geocode::geocode_cmd,
headers::headers_cmd, index::index_cmd, input::input_cmd, join::join_cmd, joinp::joinp_cmd,
json::json_cmd, jsonl::jsonl_cmd, luau::luau_cmd, partition::partition_cmd, prompt::prompt_cmd,
pseudo::pseudo_cmd, python::py_cmd, rename::rename_cmd, replace::replace_cmd,
reverse::reverse_cmd, safenames::safenames_cmd, sample::sample_cmd, schema::schema_cmd,
search::search_cmd, searchset::searchset_cmd, select::select_cmd, slice::slice_cmd,
snappy::snappy_cmd, sniff::sniff_cmd, sort::sort_cmd, sortcheck::sortcheck_cmd,
split::split_cmd, sqlp::sqlp_cmd, stats::stats_cmd, table::table_cmd, to::to_cmd,
tojsonl::tojsonl_cmd, transpose::transpose_cmd, validate::validate_cmd,
json::json_cmd, jsonl::jsonl_cmd, lens::lens_cmd, luau::luau_cmd, partition::partition_cmd,
pro::pro_cmd, prompt::prompt_cmd, pseudo::pseudo_cmd, python::py_cmd, rename::rename_cmd,
replace::replace_cmd, reverse::reverse_cmd, safenames::safenames_cmd, sample::sample_cmd,
schema::schema_cmd, search::search_cmd, searchset::searchset_cmd, select::select_cmd,
slice::slice_cmd, snappy::snappy_cmd, sniff::sniff_cmd, sort::sort_cmd,
sortcheck::sortcheck_cmd, split::split_cmd, sqlp::sqlp_cmd, stats::stats_cmd, table::table_cmd,
to::to_cmd, tojsonl::tojsonl_cmd, transpose::transpose_cmd, validate::validate_cmd,
};

pub fn build_cli() -> Command {
Expand Down Expand Up @@ -59,8 +59,10 @@ pub fn build_cli() -> Command {
joinp_cmd(),
json_cmd(),
jsonl_cmd(),
lens_cmd(),
luau_cmd(),
partition_cmd(),
pro_cmd(),
prompt_cmd(),
pseudo_cmd(),
py_cmd(),
Expand Down
35 changes: 18 additions & 17 deletions contrib/completions/src/cmd/apply.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
use clap::{arg, Command};

pub fn apply_cmd() -> Command {
let global_args = [
arg!(--"new-column"),
arg!(--rename),
arg!(--comparand),
arg!(--replacement),
arg!(--formatstr),
arg!(--jobs),
arg!(--batch),
arg!(--output),
arg!(--"no-headers"),
arg!(--delimiter),
arg!(--progressbar),
];
Command::new("apply")
.subcommands([
Command::new("operations"),
Command::new("emptyreplace"),
Command::new("dynfmt"),
Command::new("calcconv"),
])
.args([
arg!(--"new-column"),
arg!(--rename),
arg!(--comparand),
arg!(--replacement),
arg!(--formatstr),
arg!(--jobs),
arg!(--batch),
arg!(--output),
arg!(--"no-headers"),
arg!(--delimiter),
arg!(--progressbar),
Command::new("operations").args(&global_args),
Command::new("emptyreplace").args(&global_args),
Command::new("dynfmt").args(&global_args),
Command::new("calcconv").args(&global_args),
])
.args(global_args)
}
15 changes: 11 additions & 4 deletions contrib/completions/src/cmd/cat.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
use clap::{arg, Command};

pub fn cat_cmd() -> Command {
let global_args = vec![arg!(--output), arg!(--"no-headers"), arg!(--delimiter)];
Command::new("cat")
.subcommands([
Command::new("rows").args([arg!(--flexible)]),
Command::new("rowskey").args([arg!(--group), arg!(--"group-name")]),
Command::new("columns").args([arg!(--pad)]),
Command::new("rows")
.args([arg!(--flexible)])
.args(&global_args),
Command::new("rowskey")
.args([arg!(--group), arg!(--"group-name")])
.args(&global_args),
Command::new("columns")
.args([arg!(--pad)])
.args(&global_args),
])
.args([arg!(--output), arg!(--"no-headers"), arg!(--delimiter)])
.args(global_args)
}
3 changes: 3 additions & 0 deletions contrib/completions/src/cmd/count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ pub fn count_cmd() -> Command {
Command::new("count").args([
arg!(--"human-readable"),
arg!(--width),
arg!(--"width-no-delims"),
arg!(--json),
arg!(--"no-polars"),
arg!(--"low-memory"),
arg!(--flexible),
arg!(--"no-headers"),
arg!(--delimiter),
])
}
1 change: 1 addition & 0 deletions contrib/completions/src/cmd/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub fn diff_cmd() -> Command {
arg!(--"delimiter-output"),
arg!(--key),
arg!(--"sort-columns"),
arg!(--"drop-equal-fields"),
arg!(--jobs),
arg!(--output),
])
Expand Down
2 changes: 2 additions & 0 deletions contrib/completions/src/cmd/fixlengths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pub fn fixlengths_cmd() -> Command {
Command::new("fixlengths").args([
arg!(--length),
arg!(--insert),
arg!(--quote),
arg!(--escape),
arg!(--output),
arg!(--delimiter),
])
Expand Down
1 change: 1 addition & 0 deletions contrib/completions/src/cmd/frequency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub fn frequency_cmd() -> Command {
arg!(--"other-text"),
arg!(--asc),
arg!(--"no-trim"),
arg!(--"no-nulls"),
arg!(--"ignore-case"),
arg!(--"stats-mode"),
arg!(--"all-unique-text"),
Expand Down
18 changes: 16 additions & 2 deletions contrib/completions/src/cmd/geocode.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::{arg, Command};

pub fn geocode_cmd() -> Command {
Command::new("geocode").args([
let global_args = [
arg!(--"new-column"),
arg!(--rename),
arg!(--country),
Expand All @@ -21,5 +21,19 @@ pub fn geocode_cmd() -> Command {
arg!(--output),
arg!(--delimiter),
arg!(--progressbar),
])
];
Command::new("geocode")
.subcommands([
Command::new("suggest").args(&global_args),
Command::new("suggestnow").args(&global_args),
Command::new("reverse").args(&global_args),
Command::new("reversenow").args(&global_args),
Command::new("countryinfo").args(&global_args),
Command::new("countryinfonow").args(&global_args),
Command::new("index-load").args(&global_args),
Command::new("index-check").args(&global_args),
Command::new("index-update").args(&global_args),
Command::new("index-reset").args(&global_args),
])
.args(global_args)
}
1 change: 1 addition & 0 deletions contrib/completions/src/cmd/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use clap::{arg, Command};
pub fn join_cmd() -> Command {
Command::new("join").args([
arg!(--"ignore-case"),
arg!(--"left"),
arg!(--"left-anti"),
arg!(--"left-semi"),
arg!(--right),
Expand Down
15 changes: 15 additions & 0 deletions contrib/completions/src/cmd/lens.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use clap::{arg, Command};

pub fn lens_cmd() -> Command {
Command::new("lens").args([
arg!(--delimiter),
arg!(--"tab-separated"),
arg!(--"no-headers"),
arg!(--columns),
arg!(--filter),
arg!(--find),
arg!(--"ignore-case"),
arg!(--"echo-column"),
arg!(--debug),
])
}
11 changes: 9 additions & 2 deletions contrib/completions/src/cmd/luau.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use clap::{arg, Command};

pub fn luau_cmd() -> Command {
Command::new("luau").args([
let global_args = [
arg!(--"no-globals"),
arg!(--colindex),
arg!(--remap),
arg!(--begin),
arg!(--end),
arg!(--"luau-path"),
arg!(--"max-errors"),
arg!(--timeout),
Expand All @@ -16,5 +17,11 @@ pub fn luau_cmd() -> Command {
arg!(--"no-headers"),
arg!(--delimiter),
arg!(--progressbar),
])
];
Command::new("luau")
.subcommands([
Command::new("map").args(&global_args),
Command::new("filter").args(&global_args),
])
.args(global_args)
}
2 changes: 2 additions & 0 deletions contrib/completions/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ pub mod join;
pub mod joinp;
pub mod json;
pub mod jsonl;
pub mod lens;
pub mod luau;
pub mod partition;
pub mod pro;
pub mod prompt;
pub mod pseudo;
pub mod python;
Expand Down
5 changes: 5 additions & 0 deletions contrib/completions/src/cmd/pro.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use clap::Command;

pub fn pro_cmd() -> Command {
Command::new("pro").subcommands([Command::new("lens"), Command::new("workflow")])
}
1 change: 1 addition & 0 deletions contrib/completions/src/cmd/pseudo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub fn pseudo_cmd() -> Command {
arg!(--start),
arg!(--increment),
arg!(--formatstr),
arg!(--output),
arg!(--"no-headers"),
arg!(--delimiter),
])
Expand Down
10 changes: 8 additions & 2 deletions contrib/completions/src/cmd/python.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
use clap::{arg, Command};

pub fn py_cmd() -> Command {
Command::new("py").args([
let global_args = [
arg!(--helper),
arg!(--batch),
arg!(--output),
arg!(--"no-headers"),
arg!(--delimiter),
arg!(--progressbar),
])
];
Command::new("py")
.subcommands([
Command::new("map").args(&global_args),
Command::new("filter").args(&global_args),
])
.args(global_args)
}
2 changes: 1 addition & 1 deletion contrib/completions/src/cmd/searchset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ pub fn searchset_cmd() -> Command {
arg!(--quick),
arg!(--count),
arg!(--json),
arg!(--"not-one"),
arg!(--"size-limit"),
arg!(--"dfa-size-limit"),
arg!(--"not-one"),
arg!(--output),
arg!(--"no-headers"),
arg!(--delimiter),
Expand Down
25 changes: 13 additions & 12 deletions contrib/completions/src/cmd/snappy.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
use clap::{arg, Command};

pub fn snappy_cmd() -> Command {
let global_args = [
arg!(--"user-agent"),
arg!(--timeout),
arg!(--output),
arg!(--jobs),
arg!(--quiet),
arg!(--progressbar),
];
Command::new("snappy")
.subcommands([
Command::new("compress"),
Command::new("decompress"),
Command::new("check"),
Command::new("validate"),
])
.args([
arg!(--"user-agent"),
arg!(--timeout),
arg!(--output),
arg!(--jobs),
arg!(--quiet),
arg!(--progressbar),
Command::new("compress").args(&global_args),
Command::new("decompress").args(&global_args),
Command::new("check").args(&global_args),
Command::new("validate").args(&global_args),
])
.args(global_args)
}
1 change: 1 addition & 0 deletions contrib/completions/src/cmd/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub fn stats_cmd() -> Command {
arg!(--round),
arg!(--nulls),
arg!(--"infer-dates"),
arg!(--"dates-whitelist"),
arg!(--"prefer-dmy"),
arg!(--force),
arg!(--jobs),
Expand Down
12 changes: 10 additions & 2 deletions contrib/completions/src/cmd/to.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::{arg, Command};

pub fn to_cmd() -> Command {
Command::new("to").args([
let global_args = [
arg!(--"print-package"),
arg!(--dump),
arg!(--stats),
Expand All @@ -14,5 +14,13 @@ pub fn to_cmd() -> Command {
arg!(--separator),
arg!(--jobs),
arg!(--delimiter),
])
];
Command::new("to")
.subcommands([
Command::new("postgres").args(&global_args),
Command::new("sqlite").args(&global_args),
Command::new("xlsx").args(&global_args),
Command::new("datapackage").args(&global_args),
])
.args(global_args)
}

0 comments on commit 410ee69

Please sign in to comment.