Interactive grep (for streaming)
Interactive grep
--cmd is specified instread of piping data to sig,
the command will be executed on initial and retries.-Q option.brew install ynqa/tap/sigrscargo install sigrsIf you're an x-cmd user, you can install it with the following command:
x install sigpacman -S sigAdd it as an input to your flake:
inputs = {
sig.url = 'github:ynqa/sig/'
}Create a shell with it:
nix shell github:ynqa/sigOr run it directly:
cat README.md | nix run github:ynqa/sigFetch the source and use it, e.g. in your shell:
let
# At the time of writing this, pkgs need to be unstable for the package to build properly
# (requires Rust 1.74, stable has 1.73)
pkgs = import {};
sig = pkgs.callPackage (pkgs.fetchFromGitHub {
owner = "ynqa";
repo = "sig";
rev = "";
hash = ""; # Build first, put proper hash in place
}) {};
in
pkgs.mkShell {
packages = [sig];
}stern --context kind-kind etcd |& sig
# or
sig --cmd "stern --context kind-kind etcd" # this is able to retry command by ctrl+r.
# or static input (switches to archived view after EOF)
cat README.md |& sig| Key | Action |
|---|---|
| Ctrl + C | Exit sig |
| Ctrl + R | Retry command if --cmd is specified |
| Ctrl + S | Pause/Resume stream ingestion |
| Ctrl + F | Enter Archived mode |
| ← | Move the cursor one character to the left |
| → | Move the cursor one character to the right |
| Ctrl + A | Move the cursor to the start of the filter |
| Ctrl + E | Move the cursor to the end of the filter |
| Backspace | Delete a character of filter at the cursor position |
| Ctrl + U | Delete all characters of filter |
(Archived mode)
| Key | Action |
|---|---|
| Ctrl + C | Exit Archived mode |
| ← | Move the cursor one character to the left |
| → | Move the cursor one character to the right |
| Ctrl + A | Move the cursor to the start of the filter |
| Ctrl + E | Move the cursor to the end of the filter |
| Backspace | Delete a character of filter at the cursor position |
| Ctrl + U | Delete all characters of filter |
…The following settings are available in config.toml
…No open issues yet, or sync has not completed.