Skip to content

Commit

Permalink
update examples section
Browse files Browse the repository at this point in the history
  • Loading branch information
curusarn committed Dec 18, 2019
1 parent d207deb commit e3c64d4
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ Imagine being able to search your shell history based on both the command itself
- :x: allow searchnig by metadata
- :x: app contians different search modes

- :heavy_check_mark: Provide a `reshctl` utility to control and interact with the project
- :heavy_check_mark: zsh completion
- :heavy_check_mark: bash completion

- :x: Synchronize recorded history between devices

- :x: Provide an API to make resh extendable
Expand All @@ -63,6 +67,8 @@ Imagine being able to search your shell history based on both the command itself

- :heavy_check_mark: Be compatible with Linux and macOS

- :heavy_check_mark: Require very little prerequisite software

- :white_check_mark: Show cool graphs based on recorded history

- :heavy_check_mark: Provide a tool to sanitize the recorded history
Expand Down Expand Up @@ -103,6 +109,8 @@ curl -s https://raw.githubusercontent.com/curusarn/resh/master/scripts/rawinstal

## Examples

### View the recorded history

Resh history is saved to `~/.resh_history.json`

Each line is a JSON that represents one executed command line.
Expand All @@ -113,6 +121,60 @@ You can install `jq` using your favourite package manager or you can use other J

![screenshot](img/screen.png)

*Recorded metadata will be reduced to only include useful information in the future.*

### Update

Check for updates and update

```sh
reshctl update
```

### Arrow key bindings

Resh provides arrow key bindings.

These bindings do regular stepping through history and prefix search.

They allow resh to record bindings usage metadata.

![bindings metadata](img/screen-recall.png)

*In example above I pressed UP, pressed DOWN, pressed UP (prefix search `make`) and the command line after the last command line retrieved from history was `make build` so we see that I executed the retrieved command without editing it.*

Arrow key bindings are enabled by default in zsh and they are disabled by default in bash because there are some performance issues.

Enable/disable arrow key bindnigs for THIS shell session:

```sh
reshctl enable arrow_key_bindings

reshctl disable arrow_key_bindings
```

Enable/disable for FUTURE shell sessions:

```sh
reshctl enable arrow_key_bindings_global

reshctl disable arrow_key_bindings_global
```

See what your current setting is:

```sh
reshctl status
```

### Graphs

:clock10: *coming soon*

Sneak peak

![graph of command sequences](img/graph-command-sequences.png)

## Known issues

### Q: I use bash on macOS and resh doesn't work
Expand Down
Binary file added img/screen-recall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ echo "
please give me some contact info using this form: https://forms.gle/227SoyJ5c2iteKt98
ARROW KEY BINDINGS
Resh arrow key bindings replicate the default behaviour (for now).
That means stepping through history and prefix search.
They also provide very precious usage metadata.
Resh provides arrow key bindings.
These bindings do regular stepping through history and prefix search.
They allow resh to record bindings usage metadata.
* Enabled by default in zsh
* Disabled by default in bash
Expand Down

0 comments on commit e3c64d4

Please sign in to comment.