blacknon / hwatch

A modern alternative to the watch command, records the differences in execution results and can check this differences at after.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Allow pass commands to exec like `watch -x`.

VergeDX opened this issue · comments

Original watch command allow us "pass command to exec instead of "sh -c"":
https://gitlab.com/procps-ng/procps/-/blob/v3.3.16/watch.c#L100

But there is no equivalent in hwatch:
https://github.com/blacknon/hwatch/blob/0.3.4/src/exec.rs#L50=

Previous: hwatch 'nu -c "jc mpstat | from json"',
After this feature: hwatch -x nu -c "jc mpstat | from json".

Which saves a single quote wrap, to gain better colors of terminal:
image

Thank you for this Issue!
It was a feature I was thinking of adding someday, but I was putting it off.

I would like to add it in version 0.3.5 or 0.3.6.

Yes I saw your comments in source code, good luck!