Skip to content

Commit

Permalink
Merge pull request #113 from blacknon/0.3.13
Browse files Browse the repository at this point in the history
0.3.13

- #95
- #99
  • Loading branch information
blacknon authored May 6, 2024
2 parents 5dc06a5 + 79772f6 commit cb96cfb
Show file tree
Hide file tree
Showing 13 changed files with 425 additions and 138 deletions.
48 changes: 16 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ keywords = ["watch", "command", "monitoring"]
license-file = "LICENSE"
name = "hwatch"
repository = "https://github.com/blacknon/hwatch"
version = "0.3.12"
version = "0.3.13"

[dependencies]
# TODO: ansi-parserが正式にバージョンアップしたらそちらに切り替える
ansi-parser = "0.9.0"
heapless = "0.6.1"
hwatch-ansi-parser = "0.9.0"

ansi_term = "0.12.1"
async-std = {version = "1.12"}
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ That records the result of command execution and can display it history and diff
-B, --beep beep if command has a change result
--mouse enable mouse wheel support. With this option, copying text with your terminal may be harder. Try holding the Shift key.
-c, --color interpret ANSI color and style sequences
-r, --reverse display text upside down.
-t, --no-title hide the UI on start. Use `t` to toggle it.
-N, --line-number show line number
--no-help-banner hide the "Display help with h key" message
Expand All @@ -71,8 +72,6 @@ That records the result of command execution and can display it history and diff
-V, --version Print version




watch window keybind

| Key | Action |
Expand All @@ -82,6 +81,7 @@ watch window keybind
| <kbd>→</kbd> | select history screen. |
| <kbd>H</kbd> | show help window. |
| <kbd>C</kbd> | toggle color. |
| <kbd>R</kbd> | toggle reverse mode. |
| <kbd>D</kbd> | switch diff mode. |
| <kbd>N</kbd> | switch line number display. |
| <kbd>T</kbd> | toggle the UI (history pane and header). |
Expand All @@ -103,7 +103,6 @@ watch window keybind
| <kbd>*</kbd> | filter history by regex. |
| <kbd>Esc</kbd> | unfiltering. |


## Configuration

If you always want to use some command-line options, you can set them in the
Expand Down Expand Up @@ -154,7 +153,6 @@ hwatch -n 3 -s 'zsh -c "source ~/.zshrc"; {COMMAND}' command...
<img src="./img/shell_function.gif" />
</p>


### ANSI Color code

If you want to see output colored with ANSI color code, enable color mode.
Expand All @@ -170,7 +168,6 @@ hwatch -n 3 -c command...
<img src="./img/ansi_color.gif" />
</p>


### diff view

To enable color mode, run hwatch with the `-d` option.
Expand Down Expand Up @@ -200,12 +197,10 @@ hwatch -n 3 -d command...
<img src="./img/word_diff.png" />
</p>


### history filtering

You can filter history as a string with <kbd>/</kbd> key and as a regular expression with <kbd>*</kbd> key.


### run batch mode

You can have command diffs output directly to stdout instead with `-b` option of getting them as a TUI app.
Expand Down
7 changes: 0 additions & 7 deletions examples/version.rs

This file was deleted.

Loading

0 comments on commit cb96cfb

Please sign in to comment.