Skip to content

Commit

Permalink
Improve cli docstring (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Mar 21, 2022
1 parent fe6c4ca commit c26521e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ cargo install prql
### Usage

```sh
echo "from employees | filter has_dog" | prql compile
$ echo "from employees | filter has_dog" | prql compile

SELECT
*
FROM
Expand All @@ -60,7 +61,7 @@ WHERE
has_dog
```

More details in `prql compile --help`. See below for better examples of PRQL.
See below for fuller examples of PRQL.

### Python implementation

Expand Down
6 changes: 4 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ enum Dialect {
}

#[derive(Parser)]
#[clap(name = env!("CARGO_PKG_NAME"), about, version, author)]
#[clap(name = env!("CARGO_PKG_NAME"), about, version)]
pub enum Cli {
Compile(CompileCommand),
}

#[derive(Args)]
#[clap()]
/// Compile a PRQL string into a SQL string.
///
/// See https://github.com/max-sixty/prql for more information.
pub struct CompileCommand {
#[clap(default_value="-", parse(try_from_os_str = Input::try_from))]
input: Input,
Expand Down

0 comments on commit c26521e

Please sign in to comment.