Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add favorite query parameters #18

Merged
merged 2 commits into from
Nov 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions content/pages/favorites.md
Original file line number Diff line number Diff line change
@@ -39,3 +39,20 @@ Examples:
> \fd simple
simple: Deleted
```

## Positional Parameters

Favorite queries support shell-style parameter substitution. Save your favorite
query with parameters as placeholders (e.g. `$1`, `$2`,
`$3`, etc.):

```
\fs user_by_name select * from users where name = '$1'
```

When you call a favorite query with parameters, just add the parameters after
the query's name. You can put quotes around arguments that include spaces.

```
\f user_by_name "Skelly McDermott"
```