aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md80
1 files changed, 52 insertions, 28 deletions
diff --git a/README.md b/README.md
index d16359f..e14f43d 100644
--- a/README.md
+++ b/README.md
@@ -1,41 +1,58 @@
# rusty-ping
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.
+A very simple ping utility that tries to be as visual as possible.
+
+Tested on Linux only.
## Install
```shell
-$ git clone https://github.com/ache/git/rusty-ping.git
+$ git clone https://source.tube/ache/rusty-ping
$ cd rusty-ping
$ cargo install --path .
```
+You can also cloneΒ :
+
+- https://git.ache.one/rusty-ping.git
+- Soon https://codeberg.org/ache/rusty-ping/
+
## Usage
```shell
+$ rusty-ping <host>
+```
+
+Or before installationΒ :
+
+```shell
$ cargo run -- <host>
```
-or after installation:
+### Uninstall
```shell
-$ rusty-ping <host>
+$ cargo uninstall rusty-ping
```
+⚠️ Don't forget to remove any shell integration !
+
## 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.
+The goal, **for me**, is to type `pp` to quickly do a ping.
+
+**I will not call this project** `pp` as it may conflict with other CLI tools.
+So you should set up a shell alias (e.g., `pp`, `rp`, or any name you prefer) via shell integration.
-I use fish, so if something breaks with `bash` / `zsh`, just send me a e-mail.
+I primarily use Fish, so if anything breaks with `bash` or `zsh`, please send me an email.
### Fish
-I prefere to use fish abbreviation.
+I prefer to use [fish abbreviations](https://fishshell.com/docs/current/cmds/abbr.html).
-`$HOME/.config/fish/function/pp.fish`
+In `$HOME/.config/fish/function/pp.fish` or `$HOME/.config/fish/conf.d/pp.fish`Β :
```fish
abbr --add pp rusty-ping --stats --status --default-target 2606:4700:4700::1111
@@ -55,52 +72,59 @@ You can just use a functionΒ :
```bash
function pp {
- rusty-ping --stats --legende --status --default-target 2606:4700:4700::1111
+ rusty-ping --stats --legend --status --default-target 2606:4700:4700::1111
}
```
## "User Interface"
-Here is the full UI and the explainationsΒ :
+Here is the full UI and the explanationsΒ :
```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)
+rusty-ping --stats --status --default-target git.ache.one --legend
+0 ▁ 30 β–„ 50 β–† 70 β–ˆ 90 β–‚ 120 β–… 150 β–ˆ 170 β–‚ 190 β–„ 210 β–† 240 ? <-- The legend (--legend)
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)
+0/9 (0.0%) | ⌊34βŒ‹ ⌈35βŒ‰ [35] [Ξ”0]ms <-- Statistics on the last 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.
+The legend indicates which characters correspond to which RTT in the ping line.
+On the ping line, each character represents an ICMP packet sent.
-? => Packet not yet received
-! => Packet lost
+`?` => Packet not yet received
+`!` => Packet lost
### The statistics
RTT is expressed in miliseconds.
```plain
- ┏━> Number of packets lost / Total send (Percentage of packets lost)
+ ┏━> Number of packets lost / Total sent (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
+ β”‚ ┕━> The maximum RTT
+ ┕━> The minimum RTT
```
## Technical Notes
-It does NOT use the `ping` command.
-It isn't tied to bash or any shell.
+Rusty-ping does NOT use the `ping` command.
+It isn't tied to Bash or any specific shell.
+
+### Rust dependencies:
+
+- `clap` to parse args.
+- `ping` crate to actually do the ping.
+- `term_size` to print the legend on a single line.
+- `tokio` for `mpsc`, the default mpsc queue seems to be deprecated;
+
+### License
-### Rust dependancies:
+CeCILL 2.1
-- `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
+- [fr](http://www.cecill.info/licences/Licence_CeCILL_V2.1-fr.html)
+- [en](http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html)