aboutsummaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-25 14:31:32 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-25 14:31:32 +1300
commite3f97d6c12e6e311b155ce24ce586717b1abc18b (patch)
tree4d7f5c0556499331218bf2897ef04bc2962aca12 /README.markdown
parentMove Zsh keybinding setup to after ENV sourcing (diff)
downloaddotfiles-e3f97d6c12e6e311b155ce24ce586717b1abc18b.tar.gz
dotfiles-e3f97d6c12e6e311b155ce24ce586717b1abc18b.zip
Show prompt prefix if a shell is exotic
That is, include e.g. "ksh:" as a prefix to the prompt if the user appears to have Bash or Zsh (or anything else) as their login shell. This is probably imperfect, but it's a start.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown3
1 files changed, 3 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 9c956d51..70234ed8 100644
--- a/README.markdown
+++ b/README.markdown
@@ -147,6 +147,9 @@ include these elements in this order:
You can set `PROMPT_COLOR`, `PROMPT_PREFIX`, and `PROMPT_SUFFIX` too, which all
do about what you'd expect.
+If you start up Bash, Ksh, or Zsh and it detects that it's not normally your
+`$SHELL`, the prompt will display an appropriate prefix.
+
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
common terminals using both `termcap(5)` and `terminfo(5)`, including \*BSD