2021-04-25 19:21:52 +02:00
|
|
|
# `atuin search`
|
|
|
|
|
|
|
|
```
|
|
|
|
atuin search <query>
|
|
|
|
```
|
|
|
|
|
|
|
|
Atuin search also supports wildcards, with either the `*` or `%` character. By
|
|
|
|
default, a prefix search is performed (ie, all queries are automatically
|
2022-04-22 22:17:05 +02:00
|
|
|
appended with a wildcard).
|
2021-04-25 19:21:52 +02:00
|
|
|
|
|
|
|
| Arg | Description |
|
|
|
|
| ------------------ | ----------------------------------------------------------------------------- |
|
|
|
|
| `--cwd/-c` | The directory to list history for (default: all dirs) |
|
|
|
|
| `--exclude-cwd` | Do not include commands that ran in this directory (default: none) |
|
|
|
|
| `--exit/-e` | Filter by exit code (default: none) |
|
|
|
|
| `--exclude-exit` | Do not include commands that exited with this value (default: none) |
|
|
|
|
| `--before` | Only include commands ran before this time(default: none) |
|
|
|
|
| `--after` | Only include commands ran after this time(default: none) |
|
|
|
|
| `--interactive/-i` | Open the interactive search UI (default: false) |
|
2023-01-11 22:36:51 +01:00
|
|
|
| `--human` | Use human-readable formatting for the timestamp and duration (default: false) |
|
2021-04-25 19:21:52 +02:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
```
|
|
|
|
# Open the interactive search TUI
|
|
|
|
atuin search -i
|
|
|
|
|
|
|
|
# Open the interactive search TUI preloaded with a query
|
|
|
|
atuin search -i atuin
|
|
|
|
|
|
|
|
# Search for all commands, beginning with cargo, that exited successfully
|
|
|
|
atuin search --exit 0 cargo
|
|
|
|
|
|
|
|
# Search for all commands, that failed, from the current dir, and were ran before April 1st 2021
|
|
|
|
atuin search --exclude-exit 0 --before 01/04/2021 --cwd .
|
|
|
|
|
|
|
|
# Search for all commands, beginning with cargo, that exited successfully, and were ran after yesterday at 3pm
|
|
|
|
atuin search --exit 0 --after "yesterday 3pm" cargo
|
|
|
|
```
|