Skip to content

Commit

Permalink
Add a readme
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
trygveaa committed Apr 10, 2020
1 parent 5dc49fd commit 6d525b5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Search kitten for kitty

[Kitten](https://sw.kovidgoyal.net/kitty/#kittens) for the [kitty terminal emulator](https://sw.kovidgoyal.net/kitty/) providing live incremental search in the terminal history.

![Demo](https://user-images.githubusercontent.com/601966/78996982-09c42c80-7b46-11ea-9cb2-d338b846ab87.gif)

## Installation

Place the two `.py` files in this repo (`search.py` and `scroll_mark.py`) in the same directory as `kitty.conf`.

Map a key to launch the kitten. E.g. for `kitty_mod+/` add this to `kitty.conf`:

```
map kitty_mod+/ launch --allow-remote-control kitty +kitten search.py @active-kitty-window-id
```

## Usage

Pressing the key you mapped will open a window where you can type your search. The search is performed immediately as you type each key, however currently it does not scroll to a match automatically if it is outside of the current content shown.

These keys can be used to control the kitten:

- Up/down arrow: Scroll to previous/next match
- Tab: Switch between literal match and regex match
- Ctrl-u: Clear the query
- Ctrl-a/e: Go to the beginning/end of the query
- Enter: Exit the kitten and keep the current scroll position
- Esc: Exit the kitten and scroll to the bottom of the history

0 comments on commit 6d525b5

Please sign in to comment.