diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-01-26 19:28:44 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-01-26 19:28:44 -0800 |
commit | 4c79207fbe19ce51c82e9be7573641930410718c (patch) | |
tree | ed995981c3540a466895926d94994ede4c453ff1 | |
parent | 00b93a6e3f643130945d60081213c27faaeba199 (diff) | |
download | basta-4c79207fbe19ce51c82e9be7573641930410718c.tar.gz basta-4c79207fbe19ce51c82e9be7573641930410718c.tar.bz2 basta-4c79207fbe19ce51c82e9be7573641930410718c.zip |
README: recommend simple reload first.
-rw-r--r-- | README.md | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -22,9 +22,15 @@ This requires Bash 4.4 or higher. ## Reloading -Assuming your `~/.bashrc` sources the Basta code, here is how -you can re-execute your shell correctly so that you don't get a nested -Basta prompt +Basta supports hot reloading: if you make some changes to the +code or fetch a minor update, you can just source the file again. + + ::text + . /path/to/basta.sh + +However, if you're updating from a very old version to a much newer one, +here is how to perfrm a deeper reload (assuming your `~/.bashrc` sources the +Basta code): ::text basta.cleanup; exec bash -l @@ -33,14 +39,6 @@ I.e. run the Basta cleanup code explicitly and re-execute the login shell. The cleanup code is hooked to the `EXIT` trap, but that doesn't execute on exec. -This is something that might be necessary if upgrading to -a new version of Basta which is too different, like if some -internal variable and function names have changed. - -The code otherwise supports "hot reloading" for minor changes; -you can source the file after customizing the status line -generation logic or some other details. - ## Temporarily Disabling Basta executes code for every new prompt, and when the signals SIGALRM |