Skip to content

Commit

Permalink
demo and document search command
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasvanEyk committed Jul 1, 2023
1 parent e6111cd commit 0873a65
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ While quite basic, this command can be used in conjunction with other tools to q

Renders the nearest changelog right inside your terminal using [charmbracelet/glamour](https://github.com/charmbracelet/glamour).

### `changelog search`

Searches for changes matching the given search query.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://niclasvaneyk.github.io/keepac/search.dark.gif">
<img src="https://niclasvaneyk.github.io/keepac/search.light.gif" loading="lazy">
</picture>

Matches are displayed with contextual information, such as the version the change was released in and its type of change.

### `changelog edit`

Opens the nearest changelog inside your `$EDITOR`.
Expand Down
43 changes: 43 additions & 0 deletions tapes/dark/search.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Require changelog
Require wget

Set Width 2400
Set Height 800

Hide
# We use the tailwindcss changelog as an example
Type "wget https://github.com/tailwindlabs/tailwindcss/raw/master/CHANGELOG.md"
Sleep 250ms
Enter
Sleep 250ms
Type "clear"
Enter
Show

Type "# Imagine you are trying to search for changes related to a specific feature."
Sleep 500ms
Enter

Type "# Lets use TailwindCSS as an example. Let's try searching for changes related to flexbox"
Sleep 500ms
Enter

Type "cat CHANGELOG.md | grep flex"
Sleep 500ms
Enter

Type "# This works, but we can do better:"
Sleep 500ms
Enter

Type "changelog search flex"
Sleep 500ms
Enter
Sleep 2500ms

Type "# Much better! More context, nicer output and easier to remember."
Sleep 10000ms

Hide
Type "rm CHANGELOG.md"

0 comments on commit 0873a65

Please sign in to comment.