aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-01-26 19:28:44 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-01-26 19:28:44 -0800
commit4c79207fbe19ce51c82e9be7573641930410718c (patch)
treeed995981c3540a466895926d94994ede4c453ff1
parent00b93a6e3f643130945d60081213c27faaeba199 (diff)
downloadbasta-4c79207fbe19ce51c82e9be7573641930410718c.tar.gz
basta-4c79207fbe19ce51c82e9be7573641930410718c.tar.bz2
basta-4c79207fbe19ce51c82e9be7573641930410718c.zip
README: recommend simple reload first.
-rw-r--r--README.md20
1 files 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