aboutsummaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-11-30 10:52:41 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-11-30 10:52:41 +1300
commite231476ec89597cf42571efa4b67e6c66ce94078 (patch)
tree6fa4665e21325f5b332813d7d796f04a69bb78b6 /README.markdown
parentHandle tmux sessions showing SHLVL properly (diff)
downloaddotfiles-e231476ec89597cf42571efa4b67e6c66ce94078.tar.gz
dotfiles-e231476ec89597cf42571efa4b67e6c66ce94078.zip
Some more detail about SHLVL
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown5
1 files changed, 4 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index ec6ef7a4..c249d831 100644
--- a/README.markdown
+++ b/README.markdown
@@ -138,6 +138,8 @@ A terminal session with my prompt looks something like this:
[1] 28937
>tom@remote:~/.dotfiles(master+!){1}$
+If `SHLVL` is greater than one, right angle brackets are added to show how many
+`bash` instances deep into the process tree we are, taking into account `tmux`.
The username and hostname are elided if not connected via SSH. The working
directory is always shown. The rest of the prompt expands based on context to
include these elements in this order:
@@ -150,7 +152,8 @@ include these elements in this order:
* The exit status of the last command, if non-zero
You can set `PROMPT_COLOR`, `PROMPT_PREFIX`, and `PROMPT_SUFFIX` too, which all
-do about what you'd expect.
+do about what you'd expect. `PROMPT_PREFIX` will appear after the `SHLVL` angle
+brackets.
This is all managed within the `prompt` function. There's some mildly hacky
logic on `tput` codes included such that it should work correctly for most