Skip to content

Commit

Permalink
added documentation for pacman listings (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
herzrasen committed Oct 6, 2019
1 parent 34863c9 commit 2b03735
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,23 @@ This is a little collection of useful regexes that can be used for filtering.
Sometimes using `--exclude` is easier than trying to create an exclusion regex.
## Using pkghist's output as input for pacman
You can use the result of a `pkghist` query as input for pacman.

To create an output in the matching format, use the `--no-colors` and the `--no-details' options in your query.
The following command installs all packages that have been removed after 2019-10-01 12:00.
```bash
sudo pacman -S $(pkghist --no-details --no-colors --removed-only --after "2019-10-01 12:00"')
```

The following command removes all packages that have been installed after 2019-10-02 12:00.
```bash
sudo pacman -R $(pkghist --no-details --no-colors --after "2019-10-02 12:00"')
```
## Shell completions
`pkghist` creates completion scripts for `bash`, `fish` and `zsh`.
They are created at build time using the great [clap library](https://github.com/clap-rs/clap).
They are created at build time using the great [clap crate](https://github.com/clap-rs/clap).
When installing using `makepkg` (e.g. using the AUR), they are put into the appropriate location.
When installing manually, you may copy them from [the completions directory](./completions) into the appropriate location.

0 comments on commit 2b03735

Please sign in to comment.