From 4c79207fbe19ce51c82e9be7573641930410718c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 26 Jan 2025 19:28:44 -0800 Subject: README: recommend simple reload first. --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index abff3d7..18352c4 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3