aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2026-08-16 23:18:10 +0200
committerache <ache@ache.one>2026-08-16 23:18:10 +0200
commitc56755a024c264e9c3028a3cb9696c1afe5dbca9 (patch)
tree327a8458ee1e24b858a7c23bf2033618bb867bfe
parentAdd the -S short option for the status line (diff)
Add a real README
-rw-r--r--README.md88
1 files changed, 80 insertions, 8 deletions
diff --git a/README.md b/README.md
index 76798b1..d16359f 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,7 @@
# rusty-ping
-A replacement for [prettyping](https://github.com/denilsonsa/prettyping).
-
-A basic ping utility that tries to be visual, with no external dependencies.
+A replacement for [prettyping](https://github.com/denilsonsa/prettyping).
+A very simple ping utility that tries to be as visual as possible, does NOT use the ping command.
## Install
@@ -24,11 +23,84 @@ or after installation:
$ rusty-ping <host>
```
+## Shell integration
+
+Rusty-ping doesn't use a config file to keep things as simple as possible.
+The goal is to type 'pp' to quickly do a ping, I will not call rusty-ping pp as it may conflict with other CLI.
+So the configuration step and alias to 'pp' is done with some shell integration.
+
+I use fish, so if something breaks with `bash` / `zsh`, just send me a e-mail.
+
+### Fish
+
+I prefere to use fish abbreviation.
+
+`$HOME/.config/fish/function/pp.fish`
+
+```fish
+abbr --add pp rusty-ping --stats --status --default-target 2606:4700:4700::1111
+```
+
+But a function works too.
+
+```fish
+function pp
+ rusty-ping --stats --status --default-target 2606:4700:4700::1111
+end
+```
+
+### Bash / zsh
+
+You can just use a functionΒ :
+
+```bash
+function pp {
+ rusty-ping --stats --legende --status --default-target 2606:4700:4700::1111
+}
+```
+
+## "User Interface"
+
+Here is the full UI and the explainationsΒ :
+
+```shell
+rusty-ping --stats --status --default-target git.ache.one --legende
+0 ▁ 30 β–„ 50 β–† 70 β–ˆ 90 β–‚ 120 β–… 150 β–ˆ 170 β–‚ 190 β–„ 210 β–† 240 ? <-- The legende (--legende)
+PING git.ache.one (145.239.86.0) <-- The status line (--status)
+β–„β–„β–„β–„β–„β–„β–„β–„? <-- The ping line
+0/9 (0.0%) | ⌊34βŒ‹ ⌈35βŒ‰ [35] [Ξ”0]ms <-- Statistics on every packet (--stats)
+0/9 (0.0%) | ⌊34βŒ‹ ⌈35βŒ‰ [35] [Ξ”0]ms <-- Statistics on the lasts 30 packets (--stats)
+```
+
+The legende indicate which characters correspond to which RTT in the ping line.
+On the ping line, every characters correspond to a ICMP packet send.
+
+? => Packet not yet received
+! => Packet lost
+
+### The statistics
+
+RTT is expressed in miliseconds.
+
+```plain
+ ┏━> Number of packets lost / Total send (Percentage of packets lost)
+ β”‚ ┏━> Just a separator
+0/9 (0.0%) | ⌊36βŒ‹ ⌈56βŒ‰ [40] [Ξ”4]ms
+ β”‚ β”‚ β”‚ ┕━> The mean absolute difference
+ β”‚ β”‚ β”‚ to the average RTT
+ β”‚ β”‚ ┕━> The average RTT
+ β”‚ ┕━> The maximal RTT
+ ┕━> The minimal RTT
+```
+
## Technical Notes
-- `clap` to parse args
-- `tokio` for `mpsc`
-- `icmp` crates for the ping
-- Rust 2024 edition
+It does NOT use the `ping` command.
+It isn't tied to bash or any shell.
+
+### Rust dependancies:
-_Still WIP_
+- `clap` to parse args
+- `ping` crate to actually do the ping
+- `term_size` to pretty print the legende
+- `tokio` for `mpsc`, the default mpsc queue seems to be deprecated