docs(script): Reformatted (#1)

This commit is contained in:
hygienic-books 2023-03-03 05:48:55 +01:00
parent 28d33784ae
commit bc81659639

View File

@ -20,6 +20,12 @@ It peeks into that file and offers auto-completion based on saved sessions. It c
sudo ln -s <repo>/hs.sh /usr/local/bin/hs sudo ln -s <repo>/hs.sh /usr/local/bin/hs
chmod +x <repo>/hs.sh chmod +x <repo>/hs.sh
``` ```
1. Run:
```
hs <TAB>
```
This will list all HeidiSQL sessions that have `NetType` set to `2` aka `MariaDB or MySQL (SSH tunnel)`. Select one and `hs` creates the necessary tunnel.
# What it looks like # What it looks like
@ -27,8 +33,6 @@ Here with `fzf` as auto-completion helper (optional, is a personal preference):
![Screencast showing hs in action](https://i.imgur.com/FhVFtaR.gif) ![Screencast showing hs in action](https://i.imgur.com/FhVFtaR.gif)
> Here `hs` first attempts to set up an SSH tunnel for a HeidiSQL saved session and fails because something's already listening on the local port. > Here `hs` first attempts to set up an SSH tunnel for a HeidiSQL saved session and fails because something's already listening on the local port. We `kill` the connection in question - an SSH tunnel from a prior test - and try again. This time `hs` correctly creates our tunnel. With `set -xv` we see the actual command that gets executed.
>
> We `kill` the connection in question - an SSH tunnel from a prior test - and try again. This time `hs` correctly creates our tunnel. With `set -xv` we see the actual command that gets executed.
> >
> Once done we clean up after ourselves and kill SSH tunnels we no longer need. > Once done we clean up after ourselves and kill SSH tunnels we no longer need.