Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 3.64 KB

File metadata and controls

77 lines (51 loc) · 3.64 KB

prompt

Open a file dialog to either pick a file as input or save output to a file.

Table of Contents | Source: src/cmd/prompt.rs | 🐻‍❄️🖥️

Description | Examples | Usage | Prompt Options | Common Options

Description

Open a file dialog to pick a file as input or save to an output file.

Examples

Pick a single file as input to qsv stats using an INPUT file dialog, pipe into qsv stats using qsv prompt, and browse the stats using qsv lens:

qsv prompt | qsv stats | qsv lens

If you want to save the output of a command to a file using a save file OUTPUT dialog, pipe into qsv prompt using the --fd-output flag:

qsv prompt -m 'Pick a CSV file to summarize' | qsv stats -E | qsv prompt --fd-output

Prompt for a spreadsheet, and export to CSV using a save file dialog:

qsv prompt -m 'Select a spreadsheet to export to CSV' -F xlsx,xls,ods | \
qsv excel - | qsv prompt -m 'Save exported CSV to...' --fd-output

Usage

qsv prompt [options]
qsv prompt --help

Prompt Options

     Option       Type Description Default
 ‑m,
‑‑msg 
string The prompt message to display in the file dialog title. When not using --fd-output, the default is "Select a File". When using --fd-output, the default is "Save File As".
 ‑F,
‑‑filters 
string The filter to use for the INPUT file dialog. Set to "None" to disable filters. Filters are comma-delimited file extensions. Defaults to csv,tsv,tab,ssv,xls,xlsx,xlsm,xlsb,ods. If the polars feature is enabled, it adds avro,arrow,ipc,parquet, json,jsonl,ndjson & gz,zst,zlib compressed files to the filter.
 ‑d,
‑‑workdir 
string The directory to start the file dialog in. .
 ‑f,
‑‑fd‑output 
flag Write output to a file by using a save file dialog. Used when piping into qsv prompt. Mutually exclusive with --output.
 ‑‑save‑fname  string The filename to save the output as when using --fd-output. output.csv
 ‑‑base‑delay‑ms  string The base delay in milliseconds to use when opening INPUT dialog. This is to ensure that the INPUT dialog is shown before/over the OUTPUT dialog when using the prompt command is used in both INPUT and OUTPUT modes in a single pipeline. 200

Common Options

     Option      Type Description Default
 ‑h,
‑‑help 
flag Display this message
 ‑o,
‑‑output 
string Write output to without showing a save dialog. Mutually exclusive with --fd-output.
 ‑q,
‑‑quiet 
flag Do not print --fd-output message to stderr.

Source: src/cmd/prompt.rs | Table of Contents | README