aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-02-10 13:21:04 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-02-10 13:21:04 -0800
commit1a55ca5bfd77a816685a8b5b560077b86dfd0aa9 (patch)
tree8d485cfb718f1383c5bffb7784f57741e5124fdd /README.md
parent02620a07969b078b86cb6a034ef574fee37104a7 (diff)
downloadbasta-1a55ca5bfd77a816685a8b5b560077b86dfd0aa9.tar.gz
basta-1a55ca5bfd77a816685a8b5b560077b86dfd0aa9.tar.bz2
basta-1a55ca5bfd77a816685a8b5b560077b86dfd0aa9.zip
README: additional installation notes.
- Some advice about Bash configuration for people who are not Bash experts. Bash trips people up by reading different config files when run as a login shell versus non-login shell.
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md
index 18352c4..e330e7e 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,37 @@ instance by adding this line to `~/.bashrc`:
This requires Bash 4.4 or higher.
+## Additional Installation Notes
+
+Note that `~/.bashrc' is loaded only for non-login shells. When Bash runs as a
+login shell, it runs `~/.bash_profile`. If customizations are placed in
+`~/.bashrc`, then `~/.bash_profile` must source `~/.bashrc`. That's one
+configuration style. Another style is to have customizations in a common
+file like `~/.bash_config` (not an official Bash name). This file is then
+sourced by both `~/.bashrc` and `~/.bash_profile`.
+
+Note that if Bash, when run as a login shell, does not find `~/.bash_profile`,
+it looks for `~/.bash_login`, and if that is missing, then `~/.profile`.
+If your environment uses these files, then you might want to integrate
+Basta via those instead. If you introduce `~/.bash_profile` into a
+user environment relying on `~/.bash_login`, you will suppress the use of
+`~/.bash_login`. If you rely on `~/.profile` for customization, that
+name is known to other shells. Since Basta works with Bash only, if you
+hook it into `~/.profile` you need a piece of code there to only run Basta
+if the shell is Bash.
+
+It makes sense to run Basta for both your login shell and for all recursive
+interactive shells which are non-login shells. Hence, it should be
+referenced from both `~/.bashrc` and from `~/.bash_profile`. Each Basta
+invocations in a new shell will create its own status line, as seen in the
+screenshot, helping you be aware that you are in a recursive session. The
+inactive status line below the topmost one are frozen: they continue to record
+the last time they were updated, and also show the working directory at that
+time. Unfortunately, applications osmetimes clear the entire terminal, so that
+these frozen status lines disappear. The only way to refresh them is to return
+to their respective sessions (even if only termporarily vi a suspend
+operation).
+
## Reloading
Basta supports hot reloading: if you make some changes to the