diff --git a/contrib/bashly/README.md b/contrib/bashly/README.md deleted file mode 100644 index c486a03fc..000000000 --- a/contrib/bashly/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# qsv completions with Bashly - -![qsv-completions-bashly-demo](https://github.com/jqnatividad/qsv/assets/30333942/d1e4f78a-e9d3-4761-9ddb-2343857d3545) - -> These completions may be outdated by the time you're using them (see the version value in `src/bashly.yml` for the expected version to use it for). Update `src/bashly.yml` to ensure they're in sync with qsv's latest commands. - -This is a foundation for CLI completions for [qsv](https://github.com/jqnatividad/qsv) using [Bashly](https://bashly.dannyb.co/). - -## How to enable completions - -Run `source completions.bash` on the `completions.bash` file in your terminal then try out the completions! - -See Bashly's [Bash Completion docs](https://bashly.dannyb.co/advanced/bash-completion/) for more info. - -## Development Setup - -1. Install [Ruby](https://rubygems.org/pages/download). -2. Install bashly by running `gem install bashly` in your terminal. -3. Clone/download this directory to your system and `cd` into it. -4. If you're modifying the completions in `src/bashly.yml`, then you'll want to delete `completions.bash` before the next step (e.g., `rm completions.bash`). -5. Modify the `src/bashly.yml` as you see fit, save, then run `bashly add completions_script` which will generate a new `completions.bash` file. -6. Run the completions in your terminal with `source completions.bash`. -7. Try out the completions! diff --git a/contrib/bashly/completions.bash b/contrib/bashly/completions.bash deleted file mode 100644 index 479cec6d4..000000000 --- a/contrib/bashly/completions.bash +++ /dev/null @@ -1,439 +0,0 @@ -# qsv completion -*- shell-script -*- - -# This bash completions script was generated by -# completely (https://github.com/dannyben/completely) -# Modifying it manually is not recommended - -_qsv_completions_filter() { - local words="$1" - local cur=${COMP_WORDS[COMP_CWORD]} - local result=() - - if [[ "${cur:0:1}" == "-" ]]; then - echo "$words" - - else - for word in $words; do - [[ "${word:0:1}" != "-" ]] && result+=("$word") - done - - echo "${result[*]}" - - fi -} - -_qsv_completions() { - local cur=${COMP_WORDS[COMP_CWORD]} - local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") - local compline="${compwords[*]}" - - case "$compline" in - *'fetchpost'*'--disk-cache-dir') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) - ;; - - *'describegpt'*'--prompt-file') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) - ;; - - *'validate'*'--valid-output') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) - ;; - - *'geocode'*'countryinfonow'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'fetch'*'--disk-cache-dir') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) - ;; - - *'geocode'*'index-update'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'applydp'*'emptyreplace'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help --replacement -h")" -- "$cur" ) - ;; - - *'geocode'*'index-reset'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'geocode'*'countryinfo'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'geocode'*'index-check'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'applydp'*'operations'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'fetchpost'*'--jqlfile') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) - ;; - - *'geocode'*'index-load'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'geocode'*'suggestnow'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'apply'*'emptyreplace'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help --replacement -h")" -- "$cur" ) - ;; - - *'geocode'*'reversenow'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'snappy'*'decompress'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'apply'*'operations'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'foreach'*'--dry-run') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) - ;; - - *'geocode'*'reverse'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help --k_weight -h")" -- "$cur" ) - ;; - - *'snappy'*'compress'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'geocode'*'suggest'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--admin1 --help --min-score -h")" -- "$cur" ) - ;; - - *'snappy'*'validate'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'fetch'*'--jqlfile') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) - ;; - - *'applydp'*'dynfmt'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--formatstr --help --new-column -h")" -- "$cur" ) - ;; - - *'to'*'datapackage'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'apply'*'calconv'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--formatstr --help --new-column -h")" -- "$cur" ) - ;; - - *'snappy'*'check'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'apply'*'dynfmt'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--formatstr --help --new-column -h")" -- "$cur" ) - ;; - - *'to'*'postgres'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'luau'*'filter'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'cat'*'columns'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -A file -W "$(_qsv_completions_filter "--help --pad -h")" -- "$cur" ) - ;; - - *'describegpt'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--all --api-key --base-url --description --dictionary --help --json --jsonl --max-tokens --model --output --prompt --prompt-file --quiet --tags --timeout --user-agent -h")" -- "$cur" ) - ;; - - *'cat'*'rowskey'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -A file -W "$(_qsv_completions_filter "--group --group-name --help -h")" -- "$cur" ) - ;; - - *'fixlengths'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --insert --length --output -h")" -- "$cur" ) - ;; - - *'py'*'--helper') - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) - ;; - - *'to'*'parquet'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'safenames'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --mode --output --prefix --reserved -h")" -- "$cur" ) - ;; - - *'transpose'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --memcheck --multipass --output -h")" -- "$cur" ) - ;; - - *'partition'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --drop --filename --help --no-headers --prefix-length -h")" -- "$cur" ) - ;; - - *'frequency'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--asc --delimiter --help --ignore-case --jobs --limit --lmt-threshold --memcheck --no-headers --no-nulls --other-sorted --other-text --output --pct-dec-places --select --unq-limit -h")" -- "$cur" ) - ;; - - *'sortcheck'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--all --delimiter --help --ignore-case --json --no-headers --pretty-json --progressbar --select -h")" -- "$cur" ) - ;; - - *'searchset'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--count --delimiter --dfa-size-limit --flag --flag-matches-only --help --ignore-case --invert-match --json --no-headers --output --progressbar --quick --quiet --select --size-limit --unicode --unmatched-output -h")" -- "$cur" ) - ;; - - *'clipboard'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help --save -h")" -- "$cur" ) - ;; - - *'fetchpost'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--cache-error --compress --cookies --delimiter --disk-cache --disk-cache-dir --flush-cache --help --http-header --jql --jqlfile --max-errors --max-retries --mem-cache-size --new-column --no-cache --no-headers --output --pretty --progressbar --rate-limit --redis-cache --report --store-error --timeout --user-agent -h")" -- "$cur" ) - ;; - - *'py'*'filter'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'to'*'sqlite'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'extdudup'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--dupes-output --help --human-readable --memory-limit --no-output --quiet -h")" -- "$cur" ) - ;; - - *'generate'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --indsp --outdsp --output --rows -h")" -- "$cur" ) - ;; - - *'cat'*'rows'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -A file -W "$(_qsv_completions_filter "--flexible --help -h")" -- "$cur" ) - ;; - - *'validate'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--batch --delimiter --fail-fast --help --invalid --jobs --no-headers --pretty-json --progressbar --quiet --timeout --trim --valid --valid-output -h")" -- "$cur" ) - ;; - - *'luau'*'map'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'flatten'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--condense --delimiter --field-separator --help --no-headers --separator -h")" -- "$cur" ) - ;; - - *'headers'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -A file -W "$(_qsv_completions_filter "--delimiter --help --intersect --just-names --trim -h")" -- "$cur" ) - ;; - - *'foreach'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --dry-run --help --new-column --no-headers --progressbar --unify -h")" -- "$cur" ) - ;; - - *'datefmt'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--batch --default-tz --delimiter --formatstr --help --input-tz --jobs --keep-zero-time --new-column --no-headers --output --output-tz --prefer-dmy --progressbar --rename --ts-resolution --utc --zulu -h")" -- "$cur" ) - ;; - - *'to'*'xlsx'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'tojsonl'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--batch --delimiter --help --jobs --memcheck --no-boolean --output --trim -h")" -- "$cur" ) - ;; - - *'reverse'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --memcheck --no-headers --output -h")" -- "$cur" ) - ;; - - *'exclude'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --ignore-case --no-headers --output -h -v")" -- "$cur" ) - ;; - - *'extsort'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help --jobs --memory-limit --no-headers --tmp-dir -h")" -- "$cur" ) - ;; - - *'applydp'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--batch --comparand --delimiter --formatstr --help --jobs --new-column --no-headers --output --rename --replacement -h dynfmt emptyreplace operations")" -- "$cur" ) - ;; - - *'geocode'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--batch --cache-dir --cities-url --country --delimiter --force --formatstr --help --invalid-result --jobs --language --languages --new-column --output --progressbar --rename --timeout -h countryinfo countryinfonow index-check index-load index-reset index-update reverse reversenow suggest suggestnow")" -- "$cur" ) - ;; - - *'explode'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --no-headers --output --rename -h")" -- "$cur" ) - ;; - - *'prompt'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--base-delay-ms --fd-output --filters --help --msg --output --quiet --save-fname --workdir -h")" -- "$cur" ) - ;; - - *'pseudo'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --formatstr --help --increment --no-headers --output --start -h")" -- "$cur" ) - ;; - - *'snappy'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--help --jobs --output --progressbar --quiet --timeout --user-agent -h check compress decompress validate")" -- "$cur" ) - ;; - - *'select'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --no-headers --output --random --seed --sort -h")" -- "$cur" ) - ;; - - *'py'*'map'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help -h")" -- "$cur" ) - ;; - - *'search'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--count --delimiter --dfa-size-limit --flag --help --ignore-case --invert-match --json --no-headers --not-one --output --preview-match --progressbar --quick --quiet --select --size-limit --unicode -h")" -- "$cur" ) - ;; - - *'rename'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --dfa-size-limit --help --ignore-case --no-headers --output --progressbar --quiet --select --size-limit --unicode -h")" -- "$cur" ) - ;; - - *'schema'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--dates-whitelist --delimiter --enum-threshold --force --help --ignore-case --jobs --memcheck --no-headers --pattern-columns --prefer-dmy --stdout --strict-dates -h")" -- "$cur" ) - ;; - - *'sample'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --help --no-headers --output --rng --seed --timeout --user-agent -h")" -- "$cur" ) - ;; - - *'behead'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--flexible --help --output -h")" -- "$cur" ) - ;; - - *'jsonl'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--batch --delimiter --help --ignore-errors --jobs --output -h")" -- "$cur" ) - ;; - - *'excel'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--date-format --delimiter --error-format --flexible --help --jobs --keep-zero-time --metadata --output --quiet --range --sheet --trim -h")" -- "$cur" ) - ;; - - *'dedup'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --dupes-output --help --human-readable --ignore-case --jobs --memcheck --no-headers --numeric --output --quiet --select --sorted -h")" -- "$cur" ) - ;; - - *'fetch'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--cache-error --cookies --delimiter --disk-cache --disk-cache-dir --flush-cache --help --http-header --jql --jqlfile --max-errors --max-retries --mem-cache-size --new-column --no-cache --no-headers --output --pretty --progressbar --rate-limit --redis-cache --report --store-error --timeout --url-template --user-agent -h")" -- "$cur" ) - ;; - - *'slice'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --end --help --index --json --len --no-headers --output --start -h")" -- "$cur" ) - ;; - - *'table'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--align --condense --delimiter --help --memcheck --output --pad --width -h")" -- "$cur" ) - ;; - - *'input'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--auto-skip --comment --delimiter --encoding-errors --escape --help --no-quoting --output --quote --quote-style --skip-lastlines --skip-lines --trim-fields --trim-headers -h")" -- "$cur" ) - ;; - - *'count'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--flexible --help --human-readable --low-memory --no-headers --no-polars --width -h")" -- "$cur" ) - ;; - - *'index'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help --output -h")" -- "$cur" ) - ;; - - *'apply'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--batch --comparand --delimiter --formatstr --help --jobs --new-column --no-headers --output --progressbar --rename --replacement -h calconv dynfmt emptyreplace operations")" -- "$cur" ) - ;; - - *'sniff'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --harvest-mode --help --json --just-mime --no-infer --prefer-dmy --pretty-json --progressbar --quick --quote --sample --save-urlsample --stats-types --timeout --user-agent -h")" -- "$cur" ) - ;; - - *'stats'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--cache-threshold --cardinality --dates-whitelist --delimiter --everything --force --help --infer-boolean --infer-dates --jobs --mad --median --memcheck --mode --no-headers --nulls --output --prefer-dmy --quartiles --round --select --stats-binout --typesonly -h")" -- "$cur" ) - ;; - - *'joinp'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--asof --coalesce --cross --date-format --datetime-format --decimal-comma --delimiter --filter-left --filter-right --float-precision --full --help --ignore-errors --infer-len --left --left-anti --left-semi --left_by --low-memory --no-optimizations --null-value --nulls --output --quiet --right_by --sql-filter --strategy --streaming --time-format --tolerance --try-parsedates --validate -h")" -- "$cur" ) - ;; - - *'split'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--chunks --delimiter --filename --help --jobs --kb-size --no-headers --pad --quiet --size -h")" -- "$cur" ) - ;; - - *'sqlp'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--compress-level --compression --date-format --datetime-format --decimal-comma --delimiter --float-precision --format --help --ignore-errors --infer-len --low-memory --memcheck --no-headers --no-optimizations --output --quiet --rnull-values --statistics --time-format --truncate-ragged-lines --try-parsedates --wnull-value -h")" -- "$cur" ) - ;; - - *'sort'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter --faster --help --ignore-case --jobs --memcheck --no-headers --numeric --output --random --reverse --rng --seed --select --unique -h")" -- "$cur" ) - ;; - - *'diff'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--delimiter right --delimiter-left --delimiter-output --help --jobs --key --no-headers-left --no-headers-output --no-headers-right --output --sort-columns -h")" -- "$cur" ) - ;; - - *'enum'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--constant --copy --delimiter --hash --help --increment --new-column --no-headers --output --start --uuid4 --uuid7 -h")" -- "$cur" ) - ;; - - *'luau'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--begin --cache-dir --ckan-api --ckan-token --colindex --delimiter --end --help --luau-path --max-errors --no-globals --no-headers --output --progressbar --remap --timeout -h filter map")" -- "$cur" ) - ;; - - *'json'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--help --output -h")" -- "$cur" ) - ;; - - *'join'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--cross --delimiter --full --help --ignore-case --left --left-anti --left-semi --no-headers --nulls --output --right -h")" -- "$cur" ) - ;; - - *'fill'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--backfill --default --delimiter --first --groupby --help --no-headers --output -h")" -- "$cur" ) - ;; - - *'cat'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--delimiter --help --no-headers --output -h columns rows rowskey")" -- "$cur" ) - ;; - - *'fmt'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -W "$(_qsv_completions_filter "--ascii --crlf --delimiter --escape --help --no-final-newline --out-delimiter --output --quote --quote-always --quote-never -h")" -- "$cur" ) - ;; - - *'py'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--batch --delimiter --help --helper --no-headers --output --progressbar -h filter map")" -- "$cur" ) - ;; - - *'to'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--delimiter --drop --dump --evolve --help --jobs --pipe --print-package --quiet --schema --separator --stats --stats-csv -h datapackage parquet postgres sqlite xlsx")" -- "$cur" ) - ;; - - *) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_qsv_completions_filter "--envlist --help --list --update --updatenow --version -h -v apply applydp behead cat clipboard count datefmt dedup describegpt diff enum excel exclude explode extdudup extsort fetch fetchpost fill fixlengths flatten fmt foreach frequency generate geocode headers index input join joinp json jsonl luau partition prompt pseudo py rename reverse safenames sample schema search searchset select slice snappy sniff sort sortcheck split sqlp stats table to tojsonl transpose validate")" -- "$cur" ) - ;; - - esac -} && -complete -F _qsv_completions qsv - -# ex: filetype=sh diff --git a/contrib/bashly/src/bashly.yml b/contrib/bashly/src/bashly.yml deleted file mode 100644 index 2cce77183..000000000 --- a/contrib/bashly/src/bashly.yml +++ /dev/null @@ -1,1355 +0,0 @@ -name: qsv -# name: qsv.exe # Windows -version: 0.129.0 - -flags: - - long: --list - - long: --envlist - - long: --update - - long: --updatenow -commands: - - name: apply - commands: - - name: operations - args: - - name: operations - required: true - - name: column - required: true - completions: - - - - name: emptyreplace - args: - - name: column - required: true - flags: - - long: --replacement - arg: string - completions: - - - - name: dynfmt - flags: - - long: --formatstr - arg: string - - long: --new-column - arg: name - completions: - - - - name: calconv - flags: - - long: --formatstr - arg: string - - long: --new-column - arg: name - completions: - - - args: - - name: input - required: true - flags: - - long: --new-column - arg: name - - long: --rename - arg: name - - long: --comparand - arg: string - - long: --replacement - arg: string - - long: --formatstr - arg: string - - &jobs - long: --jobs - arg: arg - - long: --batch - arg: size - - &output - long: --output - arg: - - &no-headers - long: --no-headers - - &delimiter - long: --delimiter - arg: - - &progressbar - long: --progressbar - - - name: applydp - commands: - - name: operations - args: - - name: operations - required: true - - name: column - required: true - completions: - - - - name: emptyreplace - args: - - name: column - required: true - flags: - - long: --replacement - arg: string - completions: - - - - name: dynfmt - flags: - - long: --formatstr - arg: string - - long: --new-column - arg: name - completions: - - - args: - - name: input - required: true - flags: - - long: --new-column - arg: name - - long: --rename - arg: name - - long: --comparand - arg: string - - long: --replacement - arg: string - - long: --formatstr - arg: string - - *jobs - - long: --batch - arg: size - - *output - - *no-headers - - *delimiter - - - name: behead - completions: - - - flags: - - long: --flexible - - *output - - - name: cat - commands: - - name: rows - flags: - - long: --flexible - completions: - - - - - - name: rowskey - flags: - - long: --group - arg: grpkind - - long: --group-name - arg: arg - completions: - - - - - - name: columns - flags: - - long: --pad - completions: - - - - - flags: - - *output - - *no-headers - - *delimiter - - - name: clipboard - flags: - - long: --save - - - name: count - completions: - - - flags: - - long: --human-readable - - long: --width - - long: --no-polars - - long: --low-memory - - long: --flexible - - long: --no-headers - - - name: datefmt - completions: - - - args: - - name: column - required: true - - name: input - required: true - flags: - - long: --formatstr - arg: string - - long: --new-column - arg: name - - long: --rename - arg: name - - long: --prefer-dmy - - long: --keep-zero-time - - long: --input-tz - arg: string - - long: --output-tz - arg: string - - long: --default-tz - arg: string - - long: --utc - - long: --zulu - - long: --ts-resolution - arg: res - - *jobs - - long: --batch - arg: size - - *output - - *no-headers - - *delimiter - - *progressbar - - - name: dedup - completions: - - - args: - - name: input - required: true - flags: - - long: --select - arg: arg - - long: --numeric - - long: --ignore-case - - long: --sorted - - long: --dupes-output - arg: file - - long: --human-readable - - *jobs - - *output - - *no-headers - - *delimiter - - &quiet - long: --quiet - - &memcheck - long: --memcheck - - - name: describegpt - completions: - - - args: - - name: input - required: true - flags: - - long: --all - - long: --description - - long: --dictionary - - long: --tags - - long: --api-key - arg: key - - long: --max-tokens - arg: value - - long: --json - - long: --jsonl - - long: --prompt - arg: prompt - - long: --prompt-file - arg: file - completions: - - - - long: --base-url - arg: url - - long: --model - arg: model - - long: --timeout - arg: secs - - long: --user-agent - arg: agent - - *output - - *quiet - - - name: diff - completions: - - - args: - - name: input-left - required: true - - name: input-right - required: true - flags: - - long: --no-headers-left - - long: --no-headers-right - - long: --no-headers-output - - long: --delimiter-left - arg: arg - - long: --delimiter right - arg: arg - - long: --delimiter-output - arg: arg - - long: --key - arg: arg - - long: --sort-columns - arg: arg - - *jobs - - *output - - - name: enum - completions: - - - flags: - - long: --new-column - arg: name - - long: --start - arg: value - - long: --increment - arg: value - - long: --constant - arg: value - - long: --copy - arg: column - - long: --uuid4 - - long: --uuid7 - - long: --hash - arg: columns - - *output - - *no-headers - - *delimiter - - - name: excel - completions: - - - flags: - - long: --sheet - arg: name/index - - long: --metadata - arg: c|s|j|J|S - - long: --error-format - arg: format - - long: --error-format - arg: format - - long: --flexible - - long: --trim - - long: --date-format - arg: format - - long: --keep-zero-time - - long: --range - arg: range - - *jobs - - *output - - *delimiter - - *quiet - - - name: exclude - completions: - - - args: - - name: columns1 - required: true - - name: input1 - required: true - - name: columns2 - required: true - - name: input2 - required: true - flags: - - long: --ignore-case - - short: -v - - *output - - *no-headers - - *delimiter - - - name: explode - completions: - - - args: - - name: column - required: true - - name: separator - required: true - flags: - - long: --rename - arg: name - - *output - - *no-headers - - *delimiter - - - name: extdudup - completions: - - - args: - - name: input - required: true - - name: output - required: true - flags: - - long: --no-output - - long: --dupes-output - arg: file - - long: --human-readable - - long: --memory-limit - arg: arg - - *quiet - - - name: extsort - completions: - - - args: - - name: input - required: true - - name: output - required: true - flags: - - long: --memory-limit - arg: arg - - long: --tmp-dir - arg: arg - - *jobs - - *no-headers - - - name: fetch - completions: - - - flags: - - long: --url-template - arg: template - - long: --new-column - arg: name - - long: --jql - arg: selector - - long: --jqlfile - arg: file - completions: - - - - long: --pretty - - long: --rate-limit - arg: qps - - long: --timeout - arg: seconds - - long: --http-header - arg: k:v - - long: --max-retries - arg: count - - long: --max-errors - arg: count - - long: --store-error - - long: --cookies - - long: --user-agent - arg: agent - - long: --report - arg: d|s - - long: --no-cache - - long: --mem-cache-size - arg: count - - long: --disk-cache - - long: --disk-cache-dir - arg: dir - completions: - - - - long: --redis-cache - - long: --cache-error - - long: --flush-cache - - *output - - *no-headers - - *delimiter - - *progressbar - - - name: fetchpost - completions: - - - flags: - - long: --new-column - arg: name - - long: --jql - arg: selector - - long: --jqlfile - arg: file - completions: - - - - long: --pretty - - long: --rate-limit - arg: qps - - long: --timeout - arg: seconds - - long: --http-header - arg: k:v - - long: --compress - - long: --max-retries - arg: count - - long: --max-errors - arg: count - - long: --store-error - - long: --cookies - - long: --user-agent - arg: agent - - long: --report - arg: d|s - - long: --no-cache - - long: --mem-cache-size - arg: count - - long: --disk-cache - - long: --disk-cache-dir - arg: dir - completions: - - - - long: --redis-cache - - long: --cache-error - - long: --flush-cache - - *output - - *no-headers - - *delimiter - - *progressbar - - - name: fill - completions: - - - args: - - name: selection - required: true - - name: input - required: true - flags: - - long: --groupby - arg: keys - - long: --first - - long: --backfill - - long: --default - arg: value - - *output - - *no-headers - - *delimiter - - - name: fixlengths - completions: - - - flags: - - long: --length - arg: arg - - long: --insert - arg: pos - - *output - - *delimiter - - - name: flatten - completions: - - - flags: - - long: --condense - arg: arg - - long: --field-separator - arg: arg - - long: --separator - arg: arg - - *no-headers - - *delimiter - - - name: fmt - completions: - - - flags: - - long: --out-delimiter - arg: arg - - long: --crlf - - long: --ascii - - long: --quote - arg: arg - - long: --quote-always - - long: --quote-never - - long: --escape - arg: arg - - long: --no-final-newline - - *output - - *delimiter - - - name: foreach - completions: - - - args: - - name: column - required: true - - name: command - required: true - - name: input - required: true - flags: - - long: --unify - - long: --new-column - arg: name - - long: --dry-run - arg: file|boolean - completions: - - - - *no-headers - - *delimiter - - *progressbar - - - name: frequency - completions: - - - flags: - - long: --select - arg: arg - - long: --limit - arg: arg - - long: --unq-limit - arg: arg - - long: --lmt-threshold - arg: arg - - long: --pct-dec-places - arg: arg - - long: --other-sorted - - long: --other-text - arg: arg - - long: --asc - - long: --no-trim - - long: --no-nulls - - long: --ignore-case - - *jobs - - *output - - *no-headers - - *delimiter - - *memcheck - - - name: generate - completions: - - - flags: - - long: --rows - arg: count - - long: --outdsp - arg: file - - long: --indsp - arg: file - - *output - - *delimiter - - - name: geocode - commands: - - name: suggest - args: - - name: column - required: true - flags: - - long: --min-score - arg: score - - long: --admin1 - arg: admin1_list - - name: suggestnow - args: - - name: location - required: true - - name: reverse - args: - - name: column - required: true - flags: - - long: --k_weight - arg: weight - - name: reversenow - args: - - name: location - required: true - - name: countryinfo - args: - - name: column - required: true - - name: countryinfonow - args: - - name: location - required: true - - name: index-load - args: - - name: index-file - required: true - - name: index-check - - name: index-update - - name: index-reset - args: - - name: input - required: true - flags: - - long: --new-column - arg: name - - long: --rename - arg: name - - long: --country - arg: country_list - - long: --formatstr - arg: string - - long: --language - arg: lang - - long: --invalid-result - arg: string - - *jobs - - long: --batch - arg: size - - long: --timeout - arg: seconds - - long: --cache-dir - arg: dir - - long: --languages - arg: lang-list - - long: --cities-url - arg: url - - long: --force - - *output - - *delimiter - - *progressbar - - - name: headers - completions: - - - - - flags: - - long: --just-names - - long: --intersect - - long: --trim - - *delimiter - - - name: index - completions: - - - flags: - - *output - - - name: input - completions: - - - flags: - - long: --quote - arg: arg - - long: --escape - arg: arg - - long: --no-quoting - - long: --quote-style - arg: arg - - long: --skip-lines - arg: arg - - long: --auto-skip - - long: --skip-lastlines - arg: arg - - long: --trim-headers - - long: --trim-fields - - long: --comment - arg: char - - long: --encoding-errors - arg: arg - - *output - - *delimiter - - - name: join - completions: - - - args: - - name: columns1 - required: true - - name: input1 - required: true - - name: columns2 - required: true - - name: input2 - required: true - flags: - - long: --ignore-case - - long: --left - - long: --left-anti - - long: --left-semi - - long: --right - - long: --full - - long: --cross - - long: --nulls - - *output - - *no-headers - - *delimiter - - - name: joinp - completions: - - - flags: - - long: --left - - long: --left-anti - - long: --left-semi - - long: --right - - long: --full - - long: --cross - - long: --coalesce - - long: --filter-left - arg: arg - - long: --filter-right - arg: arg - - long: --validate - arg: arg - - long: --nulls - - long: --streaming - - long: --try-parsedates - - long: --infer-len - arg: arg - - long: --low-memory - - long: --no-optimizations - - long: --ignore-errors - - long: --decimal-comma - - long: --asof - - long: --left_by - arg: arg - - long: --right_by - arg: arg - - long: --strategy - arg: arg - - long: --tolerance - arg: arg - - long: --sql-filter - arg: SQL - - long: --datetime-format - arg: fmt - - long: --date-format - arg: fmt - - long: --time-format - arg: fmt - - long: --float-precision - arg: arg - - long: --null-value - arg: value - - *output - - *delimiter - - *quiet - - - name: jsonl - completions: - - - flags: - - long: --ignore-errors - - *jobs - - long: --batch - arg: size - - *output - - *delimiter - - - name: json - completions: - - - flags: - - *output - - - name: luau - commands: - - name: map - completions: - - - - name: filter - completions: - - - flags: - - long: --no-globals - - long: --colindex - - long: --remap - - long: --begin - arg: script - - long: --end - arg: script - - long: --luau-path - arg: pattern - - long: --max-errors - arg: count - - long: --timeout - arg: seconds - - long: --ckan-api - arg: url - - long: --ckan-token - arg: token - - long: --cache-dir - arg: dir - - *output - - *no-headers - - *delimiter - - *progressbar - - - name: partition - completions: - - - flags: - - long: --filename - arg: filename - - long: --prefix-length - arg: n - - long: --drop - - *no-headers - - *delimiter - - - name: prompt - flags: - - long: --msg - arg: arg - - long: --filters - arg: arg - - long: --workdir - arg: dir - - long: --fd-output - - long: --save-fname - arg: file - - long: --base-delay-ms - arg: ms - - *output - - *quiet - - - name: pseudo - completions: - - - flags: - - long: --start - arg: number - - long: --increment - arg: number - - long: --formatstr - arg: template - - *output - - *no-headers - - *delimiter - - - name: py - commands: - - name: map - completions: - - - - name: filter - completions: - - - flags: - - long: --helper - arg: file - completions: - - - - long: --batch - arg: size - - *output - - *no-headers - - *delimiter - - *progressbar - - - name: rename - completions: - - - flags: - - *output - - *no-headers - - *delimiter - - - name: rename - completions: - - - flags: - - long: --ignore-case - - long: --select - arg: arg - - long: --unicode - - long: --size-limit - arg: mb - - long: --dfa-size-limit - arg: mb - - *output - - *no-headers - - *delimiter - - *progressbar - - *quiet - - - name: reverse - completions: - - - flags: - - *output - - *no-headers - - *delimiter - - *memcheck - - - name: safenames - completions: - - - flags: - - long: --mode - arg: c|a|v|V|j|J - - long: --reserved - arg: list - - long: --prefix - arg: string - - *output - - *delimiter - - - name: sample - completions: - - - flags: - - long: --seed - arg: number - - long: --rng - arg: kind - - long: --user-agent - arg: agent - - long: --timeout - arg: secs - - *output - - *no-headers - - *delimiter - - - name: schema - completions: - - - flags: - - long: --enum-threshold - arg: num - - long: --ignore-case - - long: --strict-dates - - long: --pattern-columns - arg: args - - long: --dates-whitelist - arg: list - - long: --prefer-dmy - - long: --force - - long: --stdout - - *jobs - - *no-headers - - *delimiter - - *memcheck - - - name: search - completions: - - - flags: - - long: --ignore-case - - long: --select - arg: arg - - long: --invert-match - - long: --unicode - - long: --flag - arg: column - - long: --quick - - long: --preview-match - arg: arg - - long: --count - - long: --size-limit - arg: mb - - long: --dfa-size-limit - arg: mb - - long: --json - - long: --not-one - - *output - - *no-headers - - *delimiter - - *progressbar - - *quiet - - - name: searchset - completions: - - - flags: - - long: --ignore-case - - long: --select - arg: arg - - long: --invert-match - - long: --unicode - - long: --flag - arg: column - - long: --flag-matches-only - - long: --unmatched-output - arg: file - - long: --quick - - long: --count - - long: --json - - long: --size-limit - arg: mb - - long: --dfa-size-limit - arg: mb - - *output - - *no-headers - - *delimiter - - *progressbar - - *quiet - - - name: select - completions: - - - flags: - - long: --random - - long: --seed - arg: number - - long: --sort - - *output - - *no-headers - - *delimiter - - - name: slice - completions: - - - flags: - - long: --start - - long: --end - - long: --len - arg: arg - - long: --index - arg: arg - - long: --json - - *output - - *no-headers - - *delimiter - - - name: snappy - commands: - - name: compress - completions: - - - - name: decompress - completions: - - - - name: check - completions: - - - - name: validate - completions: - - - flags: - - long: --user-agent - arg: agent - - long: --timeout - arg: secs - - *output - - *jobs - - *quiet - - *progressbar - - - name: sniff - completions: - - - flags: - - long: --sample - arg: size - - long: --prefer-dmy - - *delimiter - - long: --quote - arg: arg - - long: --json - - long: --pretty-json - - long: --save-urlsample - arg: file - - long: --timeout - arg: secs - - long: --user-agent - arg: agent - - long: --stats-types - - long: --no-infer - - long: --just-mime - - long: --quick - - long: --harvest-mode - - *progressbar - - - name: sort - completions: - - - flags: - - long: --select - arg: arg - - long: --numeric - - long: --reverse - - long: --ignore-case - - long: --unique - - long: --random - - long: --seed - arg: number - - long: --rng - arg: kind - - *jobs - - long: --faster - - *output - - *no-headers - - *delimiter - - *memcheck - - - name: sortcheck - completions: - - - flags: - - long: --select - arg: arg - - long: --ignore-case - - long: --all - - long: --json - - long: --pretty-json - - *no-headers - - *delimiter - - *progressbar - - - name: split - completions: - - - flags: - - long: --size - arg: arg - - long: --chunks - arg: arg - - long: --kb-size - arg: arg - - *jobs - - long: --filename - arg: arg - - long: --pad - arg: arg - - *no-headers - - *delimiter - - *quiet - - - name: sqlp - completions: - - - flags: - - long: --format - arg: - - long: --try-parsedates - - long: --infer-len - arg: - - long: --low-memory - - long: --no-optimizations - - long: --truncate-ragged-lines - - long: --ignore-errors - - long: --rnull-values - arg: - - long: --decimal-comma - - long: --datetime-format - arg: - - long: --date-format - arg: - - long: --time-format - arg: - - long: --float-precision - arg: - - long: --wnull-value - arg: - - long: --compression - arg: - - long: --compress-level - arg: - - long: --statistics - - *output - - *no-headers - - *delimiter - - *memcheck - - long: --quiet - - - name: stats - completions: - - - flags: - - long: --select - arg: arg - - long: --everything - - long: --typesonly - - long: --infer-boolean - - long: --mode - - long: --cardinality - - long: --median - - long: --mad - - long: --quartiles - - long: --round - arg: decimal_places - - long: --nulls - - long: --infer-dates - - long: --dates-whitelist - arg: list - - long: --prefer-dmy - - long: --force - - *jobs - - long: --stats-binout - - long: --cache-threshold - arg: arg - - *output - - *no-headers - - *delimiter - - *memcheck - - - name: table - completions: - - - flags: - - long: --width - arg: arg - - long: --pad - arg: arg - - long: --align - arg: arg - - long: --condense - arg: arg - - *output - - *delimiter - - *memcheck - - - name: to - commands: - - name: postgres - completions: - - - - name: sqlite - completions: - - - - name: xlsx - completions: - - - - name: parquet - completions: - - - - name: datapackage - completions: - - - flags: - - long: --print-package - - long: --dump - - long: --stats - - long: --stats-csv - arg: path - - *quiet - - long: --schema - arg: arg - - long: --drop - - long: --evolve - - long: --pipe - - long: --separator - arg: arg - - *jobs - - *delimiter - - - name: tojsonl - completions: - - - flags: - - long: --trim - - long: --no-boolean - - *jobs - - long: --batch - arg: size - - *delimiter - - *output - - *memcheck - - - name: transpose - completions: - - - flags: - - long: --multipass - - *output - - *delimiter - - *memcheck - - - name: validate - completions: - - - flags: - - long: --trim - - long: --fail-fast - - long: --valid - arg: suffix - - long: --invalid - arg: suffix - - long: --pretty-json - - long: --valid-output - arg: file - completions: - - - - *jobs - - long: --batch - arg: size - - long: --timeout - arg: seconds - - *no-headers - - *delimiter - - *progressbar - - *quiet diff --git a/contrib/completions/README.md b/contrib/completions/README.md index c2f61e6da..f325e0745 100644 --- a/contrib/completions/README.md +++ b/contrib/completions/README.md @@ -12,7 +12,7 @@ Generate shell completions for qsv including the following shells: There is potential to move this into a `qsv completions` command and/or add it as a feature since clap and several clap-related crates may need to be installed. Also this is currently a manual effort to keep commands up to date. -> Status as of qsv release v0.129.0: Completions for commands except for `applydp` and `generate` (`applydp` is specific to DataPusher+ and `generate` is not usually distributed with qsv anymore) are available. Completions may not account for file paths (you may need to explicitly use a relative path for example starting with `./` to begin file completions) and other potential changes that could be improved. Not all shells have been verified to work with the generated completions. +> Status as of qsv release v0.130.1: Completions for commands except for `applydp` and `generate` (`applydp` is specific to DataPusher+ and `generate` is not usually distributed with qsv anymore) are available. Completions may not account for file paths (you may need to explicitly use a relative path for example starting with `./` to begin file completions) and other potential changes that could be improved. Not all shells have been verified to work with the generated completions. ## Usage diff --git a/contrib/completions/examples/qsv.bash b/contrib/completions/examples/qsv.bash index 43b9455fb..4eec07e57 100644 --- a/contrib/completions/examples/qsv.bash +++ b/contrib/completions/examples/qsv.bash @@ -1064,7 +1064,7 @@ _qsv() { return 0 ;; qsv__frequency) - opts="-h --select --limit --unq-limit --lmt-threshold --pct-dec-places --other-sorted --other-text --asc --no-trim --ignore-case --jobs --output --no-headers --delimiter --memcheck --help" + opts="-h --select --limit --unq-limit --lmt-threshold --pct-dec-places --other-sorted --other-text --asc --no-trim --ignore-case --stats-mode --all-unique-text --jobs --output --no-headers --delimiter --memcheck --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/contrib/completions/examples/qsv.elv b/contrib/completions/examples/qsv.elv index 993634be0..d6476f301 100644 --- a/contrib/completions/examples/qsv.elv +++ b/contrib/completions/examples/qsv.elv @@ -457,6 +457,8 @@ set edit:completion:arg-completer[qsv] = {|@words| cand --asc 'asc' cand --no-trim 'no-trim' cand --ignore-case 'ignore-case' + cand --stats-mode 'stats-mode' + cand --all-unique-text 'all-unique-text' cand --jobs 'jobs' cand --output 'output' cand --no-headers 'no-headers' diff --git a/contrib/completions/examples/qsv.fig.js b/contrib/completions/examples/qsv.fig.js index 8a42e79e9..2aa824134 100644 --- a/contrib/completions/examples/qsv.fig.js +++ b/contrib/completions/examples/qsv.fig.js @@ -956,6 +956,12 @@ const completion: Fig.Spec = { { name: "--ignore-case", }, + { + name: "--stats-mode", + }, + { + name: "--all-unique-text", + }, { name: "--jobs", }, diff --git a/contrib/completions/examples/qsv.fish b/contrib/completions/examples/qsv.fish index 1ca751019..a38d21e8b 100644 --- a/contrib/completions/examples/qsv.fish +++ b/contrib/completions/examples/qsv.fish @@ -351,6 +351,8 @@ complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l other-text complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l asc complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l no-trim complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l ignore-case +complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l stats-mode +complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l all-unique-text complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l jobs complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l output complete -c qsv -n "__fish_qsv_using_subcommand frequency" -l no-headers diff --git a/contrib/completions/examples/qsv.nu b/contrib/completions/examples/qsv.nu index 7ff5d3b72..870ddfd20 100644 --- a/contrib/completions/examples/qsv.nu +++ b/contrib/completions/examples/qsv.nu @@ -378,6 +378,8 @@ module completions { --asc --no-trim --ignore-case + --stats-mode + --all-unique-text --jobs --output --no-headers diff --git a/contrib/completions/examples/qsv.ps1 b/contrib/completions/examples/qsv.ps1 index e42a3efaa..a965f21c4 100644 --- a/contrib/completions/examples/qsv.ps1 +++ b/contrib/completions/examples/qsv.ps1 @@ -501,6 +501,8 @@ Register-ArgumentCompleter -Native -CommandName 'qsv' -ScriptBlock { [CompletionResult]::new('--asc', 'asc', [CompletionResultType]::ParameterName, 'asc') [CompletionResult]::new('--no-trim', 'no-trim', [CompletionResultType]::ParameterName, 'no-trim') [CompletionResult]::new('--ignore-case', 'ignore-case', [CompletionResultType]::ParameterName, 'ignore-case') + [CompletionResult]::new('--stats-mode', 'stats-mode', [CompletionResultType]::ParameterName, 'stats-mode') + [CompletionResult]::new('--all-unique-text', 'all-unique-text', [CompletionResultType]::ParameterName, 'all-unique-text') [CompletionResult]::new('--jobs', 'jobs', [CompletionResultType]::ParameterName, 'jobs') [CompletionResult]::new('--output', 'output', [CompletionResultType]::ParameterName, 'output') [CompletionResult]::new('--no-headers', 'no-headers', [CompletionResultType]::ParameterName, 'no-headers') diff --git a/contrib/completions/examples/qsv.zsh b/contrib/completions/examples/qsv.zsh index e18366a12..d7419cf00 100644 --- a/contrib/completions/examples/qsv.zsh +++ b/contrib/completions/examples/qsv.zsh @@ -514,6 +514,8 @@ _arguments "${_arguments_options[@]}" : \ '--asc[]' \ '--no-trim[]' \ '--ignore-case[]' \ +'--stats-mode[]' \ +'--all-unique-text[]' \ '--jobs[]' \ '--output[]' \ '--no-headers[]' \ diff --git a/contrib/completions/src/cmd/frequency.rs b/contrib/completions/src/cmd/frequency.rs index 0498f9453..9a24b310f 100644 --- a/contrib/completions/src/cmd/frequency.rs +++ b/contrib/completions/src/cmd/frequency.rs @@ -12,6 +12,8 @@ pub fn frequency_cmd() -> Command { arg!(--asc), arg!(--"no-trim"), arg!(--"ignore-case"), + arg!(--"stats-mode"), + arg!(--"all-unique-text"), arg!(--jobs), arg!(--output), arg!(--"no-headers"), diff --git a/contrib/fish/README.md b/contrib/fish/README.md deleted file mode 100644 index 656d22566..000000000 --- a/contrib/fish/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# qsv fish completions - -The `contrib/fish/qsv.fish` file is available for fish shell completions. - -## Contributing - -Currently the completions are incomplete, may differ per qsv version (e.g., may be outdated), and can be improved so feel free to contribute. - -Here are some external docs: - -- https://fishshell.com/docs/current/completions.html#writing-your-own-completions -- https://fishshell.com/docs/current/cmds/complete.html#complete-edit-command-specific-tab-completions - -## Usage - -Download the `qsv.fish` file and move it to `~/.config/fish/completions/` (e.g., using the `mv` command) so that you have a file `~/.config/fish/completions/qsv.fish` available. Then launch the fish shell and the completions should be available (tried this on WSL2 Ubuntu). You can modify the file, save it, then relaunch the fish shell for the updated completions. diff --git a/contrib/fish/qsv.fish b/contrib/fish/qsv.fish deleted file mode 100644 index 4cd948190..000000000 --- a/contrib/fish/qsv.fish +++ /dev/null @@ -1,61 +0,0 @@ -# Set all available subcommands for qsv -set -l qsv_commands apply applydp behead cat count datefmt dedup describegpt diff enum excel exclude explode extdedup extsort fetch fetchpost fill fixlengths flatten fmt frequency geocode headers index input join joinp jsonl json luau partition prompt pseudo py rename replace reverse safenames sample schema search searchset select slice snappy sniff sort sortcheck split sqlp stats table to tojsonl transpose validate - -# Enable completions for qsv -complete -c qsv - -# qsv options -complete -c qsv -n "not __fish_seen_subcommand_from $qsv_commands" -l list -d 'List all commands available' -complete -c qsv -n "not __fish_seen_subcommand_from $qsv_commands" -l envlist -d 'List all qsv-relevant environment variables' -complete -c qsv -n "not __fish_seen_subcommand_from $qsv_commands" -s u -l update -d 'Update qsv to the latest release from GitHub' -complete -c qsv -n "not __fish_seen_subcommand_from $qsv_commands" -s U -l updatenow -d 'Update qsv to the latest release from GitHub without confirming' -complete -c qsv -n "not __fish_seen_subcommand_from $qsv_commands" -s v -l version -d 'Print version info, mem allocator, features installed, max_jobs, num_cpus, build info then exit' - -# If no subcommands are provided yet, show subcommands -complete -c qsv \ - -n "not __fish_seen_subcommand_from $qsv_commands" -f -a "$qsv_commands" - -# qsv apply -set -l apply_subcommands operations emptyreplace dynfmt calcconv -complete -c qsv -n "__fish_seen_subcommand_from apply" -n "not __fish_seen_subcommand_from $apply_subcommands" -f -a "$apply_subcommands" -complete -c qsv -n "__fish_seen_subcommand_from apply" -l new-column -complete -c qsv -n "__fish_seen_subcommand_from apply" -l rename -complete -c qsv -n "__fish_seen_subcommand_from apply" -l comparand -complete -c qsv -n "__fish_seen_subcommand_from apply" -l replacement -complete -c qsv -n "__fish_seen_subcommand_from apply" -l formatstr -complete -c qsv -n "__fish_seen_subcommand_from apply" -l jobs -complete -c qsv -n "__fish_seen_subcommand_from apply" -l batch -complete -c qsv -n "__fish_seen_subcommand_from apply" -l output -complete -c qsv -n "__fish_seen_subcommand_from apply" -l no-headers -complete -c qsv -n "__fish_seen_subcommand_from apply" -l delimiter -complete -c qsv -n "__fish_seen_subcommand_from apply" -l progressbar - -# qsv count -complete -c qsv -n "__fish_seen_subcommand_from count" -s H -l human-readable -d 'Comma separate row count' -complete -c qsv -n "__fish_seen_subcommand_from count" -l width -complete -c qsv -n "__fish_seen_subcommand_from count" -l flexible -complete -c qsv -n "__fish_seen_subcommand_from count" -l no-headers - -# qsv stats -complete -c qsv -n "__fish_seen_subcommand_from stats" -xl select -complete -c qsv -n "__fish_seen_subcommand_from stats" -l everything -complete -c qsv -n "__fish_seen_subcommand_from stats" -l typesonly -complete -c qsv -n "__fish_seen_subcommand_from stats" -l infer-boolean -complete -c qsv -n "__fish_seen_subcommand_from stats" -l mode -complete -c qsv -n "__fish_seen_subcommand_from stats" -l cardinality -complete -c qsv -n "__fish_seen_subcommand_from stats" -l median -complete -c qsv -n "__fish_seen_subcommand_from stats" -l mad -complete -c qsv -n "__fish_seen_subcommand_from stats" -l quartiles -complete -c qsv -n "__fish_seen_subcommand_from stats" -xl round -complete -c qsv -n "__fish_seen_subcommand_from stats" -l nulls -complete -c qsv -n "__fish_seen_subcommand_from stats" -l infer-dates -complete -c qsv -n "__fish_seen_subcommand_from stats" -xl dates-whitelist -complete -c qsv -n "__fish_seen_subcommand_from stats" -l prefer-dmy -complete -c qsv -n "__fish_seen_subcommand_from stats" -l force -complete -c qsv -n "__fish_seen_subcommand_from stats" -xl jobs -complete -c qsv -n "__fish_seen_subcommand_from stats" -l stats-binout -complete -c qsv -n "__fish_seen_subcommand_from stats" -xl cache-threshold -complete -c qsv -n "__fish_seen_subcommand_from stats" -rl output -complete -c qsv -n "__fish_seen_subcommand_from stats" -l no-headers -complete -c qsv -n "__fish_seen_subcommand_from stats" -xl delimiter -complete -c qsv -n "__fish_seen_subcommand_from stats" -l memcheck