diff -pruN 1.11-3/CHANGELOG.md 2.0.3-1/CHANGELOG.md
--- 1.11-3/CHANGELOG.md	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/CHANGELOG.md	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,821 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [2.0.3] - 2021-05-30
+### Fixed
+- **hg**: Stash count erroring with no function defined ([#671])
+- **fossil**: Stash count erroring with no function defined ([#671])
+- **fossil**: Uncommited files erroring with no function defined ([#671])
+- **fossil**: Untracked files erroring with no function defined ([#671])
+- **svn**: Uncommited files erroring with no function defined ([#671])
+- **temp**: Temperature erroring if tool returns no data with `set -u` ([#670])
+
+## [2.0.2] - 2021-02-22
+### Fixed
+- **git**: Git worktrees not being detected ([#658])
+
+## [2.0.1] - 2021-02-07
+### Added
+- **docs**: Example for `lp_terminal_format()` ([#657], [954bace])
+- **tests**: Tests for tools/theme-preview.sh and tools/external-tool-tester.sh ([e121179])
+
+### Fixed
+- **general**: Unset errors in liquidprompt and theme-preview on Bash-3.2 ([#656], [e121179])
+- **general**: Unset errors in liquidprompt in Zsh when no terminal attached ([dc11eb4])
+- **general**: Unset errors in liquidprompt on Windows ([461f0ee])
+- **color**: Background of path always black, ignoring terminal background setting ([#657], [58693b0])
+- **tools**: Make theme-preview.sh work in Zsh ([e121179])
+
+### Changed
+- **color**: `LP_COLOR_PATH` changed to `$NO_COL`, to follow terminal default
+  foreground ([58693b0])
+- **color**: `LP_COLOR_PATH_SEPARATOR` and 'LP_COLOR_PATH_SHORTENED` changed
+  from light grey to grey, to be neutral on both light and dark backgrounds ([58693b0])
+- **color**: `LP_COLOR_PATH_LAST_DIR` and 'LP_COLOR_PATH_VCS_ROOT` changed
+  from bold white to `$BOLD`, to follow terminal default foreground ([58693b0])
+
+## [2.0.0] - 2021-02-05
+### BREAKING CHANGES
+Note: these breaking changes are the only reason that this version is so much
+faster. They are also on private functions and variables, which the end user
+was not supposed to use. If you were using them, see the
+[upgrade notes](https://liquidprompt.readthedocs.io/en/stable/upgrading/v2.0.html)
+for help.
+
+- **general**: `$_LP_SHELL_bash` and `$_LP_SHELL_zsh` contain `1` or `0` instead of `true`
+  or `false` ([f681cdf])
+- **general**: `_lp_color_map()` return changed from stdout to `$ret` ([e843ccf])
+- **general**: `_lp_escape()` renamed to `__lp_escape()` and return changed from stdout to
+  `$ret` ([f3404f9])
+- **general**: `_lp_set_prompt()` renamed to `__lp_set_prompt()` ([decaece])
+- **general**: `_lp_source_config()` renamed to `__lp_source_config()` ([decaece])
+- **battery**: `_lp_battery()` return changed from stdout to `$lp_battery` ([3f57231])
+- **battery**: `_lp_battery_color()` return changed from stdout to `$lp_battery_color` ([3f57231])
+- **env**: `$lp_err` renamed to `$lp_error` ([63b9f73])
+- **env**: `_lp_connection()` return changed from stdout to `$lp_connection` ([edc490f])
+- **git**: `_lp_git_head_status()` return changed from stdout to `$lp_vcs_head_status` ([7c21470])
+- **jobs**: `_lp_jobcount_color()` return changed from stdout to `$lp_jobcount_color` ([73f2057])
+- **load**: `_lp_load_color()` return changed from stdout to `$lp_load_color` ([8a987f4])
+- **path**: `_lp_get_home_tilde_collapsed()` renamed to `__lp_pwd_tilde()` and return changed from
+  stdout to `$lp_pwd_tilde` ([28c13f2])
+- **path**: `_lp_set_dirtrim()` renamed to `__lp_set_dirtrim()` ([decaece])
+- **path**: `_lp_shorten_path()` replaced by `_lp_path_format()` ([decaece], [a35032f], [ae769dc])
+- **runtime**: `_lp_runtime()` renamed to `_lp_runtime_color()` and return changed from stdout to
+  `$lp_runtime_color` ([0f0fd37])
+- **runtime**: `_lp_runtime_after()` renamed to `__lp_runtime_after()` ([decaece])
+- **runtime**: `_lp_runtime_before()` renamed to `__lp_runtime_before()` ([decaece])
+- **temperature**: `_lp_temp_acpi()` renamed to `__lp_temp_acpi()` and return changed from
+  `$temperature` to `$lp_temperature` ([69c75a3])
+- **temperature**: `_lp_temp_detect()` renamed to `__lp_temp_detect()` ([69c75a3])
+- **temperature**: `_lp_temp_sensors()` renamed to `__lp_temp_sensors()` and return changed from
+  `$temperature` to `$lp_temperature` ([69c75a3])
+- **temperature**: `_lp_temperature()` changed to data function, replaced by
+  `_lp_temperature_color()` and return changed from stdout to `$lp_temperature_color` ([69c75a3])
+- **time**: `_lp_time()` split into `_lp_time()`, `_lp_time_color()`, `_lp_analog_time()`, and
+  `_lp_analog_time_color()` ([8cb609d])
+- **vcs**: `_lp_<vcs>_branch()` return changed from stdout to `$lp_vcs_branch` ([f3404f9])
+- **vcs**: `_lp_<vcs>_branch_color()` functions removed, replaced by
+  `_lp_vcs_details_color()` ([cafb8b2], [bf2b9c6], [1a9fcd0], [4fff496], [b523025])
+- **vcs**: `_lp_smart_mark()` return changed from stdout to `$lp_smart_mark` ([9c6d073])
+- **vcs**: `_lp_upwards_find()` removed, replaced by `_lp_find_vcs()` ([f434b6d])
+
+### Deprecated
+- **path**: `LP_PATH_DEFAULT` is replaced by `LP_PATH_METHOD` ([ae769dc])
+- **title**: `_lp_title()` is replaced by `_lp_formatted_title()` ([46df995], [9604203], [#581])
+- **utils**: `_lp_bool()` is replaced by manually storing return codes ([82ee823]).
+- **utils**: `_lp_sb()` is replaced by data functions indicating if they
+  returned data or not ([82ee823]).
+- **utils**: `_lp_sl()` is replaced by data functions indicating if they
+  returned data or not ([82ee823]).
+- **utils**: `_lp_sr()` is replaced by data functions indicating if they
+  returned data or not ([82ee823]).
+- **vcs**: `$LP_DISABLED_VCS_PATH` variable is replaced by a
+  `$LP_DISABLED_VCS_PATHS` array variable. A warning will be displayed at
+  startup if your config still uses the old variable, but a compatibility shim
+  is active. See the upgrade notes for help ([cad6286])
+
+### Added
+- **general**: Sphinx documentation ([0d420d2], [c7b5003], [b523025], [f9fd12e])
+- **general**: Manual pages built from documentation ([#637], [13e128b])
+- **general**: Command line flag `--no-activate` to skip auto shell activation when sourcing
+  liquidprompt ([e122d21])
+- **general**: `lp_activate()` function to reload config without needing to re-source
+  liquidprompt ([e1f8bd5], [22dd760])
+- **bzr**: `_lp_bzr_active()` data function ([b523025])
+- **bzr**: `_lp_bzr_commit_id()` data function ([b523025])
+- **bzr**: `_lp_bzr_stash_count()` data function ([b523025])
+- **bzr**: `_lp_bzr_tag()` data function ([b523025])
+- **bzr**: `_lp_bzr_uncommitted_files()` data function ([b523025])
+- **bzr**: `_lp_bzr_uncommitted_lines()` data function ([b523025])
+- **bzr**: `_lp_bzr_untracked_files()` data function ([b523025])
+- **color**: `lp_terminal_format()` util function ([#486], [09cfced])
+- **cpu**: Internal function `__lp_cpu_count()` to count CPU cores ([e5047c0])
+- **dirstack**: Directory stack data source ([#625], [f35d9ac])
+- **env**: `$LP_ENABLE_ERROR` config option ([#543], [63b9f73])
+- **env**: `_lp_chroot()` data function ([c946155])
+- **env**: `_lp_connected_display()` data function ([c946155])
+- **env**: `_lp_error()` data function ([63b9f73])
+- **env**: `_lp_hostname()` data function ([8de1a72], [6ea54e9])
+- **env**: `_lp_hostname_color()` theme function ([c946155], [8de1a72], [b1a3145])
+- **env**: `_lp_http_proxy()` data function ([78dee3c])
+- **env**: `_lp_http_proxy_color()` theme function ([78dee3c])
+- **env**: `_lp_multiplexer()` data function ([0200b99], [230c9d7])
+- **env**: `_lp_python_env()` data function ([03434d3])
+- **env**: `_lp_python_env_color()` theme function ([03434d3])
+- **env**: `_lp_software_collections()` data function ([f4afc5d])
+- **env**: `_lp_software_collections_color()` theme function ([f4afc5d])
+- **env**: `_lp_sudo_active()` data function ([9ba5d28])
+- **env**: `_lp_sudo_active_color()` theme function ([9ba5d28])
+- **env**: `_lp_user()` data function ([9ba5d28])
+- **env**: `_lp_username()` data function ([debb794])
+- **env**: `_lp_username_color()` theme function ([afe3195])
+- **fossil**: `_lp_fossil_active()` data function ([bf2b9c6])
+- **fossil**: `_lp_fossil_commit_id()` data function ([bf2b9c6])
+- **fossil**: `_lp_fossil_head_status()` data function ([bf2b9c6])
+- **fossil**: `_lp_fossil_stash_count()` data function ([bf2b9c6])
+- **fossil**: `_lp_fossil_uncommitted_files()` data function ([bf2b9c6])
+- **fossil**: `_lp_fossil_uncommitted_lines()` data function ([bf2b9c6])
+- **fossil**: `_lp_fossil_untracked_files()` data function ([bf2b9c6])
+- **git**: `_lp_git_active()` data function ([70b4ef6])
+- **git**: `_lp_git_commit_id()` data function ([70b4ef6])
+- **git**: `_lp_git_commits_off_remote()` data function ([309b443])
+- **git**: `_lp_git_staged_files()` data function ([#644], [9038ec8])
+- **git**: `_lp_git_staged_lines()` data function ([#644], [9038ec8])
+- **git**: `_lp_git_stash_count()` data function ([fe9919f], [bb19836])
+- **git**: `_lp_git_tag()` data function ([70b4ef6], [#506])
+- **git**: `_lp_git_uncommitted_files()` data function ([67dc0a9])
+- **git**: `_lp_git_uncommitted_lines()` data function ([70b4ef6])
+- **git**: `_lp_git_unstaged_files()` data function ([67dc0a9])
+- **git**: `_lp_git_unstaged_lines()` data function ([70b4ef6])
+- **git**: `_lp_git_untracked_files()` data function ([fe9919f])
+- **git**: Caching for diff data functions that share targets (`files()` + `lines()`) ([8bf1772])
+- **hg**: `_lp_hg_active()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_bookmark()` data function ([f4636e6])
+- **hg**: `_lp_hg_commit_id()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_head_status()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_stash_count()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_tag()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_uncommitted_files()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_uncommitted_lines()` data function ([1a9fcd0])
+- **hg**: `_lp_hg_untracked_files()` data function ([1a9fcd0])
+- **hostname**: `__lp_hostname_hash()` internal function ([8f730c8])
+- **jobs**: `$LP_ENABLE_DETACHED_SESSIONS` config option, separate from jobs ([f9038e0], [862dcfb], [#552])
+- **jobs**: `_lp_detached_sessions()` data function ([73f2057], [862dcfb])
+- **jobs**: `_lp_jobcount()` data function ([73f2057])
+- **load**: `LP_LOAD_CAP` config option ([#650], [#530], [e058b61])
+- **load**: `_lp_load()` data function ([8a987f4])
+- **path**: `LP_COLOR_PATH_LAST_DIR` config option ([ae769dc])
+- **path**: `LP_COLOR_PATH_SEPARATOR` config option ([ae769dc])
+- **path**: `LP_COLOR_PATH_SHORTENED` config option ([ae769dc])
+- **path**: `LP_COLOR_PATH_VCS_ROOT` config option ([ae769dc])
+- **path**: `LP_PATH_CHARACTER_KEEP` config option ([ae769dc])
+- **path**: `LP_PATH_METHOD` config option ([ae769dc])
+- **path**: `LP_PATH_VCS_ROOT` config option ([ae769dc])
+- **path**: `_lp_path_format()` data function ([#648], [#349], [#149], [ae769dc])
+- **path**: `__lp_end_path_left_shortening()` internal function ([ae769dc])
+- **path**: `__lp_get_unique_directory()` internal function ([ae769dc])
+- **runtime**: `_lp_runtime_format()` data function ([0f0fd37])
+- **svn**: `_lp_svn_active()` data function ([4fff496])
+- **svn**: `_lp_svn_commit_id()` data function ([4fff496])
+- **svn**: `_lp_svn_uncommitted_files()` data function ([4fff496])
+- **svn**: `_lp_svn_uncommitted_lines()` data function ([4fff496])
+- **svn**: `_lp_svn_untracked_files()` data function ([4fff496])
+- **temperature**: `_lp_temperature()` as data function ([69c75a3])
+- **terminal**: `_lp_terminal_device()` data function ([5076dbe])
+- **tests**: Shunit2 testing suite ([#469], [46918f6], [44e3a6f], [1fe1559])
+- **tests**: Tests to check if a shell supports all features that Liquidprompt
+  needs ([46918f6], [5a9293d], [1fe1559])
+- **tests**: Tests for `_lp_as_text()` ([6cdb860])
+- **tests**: Tests for `_lp_battery()`/`acpi` ([cef9cb1])
+- **tests**: Tests for `_lp_battery()`/`pmset` ([c0e74b8], [9e205f5], [37db052])
+- **tests**: Tests for `_lp_connection()`/`who`+`ps` ([23eb3f2], [37db052], [cef9cb1])
+- **tests**: Tests for `__lp_cpu_count()`/`ncpu` ([37db052])
+- **tests**: Tests for `_lp_cpu_load()`/`sysctl` ([37db052])
+- **tests**: Tests for `_lp_detached_sessions()`/`screen`+`tmux` ([23eb3f2], [37db052], [cef9cb1])
+- **tests**: Tests for `__lp_hostname_hash()` internal function ([8f730c8], [37db052])
+- **tests**: Tests for `__lp_is_function()` util function ([9b40ca1])
+- **tests**: Tests for `__lp_line_count()` util function ([a314677])
+- **tests**: Tests for `__lp_pwd_tilde()` path function ([28c13f2])
+- **tests**: Tests for `__lp_temp_sensors()`/`sensors` ([23eb3f2], [cef9cb1])
+- **tests**: Tests for `_lp_terminal_device()` data function ([5076dbe], [37db052], [cef9cb1])
+- **tests**: Github Actions build file ([#469], [05e0a50])
+- **tests**: Github Actions documentation linting ([#649], [30f977b])
+- **theme**: `__lp_theme_bash_complete()` to complete themes in Bash for `lp_theme()` ([884c069])
+- **theme**: `__lp_theme_list()` to list themes loaded in function memory ([884c069])
+- **theme**: `__lp_theme_zsh_complete()` to complete themes in Zsh for `lp_theme()` ([884c069])
+- **theme**: `_lp_default_theme_activate()` theme function ([40c4331], [45f8091])
+- **theme**: `_lp_default_theme_directory()` theme function ([40c4331], [45f8091])
+- **theme**: `_lp_default_theme_prompt()` theme function ([40c4331], [45f8091], [acb5430])
+- **theme**: `_lp_default_theme_prompt_data()` theme function ([acb5430])
+- **theme**: `_lp_default_theme_prompt_template()` theme function ([acb5430])
+- **theme**: `lp_theme()` to switch themes without resourcing any
+  files ([45f8091], [884c069], [#592])
+- **theme**: `alternate_vcs`, the default theme with modified VCS display ([#635], [#524], [2d659f0])
+- **theme**: `powerline_full`, the default theme order in Powerline style ([bcefaf3])
+- **theme**: `powerline`, a clone of the Powerline prompt ([af8382b], [8de1a72], [5ef795d], [#520])
+- **time**: `_lp_analog_time()` data function ([8cb609d], [bc120d5])
+- **time**: `_lp_analog_time_color()` theme function ([8cb609d], [bc120d5])
+- **time**: `_lp_time()` data function ([bc120d5])
+- **time**: `_lp_time_color()` theme function ([bc120d5])
+- **title**: `lp_formatted_title()` sets persistent title stripping terminal formatting
+  sequences ([46df995], [9604203])
+- **title**: `_lp_raw_title()` sets persistent title without stripping terminal formatting
+  sequences ([46df995])
+- **title**: `lp_title()` sets a manual title that overrides the theme set title ([46df995], [#609])
+- **tools**: `external-tool-tester.sh` script to generate test data ([b699dea], [9a00ead], [4b7fd88])
+- **tools**: `theme-preview.sh` script to generate standard prompt previews ([0b94b74])
+- **utils**: `__lp_is_function()` util function ([9b40ca1])
+- **utils**: `__lp_line_count()` util function ([a314677])
+- **vcs**: `_lp_find_vcs()` to quickly find nearest VCS repo ([f434b6d], [#524])
+- **vcs**: `_lp_vcs_active()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_bookmark()` data function ([f4636e6], [#524])
+- **vcs**: `_lp_vcs_branch()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_commit_id()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_commits_off_remote()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_details_color()` to format VCS details regardless of VCS
+  type ([cafb8b2], [f4636e6], [5c56e65], [#524])
+- **vcs**: `_lp_vcs_head_status()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_stash_count()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_tag()` data function ([cafb8b2], [#506], [#524])
+- **vcs**: `_lp_vcs_uncommitted_files()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_uncommitted_lines()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_unstaged_files()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_unstaged_lines()` data function ([cafb8b2], [#524])
+- **vcs**: `_lp_vcs_untracked_files()` data function ([cafb8b2], [#524])
+
+### Fixed
+- **general**: Issues with custom `$IFS` ([e48856b], [4ebc26e])
+- **general**: Liquidprompt is now `set -u` compatable ([#354], [a8aa8c9], [cb9d71b])
+- **acpi**: Temperature check printed each temp twice, slowing down check ([cf8bf97])
+- **acpi**: Temperature check used extended sed syntax without declaring extended language ([eb30942])
+- **battery**: Color display would break with custom `$LP_COLORMAP` array ([f3f20ec])
+- **runtime**: DEBUG trap was not unset if `$LP_ENABLE_RUNTIME_BELL` was disabled ([cb9d71b])
+- **sensors**: Redirect sensors error output to `/dev/null` ([#445], [4a52696])
+- **time**: Add default value for `$LP_TIME_ANALOG` ([f8c1c47])
+- **vcs**: VCS display for new VCS works without needing to change directories ([f434b6d])
+
+### Changed
+- **general**: Exit if shell is in interactive mode ([f2276fc])
+- **general**: Load all functions at source time, not only ones enabled by the
+  config ([e1f8bd5], [8cb609d])
+- **general**: Remove subshells to improve speed ([#607], [9ba6e86], [e2ba86e])
+- **general**: Remove uses of eval improve speed and security ([4fff496], [1a56d58])
+- **color**: Better handling when `tput` is not found ([09cfced])
+- **fossil**: Remove `sed` call in `_lp_fossil_branch()` ([6d94db6])
+- **git**: `_lp_git_branch()` only returns a matching branch, not a fallback commit ID. Use
+  `_lp_git_commit_id()` instead ([70b4ef6])
+- **git**: `_lp_git_head_status()` add more matches from official git prompt, as well as details
+  for partial rebases ([#527], [5c56e65])
+- **jobs**: Use `__lp_line_count()` instead of `wc -l` for data function ([fb123f4])
+- **load**: Display actual load average instead of normalized ([#650], [#530], [e058b61])
+- **load**: `LP_LOAD_THRESHOLD` accepts floats of actual load average instead of integer centiload ([#650], [#530], [e058b61])
+- **load**: Default color scale cap from 1.0 to 2.0 ([#650], [#530], [5069c22])
+- **path**: `LP_COLOR_PATH` default changed from `$BOLD` to `lp_terminal_format 255 0 0 0 7` (no longer bold) ([ae769dc])
+- **runtime**: Save bell escape sequence on startup to save time when sending bell to terminal
+  with runtime bell ([3e615cd])
+- **svn**: `_lp_svn_branch()` prefixes tag with "tag/", no longer returns current directory if no
+  match found ([4fff496])
+- **zsh**: Add check for Zsh >= 5.0, the versions now officially supported ([5bd80ce])
+
+### Removed
+- **tests**: `pmset-simulator` file, now integrated into `pmset` tests above ([c0e74b8])
+- **tests**: `test.sh` file, unit tests integrated into `acpi` tests above ([f445eff])
+- **vcsh**: `$LP_ENABLE_VCSH` config option, which did nothing ([f86a097])
+
+## [1.12.1] - 2020-10-25
+### Fixed
+- **fossil**: fossil 2.11+ maching any directory as a valid repo and printing
+  3 error messages ([#626])
+
+## [1.12.0] - 2020-07-17
+### Added
+- **color**: Add `$MAGENTA`, `$BOLD_PURPLE`, and `$BOLD_MAGENTA` ([3fadce9])
+- **color**: Add warning when `tput` is not available ([#615])
+- **path**: Allow to customize the symbol before the path that shows if the
+  directory is writable: `$LP_MARK_PERM` ([#430])
+- **runtime**: `$LP_RUNTIME_BELL` and `$LP_RUNTIME_BELL_THRESHOLD` to ring bell
+  for slow commands ([#571])
+
+### Fixed
+- **general**: use `LC_ALL=C` everywhere parsable output is needed ([#548], [#549])
+- **general**: set specific `IFS` everywhere it is used ([#613])
+- **bash**: workaround broken .bashrc that export `$PROMPT_COMMAND`, we now
+  unexport it on startup ([#450], [#463], [#474])
+- **bash**: handle unset `$_LP_RUNTIME_LAST_SECONDS` when `set -u` is set ([#605])
+- **bash**: use `$BASH_VERSINFO` for when there is a non-numeric
+  suffix ([#522], [0234a58])
+- **battery/OS X**: newer versions of OS X failing to parse ([#476], [fefbe01])
+- **color**: `$LP_COLORMAP` would break if customized with a different sized
+  array ([a70e80f])
+- **color**: `_lp_color_map()` would return nothing if the passed in value was
+  outside the scale range ([a70e80f], [#455], [#499], [#604])
+- **cpu/SunOS**: failing math operation on load average ([#479], [#480])
+- **fossil**: improve branch name detection, don't match tags ([#497])
+- **git**: remove `-E` from grep check for portablility ([#508])
+- **git**: modifications incorrectly showing as untracked files ([#509])
+- **git**: changed line check failing if file named "HEAD" existed ([#517])
+- **hg**: modifications incorrectly showing as untracked files ([#509])
+- **hostname**: regression in `$LP_ENABLE_FQDN` implementation ([#472])
+- **hostname/SunOS**: `$LP_COLOR_HOST_HASH` erroring ([#461], [#462], [9c1c8a3])
+- **jobs**: mispelled variable local declaration ([#564])
+- **root**: `$LP_MARK_DEFAULT` being ignored if root ([#501], [5ee3c53])
+- **runtime**: when runtime enabled, `$_` would evaluate as
+  `_lp_runtime_before` ([#451])
+- **runtime**: when running a multipart command line (with pipes or `;`),
+  runtime would never show. Now shows runtime of whole pipeline ([#614])
+- **tmux**: tmux not showing as multiplexer if custom `$TERM` set ([#563])
+
+### Changed
+- **battery**: hide battery symbol when neither charging nor discharging ([#582])
+- **color**: optimize `tput` color gen ([d62bf31])
+- **git**: faster `git stash` check ([#503], [93df016])
+
+## [1.11] - 2016-06-25 - dolmen (Olivier Mengué)
+### Fixed
+- **OS X**: sudo feature fixed ([#443])
+- **OS X**: battery level restored ([#444])
+
+## [1.10] - 2016-05-30 - dolmen (Olivier Mengué)
+### BREAKING CHANGES
+- **config**: Many `$LP_ENABLE_*` settings are now static (their effect applies
+  when liquidprompt is loaded, and changing them at the prompt does nothing)
+  to improve speed.
+- **screen**: `$LP_SCREEN_TITLE_OPEN` and `$LP_SCREEN_TITLE_CLOSE` are now
+  removed to simplify the code ([#371])
+- **zsh**: option 'nopromptsubst' is enabled for security reasons. This will
+  unfortunately also affect evaluations of other prompt contexts such as
+  RPS1. ([282359a], [#432])
+
+### Deprecated
+- **color**: `$LP_COLORMAP_x` variables are replaced by a single `$LP_COLORMAP`
+  array variable. A warning will be displayed at startup if your config still
+  uses the old variables, but a compatibility shim is active (will be removed
+  in v2.1). ([6961f99])
+
+### Added
+- **git**: show the number of commits behind the remote ([#110], [#269], [48f1b02])
+- **git**: show the rebasing/merging/cherry-picking state ([#409], [5cfd2c2])
+- **hostname**: `$LP_ENABLE_FQDN` to show the fully qualified domain name of
+  the host ([#254], [#277], [695d629])
+- **hostname**: `LP_HOSTNAME_ALWAYS=-1` to always hide the
+  hostname ([#406], [d9cb55d])
+- **python**: add support for Conda (CONDA_DEFAULT_ENV) ([#425], [07be967])
+- **sudo**: the color of the prompt mark is now dynamic and changes to
+  `$LP_COLOR_MARK_SUDO` (default: bold red) as long as your sudo credentials
+  are cached. Requires sudo 1.7.0+. This feature must be enabled with
+  `LP_ENABLE_SUDO=1`. Use `sudo -K` to revoke your credentials early. This
+  feature is disabled by default as there is no way to detect if the user has
+  sudo rights without triggering a security alert that will annoy the
+  sysadmin ([#335], [#345], [a8571bb])
+- **tty**: `$LP_TTYN`: the basename of the terminal ([#357], [a97c0da], [f436867])
+- **zsh**: run duration of the last command (`LP_ENABLE_RUNTIME`) is now
+  supported ([#404], [#355])
+
+### Fixed
+- **general**: last statement of liquidprompt did not return 0 ([#360], [#361])
+- **general**: better support for `set -u` ([a8114dd])
+- **bash**: bash 3 compatibility, remove `function` syntax ([#313], [3079299])
+- **battery/OS X**: handle battery edge cases. We now have a pmset simulator to
+  better detect regressions ([#326], [fabc775])
+- **compat**: broken path inside Midnight Commander ([#288])
+- **config**: Use $XDG_CONFIG_HOME to locate the config ([#415], [#420], [#427])
+- **cpu**: fix the scale that was incorrectly 0-200 (not an ideal
+  fix) ([#391], [e9c35dd])
+- **examples**: example.bashrc major fixes ([fdbd7ca])
+- **fossil/OS X**: tag regexp to work on darwin ([#390])
+- **git**: broken git work directory detection caused by typo ([64029ad])
+- **grep**: clear GREP_OPTIONS and skip `grep` aliases ([#340], [#372])
+- **path**: issues when $PWD contains spaces or special chars ([#369], [0e0cc12])
+- **path**: escaping of special chars from $PWD (well, almost, see [#389])
+- **path**: fix path growing with extra color codes each time directory is
+  changed ([b53e53b])
+- **temp**: try each backend (acpi/sensors) once to check it works at startup
+  and disable the feature if none works. ([#410], [#319], [#381], [#387])
+- **temp**: the 'sensors' command now uses the '-u' option ("raw
+  output") that is easier to parse. This format is at least 7 years
+  old. ([#379], [#380])
+- **temp**: fix failing regex on bash ([1fc0308])
+- **term**: fix detection of connection source for tmux ([#304], [#407])
+- **title**: terminal sequences that were sent in the title text (the escaping
+  algorithm is rewritten and now just correct) ([#416], [8605378])
+- **zsh**: enable word splitting to fix `$LP_DISABLED_VCS_PATH` ([#423])
+- **zsh**: fix `LP_PATH_KEEP=-1` not working ([#433])
+- **zsh**: fix title escapes in zsh inside tmux/screen ([#370], [#371])
+- **zsh**: rename `$status` variable in `_lp_battery()` ([#334], [0f80162])
+- **zsh**: save and restore a prompt set with zsh' promptinit ([02bc49e])
+- **zsh**: use zsh style symbol when `prompt_OFF()` ([eb6dafc])
+
+### Changed
+- **bash**: disable parameter expansion in PS1 ([c3d4970])
+- **clock**: complete rewrite of analog clock for speed and
+  correctness ([#365], [0548290])
+- **dist**: Move dist/ to contrib/dist/ as files there are unmaintained ([cf01d02])
+- **jobs**: optimize job count, espceially when disabled ([aa870b5])
+- **path**: optimize implementation in case of `LP_PATH_KEEP=-1`: `$LP_PWD`
+  becomes static ([7602c09], [#256])
+- **path**: optimize implementation in case `LP_ENABLE_SHORTEN_PATH=0` on bash
+  with `$PROMPT_DIRTRIM` ([8da3314])
+- **runtime**: refactor runtime system ([03c73fe], [d485ed1])
+- **zsh**: disable `$PROMPT_COMMAND` hacks and only use zsh built in
+  hooks ([5fa9054])
+- **zsh**: disable existing hooks at startup ([454112f])
+- **zsh**: explicitely set the shell options we need (instead of relying on
+  the shell default settings) ([282359a])
+
+## [1.9] - 2014-11-12 - dolmen (Olivier Mengué)
+### Added
+- **temp/linux** guard against any future language change of the `acpi`
+  command ([1c65748])
+- **vcsh**: vcsh support ([#148], [#287], [e927985])
+- **venv**: support for Software Collections ([#299], [#300], [cc1be7e])
+
+### Fixed
+- **general**: lots of varable quoting fixes
+- **general**: save user IFS and restore it to avoid echo ([#267], [782fad0])
+- **bash**: save and set shell option promptvars ([62f0270])
+- **bash**: workaround broken pattern substitution in bash
+  4.2 ([#289], [#294], [#302], [5813a71])
+- **battery**: general fixes ([#265])
+- **battery/OS X**: fix for computers without battery (like iMacs) ([#317])
+- **bazar**: `_lp_bzr_branch_color()` for zsh ([#301], [#303])
+- **clock**: fix analog clock hour for 12AM and 12PM ([#273])
+- **color**: fix `tput` usage on BSDs ([4572bd0])
+- **git**: count merge commits when checking differences with remote
+  branch ([7e7734e])
+- **git**: use --porcelain for `git status` ([#270], [89540d3])
+- **hostname**: fix colorization for SSH ([9633ac8])
+- **jobs**: fix when screen/tmux are not installed ([#304], [07d18d4])
+- **mark**: losing space when `$LP_MARK_DEFAULT` not quoted ([#268], [c9bdefe])
+- **screen**: counting screen sessions running with extra
+  parameters ([#261], [5f8fcc4])
+- **svn**: fix branch/tag name extraction ([#117], [#237], [c98f16d])
+- **svn**: support paths that are not branches or trunk ([#293], [5425a5e])
+- **temp/linux** fix for negative temperature values ([#308], [7402f79])
+- **term**: fix `$TERM` check ([#291], [dc7be25])
+- **zsh**: make `$LP_OLD_PROMPT_COMMAND` work ([81b080e])
+
+### Changed
+- **general**: apply some shellcheck.com suggestions
+- **color**: optimize colormap when `LP_PERCENT_ALWAYS=1` ([ee63435])
+- **fossil**: cleanup and optimization ([#274])
+- **git**: minor optimization ([#266])
+- **git**: simplify working tree detection ([0e0cc87])
+- **hg**: disabled `hg outgoing` because it is slow ([#217])
+- **hg**: general cleanup for speed and fixes ([dd9a024])
+
+### Removed
+- **general**: `$LP_LIQUIDPROMPT`, use `$LP_OLD_PS1` for the same check ([ed4f383])
+
+## [1.8] - 2014-01-15 - dolmen (Olivier Mengué)
+
+## [1.7] - 2013-11-30 - nojhan
+
+## [1.6] - 2013-05-14 - nojhan
+
+## [1.5] - 2013-04-20 - nojhan
+
+## [1.4] - 2013-04-11 - nojhan
+
+## [1.3] - 2013-03-11 - nojhan
+
+## [1.2] - 2013-01-16 - nojhan
+
+## [1.1] - 2012-08-16 - nojhan
+
+## [1.0] - 2012-08-10 - nojhan
+
+[Unreleased]: https://github.com/nojhan/liquidprompt/compare/v2.0.2...master
+[2.0.2]: https://github.com/nojhan/liquidprompt/releases/tag/v2.0.2
+[2.0.1]: https://github.com/nojhan/liquidprompt/releases/tag/v2.0.1
+[2.0.0]: https://github.com/nojhan/liquidprompt/releases/tag/v2.0.0
+[1.12.1]: https://github.com/nojhan/liquidprompt/releases/tag/v1.12.1
+[1.12.0]: https://github.com/nojhan/liquidprompt/releases/tag/v1.12.0
+[1.11]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.11
+[1.10]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.10
+[1.9]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.9
+[1.8]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.8
+[1.7]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.7
+[1.6]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.6
+[1.5]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.5
+[1.4]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.4
+[1.3]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.3
+[1.2]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.2
+[1.1]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.1
+[1.0]: https://github.com/nojhan/liquidprompt/releases/tag/v_1.0
+
+[#110]: https://github.com/nojhan/liquidprompt/issues/110
+[#117]: https://github.com/nojhan/liquidprompt/issues/117
+[#148]: https://github.com/nojhan/liquidprompt/issues/148
+[#149]: https://github.com/nojhan/liquidprompt/issues/149
+[#217]: https://github.com/nojhan/liquidprompt/issues/217
+[#237]: https://github.com/nojhan/liquidprompt/issues/237
+[#254]: https://github.com/nojhan/liquidprompt/pull/254
+[#256]: https://github.com/nojhan/liquidprompt/issues/256
+[#261]: https://github.com/nojhan/liquidprompt/pull/261
+[#265]: https://github.com/nojhan/liquidprompt/pull/265
+[#266]: https://github.com/nojhan/liquidprompt/pull/266
+[#267]: https://github.com/nojhan/liquidprompt/pull/267
+[#268]: https://github.com/nojhan/liquidprompt/pull/268
+[#269]: https://github.com/nojhan/liquidprompt/pull/269
+[#270]: https://github.com/nojhan/liquidprompt/pull/270
+[#273]: https://github.com/nojhan/liquidprompt/pull/273
+[#274]: https://github.com/nojhan/liquidprompt/pull/274
+[#277]: https://github.com/nojhan/liquidprompt/pull/277
+[#287]: https://github.com/nojhan/liquidprompt/pull/287
+[#288]: https://github.com/nojhan/liquidprompt/issues/288
+[#289]: https://github.com/nojhan/liquidprompt/issues/289
+[#291]: https://github.com/nojhan/liquidprompt/issues/291
+[#293]: https://github.com/nojhan/liquidprompt/pull/293
+[#294]: https://github.com/nojhan/liquidprompt/pull/294
+[#299]: https://github.com/nojhan/liquidprompt/pull/299
+[#300]: https://github.com/nojhan/liquidprompt/pull/300
+[#301]: https://github.com/nojhan/liquidprompt/issues/301
+[#302]: https://github.com/nojhan/liquidprompt/pull/302
+[#303]: https://github.com/nojhan/liquidprompt/pull/303
+[#304]: https://github.com/nojhan/liquidprompt/issues/304
+[#308]: https://github.com/nojhan/liquidprompt/pull/308
+[#313]: https://github.com/nojhan/liquidprompt/pull/313
+[#317]: https://github.com/nojhan/liquidprompt/pull/317
+[#319]: https://github.com/nojhan/liquidprompt/pull/319
+[#326]: https://github.com/nojhan/liquidprompt/issues/326
+[#334]: https://github.com/nojhan/liquidprompt/pull/334
+[#335]: https://github.com/nojhan/liquidprompt/issues/335
+[#340]: https://github.com/nojhan/liquidprompt/pull/340
+[#345]: https://github.com/nojhan/liquidprompt/issues/345
+[#349]: https://github.com/nojhan/liquidprompt/issues/349
+[#354]: https://github.com/nojhan/liquidprompt/issues/354
+[#355]: https://github.com/nojhan/liquidprompt/pull/355
+[#357]: https://github.com/nojhan/liquidprompt/pull/357
+[#360]: https://github.com/nojhan/liquidprompt/issues/360
+[#361]: https://github.com/nojhan/liquidprompt/pull/361
+[#365]: https://github.com/nojhan/liquidprompt/pull/365
+[#369]: https://github.com/nojhan/liquidprompt/pull/369
+[#370]: https://github.com/nojhan/liquidprompt/issues/370
+[#371]: https://github.com/nojhan/liquidprompt/pull/371
+[#372]: https://github.com/nojhan/liquidprompt/pull/372
+[#379]: https://github.com/nojhan/liquidprompt/issues/379
+[#380]: https://github.com/nojhan/liquidprompt/pull/380
+[#381]: https://github.com/nojhan/liquidprompt/pull/381
+[#387]: https://github.com/nojhan/liquidprompt/pull/387
+[#389]: https://github.com/nojhan/liquidprompt/issues/389
+[#390]: https://github.com/nojhan/liquidprompt/pull/390
+[#391]: https://github.com/nojhan/liquidprompt/pull/391
+[#404]: https://github.com/nojhan/liquidprompt/pull/404
+[#406]: https://github.com/nojhan/liquidprompt/pull/406
+[#407]: https://github.com/nojhan/liquidprompt/issues/407
+[#409]: https://github.com/nojhan/liquidprompt/pull/409
+[#410]: https://github.com/nojhan/liquidprompt/issues/410
+[#415]: https://github.com/nojhan/liquidprompt/issues/415
+[#416]: https://github.com/nojhan/liquidprompt/pull/416
+[#420]: https://github.com/nojhan/liquidprompt/issues/420
+[#423]: https://github.com/nojhan/liquidprompt/pull/423
+[#425]: https://github.com/nojhan/liquidprompt/pull/425
+[#427]: https://github.com/nojhan/liquidprompt/pull/427
+[#430]: https://github.com/nojhan/liquidprompt/pull/430
+[#432]: https://github.com/nojhan/liquidprompt/pull/432
+[#433]: https://github.com/nojhan/liquidprompt/pull/433
+[#443]: https://github.com/nojhan/liquidprompt/pull/443
+[#444]: https://github.com/nojhan/liquidprompt/pull/444
+[#445]: https://github.com/nojhan/liquidprompt/issues/445
+[#450]: https://github.com/nojhan/liquidprompt/issues/450
+[#451]: https://github.com/nojhan/liquidprompt/issues/451
+[#455]: https://github.com/nojhan/liquidprompt/pull/455
+[#461]: https://github.com/nojhan/liquidprompt/issues/461
+[#462]: https://github.com/nojhan/liquidprompt/pull/462
+[#463]: https://github.com/nojhan/liquidprompt/issues/463
+[#469]: https://github.com/nojhan/liquidprompt/issues/469
+[#472]: https://github.com/nojhan/liquidprompt/issues/472
+[#474]: https://github.com/nojhan/liquidprompt/issues/474
+[#476]: https://github.com/nojhan/liquidprompt/pull/476
+[#479]: https://github.com/nojhan/liquidprompt/issues/479
+[#480]: https://github.com/nojhan/liquidprompt/pull/480
+[#486]: https://github.com/nojhan/liquidprompt/issues/486
+[#497]: https://github.com/nojhan/liquidprompt/pull/497
+[#499]: https://github.com/nojhan/liquidprompt/issues/499
+[#501]: https://github.com/nojhan/liquidprompt/issues/501
+[#503]: https://github.com/nojhan/liquidprompt/pull/503
+[#506]: https://github.com/nojhan/liquidprompt/issues/506
+[#508]: https://github.com/nojhan/liquidprompt/pull/508
+[#509]: https://github.com/nojhan/liquidprompt/pull/509
+[#517]: https://github.com/nojhan/liquidprompt/issues/517
+[#520]: https://github.com/nojhan/liquidprompt/issues/520
+[#522]: https://github.com/nojhan/liquidprompt/issues/522
+[#523]: https://github.com/nojhan/liquidprompt/pull/523
+[#524]: https://github.com/nojhan/liquidprompt/issues/524
+[#524]: https://github.com/nojhan/liquidprompt/issues/524
+[#527]: https://github.com/nojhan/liquidprompt/issues/527
+[#530]: https://github.com/nojhan/liquidprompt/issues/530
+[#543]: https://github.com/nojhan/liquidprompt/issues/543
+[#548]: https://github.com/nojhan/liquidprompt/issues/548
+[#549]: https://github.com/nojhan/liquidprompt/pull/549
+[#552]: https://github.com/nojhan/liquidprompt/issues/552
+[#563]: https://github.com/nojhan/liquidprompt/issues/563
+[#564]: https://github.com/nojhan/liquidprompt/issues/564
+[#571]: https://github.com/nojhan/liquidprompt/pull/571
+[#581]: https://github.com/nojhan/liquidprompt/issues/581
+[#582]: https://github.com/nojhan/liquidprompt/pull/582
+[#592]: https://github.com/nojhan/liquidprompt/issues/592
+[#604]: https://github.com/nojhan/liquidprompt/pull/604
+[#605]: https://github.com/nojhan/liquidprompt/pull/605
+[#607]: https://github.com/nojhan/liquidprompt/issues/607
+[#609]: https://github.com/nojhan/liquidprompt/issues/609
+[#613]: https://github.com/nojhan/liquidprompt/issues/613
+[#614]: https://github.com/nojhan/liquidprompt/issues/614
+[#615]: https://github.com/nojhan/liquidprompt/issues/615
+[#625]: https://github.com/nojhan/liquidprompt/pull/625
+[#626]: https://github.com/nojhan/liquidprompt/issues/626
+[#635]: https://github.com/nojhan/liquidprompt/pull/635
+[#637]: https://github.com/nojhan/liquidprompt/pull/637
+[#644]: https://github.com/nojhan/liquidprompt/issues/644
+[#648]: https://github.com/nojhan/liquidprompt/pull/648
+[#649]: https://github.com/nojhan/liquidprompt/pull/649
+[#650]: https://github.com/nojhan/liquidprompt/pull/650
+[#656]: https://github.com/nojhan/liquidprompt/issues/656
+[#657]: https://github.com/nojhan/liquidprompt/issues/657
+[#658]: https://github.com/nojhan/liquidprompt/issues/658
+[#670]: https://github.com/nojhan/liquidprompt/issues/670
+[#671]: https://github.com/nojhan/liquidprompt/pull/671
+
+[0200b99]: https://github.com/nojhan/liquidprompt/commit/0200b99ebd8485ba8ba2c91da7703e87c40ec15d
+[0234a58]: https://github.com/nojhan/liquidprompt/commit/0234a581d023fb6c40e5339f6dcbd619a33b4553
+[02bc49e]: https://github.com/nojhan/liquidprompt/commit/02bc49edf306749c47d7a389dc916cb68e992cc8
+[03434d3]: https://github.com/nojhan/liquidprompt/commit/03434d388686792b6ed2aa0bf0e09851c90a7479
+[03c73fe]: https://github.com/nojhan/liquidprompt/commit/03c73fe05e5a3b48252a9f527e6e62666afbd726
+[0548290]: https://github.com/nojhan/liquidprompt/commit/05482901fe86788032ab4089525c415384937a24
+[05e0a50]: https://github.com/nojhan/liquidprompt/commit/05e0a502e8ae4e2a4711f5222f39c2589c6f582f
+[07be967]: https://github.com/nojhan/liquidprompt/commit/07be96765bbd742c5c2846ef6adbb0c253948216
+[07d18d4]: https://github.com/nojhan/liquidprompt/commit/07d18d4ca3f4a77377591d62dc054e00f4616cc7
+[09cfced]: https://github.com/nojhan/liquidprompt/commit/09cfced24745dd7aea086a292ab042f070ce4fbb
+[0b94b74]: https://github.com/nojhan/liquidprompt/commit/0b94b74d02046077a21d3fb83842c6a1fe74f6e5
+[0d420d2]: https://github.com/nojhan/liquidprompt/commit/0d420d2f3ac84a83e150110f9e09fc21e919df7f
+[0e0cc12]: https://github.com/nojhan/liquidprompt/commit/0e0cc12fabc474b6c0cfed7abf80c9f61efb68fc
+[0e0cc87]: https://github.com/nojhan/liquidprompt/commit/0e0cc870c2dcf3fbfed1b2e187e918d74dd6d3db
+[0f0fd37]: https://github.com/nojhan/liquidprompt/commit/0f0fd3739a8dd9821b34b78859de13b47b2d856d
+[0f80162]: https://github.com/nojhan/liquidprompt/commit/0f80162f1f22277e497b69f243894a87fcaec643
+[13e128b]: https://github.com/nojhan/liquidprompt/commit/13e128bb320034a0303f7354fad66a5674c6b4da
+[1a56d58]: https://github.com/nojhan/liquidprompt/commit/1a56d58d4e63f395545fed820278c5b4561dfa95
+[1a9fcd0]: https://github.com/nojhan/liquidprompt/commit/1a9fcd0944711ccab20045e5a3f3bde9d7f0ec59
+[1c65748]: https://github.com/nojhan/liquidprompt/commit/1c657481fd3481720b54187f9aa464df0e62a3f2
+[1fc0308]: https://github.com/nojhan/liquidprompt/commit/1fc030813069ebc0cfc0542d049a9e4998100490
+[1fe1559]: https://github.com/nojhan/liquidprompt/commit/1fe1559ebb18ae2ff39e1c4703a06d35f0f6538f
+[22dd760]: https://github.com/nojhan/liquidprompt/commit/22dd760926c3a7b8e4f4fa28902d43b06e68e6a8
+[230c9d7]: https://github.com/nojhan/liquidprompt/commit/230c9d7d45c10b8f319b9d5c64b4fd59261c8008
+[23eb3f2]: https://github.com/nojhan/liquidprompt/commit/23eb3f23b633a8e849f91867948c96976108df6b
+[282359a]: https://github.com/nojhan/liquidprompt/commit/282359a4b7c80a6032ec043eddb1bf378084e64e
+[28c13f2]: https://github.com/nojhan/liquidprompt/commit/28c13f27e652b84373a7c73389cbd0a5a10b88c3
+[2d659f0]: https://github.com/nojhan/liquidprompt/commit/2d659f04628a804409e6262733f0f909c3c2675b
+[3079299]: https://github.com/nojhan/liquidprompt/commit/3079299f816ee2d893c2b7c2284e9e6034164d16
+[309b443]: https://github.com/nojhan/liquidprompt/commit/309b443461a25f552754663d3d67a5ee0f97571f
+[30f977b]: https://github.com/nojhan/liquidprompt/commit/30f977b09f6ee36c38e1ec07a272b5b0e621729f
+[37db052]: https://github.com/nojhan/liquidprompt/commit/37db052c18d99fc36f4c4a4ede798155e519e2ca
+[3e615cd]: https://github.com/nojhan/liquidprompt/commit/3e615cded01b583870a7e6e9529f341280eb40a6
+[3f57231]: https://github.com/nojhan/liquidprompt/commit/3f57231d73112ea1090e3a607539e515f21de794
+[3fadce9]: https://github.com/nojhan/liquidprompt/commit/3fadce962396d6d3a1f7c2c8e23c1d9fdc22c098
+[40c4331]: https://github.com/nojhan/liquidprompt/commit/40c4331f6eda1cb836e8ae62426cb7755fdec371
+[44e3a6f]: https://github.com/nojhan/liquidprompt/commit/44e3a6fe8ea9aa61f7cedb32286eb321fc93c6ed
+[454112f]: https://github.com/nojhan/liquidprompt/commit/454112f385c49e0bdf408ffd6123f8eaa39d0b0c
+[4572bd0]: https://github.com/nojhan/liquidprompt/commit/4572bd02fa289b989de3d24e246be187dbd25f65
+[45f8091]: https://github.com/nojhan/liquidprompt/commit/45f80913da7aaf869a80288c5433c4d71ffc28c4
+[461f0ee]: https://github.com/nojhan/liquidprompt/commit/461f0ee05e1466a0f14afebcbc2aaeabe711e38a
+[46918f6]: https://github.com/nojhan/liquidprompt/commit/46918f62ef80f26bec379a5542d669654e5e3280
+[46df995]: https://github.com/nojhan/liquidprompt/commit/46df99503698c838ad6bb9c030a271e9fda87b15
+[48f1b02]: https://github.com/nojhan/liquidprompt/commit/48f1b022dd078ce45f786a28dbe75a8acea37031
+[4a52696]: https://github.com/nojhan/liquidprompt/commit/4a526965cba546978423a4d51bfbb0a2d1000246
+[4b7fd88]: https://github.com/nojhan/liquidprompt/commit/4b7fd88da0777d005d67d28d285be9255f1666c7
+[4ebc26e]: https://github.com/nojhan/liquidprompt/commit/4ebc26e92be20ddf5d068fb25d2cecfcf479c1ea
+[4fff496]: https://github.com/nojhan/liquidprompt/commit/4fff49644a86fe93f1373825f09e1b1fdfb20f54
+[5069c22]: https://github.com/nojhan/liquidprompt/commit/5069c22dbece5ef8726b1393df5ae91550a2b3fe
+[5076dbe]: https://github.com/nojhan/liquidprompt/commit/5076dbe68788586f317c4d0590e1ea60e4dec07a
+[5425a5e]: https://github.com/nojhan/liquidprompt/commit/5425a5eb56433d4332441d37eae69d159ab456c1
+[5813a71]: https://github.com/nojhan/liquidprompt/commit/5813a710fc0feb2970e1d1e6615f822777b111c7
+[58693b0]: https://github.com/nojhan/liquidprompt/commit/58693b0664964e2a06b46fa8d5bdffd23ada417f
+[5a9293d]: https://github.com/nojhan/liquidprompt/commit/5a9293db78cad4739f2b105e1c438d21372c25f1
+[5bd80ce]: https://github.com/nojhan/liquidprompt/commit/5bd80ce1da07adc501a46c375eae0ca741f3960e
+[5c56e65]: https://github.com/nojhan/liquidprompt/commit/5c56e65888d92f9f0239096c02ac86e568d53ad1
+[5cfd2c2]: https://github.com/nojhan/liquidprompt/commit/5cfd2c2e7a892d1435cfd7b61cce697d5658db5c
+[5ee3c53]: https://github.com/nojhan/liquidprompt/commit/5ee3c53cbbc95b5288fe5baf5a3c5b21d2a7212d
+[5ef795d]: https://github.com/nojhan/liquidprompt/commit/5ef795d262839e99183db00a3dc7572e06f9b610
+[5f8fcc4]: https://github.com/nojhan/liquidprompt/commit/5f8fcc46eade20015291833118055b7cd76a5c0a
+[5fa9054]: https://github.com/nojhan/liquidprompt/commit/5fa905481c9c7c4579cadc0065648b6617b9c775
+[62f0270]: https://github.com/nojhan/liquidprompt/commit/62f0270888ec668ec50df2af826727ca8ba9d6c6
+[63b9f73]: https://github.com/nojhan/liquidprompt/commit/63b9f73d72218d4e72c0d43bc6a60a82ea0e15e8
+[64029ad]: https://github.com/nojhan/liquidprompt/commit/64029ad75d108a0619958c337fd64fe18560988e
+[67dc0a9]: https://github.com/nojhan/liquidprompt/commit/67dc0a9ae9eebf0c2b85b4ee6fc2d6b5562b6412
+[695d629]: https://github.com/nojhan/liquidprompt/commit/695d629dd5cf7109e8892075d4cf7fadd8c17d94
+[6961f99]: https://github.com/nojhan/liquidprompt/commit/6961f998b83f491995ce731bd232c5170cf4be5f
+[69c75a3]: https://github.com/nojhan/liquidprompt/commit/69c75a3e6c4998d682e480fb3df935e4eb224444
+[6cdb860]: https://github.com/nojhan/liquidprompt/commit/6cdb86006e4d2ad6dee06e60e229842144305594
+[6d94db6]: https://github.com/nojhan/liquidprompt/commit/6d94db6de7de879c14da842df535163a57dce638
+[6ea54e9]: https://github.com/nojhan/liquidprompt/commit/6ea54e91f84be1c491314c3680e82b06d769218e
+[70b4ef6]: https://github.com/nojhan/liquidprompt/commit/70b4ef65c034c5050173dbe70178b459e5acddc2
+[73f2057]: https://github.com/nojhan/liquidprompt/commit/73f205748fe6f09abcfe01ec150a456518aecc18
+[7402f79]: https://github.com/nojhan/liquidprompt/commit/7402f79a7518e74e16d36c74e8b5943d11f390d7
+[7602c09]: https://github.com/nojhan/liquidprompt/commit/7602c09fd7754f371db98bfad15bc075ef1ec93a
+[782fad0]: https://github.com/nojhan/liquidprompt/commit/782fad08fd37cbf2144ea203430f37608b156ae8
+[78dee3c]: https://github.com/nojhan/liquidprompt/commit/78dee3c70ab73eee04a5e869172e5f07ac916774
+[7c21470]: https://github.com/nojhan/liquidprompt/commit/7c214708d72a4fa7d298678167450693a1ffbc00
+[7e7734e]: https://github.com/nojhan/liquidprompt/commit/7e7734e6247a1b32d636b5e39fe99d8d23dde669
+[81b080e]: https://github.com/nojhan/liquidprompt/commit/81b080e2a6e6c24a3bab9348c187fb308c25ffe8
+[82ee823]: https://github.com/nojhan/liquidprompt/commit/82ee823e9cd2fb8581b653b38c4ea501b795a607
+[8605378]: https://github.com/nojhan/liquidprompt/commit/86053782d08b0d41ca69f4f45dde9ce619db1008
+[862dcfb]: https://github.com/nojhan/liquidprompt/commit/862dcfbe6c82bf4e4125cf584a010161a533b917
+[884c069]: https://github.com/nojhan/liquidprompt/commit/884c0697b71b0f87e2ea2a88159e08d33d3c6088
+[89540d3]: https://github.com/nojhan/liquidprompt/commit/89540d312543b897b3c116370deabdfe9db15dcb
+[8a987f4]: https://github.com/nojhan/liquidprompt/commit/8a987f436ffc6144eab1dadaacad9c460b9bfa1f
+[8bf1772]: https://github.com/nojhan/liquidprompt/commit/8bf1772d771904bd2095a974b35795c9db2c96cc
+[8cb609d]: https://github.com/nojhan/liquidprompt/commit/8cb609d49cc1ba92f09adc87e3fbed243d04626e
+[8da3314]: https://github.com/nojhan/liquidprompt/commit/8da33144c89075dfd2309feaa718ccf3fe693ff6
+[8de1a72]: https://github.com/nojhan/liquidprompt/commit/8de1a729f7190612d573218625dc1aaf4c2f78bf
+[8f730c8]: https://github.com/nojhan/liquidprompt/commit/8f730c8eb7b2488093db47045db1bcd239b02b9a
+[9038ec8]: https://github.com/nojhan/liquidprompt/commit/9038ec8884f11f7cf47fbfee1c86b9dbf6440307
+[93df016]: https://github.com/nojhan/liquidprompt/commit/93df0169499c4ca8563add267e95dcd343d95f12
+[954bace]: https://github.com/nojhan/liquidprompt/commit/954bace48637528795743785c4cc8cb42f204a7e
+[9604203]: https://github.com/nojhan/liquidprompt/commit/9604203fb9f90b44a8c806f32e7746588b70a83b
+[9633ac8]: https://github.com/nojhan/liquidprompt/commit/9633ac83cad5f5702c1e853940c0ab2e166961bf
+[9a00ead]: https://github.com/nojhan/liquidprompt/commit/9a00eada113cb1d5e33aa177f5b9180c25d6a843
+[9b40ca1]: https://github.com/nojhan/liquidprompt/commit/9b40ca139a43e51b4d0fbdc780d0661bfffbf6ae
+[9ba5d28]: https://github.com/nojhan/liquidprompt/commit/9ba5d2824571d41c1aa7a3573a3cf17ed729f2bb
+[9ba6e86]: https://github.com/nojhan/liquidprompt/commit/9ba6e86f8200c08543502185447185a5a4089685
+[9c1c8a3]: https://github.com/nojhan/liquidprompt/commit/9c1c8a378846c23e0a39be2aadd11531c2ecf196
+[9c6d073]: https://github.com/nojhan/liquidprompt/commit/9c6d073e3cc7a49cfce209ce4307881d70340161
+[9e205f5]: https://github.com/nojhan/liquidprompt/commit/9e205f51db459443e5c2ead0efa76f6a33c47c24
+[a314677]: https://github.com/nojhan/liquidprompt/commit/a314677b8031804130c69de94d4604e9c319575a
+[a35032f]: https://github.com/nojhan/liquidprompt/commit/a35032fe03ab3d84093141c403a7c6615f7c38d9
+[a70e80f]: https://github.com/nojhan/liquidprompt/commit/a70e80f0f501031ef97ea8baf88ca6d7ef56ad8a
+[a8114dd]: https://github.com/nojhan/liquidprompt/commit/a8114dd9550e2e7fd33b93eb7885de08b3e64933
+[a8571bb]: https://github.com/nojhan/liquidprompt/commit/a8571bb2920d9f11006754e634304242d929db57
+[a8aa8c9]: https://github.com/nojhan/liquidprompt/commit/a8aa8c94ca6b3d6486195a2d03cf7868d995f3a2
+[a97c0da]: https://github.com/nojhan/liquidprompt/commit/a97c0da0e6a6f037a6038c427a51a9ee840b45f2
+[aa870b5]: https://github.com/nojhan/liquidprompt/commit/aa870b54d27cd6deda50a24f2030511d8a23c45e
+[acb5430]: https://github.com/nojhan/liquidprompt/commit/acb54302d9711c6b7b8b68bc8a692ef232fb09d4
+[ae769dc]: https://github.com/nojhan/liquidprompt/commit/ae769dc9a71df27c24025a6bd29e840f4d97ce08
+[af8382b]: https://github.com/nojhan/liquidprompt/commit/af8382b56833e8ce08834c61c70c6eda805b413f
+[afe3195]: https://github.com/nojhan/liquidprompt/commit/afe319526a14e6ab73fba175c06e7a45188a37c4
+[b1a3145]: https://github.com/nojhan/liquidprompt/commit/b1a3145ae5432e39ff85d144207eb490f3af341a
+[b523025]: https://github.com/nojhan/liquidprompt/commit/b523025221c2c9084a933cf545fa9cb999916323
+[b53e53b]: https://github.com/nojhan/liquidprompt/commit/b53e53b6a5a5b783896b8fd75d341dbb1d7d5e5c
+[b699dea]: https://github.com/nojhan/liquidprompt/commit/b699dea7aec3b081292becf52fa1899fe82c3c8b
+[bb19836]: https://github.com/nojhan/liquidprompt/commit/bb198362d78310905ef213bbdedce1ace5002b99
+[bc120d5]: https://github.com/nojhan/liquidprompt/commit/bc120d50c265ece6158317ddea0488919e0747dd
+[bcefaf3]: https://github.com/nojhan/liquidprompt/commit/bcefaf32e9e301e13706fc5c39de814c1a2630aa
+[bf2b9c6]: https://github.com/nojhan/liquidprompt/commit/bf2b9c60a788c32f38078f580b79ba80540d3bdf
+[c0e74b8]: https://github.com/nojhan/liquidprompt/commit/c0e74b8953db777e1ae84fa5faa3620af5247511
+[c3d4970]: https://github.com/nojhan/liquidprompt/commit/c3d49708e598a79eca50caa0f96fca6230ce204e
+[c7b5003]: https://github.com/nojhan/liquidprompt/commit/c7b5003616d769ac1a4edc06d28ba6b84bfe0418
+[c946155]: https://github.com/nojhan/liquidprompt/commit/c9461552d9618548d4a858b0153671cf0fdbdac3
+[c98f16d]: https://github.com/nojhan/liquidprompt/commit/c98f16d52f9cc22723679124c3d64b06cbcb6e6e
+[c9bdefe]: https://github.com/nojhan/liquidprompt/commit/c9bdefe020c30bb053c0815a1633e5e3be25e4ef
+[cad6286]: https://github.com/nojhan/liquidprompt/commit/cad6286b6f923376a05ebe8c13a4302e91a9cfe3
+[cafb8b2]: https://github.com/nojhan/liquidprompt/commit/cafb8b2e5388fd9336c316248908881a8d66a4a5
+[cb9d71b]: https://github.com/nojhan/liquidprompt/commit/cb9d71b952954006ebedd66a7ea63de7562f9676
+[cc1be7e]: https://github.com/nojhan/liquidprompt/commit/cc1be7e29d1b7fa6ef25e960e02da6612ff8bde9
+[cef9cb1]: https://github.com/nojhan/liquidprompt/commit/cef9cb1581a419f7c7248954069fd0d4e5966284
+[cf01d02]: https://github.com/nojhan/liquidprompt/commit/cf01d02445c38ee9504bad00f079af080a7bdfe2
+[cf8bf97]: https://github.com/nojhan/liquidprompt/commit/cf8bf97b01a83a939eadc31b9da806172c91c444
+[d485ed1]: https://github.com/nojhan/liquidprompt/commit/d485ed191fb6b896290a32848c4fefd0342e2046
+[d62bf31]: https://github.com/nojhan/liquidprompt/commit/d62bf310d0d5a30fac6d047f03d832b81070c884
+[d9cb55d]: https://github.com/nojhan/liquidprompt/commit/d9cb55da834720ac3cd4893bb4a35808ab67d376
+[dc11eb4]: https://github.com/nojhan/liquidprompt/commit/dc11eb48ecb133930355f396578e5c9b06b49afc
+[dc7be25]: https://github.com/nojhan/liquidprompt/commit/dc7be2540d677600a484dcd0c2d05dc0945382e5
+[dd9a024]: https://github.com/nojhan/liquidprompt/commit/dd9a024b485d9c017aa935809bd20e7436dff46c
+[debb794]: https://github.com/nojhan/liquidprompt/commit/debb794bf2f99ab53d539e5080f0b28579333cb8
+[decaece]: https://github.com/nojhan/liquidprompt/commit/decaece03b9bfe826d7f33a3fb56dfb33916884a
+[e058b61]: https://github.com/nojhan/liquidprompt/commit/e058b619ce80918d3cdf924e07220a7028a8bb1b
+[e121179]: https://github.com/nojhan/liquidprompt/commit/e121179d1bb943ec3673e451deac2a0577adbb75
+[e122d21]: https://github.com/nojhan/liquidprompt/commit/e122d21ba14f2bdfe5fa88b70083249456c67b5b
+[e1f8bd5]: https://github.com/nojhan/liquidprompt/commit/e1f8bd585d5dfc41d21d4bf88343f3a30fb3d071
+[e2ba86e]: https://github.com/nojhan/liquidprompt/commit/e2ba86e0e5fc8bf5191cf8d8ac6aa1cd2b81a596
+[e48856b]: https://github.com/nojhan/liquidprompt/commit/e48856b59e51731b7accab27e679154bcff53ed4
+[e5047c0]: https://github.com/nojhan/liquidprompt/commit/e5047c0bbc1e95f811ae56265306851d3d5769e4
+[e843ccf]: https://github.com/nojhan/liquidprompt/commit/e843ccfd7c719f84baf7e628697f78ff59703e5d
+[e927985]: https://github.com/nojhan/liquidprompt/commit/e9279856c4af191d501e8e46898dde3b4447e6dd
+[e9c35dd]: https://github.com/nojhan/liquidprompt/commit/e9c35ddeb473da1ac24eb27331b8974f3ba05237
+[eb30942]: https://github.com/nojhan/liquidprompt/commit/eb309422009c8f8e2a105381317b71ace5d42e13
+[eb6dafc]: https://github.com/nojhan/liquidprompt/commit/eb6dafc314a3dc1fc5ca560d79c408db81af0288
+[ed4f383]: https://github.com/nojhan/liquidprompt/commit/ed4f3832fe2f7380ec1b7949777fffe2a7f63f34
+[edc490f]: https://github.com/nojhan/liquidprompt/commit/edc490f3a3e92e9b0a94e9021a0589d64c6a7881
+[ee63435]: https://github.com/nojhan/liquidprompt/commit/ee6343567d2178cd57daa89498868be6ea2ef156
+[f2276fc]: https://github.com/nojhan/liquidprompt/commit/f2276fc29530fcba63bd5602364e20187a8d44c6
+[f3404f9]: https://github.com/nojhan/liquidprompt/commit/f3404f99d3c08a5811eec0a8c326abe6763c6c14
+[f35d9ac]: https://github.com/nojhan/liquidprompt/commit/f35d9acfddacc1f7f74174b45cf4c4aa9c84beca
+[f3f20ec]: https://github.com/nojhan/liquidprompt/commit/f3f20ecbe0309842ab43d36c006e75928cd5dae4
+[f434b6d]: https://github.com/nojhan/liquidprompt/commit/f434b6dc663d704e9d616b8864908371862b9e23
+[f436867]: https://github.com/nojhan/liquidprompt/commit/f4368670bf258257fece5611a9aad17e88f10b5a
+[f445eff]: https://github.com/nojhan/liquidprompt/commit/f445eff684558e8bf200df2f3f897c09374b7d6c
+[f4636e6]: https://github.com/nojhan/liquidprompt/commit/f4636e66455a80586f20bb1ea9624a15299cea58
+[f4afc5d]: https://github.com/nojhan/liquidprompt/commit/f4afc5d0a8f776c96308001fcdae4a5aa1dac2bd
+[f681cdf]: https://github.com/nojhan/liquidprompt/commit/f681cdf9d8dd1d847aaf5f0b69222606a181c648
+[f86a097]: https://github.com/nojhan/liquidprompt/commit/f86a097d5eb9cab2a2fbca7629e9c2c389f1e12e
+[f8c1c47]: https://github.com/nojhan/liquidprompt/commit/f8c1c4770aab0a1c15f3e17b0b47a421f024f1b7
+[f9038e0]: https://github.com/nojhan/liquidprompt/commit/f9038e0331df1dfedbeb442c84ec62d63a90c37d
+[f9fd12e]: https://github.com/nojhan/liquidprompt/commit/f9fd12eed963ce2d64762e09b04adb06e00692a4
+[fabc775]: https://github.com/nojhan/liquidprompt/commit/fabc775cb8bfe1be5a39cf577d2d2187398881b0
+[fb123f4]: https://github.com/nojhan/liquidprompt/commit/fb123f4c5eee08c265eb91cc5a4d3de7e9c6c75d
+[fdbd7ca]: https://github.com/nojhan/liquidprompt/commit/fdbd7ca545a2847fb3e862a6088740aa2a06c799
+[fe9919f]: https://github.com/nojhan/liquidprompt/commit/fe9919f5e7dc01ba59cc85a128fea94e5b2163c4
+[fefbe01]: https://github.com/nojhan/liquidprompt/commit/fefbe01d9830a9033bdb008c454c0d0590548638
diff -pruN 1.11-3/CHANGES 2.0.3-1/CHANGES
--- 1.11-3/CHANGES	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/CHANGES	1970-01-01 00:00:00.000000000 +0000
@@ -1,189 +0,0 @@
-
-1.11    2016-06-25
-	Bug fixes:
-	- OS X: sudo feature fixed
-	- OS X: battery level restored
-
-1.10    2016-05-30
-	Breaking changes:
-	- In themes, LP_COLORMAP_x variables are replaced by a single
-	  LP_COLORMAP array variable. A warning will be displayed at startup
-	  if your config still uses the old variables, but a compatibility
-	  shim is active (will be removed in next release).
-	- Many LP_ENABLE_* settings are now static (their effect applies when
-	  liquidprompt is loaded, and changing them at the prompt does nothing)
-	  to more and more improve speed.
-	- zsh: option 'nopromptsubst' is enabled for security reasons.
-          This will unfortunately also affect evaluations of other prompt
-	  contexts such as RPS1.
-	- Variables LP_SCREEN_TITLE_OPEN and LP_SCREEN_TITLE_CLOSE are now
-          removed to simplify the code (GitHub #371)
-	New features:
-	- Sudo:
-	    * The color of the prompt mark is now dynamic and changes to
-	      LP_COLOR_MARK_SUDO (default: bold red) as long as your sudo
-	      credentials are cached (GitHub #335).
-	      Requires sudo 1.7.0+.
-	      This feature must be enabled with LP_ENABLE_SUDO=1
-	      Use 'sudo -K' to revoke your credentials early.
-	    * This feature is disabled by default as there is no way to
-	      detect if the user has sudo rights without triggering a security
-	      alert that will annoy the sysadmin.
-	- Git:
-	    * Show the number of commits behind the remote (GitHub #269)
-	    * Show the rebasing/merging/cherry-picking state (GitHub #409)
-	- Add variable LP_TTYN: the basename of the terminal (GitHub #357)
-	- Add setting LP_ENABLE_FQDN to show the fully qualified domain name
-	  of the host (GitHub #254, #277)
-        - LP_HOSTNAME_ALWAYS=-1 to always hide the hostname (GitHub #406)
-	- Run duration of the last command (LP_ENABLE_RUNTIME) is now also
-	  supported on zsh (GitHub #404, #355)
-	- Python: add support for Conda (CONDA_DEFAULT_ENV) (GitHub #425)
-	Bug fixes:
-	- Use $XDG_CONFIG_HOME to locate the config (GitHub #415, #420, #425)
-	- Improved zsh integration (but most issues had no impact of the
-	  user experience)
-	- Fix escaping of special chars from $PWD (well, almost, see GitHub
-	  #389) and explicitely set the shell options we need (instead of
-	  relying on the shell default settings)
-	- Git:
-	    * Fix typo in git work directory detection
-	- Fossil:
-	    * Fix on darwin (GitHub #390)
-	- LP_DISABLED_VCS_PATH is fixed on zsh (GitHub #423)
-	- Battery indicator:
-	    * MacOS: many fixes to handle (all?) edge cases (GitHub #326)
-	      We now have a pmset simulator to better detect regressions.
-	- Temperature indicator:
-	    * The code using the 'sensors' command now uses the '-u' option
-	      ("raw output") that is easier to parse. This format is at least
-	      7 years old. (GitHub #379, #380)
-	    * We now try each backend (acpi/sensors) once to check it works
-	      at startup and disable the feature if none works.
-	      (GitHub #410, #319, #381, #387)
-	- CPU load indicator:
-	    * Fix the scale that was incorrectly 0-200 (GitHub #391)
-	- Title:
-	    * Fix terminal sequences that were sent in the title text (the
-	      escaping algorithm is rewritten and now just correct).
-	- Terminal channel:
-	    * Fix detection of tmux (GitHub #304, #377)
-            * Fix detection of local session on OS X (GitHub #407)
-	- Misc:
-	    * Fix bash 3 compatibility (GitHub #313)
-	    * Clear GREP_OPTIONS and skip 'grep' aliases (GitHub #372)
-	- Shortened path:
-	    * Fix bugs when $PWD contains spaces or special chars (GitHub #369)
-	    * Optimize implementation in case of LP_PATH_KEEP=-1 : LP_PWD
-	      becomes static (related to GitHub #256, #336)
-	    * Optimize implementation in case LP_ENABLE_SHORTEN_PATH=0
-	    * Optimize implementation in case LP_ENABLE_SHORTEN_PATH=0 on bash
-	      with PROMPT_DIRTRIM
-	- Sample configuration files:
-	    * example.bashrc: major fixes
-	- The last statement of liquidprompt did not return 0 (GitHub #360,#361)
-	- Analog clock:
-	    * complete rewrite for speed and correctness (GitHub #365 and other
-	      issues)
-	- Documentation:
-	    * Many small fixes
-	- Move dist/ to contrib/dist/ as files there are unmaintained
-	- Fix title escapes in zsh inside tmux/screen (GitHub #370, #371)
-
-	Thanks to Matt Fletcher (@MaffooBristol), Kevin Yap (@iKevinY), Sean
-	Hussey (@seanhussey), François Schmidts (@jaesivsm), Morgan Knicely
-	(@morganizeit), Daniel Serodio (@dserodio), Jonathan Giddy
-	(@jongiddy), Jeremy Clement (@jeremyclement), Panayiotis Kkolos
-	(@pkkolos), Arturo Borrero Gonzalez (@aborrero), Samuel Krieg
-	(@SamK), Brian May (@brianmay), Colin Lieberman (@colinlieberman),
-	@hegedus, Anthony Gelibert (@anthonygelibert), Anthony Ramine (@nox),
-	Erik M Jacobs (@thoraxe), Pedro Parracho (@berserck), Brad Beyenhof
-	(@augmentedfourth), Austen Adler (@stonewareslord), Hagen Graf
-	(@hcgraf), William P. Riley-Land (@wprl), Dave Rigby (@daverigby),
-	Ned Batchelder (@nedbat), Fabien Marty (@thefab), Alessio Garzi
-	(@Ozzyboshi), Roger Huang (@rhuang2014), Sebastian Bremicker
-	(@sebrem), Alex Prengere (@alexprengere), Philipp Grogg (@gro-gg),
-	Tener Hades (@tenerhades), Thomas Kühnel (@kuehnelth), Étienne Deparis
-	(@milouse), @Hotschke, Software Mechanic (@softwaremechanic), Simon
-	McVittie (@smcv)...
-	... for their patches or bug reports.
-
-1.9     2014-11-12  dolmen (Olivier Mengué)
-	Bug fixes:
-	- Battery indicator:
-	    * General fixes (GitHub #264)
-	    * MacOS: fix for computers without battery (like iMacs) (GitHub
-	      #319)
-	    * Optimize colormap
-	- Temperature indicator:
-	    * Linux: Add a guard against any future l10n of the 'acpi' command
-	    * Linux: Fix for negative temperature values (GitHub #308)
-	- CPU load:
-	    * Darwin/BSD: quoting fixes
-	- Hostname:
-	    * Fix colorization for SSH
-	    * Simplify chroot detection
-	- VCS:
-	    - Git:
-		* Use --porcelain for "git status" (GitHub #270)
-		* Minir optimization (GitHub #266)
-	    - Fossil:
-		* Cleanup and fixes (GitHub #274 and others)
-	    - Subversion:
-		* Fix branch/tag name extraction (GitHub #117, #237, #293)
-	    - Bazar:
-		* Fix branch name extraction
-		* zsh fixes (GitHub #303)
-	    - Mercurial:
-		* General cleanup for speed and fixes
-		* Disabled "hg outgoing" because it is slow (GitHub #217)
-	- Shortened path:
-	    * Bash: Fix quoting for PROMPT_DIRTRIM
-	- Prompt mark:
-	    * Simplify implementation of LP_MARK_DEFAULT
-	- Jobs:
-	    * Refactoring
-	    * Fix when screen/tmux are not installed (GitHub #304)
-	- Analog clock:
-	    * Fix hour for 12AM and 12PM (GitHub #273)
-	- Misc:
-	    * bash: save and set 'promptvars'
-	    * bash: workaround broken pattern substitution in bash 4.2 (GitHub
-	      #289, #294, #302)
-	    * zsh: fix restoration of the original (pre-liquidprompt) prompt
-	    * Fix tmux detection (GitHub #279)
-	    * Save IFS (GitHub #267)
-	    * Fix $TERM check (GitHub #291)
-	    * Various quoting fixes
-	    * Apply some shellcheck.com suggestions
-	    * Many, many optimizations (GitHub #267)
-	New features:
-	- Add vcsh support (GitHub #148, #287)
-	- Add support for Software Collections (GitHub #299, #300)
-
-	Thanks to Anthony Gelibert, Frédéric Mahé, Panayiotis Kkolos, Étienne
-	Deparis, François Schmidts, Linus Wallgren, Alexander Belaev, Bartosz
-	Janda, Brett McBride, Chase Colman, Cosmin L. Neagu, Matthew Micene,
-	Vincent Lara, Wilson Maravilha and Yannack for their patches. Thanks
-	to all the other contributors who reported issues or proposed patches
-	that have not been applied.
-
-1.8     2014-01-15  dolmen (Olivier Mengué)
-
-1.7     2013-11-30  nojhan
-
-1.6     2013-05-14  nojhan
-
-1.5     2013-04-20  nojhan
-
-1.4     2013-04-11  nojhan
-
-1.3     2013-03-11  nojhan
-
-1.2     2013-01-16  nojhan
-
-1.1     2012-08-16  nojhan
-
-1.0     2012-08-10  nojhan
-
-0.0     2011-02-05  nojhan
diff -pruN 1.11-3/contrib/README 2.0.3-1/contrib/README
--- 1.11-3/contrib/README	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/contrib/README	1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-
-liquidprompt/contrib Policy
----------------------------
-
-This directory contains files that have been contributed by contributors
-but that the core liquidprompt maintainers don't take care.
-So they are probably outdated, maybe of poor quality (because the maintainers
-do not have the knowledge to properly review them).
-
-So use them at your own risks, and don't fill issues about them, just send
-patches.
-
diff -pruN 1.11-3/contrib/README.md 2.0.3-1/contrib/README.md
--- 1.11-3/contrib/README.md	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/contrib/README.md	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,23 @@
+# liquidprompt/contrib Policy
+
+This directory contains files that have been contributed by contributors
+but that the core Liquidprompt maintainers do not maintain.
+So they are probably outdated and possibly poor quality (because the maintainers
+may not have the knowledge to properly review them).
+
+So use them at your own risk, and do not open issues about them, just send
+patches.
+
+## Contributing
+
+First check the project [Contributing document](../CONTRIBUTING.md).
+
+Second, make sure you include documentation with what you are adding. Just
+because we hold the content of this directory to a lower standard does not mean
+we allow missing documentation. Add a README.md file to the top-level directory
+that you are adding.
+
+Lastly, if you would like to voluteer as the maintainer for some content in
+here, please clearly document that in the README for your content. Make sure to
+add how you would like to be contacted: via email, Github issue, or whatever
+else.
diff -pruN 1.11-3/CONTRIBUTING.md 2.0.3-1/CONTRIBUTING.md
--- 1.11-3/CONTRIBUTING.md	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/CONTRIBUTING.md	2021-05-30 15:33:14.000000000 +0000
@@ -1,14 +1,69 @@
-Contributing to Liquid Prompt
-=============================
+# Contributing to Liquid Prompt
 
-Contributing a patch
---------------------
+### I don't want to read this whole thing, I just have a question!!!
 
-The public stable branch for end users is `master`.
+Please don't file an issue to ask a question. You'll get faster results by
+using the resources below.
 
+## Did you find a bug?
 
-How to do the right thing?
---------------------------
+* **Check the [FAQs](https://github.com/nojhan/liquidprompt/wiki/FAQ)**. We
+  try to keep it updated with the latest hot questions.
+
+* **Ensure the bug was not already reported** by searching on GitHub under
+  [Issues](https://github.com/nojhan/liquidprompt/issues). If there is an open
+  issue that matches your problem, you can add a comment to the issue if you
+  have something new or helpful to add. If your comment would be ":+1:",
+  please add that as a reaction on the issue instead.
+
+* **Ensure you can reproduce the issue on the latest version**. Not only the
+  latest released version, but the latest commit on the `master` branch. While
+  it might not be the version you are using right now, if the bug doesn't exist
+  on the `master` branch, we have already fixed it.
+
+* If you're unable to find an open issue addressing the problem, [open a new
+  one](https://github.com/nojhan/liquidprompt/issues/new/choose). Be sure to
+  include a **title and clear description**, as much relevant information as
+  possible, such as shell version, and a **code sample** or a **test case**
+  demonstrating the expected behavior that is not occurring. If we can't
+  reproduce the bug, we can't fix it, so make sure to include as much
+  information as possible.
+
+## Enhancement / Feature request
+
+Same as with bugs, **check the [FAQs](https://github.com/nojhan/liquidprompt/wiki/FAQ)
+and open [Issues](https://github.com/nojhan/liquidprompt/issues)** so you don't
+duplicate a feature request.
+
+[Open a new Issue](https://github.com/nojhan/liquidprompt/issues/new/choose),
+and add as much detail as you can. Make sure to at least explain:
+
+1. **Why** you want this feature. How will it be useful to users?
+2. **What** tools it will interact with (ex: `git`). Provide links.
+3. **An example** of what it would look like in the prompt.
+
+The more details you can give, the more likely someone will be inspired to work
+on it.
+
+## Contributing a patch
+
+### Your first contribution / what can I help with?
+If you just want to help, but don't have a specific issue in mind, you can
+look at the [help wanted](https://github.com/nojhan/liquidprompt/labels/help%20wanted)
+tagged issues.
+
+### Code style and standards
+[Google's shell style guide](https://google.github.io/styleguide/shellguide.html)
+is our style guide, with the following modifications:
+
+* 4 spaces indentation
+* Don't always prefer `${var}` over `$var` (see standards)
+* Use `typeset`, not `local` or `declare` (see standards)
+
+See our [shell standards wiki page](https://github.com/nojhan/liquidprompt/wiki/Shell-standards)
+for our standards on shell language.
+
+### How do I make a pull request??
 
     $ git clone -o upstream git://github.com/nojhan/liquidprompt.git
     $ cd liquidprompt
@@ -18,11 +73,11 @@ How to do the right thing?
 
     # Prepare a fix (include the issue number in the branch name if an issue
     # already exists)
-    $ git checkout -b fix/my-fix
+    $ git checkout -b bugfix/my-fix
     # Prepare a new feature
     $ git checkout -b feature/my-feature
 
-    # Hack, commit, hack, commit...
+    # Hack, commit, hack, amend commit...
 
     # Fork the project on GitHub (if you haven't yet)
 
@@ -30,7 +85,7 @@ How to do the right thing?
     $ git remote add github git@github.com:$GITHUB_USER/liquidprompt.git
 
     # Check that your local repo is up to date
-    $ git fetch
+    $ git fetch upstream
     # Rebase your work on the latest state of `master`
     $ git rebase upstream/master
 
@@ -41,9 +96,7 @@ How to do the right thing?
     # Create the pull request on GitHub. Check that Github chose the `master`
     # branch as the starting point for your branch.
 
-
-How to make a good pull request?
---------------------------------
+### How do I make a good pull request?
 
 1. Check that your Git authorship settings are correct:
 
@@ -52,27 +105,46 @@ How to make a good pull request?
 2. All the commits in the pull request must be on the same topic. If instead
    you propose fixes on different topics, use separate branches in your repo
    and make a pull request for each.
-3. Good commit messages:
-     - first line must be 72 chars max and is a summary of the commit
+
+3. Good commit message:
+     - first line must be 50 chars max and is a summary of the commit. The
+       first charcter should be capitalized, no ending period. Use the
+       imperative mood ("fix thing", not "fixes thing" or "fixing thing" or
+       "fixed thing")
      - second line must be empty
-     - following lines (72 chars max) are optional and take this space freely
-       to express what that changes does.
+     - following lines (72 chars max) should describe the what, why, and how
+       of your change. If your change is anything more than one line, this is
+       probably not optional. Think about coming back to this patch in 6
+       months: if you won't remember why you made this change, you need to
+       write it down.
        Use references to GitHub issues number (ex: `#432`) if applicable
-4. Use a good title for your pull request.
-5. Put details, web links, in the pull request body. Use Markdown fully to
-   format the content (see
-   [Markdown syntax](http://daringfireball.net/projects/markdown/syntax)).
-   For example use triple backquotes for code blocks.
+    A good commit message isn't optional. If your commit message is bad (ex:
+    "fix temp for thing"), your PR will be rejected.
+   [See this post](https://chris.beams.io/posts/git-commit/) for even more
+   details on the topic.
 
+4. Use a good title for your pull request.
 
-Never, ever, merge the branches `master` of the main repo into one
-of your own branches. Instead, always rebase your own work on top the `master`
-branch.
+5. Put details, web links, Github issue numbers, in the pull request body. Use
+   Markdown fully to format the content (see
+   [Markdown syntax](https://guides.github.com/features/mastering-markdown/)).
+   For example use triple backquotes for code blocks.
+   Note that if information is important enough to put in the PR description,
+   it is also important enough to put in the commit message.
 
-How my patch will be applied?
------------------------------
+If your branch ever ends up "out of sync" or "conflicts" with the `master`
+branch of the main repo, never, ever, merge the `master` branch into your own
+branch. Instead, always rebase your own work on top of the `master` branch.
+
+### Can I make a pull request without a separate issue for a bug/enhancement?
+Yes, **but**, in that case, the pull request **must have a full description of
+the bug or feature**. Just because you have fixed/implemented it already
+doesn't mean you can skip the details. The reviewers of the pull request still
+need to know all of the information you would normally put in the bug report or
+feature request.
 
-Before being applied, your pull request will be reviewed, by the maintainer
+### How my patch will be applied?
+Before being applied, your pull request will be reviewed by the maintainer
 and also by other users. You can also help the project by reviewing others
 pull requests.
 
@@ -83,11 +155,10 @@ If your patch is accepted it will be app
 
 In any case, your authorship will be preserved in the commit.
 
-What if my patch is not applied?
---------------------------------
-
+### What if my patch is not applied?
 If you don't even get a review, add a "ping" comment with increasing delay
-between pings: 1 week, 2 weeks, then every month.
+between pings: 1 week, 2 weeks, then every month. But I'm trying to do better
+on this than what was happening before.
 
 If a stable version is released while your pull request has still not been
 merged on any working branch of the main repo, it would be helpful to ease
@@ -96,6 +167,4 @@ and push it again to your GitHub repo. B
 branch or a tag before your rebase) because your may lose all your work in
 that process.
 
-
-Olivier Mengué, maintainer.
-http://github.com/dolmen
+[@Rycieos](https://github.com/Rycieos), maintainer.
diff -pruN 1.11-3/CONTRIBUTORS.md 2.0.3-1/CONTRIBUTORS.md
--- 1.11-3/CONTRIBUTORS.md	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/CONTRIBUTORS.md	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,232 @@
+# Contributors
+
+Keeping this list in order of importance or size would be impossible, so it is
+in order of least recent to most recent contribution.
+We thank all our contributors, no matter the size of their contribution.
+
+Please do not open a new issue or pull request just for adding yourself to
+this file. If you made a contribution and got missed, please add a comment
+on the issue or pull request of your contribution, and we will add it.
+
+Thanks again to everyone for all of the help and support!
+
+### Maintainers
+* @nojhan (Original author)
+* Olivier Mengué (@dolmen) (Former lead maintainer)
+* Mark Vander Stel (@Rycieos) (Current lead maintainer)
+
+### Code contributions
+* @nojhan
+* Yann 'Ze' Richard (@Zeuh)
+* Aurélien Requiem (@aureq)
+* François Schmidts (@jaesivsm)
+* Joris Dedieu (@rmdir)
+* Florian Le Frioux (@floweb)
+* Ludovic Rousseau (@LudovicRousseau)
+* Thomas Debesse <thomas.debesse@gmail.com>
+* @Poil
+* Michel Barret (@barmic)
+* Luc Didry (@ldidry)
+* Olivier Mengué (@dolmen)
+* Alex Prengère (@alexprengere)
+* Olivier Dupuis (@ojdupuis)
+* Frédéric Lepied (@flepied)
+* Christophe Drevet <christophe.drevet@cea.fr>
+* Joris Vaillant (@jorisv)
+* Étienne Deparis (@milouse)
+* Clément Mathieu (@cykl)
+* David Loureiro (@dloureiro)
+* Nicolas Lacourte (@nlacourte)
+* Jonas Bengtsson (@jonasb)
+* Stéphane Pajot <pajot.stephane@gmail.com>
+* Brad Beyenhof (@augmentedfourth)
+* Julien Pecqueur (@jpec)
+* Rolf Morel (@rolfmorel)
+* Jean-Sébastien Leroy (@jsleroy)
+* Joseph Bass (@jab416171)
+* Ying Li (@cyli)
+* Daniel Miranda (@danielkza)
+* Brendan Fahy (@f4hy)
+* Young King (@wayhome)
+* Dustin Knie (@nullpuppy)
+* @Cougar
+* Octavian Damiean (@mainerror)
+* Nicolas Pouillard (@np)
+* Olivier Le Thanh Duong (@olethanh)
+* Markus Dreseler (@mrks)
+* Kim Lidström (@dxtr)
+* Taahir Ahmed (@ahmedtd)
+* Ryan Wilson-Perkin (@ryanwilsonperkin)
+* George Macon (@gmacon)
+* Anthony Gelibert (@anthonygelibert)
+* @yannack
+* Felix Chern (@dryman)
+* Kyle P Davis (@KylePDavis)
+* Alexander Belyaev (@alexbel)
+* Cosmin L. Neagu (@clneagu)
+* Brett McBride (@brettmc)
+* Linus Wallgren (@ecksun)
+* Matthew Micene (@nzwulfin)
+* Panagiotis Kkolos (@pkkolos)
+* Chase Colman (@chase)
+* Wilson Maravilha (@wmv)
+* Vincent Lara (@l-vincent-l)
+* Bartosz Janda (@bartoszj)
+* Morgan Knicely (@morganizeit)
+* Austen Adler (@stonewareslord)
+* Jonathan Giddy (@jongiddy)
+* Jeremy Clement (@hexaJer)
+* Samuel Krieg (@SamK)
+* @hegedus
+* Erik Jacobs (@thoraxe)
+* Hagen Graf (@hcgraf)
+* Tener Hades (@clayboone)
+* Philipp Grogg (@gro-gg)
+* @Hotschke
+* Software Mechanic <softwaremechanic32@gmail.com>
+* Simon McVittie (@smcv)
+* Felix Schlitter (@felixSchl)
+* Mark Vander Stel (@Rycieos)
+* Philip Garrison (@pgarrison)
+* Matt Smith (@ncs-msmith)
+* @ste-fan
+* Peter van Dijk (@Habbie)
+* Nolan Leake (@nolanl)
+* Dmitry V. Drozdovich (@thrushcat)
+* Tristan Miller (@logological)
+* Markus Gebert (@mgeb)
+* Tore Anderson (@toreanderson)
+* Fabien MARTY (@thefab)
+* Alessio Garzi (@Ozzyboshi)
+* Mathieu MD (@mathieumd)
+* Romano Giannetti (@Rmano)
+* Paulo Cazarotto (@phcco)
+* Jürgen Weigert (@jnweiger)
+* Sven-Hendrik Haase (@svenstaro)
+* Sandro Jäckel (@SuperSandro2000)
+* David Pape (@zyzzyxdonta)
+* Aksel Sjögren (@akselsjogren)
+* Raina Otoni (@rotoni)
+* Munif Tanjim (@MunifTanjim)
+
+### Code cleanup
+* Aurélien Requiem (@aureq)
+* Olivier Mengué (@dolmen)
+* Roy Wellington Ⅳ (@thanatos)
+* Roland van Laar (@rvanlaar)
+* Nicolás Alvarez (@nicolas17)
+* Frédéric Mahé (@frederic-mahe)
+* Kevin Yap (@iKevinY)
+* Matt Kelly (@mattkelly)
+* Colin Lieberman (@colinlieberman)
+* Bryce Jasmer (@b-jazz)
+
+### Documentation changes / clarifications
+* Arturo Borrero Gonzalez (@aborrero)
+* Brad Beyenhof (@augmentedfourth)
+* John Hamelink (@johnhamelink)
+* @YouthfulIndiscretion
+* Imran Munshi (@imran27)
+
+### Bug reports / Feature requests
+* @skanx
+* Yann 'Ze' Richard (@Zeuh)
+* Michael Grosser (@grosser)
+* Ludovic Rousseau (@LudovicRousseau)
+* Matthias Bussonnier (@Carreau)
+* Guillaume (@Gui13)
+* Olivier Mengué (@dolmen)
+* Alex Prengère (@alexprengere)
+* @nojhan
+* Lorenzo Leonini (@lleonini)
+* @razcampagne
+* Christophe Drevet-Droguet (@dr4Ke)
+* David Loureiro (@dloureiro)
+* Clément Mathieu (@cykl)
+* Guillaume Denry (@Guid75)
+* @gpapia
+* Luc Didry (@ldidry)
+* Mathieu Roche (@mathieuroche)
+* Julien Pecqueur (@jpec)
+* Loïc Guitaut (@Flink)
+* @madmanu
+* @quent57
+* @vicnet
+* Daniel Miranda (@danielkza)
+* Brendan Fahy (@f4hy)
+* Nicolas Pouillard (@np)
+* Richard Hartmann (@RichiH)
+* François Schmidts (@jaesivsm)
+* Anthony Carathimas (@acgreek)
+* Olivier Patry (@opatry)
+* @manitooo
+* Michael Cramer (@mikewebkist)
+* Octavian Damiean (@mainerror)
+* @Cougar
+* Brad Beyenhof (@augmentedfourth)
+* Florian Eitel (@nougad)
+* Kyle P Davis (@KylePDavis)
+* David Holm (@dholm)
+* Pat Ramsey (@patramsey)
+* Sébastien Sanoro (@dereckson)
+* Taahir Ahmed (@ahmedtd)
+* Emmett Butler (@emmett9001)
+* Zak B. Elep (@zakame)
+* André David (@adavidzh)
+* @N-Mi
+* @Cottser
+* José Alberto (@jalberto)
+* Guilherme Semente (@semente)
+* Brad Clements (@bkc)
+* Cosmin L. Neagu (@clneagu)
+* Brett McBride (@brettmc)
+* Andreas Böttger (@aboettger)
+* Chase Colman (@chase)
+* Stefan Wimmer (@wimstefan)
+* Oliver Jan Krylow (@bugabinga)
+* Chris Lasher (@gotgenes)
+* @cato-
+* Matt Fletcher (@MaffooBristol)
+* Bartosz Janda (@bartoszj)
+* Nicola Paolucci (@durdn)
+* Jeremy Clement (@hexaJer)
+* Brian May (@brianmay)
+* Arturo Borrero Gonzalez (@aborrero)
+* Toban Wiebe (@tobanw)
+* Daniel Serodio (@dserodio)
+* Peter VandeHaar (@pjvandehaar)
+* Dave Rigby (@daverigby)
+* Sebastian Bremicker (@sebrem)
+* Simon McVittie (@smcv)
+* Mark Vander Stel (@Rycieos)
+* Jon Garrison (@jpwgarrison)
+* Iain Hallam (@iainhallam)
+* Mathias Picker (@mathiasp)
+* Joey Liu (@liujoey)
+* Florian Pigorsch (@flopp)
+* Daniel Pinyol (@dpinol)
+* Alyssa Ross (@alyssais)
+* Gergo Szonyi (@gex)
+* Nolan Leake (@nolanl)
+* Éloi Rivard (@azmeuk)
+* Felix Eckhofer (@tribut)
+* Paul Lhussiez (@Depado)
+* Cyril Bouthors (@cyril-bouthors)
+* Felix Schlitter (@felixSchl)
+* Christoph Burschka (@cburschka)
+* @dreamcat4
+* Munif Tanjim (@MunifTanjim)
+* @ilovezfs
+* Aleksey Tsalolikhin (@atsaloli)
+* Micah Silverman (@dogeared)
+* Rohan Kapadia (@kapad)
+* Jan Gorecki (@jangorecki)
+* Otto Kekäläinen (@ottok)
+* Mike Simonson (@mikeSimonson)
+* Viorel-Cosmin Miron (@uhlhosting)
+* Dimitrie Hoekstra (@dimitrieh)
+* Hynek Vychodil (@pichi)
+* Ned Batchelder (@nedbat)
+* Gary Wolfman (@OldCrow)
+* @Orgams
+* Andrei Matei (@andreimatei)
diff -pruN 1.11-3/debian/changelog 2.0.3-1/debian/changelog
--- 1.11-3/debian/changelog	2016-10-10 10:15:31.000000000 +0000
+++ 2.0.3-1/debian/changelog	2021-10-31 10:06:21.000000000 +0000
@@ -1,3 +1,49 @@
+liquidprompt (2.0.3-1) unstable; urgency=medium
+
+  [ Arturo Borrero Gonzalez ]
+  * [b239abc] liquidprompt: add pointers to upstream online documentation
+
+  [ Debian Janitor ]
+  * [e4921a2] Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, Repository-Browse.
+  * [92ab386] Use canonical URL in Vcs-Git.
+  * [5002d9e] Update standards version to 4.6.0, no changes needed.
+
+  [ Arturo Borrero Gonzalez ]
+  * [1b27d13] d/: add gitlab-ci.yaml file
+  * [e157c2c] New upstream version 2.0.3 (Closes: #996242)
+  * [8abd4a4] gitignore: ignore quilt .pc/ directory
+  * [12ec2ab] d/patches: refresh debian-default-cfg.patch
+  * [89b5c4b] d/patches: refresh function_prefixes.patch
+
+  [ Christian Göttsche ]
+  * [5103b1d] Specify Rules-Requires-Root: no
+  * [d9a75d6] Update Debian theme
+  * [e8a7e22] Install extra themes
+  * [1ad6def] Quote shell variables to prevent globbing and word splitting
+
+  [ Simon Chopin ]
+  * [daa94eb] tests: make sure we have a proper TERM set
+  * [4077b2e] d/p/unknown-term.patch: safe early return if TERM=unknown
+
+ -- Arturo Borrero Gonzalez <arturo@debian.org>  Sun, 31 Oct 2021 11:06:21 +0100
+
+liquidprompt (1.12.0-1) unstable; urgency=medium
+
+  [ Arturo Borrero Gonzalez ]
+  * [49f1574] d/control: refresh VCS-* URLs
+
+  [ Ondřej Nový ]
+  * [080bdce] d/copyright: Use https protocol in Format field
+
+  [ Arturo Borrero Gonzalez ]
+  * [c587044] New upstream version 1.12.0 (Closes: #966090)
+  * [8c03a25] src:liquidprompt: bump std-version to 4.5.0
+  * [bf9775b] d/control: introduce Multi-Arch: foreign
+  * [c92d0e3] src:liquidprompt: switch to debhelper 12
+  * [877773a] d/patches: refresh patches for new upstream release
+
+ -- Arturo Borrero Gonzalez <arturo@debian.org>  Wed, 09 Sep 2020 10:40:28 +0200
+
 liquidprompt (1.11-3) unstable; urgency=medium
 
   * [4f02df2] d/: update email address to 'arturo@debian.org'
diff -pruN 1.11-3/debian/compat 2.0.3-1/debian/compat
--- 1.11-3/debian/compat	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/compat	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-9
diff -pruN 1.11-3/debian/control 2.0.3-1/debian/control
--- 1.11-3/debian/control	2016-10-10 10:14:23.000000000 +0000
+++ 2.0.3-1/debian/control	2021-10-31 10:06:21.000000000 +0000
@@ -2,14 +2,16 @@ Source: liquidprompt
 Section: misc
 Priority: optional
 Maintainer: Arturo Borrero Gonzalez <arturo@debian.org>
-Build-Depends: debhelper (>= 9)
-Standards-Version: 3.9.8
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.6.0
+Rules-Requires-Root: no
 Homepage: https://github.com/nojhan/liquidprompt
-Vcs-Git: https://github.com/aborrero/pkg-liquidprompt.git
-Vcs-Browser: https://github.com/aborrero/pkg-liquidprompt
+Vcs-Git: https://salsa.debian.org/debian/pkg-liquidprompt.git
+Vcs-Browser: https://salsa.debian.org/debian/pkg-liquidprompt
 
 Package: liquidprompt
 Architecture: all
+Multi-Arch: foreign
 Depends: ${misc:Depends}
 Enhances: screen, sudo, tmux
 Suggests: acpi, lm-sensors
@@ -20,3 +22,5 @@ Description: adaptative prompt for bash
  It shows you what you need when you need it. You will notice what
  changes when it changes, saving time and frustration. You can even use it
  with your favorite shell – bash or zsh.
+ .
+ Find extensive online documentation at https://liquidprompt.readthedocs.io/
diff -pruN 1.11-3/debian/copyright 2.0.3-1/debian/copyright
--- 1.11-3/debian/copyright	2016-10-10 10:11:56.000000000 +0000
+++ 2.0.3-1/debian/copyright	2021-10-31 10:06:21.000000000 +0000
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: liquidprompt
 Source: https://github.com/nojhan/liquidprompt
 
diff -pruN 1.11-3/debian/debian.theme 2.0.3-1/debian/debian.theme
--- 1.11-3/debian/debian.theme	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/debian.theme	2021-10-31 10:06:21.000000000 +0000
@@ -20,6 +20,7 @@ if [[ "$(locale -k LC_CTYPE | sed -n 's/
     LP_MARK_UNTRACKED="*"      # if git has untracked files
     LP_MARK_STASH="+"          # if git has stashs
     LP_MARK_SHORTEN_PATH=" … " # prompt mark in shortened paths
+    LP_MARK_PERM=":"           # separator between host and path
 else
     # If charset is anything else, fallback to ASCII chars
     LP_MARK_BATTERY="b"
@@ -35,6 +36,7 @@ else
     LP_MARK_UNTRACKED="*"
     LP_MARK_STASH="+"
     LP_MARK_SHORTEN_PATH=" ... "
+    LP_MARK_PERM=":"
 fi
 
 LP_MARK_BRACKET_OPEN=""  # open bracket
diff -pruN 1.11-3/debian/gitlab-ci.yaml 2.0.3-1/debian/gitlab-ci.yaml
--- 1.11-3/debian/gitlab-ci.yaml	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/debian/gitlab-ci.yaml	2021-10-31 10:06:21.000000000 +0000
@@ -0,0 +1,7 @@
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+
+variables:
+ RELEASE: 'unstable'
diff -pruN 1.11-3/debian/install 2.0.3-1/debian/install
--- 1.11-3/debian/install	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/install	2021-10-31 10:06:21.000000000 +0000
@@ -1,5 +1,7 @@
-debian/debian.theme		usr/share/liquidprompt
-debian/liquidprompt_activate	usr/bin
-liquid.theme			usr/share/liquidprompt
-liquidprompt			usr/share/liquidprompt
-liquidpromptrc-dist		usr/share/liquidprompt
+debian/debian.theme				usr/share/liquidprompt
+debian/liquidprompt_activate			usr/bin
+liquid.theme					usr/share/liquidprompt
+liquidprompt					usr/share/liquidprompt
+liquidpromptrc-dist				usr/share/liquidprompt
+themes/alternate_vcs/alternate_vcs.theme	usr/share/liquidprompt
+themes/powerline/powerline.theme		usr/share/liquidprompt
diff -pruN 1.11-3/debian/liquidprompt.1 2.0.3-1/debian/liquidprompt.1
--- 1.11-3/debian/liquidprompt.1	2016-10-10 10:12:15.000000000 +0000
+++ 2.0.3-1/debian/liquidprompt.1	2021-10-31 10:06:21.000000000 +0000
@@ -1,6 +1,6 @@
-.\" (C) Copyright 2015 aborrero <arturo@debian.org>
+.\" (C) Copyright 2020 aborrero <arturo@debian.org>
 .\"
-.TH LIQUIDPROMPT 1 "May  7, 2015"
+.TH LIQUIDPROMPT 1 "Dec  16, 2020"
 .SH NAME
 liquidprompt \- A full-featured & carefully designed adaptive prompt for bash & zsh
 .SH DESCRIPTION
@@ -51,7 +51,8 @@ liquidprompt is highly configurable. The
 Please take a look at the included README file at \fB/usr/share/doc/liquidprompt/\fP and the file \fB~/.config/liquidpromptrc\fP as well.
 
 .SH SEE ALSO
-.BR bash(1),
+.BR https://liquidprompt.readthedocs.io/ ,
+.BR bash(1) ,
 .BR zsh(1)
 
 .SH ABOUT
diff -pruN 1.11-3/debian/liquidprompt_activate 2.0.3-1/debian/liquidprompt_activate
--- 1.11-3/debian/liquidprompt_activate	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/liquidprompt_activate	2021-10-31 10:06:21.000000000 +0000
@@ -13,13 +13,13 @@ echo \$- | grep -q i 2>/dev/null && . /u
 "
 
 done=0
-if [ -w $BASHRC ] ; then
-	echo "$RUN" >> $BASHRC
+if [ -w "$BASHRC" ] ; then
+	echo "$RUN" >> "$BASHRC"
 	done=1
 fi
 
-if [ -w $ZSHRC ] ; then
-	echo "$RUN" >> $ZSHRC
+if [ -w "$ZSHRC" ] ; then
+	echo "$RUN" >> "$ZSHRC"
 	done=1
 fi
 
@@ -29,7 +29,7 @@ if [ $done -eq 0 ] ; then
 fi
 
 set -e
-mkdir -p $CFG
-if [ ! -r ${CFG}/${LIQUIDPROMPTRC_NAME} ] ; then
-	cp $LIQUIDPROMPTRC_DIST ${CFG}/${LIQUIDPROMPTRC_NAME}
+mkdir -p "$CFG"
+if [ ! -r "${CFG}/${LIQUIDPROMPTRC_NAME}" ] ; then
+	cp $LIQUIDPROMPTRC_DIST "${CFG}/${LIQUIDPROMPTRC_NAME}"
 fi
diff -pruN 1.11-3/debian/patches/debian-default-cfg.patch 2.0.3-1/debian/patches/debian-default-cfg.patch
--- 1.11-3/debian/patches/debian-default-cfg.patch	2016-10-10 10:12:26.000000000 +0000
+++ 2.0.3-1/debian/patches/debian-default-cfg.patch	2021-10-31 10:06:21.000000000 +0000
@@ -2,11 +2,11 @@ From: Arturo Borrero Gonzalez <arturo@de
 Subject: Debian default configuration
  This patch sets Debian defaults for liquidprompt configuration.
 Forwarded: not-needed
-Last-Update: 2015-06-24
+Last-Update: 2021-10-30
 
 --- a/liquidpromptrc-dist
 +++ b/liquidpromptrc-dist
-@@ -5,7 +5,8 @@
+@@ -9,7 +9,8 @@
  
  # If you want to use different themes and features,
  # you can load the corresponding files here:
@@ -16,7 +16,7 @@ Last-Update: 2015-06-24
  #LP_PS1_FILE=~/.config/liquidprompt/nojhan.ps1
  
  #############
-@@ -36,7 +37,8 @@
+@@ -51,7 +52,8 @@
  # Defaults to 0 (do not display hostname when locally connected)
  # set to 1 if you want to always see the hostname
  # set to -1 if you want to never see the hostname
@@ -24,15 +24,15 @@ Last-Update: 2015-06-24
 +# Debian default is 1
 +LP_HOSTNAME_ALWAYS=1
  
- # Use the FQDN instead of the short hostname if the hostname is displayed
- LP_ENABLE_FQDN=0
-@@ -110,7 +112,8 @@
+ # Use the fully qualified domain name (FQDN) instead of the short hostname when
+ # the hostname is displayed
+@@ -131,7 +133,8 @@
  
- # Show runtime of the last command if over LP_RUNTIME_THRESHOLD
+ # Show runtime of the previous command if over LP_RUNTIME_THRESHOLD
  # Recommended value is 0
 -LP_ENABLE_RUNTIME=0
 +# Debian default is 1, only active in bash
 +LP_ENABLE_RUNTIME=1
  
- # Minimal runtime to be displayed
+ # Minimal runtime (in seconds) before the runtime will be displayed
  # Recommended value is 2
diff -pruN 1.11-3/debian/patches/function_prefixes.patch 2.0.3-1/debian/patches/function_prefixes.patch
--- 1.11-3/debian/patches/function_prefixes.patch	2016-10-10 10:12:35.000000000 +0000
+++ 2.0.3-1/debian/patches/function_prefixes.patch	2021-10-31 10:06:21.000000000 +0000
@@ -6,49 +6,61 @@ Subject: Prefix liquidprompt functions
  A common namespace of commands starting with 'liquidprompt_*' is then
  given to the user.
 Forwarded: not-needed
-Last-Update: 2015-05-07
+Last-Update: 2021-10-30
 
 --- a/liquidprompt
 +++ b/liquidprompt
-@@ -1851,13 +1851,13 @@
+@@ -600,7 +600,7 @@
+     if [[ -n ${_LP_THEME_ACTIVATE_FUNCTION-} ]]; then
+         # Reactivate current theme
+         "$_LP_THEME_ACTIVATE_FUNCTION"
+-        prompt_on
++        liquidprompt_on
+     else
+         # Set default theme if no theme set
+         lp_theme default
+@@ -2808,7 +2808,7 @@
      fi
  }
  
--prompt_tag()
-+liquidprompt_tag()
- {
-     export LP_PS1_PREFIX="$(_lp_sr "$1")"
+-prompt_tag() {
++liquidprompt_tag() {
+     if [[ -n "${1-}" ]]; then
+         export LP_PS1_PREFIX="$1 "
+     else
+@@ -2817,7 +2817,7 @@
  }
  
  # Activate Liquid Prompt
--prompt_on()
-+liquidprompt_on()
- {
+-prompt_on() {
++liquidprompt_on() {
      # Reset so all PWD dependent variables are computed after loading
      LP_OLD_PWD=""
-@@ -1913,7 +1913,7 @@
+ 
+@@ -2882,7 +2882,7 @@
  }
  
  # Come back to the old prompt
--prompt_off()
-+liquidprompt_off()
- {
+-prompt_off() {
++liquidprompt_off() {
      PS1=$LP_OLD_PS1
-     if $_LP_SHELL_bash; then
-@@ -1927,7 +1927,7 @@
+     if (( _LP_SHELL_bash )); then
+         eval "$_LP_OLD_SHOPT"
+@@ -2895,7 +2895,7 @@
  }
  
  # Use an empty prompt: just the \$ mark
--prompt_OFF()
-+liquidprompt_OFF()
- {
+-prompt_OFF() {
++liquidprompt_OFF() {
      PS1="$_LP_MARK_SYMBOL "
-     if $_LP_SHELL_bash; then
-@@ -1940,6 +1940,6 @@
+     if (( _LP_SHELL_bash )); then
+         shopt -u promptvars
+@@ -2942,7 +2942,7 @@
+     _LP_THEME_PROMPT_FUNCTION=$f_prompt
+ 
+     "$f_activate"
+-    prompt_on
++    liquidprompt_on
  }
  
  # By default, sourcing liquidprompt will activate Liquid Prompt
--prompt_on
-+liquidprompt_on
- 
- # vim: set et sts=4 sw=4 tw=120 ft=sh:
diff -pruN 1.11-3/debian/patches/series 2.0.3-1/debian/patches/series
--- 1.11-3/debian/patches/series	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/patches/series	2021-10-31 10:06:21.000000000 +0000
@@ -1,2 +1,3 @@
 debian-default-cfg.patch
 function_prefixes.patch
+unknown-term.patch
diff -pruN 1.11-3/debian/patches/unknown-term.patch 2.0.3-1/debian/patches/unknown-term.patch
--- 1.11-3/debian/patches/unknown-term.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/debian/patches/unknown-term.patch	2021-10-31 10:06:21.000000000 +0000
@@ -0,0 +1,18 @@
+Description: Early exit on TERM=unknown
+Author: Matthias Klose <doko@ubuntu.com>
+Origin: Ubuntu
+Forwarded: https://github.com/nojhan/liquidprompt/pull/688
+Last-Update: 2021-10-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/liquidprompt
++++ b/liquidprompt
+@@ -22,7 +22,7 @@
+ 
+ # Issue #161: do not load if not an interactive shell
+ # Do not exit if '--no-activate' flag was passed, as it overrides this check
+-[ "x${-##*i}" = "x$-" ] || [ -z "${TERM-}" ] || [ "x${TERM-}" = xdumb ] && [ "x${1-}" != "x--no-activate" ] && return
++[ "x${-##*i}" = "x$-" ] || [ -z "${TERM-}" ] || [ "x${TERM-}" = xdumb ] && [ "x${TERM-}" = xunknown ] && [ "x${1-}" != "x--no-activate" ] && return
+ 
+ if test -n "${BASH_VERSION-}"; then
+     # Check for recent enough version of bash.
diff -pruN 1.11-3/debian/tests/test-load-liquidprompt-bash.sh 2.0.3-1/debian/tests/test-load-liquidprompt-bash.sh
--- 1.11-3/debian/tests/test-load-liquidprompt-bash.sh	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/tests/test-load-liquidprompt-bash.sh	2021-10-31 10:06:21.000000000 +0000
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if [ "$TERM" = unknown ] || [ -z "$TERM" ]; then
+  export TERM=xterm
+fi
+
 LOCATION="/usr/share/liquidprompt/liquidprompt"
 
 # As if we were in an interactive shell
diff -pruN 1.11-3/debian/tests/test-load-liquidprompt-zsh.sh 2.0.3-1/debian/tests/test-load-liquidprompt-zsh.sh
--- 1.11-3/debian/tests/test-load-liquidprompt-zsh.sh	2016-08-29 13:44:21.000000000 +0000
+++ 2.0.3-1/debian/tests/test-load-liquidprompt-zsh.sh	2021-10-31 10:06:21.000000000 +0000
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if [ "$TERM" = unknown ] || [ -z "$TERM" ]; then
+  export TERM=xterm
+fi
+
 LOCATION="/usr/share/liquidprompt/liquidprompt"
 
 set -e
diff -pruN 1.11-3/debian/upstream/metadata 2.0.3-1/debian/upstream/metadata
--- 1.11-3/debian/upstream/metadata	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/debian/upstream/metadata	2021-10-31 10:06:21.000000000 +0000
@@ -0,0 +1,5 @@
+---
+Bug-Database: https://github.com/nojhan/liquidprompt/issues
+Bug-Submit: https://github.com/nojhan/liquidprompt/issues/new
+Repository: https://github.com/nojhan/liquidprompt.git
+Repository-Browse: https://github.com/nojhan/liquidprompt
diff -pruN 1.11-3/docs/config.rst 2.0.3-1/docs/config.rst
--- 1.11-3/docs/config.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/config.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,1149 @@
+Config Options
+**************
+
+.. contents::
+   :local:
+
+Almost every feature in Liquidprompt can be turned on or off using these config
+options. They can either be set before sourcing Liquidprompt (in ``.bashrc`` or
+``.zshrc``), or set in a Liquidprompt config file.
+
+.. note::
+   Config variables set in a config file take precedence over variables set in the
+   environment or on the command line. Setting a config option on the command
+   line, then running :func:`lp_activate` will overwrite that option with the
+   value from the config file, if it is set there.
+
+The config file is searched for in the following locations:
+
+* ``~/.liquidpromptrc``
+* ``$XDG_CONFIG_HOME/liquidpromptrc`` - (if :envvar:`XDG_CONFIG_HOME` is not
+  set, ``~/.config`` is used)
+* ``$XDG_CONFIG_DIRS/liquidpromptrc`` - :envvar:`XDG_CONFIG_DIRS` is a ``:``
+  delimited array, each value is searched. (if :envvar:`XDG_CONFIG_DIRS` is not
+  set, ``/etc/xdg`` is used)
+* ``/etc/liquidpromptrc``
+
+The first file found is sourced.
+
+Liquidprompt ships with an example config file, ``liquidpromptrc-dist``. You can
+start from this file for your config::
+
+    cp ~/liquidprompt/liquidpromptrc-dist ~/.config/liquidpromptrc
+
+In the event that you synchronize your configuration file across multiple
+computers, or if you have an ``/etc/liquidpromptrc`` system-wide from which
+you'd like to make minor deviations in an individual user account, you can
+augment the primary config to add in any local modifications using lines such
+as these::
+
+    LOCAL_RCFILE=$HOME/.liquidpromptrc.local
+    [ -f "$LOCAL_RCFILE" ] && source "$LOCAL_RCFILE"
+
+.. note::
+   The example config file does not include every config option, and the
+   comments describing the options are less verbose than the descriptions on
+   this page.
+
+Each config option is documented with its default value.
+Options of type ``bool`` accept values of ``1`` for true and ``0`` for false.
+
+General
+-------
+
+.. attribute:: LP_MARK_PREFIX
+   :type: string
+   :value: " "
+
+   String added directly before :attr:`LP_MARK_DEFAULT`, after all other
+   parts of the prompt. Can be used to tag the prompt in a way that is less
+   intrusive than :attr:`LP_PS1_PREFIX`, or add a newline before the prompt
+   mark. For example::
+
+      LP_MARK_PREFIX=$'\n'
+
+.. attribute:: LP_PATH_CHARACTER_KEEP
+   :type: int
+   :value: 3
+
+   The number of characters to save at the start and possibly the end of a
+   directory name when shortening the path. See :attr:`LP_PATH_METHOD` for
+   details of the specific methods.
+
+.. attribute:: LP_PATH_DEFAULT
+   :type: string
+
+   .. deprecated:: 2.0
+      Use :attr:`LP_PATH_METHOD` set to "truncate_to_last_dir" instead.
+
+   Used to define the string used for the path. Could be used to make use of
+   shell path shortening features, like ``%2~`` in Zsh to keep the last two
+   directories of the path.
+
+   :attr:`LP_ENABLE_SHORTEN_PATH` must be disabled to have any effect.
+
+.. attribute:: LP_PATH_KEEP
+   :type: int
+   :value: 2
+
+   The number of directories (counting '/') to display at the beginning of a
+   shortened path.
+
+   Set to ``1``, will display only root. Set to ``0``, will keep nothing from the
+   beginning of the path.
+
+   :attr:`LP_ENABLE_SHORTEN_PATH` must be enabled to have any effect.
+
+   See also: :attr:`LP_PATH_LENGTH` and :attr:`LP_PATH_METHOD`.
+
+   .. versionchanged:: 2.0
+      No longer supports a value of ``-1``.
+
+.. attribute:: LP_PATH_LENGTH
+   :type: int
+   :value: 35
+
+   The maximum percentage of the terminal width used to display the path before
+   removing the center portion of the path and replacing with
+   :attr:`LP_MARK_SHORTEN_PATH`.
+
+   :attr:`LP_ENABLE_SHORTEN_PATH` must be enabled to have any effect.
+
+   .. note::
+      :attr:`LP_PATH_KEEP` and :attr:`LP_PATH_METHOD` have higher precedence
+      over this option. Important path parts, including directories saved by
+      :attr:`LP_PATH_KEEP`, :attr:`LP_PATH_VCS_ROOT`, and the last directory,
+      will always be displayed, even if the path does not fit in the maximum
+      length.
+
+.. attribute:: LP_PATH_METHOD
+   :type: string
+   :value: "truncate_chars_from_path_left"
+
+   Sets the method used for shortening the path display when it exceeds the
+   maximum length set by :attr:`LP_PATH_LENGTH`.
+
+   * **truncate_chars_from_path_left**: Truncates characters from the start of
+     the path, showing consecutive directories as one shortened section. E.g. in
+     a directory named ``~/MyProjects/Liquidprompt/tests``, it will be shortened
+     to ``...prompt/tests``. The shortened mark is :attr:`LP_MARK_SHORTEN_PATH`.
+   * **truncate_chars_from_dir_right**: Leaves the beginning of a directory name
+     untouched. E.g. directories will be shortened like so: ``~/Doc.../Office``.
+     How many characters will be untouched is set by
+     :attr:`LP_PATH_CHARACTER_KEEP`. The shortened mark is
+     :attr:`LP_MARK_SHORTEN_PATH`.
+   * **truncate_chars_from_dir_middle**:  Leaves the beginning and end of a
+     directory name untouched. E.g. in a directory named
+     ``~/MyProjects/Office``, then it will be shortened to
+     ``~/MyS...cts/Office``. How many characters will be untouched is set by
+     :attr:`LP_PATH_CHARACTER_KEEP`. The shortened mark is
+     :attr:`LP_MARK_SHORTEN_PATH`.
+   * **truncate_chars_to_unique_dir**: Truncate each directory to the shortest
+     unique starting portion of their name. E.g. in a folder
+     ``~/dev/liquidprompt``, it will be shortened to ``~/d/liquidprompt`` if
+     there is no other directory starting with 'd' in the home directory.
+   * **truncate_to_last_dir**: Only display the last directory in the path. In
+     other words, the current directory name.
+
+   All methods (other than 'truncate_to_last_dir') start at the far left of the
+   path (limited by :attr:`LP_PATH_KEEP`). Only the minimum number of
+   directories needed to fit inside :attr:`LP_PATH_LENGTH` will be shortened.
+
+   :attr:`LP_ENABLE_SHORTEN_PATH` must be enabled to have any effect.
+
+.. attribute:: LP_PATH_VCS_ROOT
+   :type: bool
+   :value: 1
+
+   Display the root directory of the current VCS repository with special
+   formatting, set by :attr:`LP_COLOR_PATH_VCS_ROOT`. If
+   :attr:`LP_ENABLE_SHORTEN_PATH` is enabled, also prevent the path shortening
+   from shortening or hidding the VCS root directory.
+
+.. attribute:: LP_PS1_POSTFIX
+   :type: string
+   :value: ""
+
+   A string displayed at the very end of the prompt, after even the prompt mark.
+   :attr:`LP_MARK_PREFIX` is an alternative that goes before the prompt mark.
+
+.. attribute:: LP_PS1_PREFIX
+   :type: string
+   :value: ""
+
+   A string displayed at the start of the prompt. Can also be set with
+   :func:`prompt_tag`.
+
+Features
+--------
+
+.. attribute:: LP_DISABLED_VCS_PATH
+   :type: string
+   :value: ""
+
+   .. deprecated:: 2.0
+      Use :attr:`LP_DISABLED_VCS_PATHS` instead.
+
+   An colon (``:``) separated list of absolute directory paths where VCS
+   features will be disabled. See :attr:`LP_DISABLED_VCS_PATHS` for more
+   information.
+
+.. attribute:: LP_DISABLED_VCS_PATHS
+   :type: array<string>
+   :value: ()
+
+   An array of absolute directory paths where VCS features will be disabled.
+   Generally this would be used for repositories that are large and slow, where
+   generating VCS information for the prompt would impact prompt responsiveness.
+
+   Any subdirectory under the input directory is also disabled, so setting
+   "/repos" would disable VCS display when the current directory is
+   "/repos/a-repo". Setting ``("/")`` would disable VCS display completely.
+
+   An example value would be::
+
+      LP_DISABLED_VCS_PATHS=("/a/svn/repo" "/home/me/my/large/repo")
+
+   See also: :attr:`LP_MARK_DISABLED`.
+
+.. attribute:: LP_ENABLE_BATT
+   :type: bool
+   :value: 1
+
+   Display the status of the battery, if there is one, using color and marks.
+   Add battery percentage colored with :attr:`LP_COLORMAP` if
+   :attr:`LP_PERCENTS_ALWAYS` is enabled.
+
+   Will be disabled if ``acpi`` is not found on Linux, or ``pmset`` is not
+   found on MacOS.
+
+   See also: :attr:`LP_BATTERY_THRESHOLD`, :attr:`LP_MARK_BATTERY`,
+   :attr:`LP_MARK_ADAPTER`, :attr:`LP_COLOR_CHARGING_ABOVE`,
+   :attr:`LP_COLOR_CHARGING_UNDER`, :attr:`LP_COLOR_DISCHARGING_ABOVE`, and
+   :attr:`LP_COLOR_DISCHARGING_UNDER`.
+
+.. attribute:: LP_ENABLE_BZR
+   :type: bool
+   :value: 1
+
+   Display VCS information inside `Bazaar <https://bazaar.canonical.com/>`_
+   repositories.
+
+   Will be disabled if ``bzr`` is not found.
+
+   See also: :attr:`LP_MARK_BZR`.
+
+.. attribute:: LP_ENABLE_COLOR
+   :type: bool
+   :value: 1
+
+   Use terminal formatting when displaying the prompt.
+
+   .. note::
+      Not all formatting is correctly disabled if this option is disabled.
+
+   Will be disabled if ``tput`` is not found.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_ENABLE_DETACHED_SESSIONS
+   :type: bool
+   :value: 1
+
+   Display the number of detached multiplexer sessions.
+
+   Will be disabled if neither ``screen`` nor ``tmux`` are found.
+
+   .. note::
+      This can be slow on some machines, and prompt speed can be greatly
+      improved by disabling it.
+
+   See also: :attr:`LP_COLOR_JOB_D`.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_ENABLE_DIRSTACK
+   :type: bool
+   :value: 0
+
+   Display the size of the directory stack if it is greater than ``1``.
+
+   See also: :attr:`LP_MARK_DIRSTACK` and :attr:`LP_COLOR_DIRSTACK`.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_ENABLE_ERROR
+   :type: bool
+   :value: 1
+
+   Display the last command error code if it is not ``0``.
+
+   See also: :attr:`LP_COLOR_ERR`.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_ENABLE_FOSSIL
+   :type: bool
+   :value: 1
+
+   Display VCS information inside `Fossil <https://www.fossil-scm.org/>`_
+   repositories.
+
+   Will be disabled if ``fossil`` is not found.
+
+   See also: :attr:`LP_MARK_FOSSIL`.
+
+.. attribute:: LP_ENABLE_FQDN
+   :type: bool
+   :value: 0
+
+   Use the fully qualified domain name (FQDN) instead of the short hostname when
+   the hostname is displayed.
+
+   See also: :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_ENABLE_GIT
+   :type: bool
+   :value: 1
+
+   Display VCS information inside `Git <https://git-scm.com/>`_ repositories.
+
+   Will be disabled if ``git`` is not found.
+
+   See also: :attr:`LP_MARK_GIT`.
+
+.. attribute:: LP_ENABLE_HG
+   :type: bool
+   :value: 1
+
+   Display VCS information inside `Mercurial <https://www.mercurial-scm.org/>`_
+   repositories.
+
+   Will be disabled if ``hg`` is not found.
+
+   See also: :attr:`LP_MARK_HG`.
+
+.. attribute:: LP_ENABLE_JOBS
+   :type: bool
+   :value: 1
+
+   Display the number of running and sleeping shell jobs.
+
+   See also: :attr:`LP_COLOR_JOB_R` and :attr:`LP_COLOR_JOB_Z`.
+
+.. attribute:: LP_ENABLE_LOAD
+   :type: bool
+   :value: 1
+
+   Display the load average over the past 1 minutes when above the threshold.
+
+   See also: :attr:`LP_LOAD_THRESHOLD`, :attr:`LP_LOAD_CAP`,
+   :attr:`LP_MARK_LOAD`, :attr:`LP_PERCENTS_ALWAYS`, and :attr:`LP_COLORMAP`.
+
+.. attribute:: LP_ENABLE_PERM
+   :type: bool
+   :value: 1
+
+   Display a colored :attr:`LP_MARK_PERM` in the prompt to show when the user
+   does not have write permission to the current directory.
+
+   See also: :attr:`LP_COLOR_WRITE` and :attr:`LP_COLOR_NOWRITE`.
+
+.. attribute:: LP_ENABLE_PROXY
+   :type: bool
+   :value: 1
+
+   Display a :attr:`LP_MARK_PROXY` mark when an HTTP proxy is detected.
+
+   See also: :attr:`LP_COLOR_PROXY`.
+
+.. attribute:: LP_ENABLE_RUNTIME
+   :type: bool
+   :value: 1
+
+   Display runtime of the previous command if over :attr:`LP_RUNTIME_THRESHOLD`.
+
+   See also: :attr:`LP_COLOR_RUNTIME`.
+
+.. attribute:: LP_ENABLE_RUNTIME_BELL
+   :type: bool
+   :value: 0
+
+   Ring the terminal bell if the previous command ran longer than
+   :attr:`LP_RUNTIME_BELL_THRESHOLD`.
+
+   .. versionadded:: 1.12
+
+.. attribute:: LP_ENABLE_SCLS
+   :type: bool
+   :value: 1
+
+   Display the currently activated `Red Hat Software Collection`_.
+
+   See also: :attr:`LP_COLOR_VIRTUALENV`.
+
+   .. _`Red Hat Software Collection`: https://developers.redhat.com/products/softwarecollections/overview
+
+.. attribute:: LP_ENABLE_SCREEN_TITLE
+   :type: bool
+   :value: 0
+
+   Set the terminal title while in a terminal multiplexer.
+
+   :attr:`LP_ENABLE_TITLE` must be enabled to have any effect.
+
+.. attribute:: LP_ENABLE_SHORTEN_PATH
+   :type: bool
+   :value: 1
+
+   Use the shorten path feature if the path is too long to fit in the prompt
+   line.
+
+   See also: :attr:`LP_PATH_METHOD`, :attr:`LP_PATH_LENGTH`,
+   :attr:`LP_PATH_KEEP`, :attr:`LP_PATH_CHARACTER_KEEP`, and
+   :attr:`LP_MARK_SHORTEN_PATH`.
+
+.. attribute:: LP_ENABLE_SSH_COLORS
+   :type: bool
+   :value: 0
+
+   Replace :attr:`LP_COLOR_SSH` with a color based on the hash of the hostname.
+   This can give each host a "color feel" to help distinguish them.
+
+   See also: :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_ENABLE_SUDO
+   :type: bool
+   :value: 0
+
+   Check if the user has valid ``sudo`` credentials, and display an indicating
+   mark or color.
+
+   Will be disabled if ``sudo`` is not found.
+
+   .. warning::
+      Each evocation of ``sudo`` by default writes to the syslog, and this will
+      run ``sudo`` once each prompt. This is likely to make your sysadmin hate
+      you.
+
+   See also: :attr:`LP_COLOR_MARK_SUDO`.
+
+.. attribute:: LP_ENABLE_SVN
+   :type: bool
+   :value: 1
+
+   Display VCS information inside `Subversion <https://subversion.apache.org/>`_
+   repositories.
+
+   Will be disabled if ``svn`` is not found.
+
+   See also: :attr:`LP_MARK_SVN`.
+
+.. attribute:: LP_ENABLE_TEMP
+   :type: bool
+   :value: 1
+
+   Display the highest system temperature if above the threshold.
+
+   Will be disabled if neither ``sensors`` nor ``acpi`` are found.
+
+   See also: :attr:`LP_TEMP_THRESHOLD`, :attr:`LP_MARK_TEMP`, and
+   :attr:`LP_COLORMAP`.
+
+.. attribute:: LP_ENABLE_TIME
+   :type: bool
+   :value: 0
+
+   Displays the time at which the prompt was shown.
+
+   See also: :attr:`LP_TIME_ANALOG` and :attr:`LP_COLOR_TIME`.
+
+.. attribute:: LP_ENABLE_TITLE
+   :type: bool
+   :value: 0
+
+   Set the terminal title to part or all of the prompt string, depending on the
+   theme.
+
+   Must be enabled to be able to set the manual title with :func:`lp_title`.
+
+   .. warning::
+      This may not work properly on exotic terminals. Please report any issues.
+
+.. attribute:: LP_ENABLE_VCS_ROOT
+   :type: bool
+   :value: 0
+
+   Enable VCS features when running as root. This is disabled by default for
+   security.
+
+.. attribute:: LP_ENABLE_VIRTUALENV
+   :type: bool
+   :value: 1
+
+   Display the currently activated Python_ or Conda_ virtual environment.
+
+   See also: :attr:`LP_COLOR_VIRTUALENV`.
+
+   .. _Python: https://docs.python.org/tutorial/venv.html
+   .. _Conda: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
+
+.. attribute:: LP_HOSTNAME_ALWAYS
+   :type: int
+   :value: 0
+
+   Determine when the hostname should be displayed. Valid values are:
+
+   * ``0`` - show the hostname, except when locally connected
+   * ``1`` - always show the hostname
+   * ``-1`` - never show the hostname
+
+   See also: :attr:`LP_COLOR_HOST` and :attr:`LP_ENABLE_SSH_COLORS`.
+
+.. attribute:: LP_PERCENTS_ALWAYS
+   :type: bool
+   :value: 1
+
+   Display the actual values of load and batteries along with their
+   corresponding marks. Disable to only print the colored marks.
+
+.. attribute:: LP_TIME_ANALOG
+   :type: bool
+   :value: 0
+
+   Shows the time using an analog clock instead of numeric values. The analog
+   clock is "accurate" to the nearest half hour. You must have a unicode-capable
+   terminal and a font with the "CLOCK" characters (U+1F550 - U+1F567).
+
+   Will only have an effect if :attr:`LP_ENABLE_TIME` is enabled.
+
+.. attribute:: LP_USER_ALWAYS
+   :type: int
+   :value: 1
+
+   Determine when the username should be displayed. Valid values are:
+
+   * ``0`` - show the username, except when the user is the login user
+   * ``1`` - always show the username
+   * ``-1`` - never show the username
+
+   See also: :attr:`LP_COLOR_USER_LOGGED`, :attr:`LP_COLOR_USER_ALT`, and
+   :attr:`LP_COLOR_USER_ROOT`.
+
+   .. versionchanged:: 2.0
+      The ``-1`` option was added.
+
+Thresholds
+----------
+
+.. attribute:: LP_BATTERY_THRESHOLD
+   :type: int
+   :value: 75
+
+   The percentage threshold that the battery level needs to fall below before
+   it will be displayed in :attr:`LP_COLOR_CHARGING_UNDER` or
+   :attr:`LP_COLOR_DISCHARGING_UNDER` color. Otherwise, it will be displayed in
+   :attr:`LP_COLOR_CHARGING_ABOVE` or :attr:`LP_COLOR_DISCHARGING_ABOVE` color.
+
+   :attr:`LP_ENABLE_BATT` must be enabled to have any effect.
+
+.. attribute:: LP_LOAD_CAP
+   :type: float
+   :value: 2.0
+
+   The value for load average per CPU to display with the max color scaling.
+   Values above this number will still be displayed, but the colors will not
+   increase in intensity.
+
+   :attr:`LP_ENABLE_LOAD` must be enabled to have any effect.
+
+   See also: :attr:`LP_COLORMAP`.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_LOAD_THRESHOLD
+   :type: float
+   :value: 0.60
+
+   Display the load average per CPU when above this threshold. For historical
+   reasons, this number must have a decimal point ('.'), or it will be treated
+   as a percentage.
+
+   :attr:`LP_ENABLE_LOAD` must be enabled to have any effect.
+
+   .. versionchanged:: 2.0
+      Accepts float values of actual load averages.
+      Integer values of centiload are still accepted, but deprecated.
+
+.. attribute:: LP_RUNTIME_THRESHOLD
+   :type: int
+   :value: 2
+
+   Time in seconds that a command must run longer than for its runtime to be
+   displayed.
+
+   :attr:`LP_ENABLE_RUNTIME` must be enabled to have any effect.
+
+.. attribute:: LP_RUNTIME_BELL_THRESHOLD
+   :type: int
+   :value: 10
+
+   Time in seconds that a command must run longer than for the terminal bell to
+   be rung.
+
+   :attr:`LP_ENABLE_RUNTIME_BELL` must be enabled to have any effect.
+
+   .. versionadded:: 1.12
+
+.. attribute:: LP_TEMP_THRESHOLD
+   :type: int
+   :value: 60
+
+   Display the highest system temperature when the temperature is above this
+   threshold (in degrees Celsius).
+
+   :attr:`LP_ENABLE_TEMP` must be enabled to have any effect.
+
+Marks
+-----
+
+.. attribute:: LP_MARK_ADAPTER
+   :type: string
+   :value: "⏚"
+
+   Mark used for battery display when charging.
+
+   See also: :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_MARK_BATTERY
+   :type: string
+   :value: "⌁"
+
+   Mark used for battery display when on battery power.
+
+   See also: :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_MARK_BRACKET_CLOSE
+   :type: string
+   :value: "]"
+
+   Mark used for closing core prompt brackets. Used by the default theme for
+   enclosing user, host, and current working directory sections.
+
+   See also: :attr:`LP_MARK_BRACKET_OPEN`.
+
+.. attribute:: LP_MARK_BRACKET_OPEN
+   :type: string
+   :value: "["
+
+   Mark used for opening core prompt brackets. Used by the default theme for
+   enclosing user, host, and current working directory sections.
+
+   See also: :attr:`LP_MARK_BRACKET_CLOSE`.
+
+.. attribute:: LP_MARK_BZR
+   :type: string
+   :value: "⚯"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is inside of a Bazaar repository.
+
+   See also: :attr:`LP_ENABLE_BZR`.
+
+.. attribute:: LP_MARK_DEFAULT
+   :type: string
+   :value: "$" (Bash) or "%" (Zsh)
+
+   Mark used to indicate that the prompt is ready for user input, unless some
+   other context overrides it, like a VCS repository.
+
+.. attribute:: LP_MARK_DIRSTACK
+   :type: string
+   :value: "⚞"
+
+   Mark used to indicate the size of the directory stack. Here are some
+   alternative marks you might like: ⚟ = ≡ ≣
+
+   See also: :attr:`LP_ENABLE_DIRSTACK` and :attr:`LP_COLOR_DIRSTACK`.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_MARK_DISABLED
+   :type: string
+   :value: "⌀"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is disabled for VCS display through :attr:`LP_DISABLED_VCS_PATHS`.
+
+.. attribute:: LP_MARK_FOSSIL
+   :type: string
+   :value: "⌘"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is inside of a Fossil repository.
+
+   See also: :attr:`LP_ENABLE_FOSSIL`.
+
+.. attribute:: LP_MARK_GIT
+   :type: string
+   :value: "±"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is inside of a Git repository.
+
+   See also: :attr:`LP_ENABLE_GIT`.
+
+.. attribute:: LP_MARK_HG
+   :type: string
+   :value: "☿"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is inside of a Mercurial repository.
+
+   See also: :attr:`LP_ENABLE_HG`.
+
+.. attribute:: LP_MARK_LOAD
+   :type: string
+   :value: "⌂"
+
+   Mark used before displaying load average.
+
+   See also: :attr:`LP_ENABLE_LOAD`.
+
+.. attribute:: LP_MARK_PERM
+   :type: string
+   :value: ":"
+
+   Mark used by default separate hostname and current working directory, and is
+   colored to indicate user permissions on the current directory.
+
+   Is still used (without colors) if :attr:`LP_ENABLE_PERM` is disabled.
+
+   .. versionadded:: 1.12
+
+.. attribute:: LP_MARK_PROXY
+   :type: string
+   :value: "↥"
+
+   Mark used to indicate a proxy is active.
+
+   See also: :attr:`LP_ENABLE_PROXY`.
+
+.. attribute:: LP_MARK_SHORTEN_PATH
+   :type: string
+   :value: " … "
+
+   Mark used to indicate a portion of the path was hidden to save space. Not all
+   shortening methods use this mark, some only use
+   :attr:`LP_COLOR_PATH_SHORTENED`.
+
+   See also: :attr:`LP_ENABLE_SHORTEN_PATH`, :attr:`LP_PATH_METHOD`.
+
+.. attribute:: LP_MARK_STASH
+   :type: string
+   :value: "+"
+
+   Mark used to indicate at least one stash or shelve exists in the current
+   repository.
+
+.. attribute:: LP_MARK_SVN
+   :type: string
+   :value: "‡"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is inside of a Subversion repository.
+
+   See also: :attr:`LP_ENABLE_SVN`.
+
+.. attribute:: LP_MARK_TEMP
+   :type: string
+   :value: "θ"
+
+   Mark used before displaying temperature.
+
+   See also: :attr:`LP_ENABLE_TEMP`.
+
+.. attribute:: LP_MARK_UNTRACKED
+   :type: string
+   :value: "*"
+
+   Mark used to indicate untracked or extra files exist in the current
+   repository.
+
+.. attribute:: LP_MARK_VCSH
+   :type: string
+   :value: "|"
+
+   Mark used instead of :attr:`LP_MARK_DEFAULT` to indicate that the current
+   directory is inside of a `VCSH <https://github.com/RichiH/vcsh>`_ repository.
+
+   Since VCSH repositories are Git repositories under the hood,
+   :attr:`LP_MARK_GIT` is surrounded in this mark.
+
+Colors
+------
+
+These color strings will be used without modification, so they need to be valid
+terminal escape sequences, either generated with :func:`lp_terminal_format` or
+using the ``$COLOR`` variables.
+
+Valid preset color variables are:
+
+* ``BOLD`` - bold formatting only.
+* ``BLACK``
+* ``BOLD_GRAY`` - actually bold black
+* ``RED``
+* ``BOLD_RED``
+* ``GREEN``
+* ``BOLD_GREEN``
+* ``YELLOW``
+* ``BOLD_YELLOW``
+* ``BLUE``
+* ``BOLD_BLUE``
+* ``PURPLE`` or ``MAGENTA``
+* ``BOLD_PURPLE``, ``BOLD_MAGENTA`` or ``PINK``
+* ``CYAN``
+* ``BOLD_CYAN``
+* ``WHITE``
+* ``BOLD_WHITE``
+* ``WARN_RED`` - black foreground, red background
+* ``CRIT_RED`` - white foreground, red background
+* ``DANGER_RED`` - yellow foreground, red background
+
+.. attribute:: LP_COLORMAP
+   :type: array<string>
+
+   An array of colors that is used by the battery, load, and temperature
+   features to indicate the severity level of their status. A normal or low
+   status will use the first index, while the last index is the most severe.
+
+   The default array is::
+
+      (
+          ""
+          $GREEN
+          $BOLD_GREEN
+          $YELLOW
+          $BOLD_YELLOW
+          $RED
+          $BOLD_RED
+          $WARN_RED
+          $CRIT_RED
+          $DANGER_RED
+      )
+
+   See also: :attr:`LP_ENABLE_BATT`, :attr:`LP_ENABLE_LOAD`, and
+   :attr:`LP_ENABLE_TEMP`.
+
+.. attribute:: LP_COLOR_CHANGES
+   :type: string
+   :value: $RED
+
+   Color used to indicate that the current repository is not clean, or in other
+   words, has changes that have not been committed.
+
+.. attribute:: LP_COLOR_CHARGING_ABOVE
+   :type: string
+   :value: $GREEN
+
+   Color used to indicate that the battery is charging and above the
+   :attr:`LP_BATTERY_THRESHOLD`.
+
+   See also: :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_COLOR_CHARGING_UNDER
+   :type: string
+   :value: $YELLOW
+
+   Color used to indicate that the battery is charging and under the
+   :attr:`LP_BATTERY_THRESHOLD`.
+
+   See also: :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_COLOR_COMMITS_BEHIND
+   :type: string
+   :value: $BOLD_RED
+
+   Color used to indicate that the current repository has a remote tracking
+   branch that has commits that the local branch does not.
+
+.. attribute:: LP_COLOR_COMMITS
+   :type: string
+   :value: $YELLOW
+
+   Color used to indicate that the current repository has commits on the local
+   branch that the remote tracking branch does not.
+
+   Also used to color :attr:`LP_MARK_STASH`.
+
+.. attribute:: LP_COLOR_DIFF
+   :type: string
+   :value: $PURPLE
+
+   Color used to indicate that the current repository has lines that have been
+   changed since the last commit.
+
+.. attribute:: LP_COLOR_DIRSTACK
+   :type: string
+   :value: $BOLD_YELLOW
+
+   Color used to indicate the size of the directory stack.
+
+   See also: :attr:`LP_ENABLE_DIRSTACK` and :attr:`LP_MARK_DIRSTACK`.
+
+   .. versionadded:: 2.0
+
+.. attribute:: LP_COLOR_DISCHARGING_ABOVE
+   :type: string
+   :value: $YELLOW
+
+   Color used to indicate that the battery is discharging and above the
+   :attr:`LP_BATTERY_THRESHOLD`.
+
+   See also: :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_COLOR_DISCHARGING_UNDER
+   :type: string
+   :value: $RED
+
+   Color used to indicate that the battery is discharging and above the
+   :attr:`LP_BATTERY_THRESHOLD`.
+
+   See also: :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_COLOR_ERR
+   :type: string
+   :value: $PURPLE
+
+   Color used to indicate the last command exited with a non-zero return code.
+
+   See also: :attr:`LP_ENABLE_ERROR`.
+
+.. attribute:: LP_COLOR_HOST
+   :type: string
+   :value: ""
+
+   Color used for the hostname when connected locally.
+
+   See also: :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_COLOR_IN_MULTIPLEXER
+   :type: string
+   :value: $BOLD_BLUE
+
+   Color used for :attr:`LP_MARK_BRACKET_OPEN` and :attr:`LP_MARK_BRACKET_CLOSE`
+   if the terminal is in a multiplexer.
+
+.. attribute:: LP_COLOR_JOB_D
+   :type: string
+   :value: $YELLOW
+
+   Color used for detached multiplexer sessions.
+
+   See also: :attr:`LP_ENABLE_DETACHED_SESSIONS`.
+
+.. attribute:: LP_COLOR_JOB_R
+   :type: string
+   :value: $BOLD_YELLOW
+
+   Color used for running shell jobs.
+
+   See also: :attr:`LP_ENABLE_JOBS`.
+
+.. attribute:: LP_COLOR_JOB_Z
+   :type: string
+   :value: $BOLD_YELLOW
+
+   Color used for sleeping shell jobs.
+
+   See also: :attr:`LP_ENABLE_JOBS`.
+
+.. attribute:: LP_COLOR_MARK
+   :type: string
+   :value: $BOLD
+
+   Color used for :attr:`LP_MARK_DEFAULT`.
+
+.. attribute:: LP_COLOR_MARK_ROOT
+   :type: string
+   :value: $BOLD_RED
+
+   Color used for :attr:`LP_MARK_DEFAULT` when the current user is root, shown
+   instead of :attr:`LP_COLOR_MARK`.
+
+.. attribute:: LP_COLOR_MARK_SUDO
+   :type: string
+   :value: $LP_COLOR_MARK_ROOT
+
+   Color used for :attr:`LP_MARK_DEFAULT` when sudo is active, shown instead of
+   :attr:`LP_COLOR_MARK`.
+
+   See also: :attr:`LP_ENABLE_SUDO`.
+
+.. attribute:: LP_COLOR_NOWRITE
+   :type: string
+   :value: $RED
+
+   Color used for :attr:`LP_MARK_PERM` when the user does not have write
+   permissions to the current working directory.
+
+   See also: :attr:`LP_ENABLE_PERM` and :attr:`LP_COLOR_WRITE`.
+
+.. attribute:: LP_COLOR_PATH
+   :type: string
+   :value: ""
+
+   Color used for the current working directory.
+
+   If :attr:`LP_COLOR_PATH_LAST_DIR`, :attr:`LP_COLOR_PATH_VCS_ROOT`,
+   :attr:`LP_COLOR_PATH_SEPARATOR`, or :attr:`LP_COLOR_PATH_SHORTENED` are set,
+   their respective sections will be colored with them instead.
+
+   .. versionchanged:: 2.0
+      Default value changed from ``$BOLD`` to the default color.
+
+.. attribute:: LP_COLOR_PATH_LAST_DIR
+   :type: string
+   :value: $BOLD
+
+   Color used for the last path segment, which corresponds to the current
+   directory basename.
+
+.. attribute:: LP_COLOR_PATH_ROOT
+   :type: string
+   :value: $BOLD_YELLOW
+
+   Color used in place of :attr:`LP_COLOR_PATH` when the current user is root.
+
+.. attribute:: LP_COLOR_PATH_SEPARATOR
+   :type: string
+   :value: lp_terminal_format 8 -1 0 0 -1  # Grey
+
+   Color used for the separator ('/') between path segments. If set to the empty
+   string, the separator will take the format of the path segment before it.
+
+.. attribute:: LP_COLOR_PATH_SHORTENED
+   :type: string
+   :value: lp_terminal_format 8 -1 0 0 -1  # Grey
+
+   Color used for path segments that have been shortened.
+
+   :attr:`LP_ENABLE_SHORTEN_PATH` must be enabled to have any effect.
+
+.. attribute:: LP_COLOR_PATH_VCS_ROOT
+   :type: string
+   :value: $BOLD
+
+   Color used for the path segment corresponding to the current VCS repository
+   root directory.
+
+   :attr:`LP_PATH_VCS_ROOT` must be enabled to have any effect.
+
+.. attribute:: LP_COLOR_PROXY
+   :type: string
+   :value: $BOLD_BLUE
+
+   Color used for :attr:`LP_MARK_PROXY`.
+
+   See also: :attr:`LP_ENABLE_PROXY`.
+
+.. attribute:: LP_COLOR_RUNTIME
+   :type: string
+   :value: $YELLOW
+
+   Color used for displaying the last command runtime.
+
+   See also: :attr:`LP_ENABLE_RUNTIME`.
+
+.. attribute:: LP_COLOR_SSH
+   :type: string
+   :value: $BLUE
+
+   Color used for displaying the hostname when connected with SSH.
+
+   Has no effect if :attr:`LP_ENABLE_SSH_COLORS` is enabled.
+
+   See also: :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_COLOR_SU
+   :type: string
+   :value: $BOLD_YELLOW
+
+   Color used for displaying the hostname when running under ``su`` or ``sudo``.
+
+   See also: :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_COLOR_TELNET
+   :type: string
+   :value: $WARN_RED
+
+   Color used for displaying the hostname when connected with Telnet.
+
+   See also: :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_COLOR_TIME
+   :type: string
+   :value: $BLUE
+
+   Color used for displaying the current time.
+
+   See also: :attr:`LP_ENABLE_TIME`.
+
+.. attribute:: LP_COLOR_UP
+   :type: string
+   :value: $GREEN
+
+   Color used to indicate that the current repository is up-to-date and no
+   commits differ from the remote tracking branch.
+
+.. attribute:: LP_COLOR_USER_ALT
+   :type: string
+   :value: $BOLD
+
+   Color used for displaying the username when running as a different user than
+   the login user.
+
+.. attribute:: LP_COLOR_USER_LOGGED
+   :type: string
+   :value: ""
+
+   Color used for displaying the username when running as the login user.
+
+   See also: :attr:`LP_USER_ALWAYS`.
+
+.. attribute:: LP_COLOR_USER_ROOT
+   :type: string
+   :value: $BOLD_YELLOW
+
+   Color used for displaying the username when running as root.
+
+.. attribute:: LP_COLOR_VIRTUALENV
+   :type: string
+   :value: $CYAN
+
+   Color used for displaying a Python virtual env or Red Hat Software
+   Collection.
+
+   See also: :attr:`LP_ENABLE_VIRTUALENV` and :attr:`LP_ENABLE_SCLS`.
+
+.. attribute:: LP_COLOR_WRITE
+   :type: string
+   :value: $GREEN
+
+   Color used for :attr:`LP_MARK_PERM` when the user has write permissions to
+   the current working directory.
+
+   See also: :attr:`LP_ENABLE_PERM` and :attr:`LP_COLOR_NOWRITE`.
+
+.. attribute:: LP_COLOR_X11_OFF
+   :type: string
+   :value: $YELLOW
+
+   Color used for indicating that a display is not connected.
+
+.. attribute:: LP_COLOR_X11_ON
+   :type: string
+   :value: $GREEN
+
+   Color used for indicating that a display is connected.
+
diff -pruN 1.11-3/docs/conf.py 2.0.3-1/docs/conf.py
--- 1.11-3/docs/conf.py	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/conf.py	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,59 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+import time
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'Liquidprompt'
+copyright = '2011-%s, Liquidprompt team' % time.strftime('%Y')
+author = 'Mark Vander Stel'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx_rtd_theme',
+]
+
+# This value determines how to group the document tree into manual pages
+man_pages = [
+    ('functions', 'liquidprompt', 'Liquidprompt functions', [], 3),
+    ('config', 'liquidprompt', 'Liquidprompt configuration', [], 5),
+    ('theme', 'liquidprompt', 'Liquidprompt theming', [], 7),
+]
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = ['_build', 'venv', 'Thumbs.db', '.DS_Store']
+
+highlight_language = 'shell'
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+#html_static_path = ['_static']
diff -pruN 1.11-3/docs/functions/data/vcs.rst 2.0.3-1/docs/functions/data/vcs.rst
--- 1.11-3/docs/functions/data/vcs.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions/data/vcs.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,726 @@
+Version Control Data Functions
+******************************
+
+.. contents::
+   :local:
+
+These functions are designed to be used by themes.
+
+Generic
+-------
+
+The generic interface functions are designed to provide a level of abstraction
+over the type of VCS that a user might be using. By using the generic interface,
+a theme can provide a common look for all VCS types.
+See the default theme function :func:`_lp_vcs_details_color` for an example of
+this.
+
+.. function:: _lp_find_vcs() -> var:lp_vcs_type, var:lp_vcs_root
+
+   Returns ``true`` if the current directory is part of a version control
+   repository. If not, returns ``1``. Returns the VCS type ID and the repository
+   root directory.
+
+   If the current directory is disabled for version control using
+   :attr:`LP_DISABLED_VCS_PATHS` (checked using :func:`_lp_are_vcs_enabled`),
+   returns ``2``, and the returned type is set to "disabled".
+
+   :func:`_lp_find_vcs` will only search for VCS types that are not disabled. If
+   all VCS types are disabled in the config, :func:`_lp_find_vcs` will return
+   ``1``, as no repository will be found.
+
+   This function does a lightweight check for the existence of a version control
+   repository, only looking for the existence of a database. It does not check
+   if the database is valid or healthy. Use :func:`_lp_vcs_active` to test for
+   that.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_are_vcs_enabled()
+
+   Returns ``true`` if the current directory is not excluded by the config
+   option :attr:`LP_DISABLED_VCS_PATHS`.
+
+.. note::
+
+   All following generic functions need :func:`_lp_find_vcs` to be run first, as
+   they need ``lp_vcs_type`` to be set.
+
+.. function:: _lp_vcs_active()
+
+   Returns ``true`` if the detected VCS is enabled in Liquidprompt and the
+   current directory is a valid repository of that type. This check should be
+   done before running any other ``_lp_vcs_*`` data functions, but can be
+   omitted for speed reasons if the checks done by :func:`_lp_find_vcs` are good
+   enough.
+
+   .. versionadded:: 2.0
+
+.. note::
+
+   All following generic functions can exit with return codes higher than their
+   normal disabled exit code. If the active VCS does not support a feature, the
+   data function will not be defined, and therefore the shell will return an
+   error code much higher than ``2``. Compare using greater-or-equal if checking
+   for not supported error codes.
+
+   Unless otherwise documented, the following functions return ``0`` for good
+   data, ``1`` for no data, and ``2`` or higher for unsupported function.
+
+.. function:: _lp_vcs_bookmark() -> var:lp_vcs_bookmark
+
+   Returns ``true`` if a bookmark is active in the repository. Returns the
+   bookmark name.
+
+   Most VCS providers do not support bookmarks.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_branch() -> var:lp_vcs_branch
+
+   Returns ``true`` if a branch is active in the repository. Returns the branch
+   name.
+
+   For some VCS providers, a branch is always active.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_commit_id() -> var:lp_vcs_commit_id
+
+   Returns the full commit ID of the current commit. The return code is not
+   defined.
+
+   Some VCS providers use hashes, while others use incrementing revision
+   numbers. All VCS providers support some form of ID. The returned string
+   should be unique enough that a user can identify the commit.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_commits_off_remote() -> var:lp_vcs_commit_ahead, \
+                                              var:lp_vcs_commit_behind
+
+   Returns ``true`` if there are commits on the current branch that are not on
+   the remote tracking branch, or commits on the remote tracking branch that are
+   not on this branch. Returns ``1`` if there are no differing commits. Returns
+   ``2`` if there is no matching remote tracking branch. Returns ``3`` or higher
+   if the VCS provider does not support remote tracking branches.
+
+   Returns the number of commits behind and ahead.
+
+   Most VCS providers do not support remote tracking branches.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_head_status() -> var:lp_vcs_head_status, \
+                                       var:lp_vcs_head_details
+
+   Return ``true`` if the repo is in a special or unusual state. Return the
+   special status, and any extra details (like progress in a rebase) if
+   applicable.
+
+   Many VCS providers do not have such information. This info is unlikely to be
+   similar across VCSs, and should probably be displayed to a user without
+   manipulation.
+
+   .. note::
+
+      The details are optional, and might not be set. Protect it with
+      ``"${lp_vcs_head_details-}"``.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_staged_files() -> var:lp_vcs_staged_files
+
+   Returns ``true`` if any staged files exist in the repository. In other words,
+   tracked files that contain staged changes. Returns the number of staged
+   files.
+
+   Many VCS providers do not support staging.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_staged_lines() -> var:lp_vcs_staged_i_lines, var:lp_vcs_staged_d_lines
+
+   Returns ``true`` if any staged lines exist in the repository. In other words,
+   tracked files that contain staged changes. Returns the number of staged
+   lines.
+
+   Many VCS providers do not support staging.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_stash_count() -> var:lp_vcs_stash_count
+
+   Returns ``true`` if there are stashes the repository. Returns the
+   number of stashes.
+
+   Some VCS providers refer to stashes as "shelves".
+
+   Some VCS providers do not support stashes.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_tag() -> var:lp_vcs_tag
+
+   Returns ``true`` if a tag is active in the repository. Returns the
+   tag name.
+
+   A tag will only be returned if it is a unique ID that points only to the
+   current commit.
+
+   If multiple tags match, only one is returned. Which tag is selected is not
+   defined.
+
+   Some VCS providers do not support unique tags.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_uncommitted_files() -> var:lp_vcs_uncommitted_files
+
+   Returns ``true`` if any uncommitted files exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted files.
+
+   Some VCS providers refer to uncommitted files as "modified" files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_uncommitted_lines() -> var:lp_vcs_uncommitted_i_lines, var:lp_vcs_uncommitted_d_lines
+
+   Returns ``true`` if any uncommitted lines exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted lines.
+
+   Some VCS providers refer to uncommitted lines as "modified" or "changed"
+   lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_unstaged_files() -> var:lp_vcs_unstaged_files
+
+   Returns ``true`` if any unstaged files exist in the repository. In other
+   words, tracked files that contain unstaged changes. Returns the number of
+   unstaged files.
+
+   Many VCS providers do not support staging.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_unstaged_lines() -> var:lp_vcs_unstaged_i_lines, var:lp_vcs_unstaged_d_lines
+
+   Returns ``true`` if any unstaged lines exist in the repository. In other
+   words, tracked files that contain unstaged changes. Returns the number of
+   unstaged lines.
+
+   Many VCS providers do not support staging.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_untracked_files() -> var:lp_vcs_untracked_files
+
+   Returns ``true`` if any untracked files exist in the repository. Returns the
+   number of untracked files.
+
+   Some VCS providers refer to untracked files as "extra" files.
+
+   .. versionadded:: 2.0
+
+Bazaar
+------
+
+.. warning::
+   Bazaar is no longer being actively developed, and depends on Python 2, which
+   is no longer supported. `Breezy <https://www.breezy-vcs.org/>`_ is a fork
+   that can work with Bazaar repositories. To use Breezy in place of Bazaar, set
+   a wrapper function::
+
+      bzr() { brz "$@"; }
+
+.. note::
+   Bazaar does not support bookmarks.
+   A nick is somewhat like a bookmark, but there is no command to view a naked
+   branch name, so the ``nick`` command is used for branches.
+
+.. note::
+   Bazaar does not support a staging area.
+
+.. note::
+   Bazaar does not support getting details of remote tracking branches.
+   Bazaar does not keep a local copy of the remote state, so checking this
+   would be impossible anyway.
+
+.. note::
+   Bazaar does not have extra head statuses. A Bazaar merge can be partially
+   complete, but there is no command to test for it.
+
+.. function:: _lp_bzr_active()
+
+   Returns ``true`` if Bazaar is enabled in Liquidprompt and the current
+   directory is a valid Bazaar repository. This check should be done before
+   running any other ``_lp_bzr_*`` data functions if accessing the Bazaar
+   data functions directly instead of through the generic interface.
+
+   Can be disabled by :attr:`LP_ENABLE_BZR`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_bzr_branch() -> var:lp_vcs_branch
+
+   Returns ``true`` if a branch is active in the repository. Returns the branch
+   name.
+
+   .. versionchanged:: 2.0
+      Return method changed from stdout.
+      No branch now returns ``false``.
+
+.. function:: _lp_bzr_commit_id() -> var:lp_vcs_commit_id
+
+   Returns the revision number of the current commit. The return code is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_bzr_stash_count() -> var:lp_vcs_stash_count
+
+   Returns ``true`` if there are shelves the repository. Returns the
+   number of shelves.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_bzr_tag() -> var:lp_vcs_tag
+
+   Returns ``true`` if a tag is active in the repository. Returns the
+   tag name.
+
+   If multiple tags match, only one is returned. Which tag is selected is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_bzr_uncommitted_files() -> var:lp_vcs_uncommitted_files
+
+   Returns ``true`` if any uncommitted files exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_bzr_uncommitted_lines() -> var:lp_vcs_uncommitted_i_lines, var:lp_vcs_uncommitted_d_lines
+
+   Returns ``true`` if any uncommitted lines exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_bzr_untracked_files() -> var:lp_vcs_untracked_files
+
+   Returns ``true`` if any untracked files exist in the repository. Returns the
+   number of untracked files.
+
+   .. versionadded:: 2.0
+
+Fossil
+------
+
+.. note::
+   Fossil does not support bookmarks.
+
+.. note::
+   Fossil does not support a staging area.
+
+.. note::
+   Fossil does not support unique tags. Fossil tags can refer to multiple
+   checkin IDs, so a matching tag is not a useful unique ID.
+
+.. note::
+   Fossil does not support remote tracking branches. Fossil by default keeps the
+   local repository in sync with the remote. Even if a user disables that, it is
+   not possible to have a local and remote branch named the same not in sync.
+
+.. function:: _lp_fossil_active()
+
+   Returns ``true`` if Fossil is enabled in Liquidprompt and the current
+   directory is a valid Fossil repository. This check should be done before
+   running any other ``_lp_fossil_*`` data functions if accessing the Fossil
+   data functions directly instead of through the generic interface.
+
+   Can be disabled by :attr:`LP_ENABLE_FOSSIL`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_fossil_branch() -> var:lp_vcs_branch
+
+   Returns ``true`` if a branch is active in the repository. Returns the branch
+   name.
+
+   .. versionchanged:: 2.0
+      Return method changed from stdout.
+      No branch now returns ``false`` and nothing instead of "no-branch".
+
+.. function:: _lp_fossil_commit_id() -> var:lp_vcs_commit_id
+
+   Returns the full commit hash of the current commit. The return code is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_fossil_head_status() -> var:lp_vcs_head_status
+
+   Return ``true`` if the repository is in a special or unusual state. Return
+   the special status.
+
+   Does not return any extra details.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_fossil_stash_count() -> var:lp_vcs_stash_count
+
+   Returns ``true`` if there are stashes the repository. Returns the
+   number of stashes.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_fossil_uncommitted_files() -> var:lp_vcs_uncommitted_files
+
+   Returns ``true`` if any uncommitted files exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_fossil_uncommitted_lines() -> var:lp_vcs_uncommitted_i_lines, var:lp_vcs_uncommitted_d_lines
+
+   Returns ``true`` if any uncommitted lines exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_fossil_untracked_files() -> var:lp_vcs_untracked_files
+
+   Returns ``true`` if any untracked files exist in the repository. Returns the
+   number of untracked files.
+
+   .. versionadded:: 2.0
+
+Git
+---
+
+.. note::
+   Git does not support bookmarks.
+
+.. function:: _lp_git_active()
+
+   Returns ``true`` if Git is enabled in Liquidprompt and the current directory
+   is a valid Git repository. This check should be done before running any other
+   ``_lp_git_*`` data functions if accessing the Git data functions directly
+   instead of through the generic interface.
+
+   Can be disabled by :attr:`LP_ENABLE_GIT`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_branch() -> var:lp_vcs_branch
+
+   Returns ``true`` if a branch is active in the repository. Returns the branch
+   name.
+
+   .. versionchanged:: 2.0
+      Return method changed from stdout.
+      No branch now returns ``false`` and nothing instead of commit ID.
+
+.. function:: _lp_git_commit_id() -> var:lp_vcs_commit_id
+
+   Returns the full commit hash of the current commit. The return code is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_commits_off_remote() -> var:lp_vcs_commit_ahead, \
+                                              var:lp_vcs_commit_behind
+
+   Returns ``true`` if there are commits on the current branch that are not on
+   the remote tracking branch, or commits on the remote tracking branch that are
+   not on this branch. Returns ``1`` if there are no differing commits. Returns
+   ``2`` if there is no matching remote tracking branch.
+
+   Returns the number of commits behind and ahead.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_head_status() -> var:lp_vcs_head_status, \
+                                       var:lp_vcs_head_details
+
+   Return ``true`` if the repository is in a special or unusual state. Return
+   the special status, and any extra details (like progress in a rebase) if
+   applicable.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_staged_files() -> var:lp_vcs_staged_files
+
+   Returns ``true`` if any staged files exist in the repository. In other words,
+   tracked files that contain staged changes. Returns the number of staged
+   files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_staged_lines() -> var:lp_vcs_staged_i_lines, var:lp_vcs_staged_d_lines
+
+   Returns ``true`` if any staged lines exist in the repository. In other words,
+   tracked files that contain staged changes. Returns the number of staged
+   lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_stash_count() -> var:lp_vcs_stash_count
+
+   Returns ``true`` if there are stashes the repository. Returns the
+   number of stashes.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_tag() -> var:lp_vcs_tag
+
+   Returns ``true`` if a tag is active in the repository. Returns the
+   tag name.
+
+   If multiple tags match, only one is returned. Which tag is selected is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_uncommitted_files() -> var:lp_vcs_uncommitted_files
+
+   Returns ``true`` if any uncommitted files exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_uncommitted_lines() -> var:lp_vcs_uncommitted_i_lines, var:lp_vcs_uncommitted_d_lines
+
+   Returns ``true`` if any uncommitted lines exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_unstaged_files() -> var:lp_vcs_unstaged_files
+
+   Returns ``true`` if any unstaged files exist in the repository. In other
+   words, tracked files that contain unstaged changes. Returns the number of
+   unstaged files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_unstaged_lines() -> var:lp_vcs_unstaged_i_lines, var:lp_vcs_unstaged_d_lines
+
+   Returns ``true`` if any unstaged lines exist in the repository. In other
+   words, tracked files that contain unstaged changes. Returns the number of
+   unstaged lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_git_untracked_files() -> var:lp_vcs_untracked_files
+
+   Returns ``true`` if any untracked files exist in the repository. Returns the
+   number of untracked files.
+
+   .. versionadded:: 2.0
+
+Mercurial
+---------
+
+.. note::
+   Mercurial does not support a staging area.
+
+.. note::
+   Mercurial remote tracking branches are disabled (see
+   :func:`_lp_hg_commits_off_remote`).
+
+.. function:: _lp_hg_active()
+
+   Returns ``true`` if Mercurial is enabled in Liquidprompt and the current
+   directory is a valid Mercurial repository. This check should be done before
+   running any other ``_lp_hg_*`` data functions if accessing the Mercurial data
+   functions directly instead of through the generic interface.
+
+   Can be disabled by :attr:`LP_ENABLE_HG`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_bookmark() -> var:lp_vcs_bookmark
+
+   Returns ``true`` if a bookmark is active in the repository. Returns the
+   bookmark name.
+
+   Mercurial bookmarks work more like Git branches.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_branch() -> var:lp_vcs_branch
+
+   Returns ``true`` if a branch is active in the repository. Returns the branch
+   name.
+
+   All Mercurial commits have a branch, so this function should always return
+   ``true``. A closer analog to Git branches are Mercurial bookmarks (see
+   :func:`_lp_hg_bookmark`).
+
+   .. versionchanged:: 2.0
+      Return method changed from stdout.
+      No branch now returns ``false``.
+
+.. function:: _lp_hg_commit_id() -> var:lp_vcs_commit_id
+
+   Returns the full global revision ID of the current commit. The return code is
+   not defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_commits_off_remote()
+
+   Returns ``3`` (disabled).
+
+   Mercurial does not keep a local copy of the remote state, so checking this
+   will require a connection to the remote server. This means it is often
+   prohibitively time expensive, and therefore should not be used in a prompt.
+   See `issue #217`_.
+
+   .. versionadded:: 2.0
+
+   .. _`issue #217`: https://github.com/nojhan/liquidprompt/issues/217
+
+.. function:: _lp_hg_head_status() -> var:lp_vcs_head_status
+
+   Return ``true`` if the repository is in a special or unusual state. Return
+   the special status.
+
+   Does not return any extra details.
+
+   This function depends on :func:`_lp_find_vcs` being run first to set
+   ``lp_vcs_root``.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_stash_count() -> var:lp_vcs_stash_count
+
+   Returns ``true`` if there are shelves the repository. Returns the
+   number of shelves.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_tag() -> var:lp_vcs_tag
+
+   Returns ``true`` if a tag is active in the repository. Returns the
+   tag name.
+
+   If multiple tags match, only one is returned. Which tag is selected is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_uncommitted_files() -> var:lp_vcs_uncommitted_files
+
+   Returns ``true`` if any uncommitted files exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_uncommitted_lines() -> var:lp_vcs_uncommitted_i_lines, var:lp_vcs_uncommitted_d_lines
+
+   Returns ``true`` if any uncommitted lines exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hg_untracked_files() -> var:lp_vcs_untracked_files
+
+   Returns ``true`` if any untracked files exist in the repository. Returns the
+   number of untracked files.
+
+   .. versionadded:: 2.0
+
+Subversion
+----------
+
+.. note::
+   Subversion does not support bookmarks.
+
+.. note::
+   Subversion does not support a staging area.
+
+.. note::
+   Subversion does not support stashes.
+
+.. note::
+   Subversion does not have extra head statuses. A Subversion merge is no
+   different than a manual file change, so the repository has no extra state to
+   track.
+
+.. note::
+   Subversion does not support remote tracking branches (as it is not a
+   distributed version control system).
+
+.. note::
+   Subversion does not support tags. What are generally agreed upon as being
+   tags are internally branches. These are returned by :func:`_lp_svn_branch`.
+
+.. function:: _lp_svn_active()
+
+   Returns ``true`` if Subversion is enabled in Liquidprompt and the current
+   directory is a valid Subversion repository. This check should be done before
+   running any other ``_lp_svn_*`` data functions if accessing the Subversion
+   data functions directly instead of through the generic interface.
+
+   Can be disabled by :attr:`LP_ENABLE_SVN`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_svn_branch() -> var:lp_vcs_branch
+
+   Returns ``true`` if a branch is active in the repository. Returns the branch
+   name.
+
+   Subversion "tags" are really branches under a "tag" directory. Tags are
+   returned as their directory name, prefixed with "tag/".
+
+   .. versionchanged:: 2.0
+      Return method changed from stdout.
+      No branch now returns ``false`` and nothing instead of the current
+      directory.
+
+.. function:: _lp_svn_commit_id() -> var:lp_vcs_commit_id
+
+   Returns the revision number of the current commit. The return code is not
+   defined.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_svn_uncommitted_files() -> var:lp_vcs_uncommitted_files
+
+   Returns ``true`` if any uncommitted files exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted files.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_svn_uncommitted_lines() -> var:lp_vcs_uncommitted_i_lines, var:lp_vcs_uncommitted_d_lines
+
+   Returns ``true`` if any uncommitted lines exist in the repository. In other
+   words, tracked files that contain uncommitted changes. Returns the number of
+   uncommitted lines.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_svn_untracked_files() -> var:lp_vcs_untracked_files
+
+   Returns ``true`` if any untracked files exist in the repository. Returns the
+   number of untracked files.
+
+   .. versionadded:: 2.0
+
diff -pruN 1.11-3/docs/functions/data.rst 2.0.3-1/docs/functions/data.rst
--- 1.11-3/docs/functions/data.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions/data.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,393 @@
+Data Functions
+**************
+
+.. contents::
+   :local:
+
+.. toctree::
+
+   data/vcs
+
+These functions are designed to be used by themes.
+
+All data functions will return ``true`` (meaning return code ``0``) when they
+are both enabled and have data. They will return ``false`` (meaning return code
+``1``) when they do not have data. Most will return ``2`` when they are
+disabled, either through the config or because the tool they depend on is not
+installed. Such disable config options will be documented. Exceptions to this
+rule are explicitly documented.
+
+When a function returns ``false``, any return variables are not guaranteed to
+be set. If running with ``set -u`` (or when building a theme to be
+distributed), guard any return variable accesses with a check of the return
+code, or use ``${var-}`` syntax.
+
+Battery
+-------
+
+.. function:: _lp_battery() -> var:lp_battery
+
+   Returns a return code depending on the status of the battery:
+
+   * ``5`` if the battery feature is disabled or not available
+   * ``4`` if no battery level is found
+   * ``3`` if charging and the level is above the threshold
+   * ``2`` if charging and the level is under the threshold
+   * ``1`` if discharging and the level is above the threshold
+   * ``0`` if discharging and the level is under the threshold
+
+   Returns an integer percentage of the current battery level.
+
+   If the threshold is not surpassed, the battery level is still returned.
+
+   The threshold is configured with :attr:`LP_BATTERY_THRESHOLD`.
+
+   Can be disabled by :attr:`LP_ENABLE_BATT`.
+
+Development Environment
+-----------------------
+
+.. function:: _lp_python_env() -> var:lp_python_env
+
+   Retuns ``true`` if a Python or Conda environment is detected. Returns the
+   virtual environment name.
+
+   If the environment name contains a forward slash (``/``), only the substring
+   after the last forward slash is returned.
+
+   Can be disabled by :attr:`LP_ENABLE_VIRTUALENV`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_software_collections() -> var:lp_software_collections
+
+   Returns ``true`` if a `Red Hat Software Collection`_ is enabled. Returns the
+   software collection name.
+
+   If the software collection name has trailing whitespace, it is removed.
+
+   Can be disabled by :attr:`LP_ENABLE_SCLS`.
+
+   .. versionadded:: 2.0
+
+   .. _`Red Hat Software Collection`: https://developers.redhat.com/products/softwarecollections/overview
+
+Environment
+-----------
+
+.. function:: _lp_connected_display()
+
+   Returns ``true`` if there is a connected X11 display.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_connection() -> var:lp_connection
+
+   Returns a string matching the connection context of the shell. Valid values:
+
+   * ``ssh`` - connected over OpenSSH
+   * ``lcl`` - running in a local terminal
+   * ``su`` - running in a ``su`` or ``sudo`` shell
+   * ``tel`` - connected over Telnet
+
+   It is not possible for more than one context to be returned. The contexts
+   are checked in the order listed above, and the first one found will be
+   returned.
+
+   It is not possible for no context to be returned.
+
+   .. versionchanged:: 2.0
+      Return method changed from stdout.
+
+.. function:: _lp_dirstack() -> var:lp_dirstack
+
+    Returns ``true`` if directory stack support is enabled and the directory
+    stack contains more than one directory. In that case, the return variable
+    is set to the number of directories on the stack.
+
+    Can be enabled by :attr:`LP_ENABLE_DIRSTACK`.
+
+    .. versionadded:: 2.0
+
+.. function:: _lp_error() -> var:lp_error
+
+   Returns ``true`` if the last user shell command returned a non-zero exit
+   code. Returns (in the return variable) the exit code of that command.
+
+   Can be disabled by :attr:`LP_ENABLE_ERROR`.
+
+   .. note::
+
+      The return variable ``lp_error`` will always be set with the last command
+      return code, as it must be the first thing done by the prompt. This
+      function should still be used, as it checks for the feature being
+      disabled by the user.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_http_proxy() -> var:lp_http_proxy
+
+   Returns ``true`` if an HTTP or HTTPS proxy is enabled through environment
+   variables in the shell. Returns the first found proxy string.
+
+   Can be disabled by :attr:`LP_ENABLE_PROXY`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_multiplexer() -> var:lp_mulitplexer
+
+   Returns ``true`` if the current shell context is inside a terminal
+   multiplexer. Returns a string matching the multiplexer:
+
+   * ``tmux``
+   * ``screen``
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_terminal_device() -> var:lp_terminal_device
+
+   Returns the basename of the terminal device connected to the shell's standard
+   input.
+
+   .. note::
+      This value should never change during the life of the shell.
+
+   .. note::
+      This data source is unlikely to be wanted by the user, and should not be
+      included in themes by default.
+
+   .. versionadded:: 2.0
+
+Jobs
+----
+
+.. function:: _lp_detached_sessions() -> var:lp_detached_sessions
+
+   Returns ``true`` if any detached multiplexer sessions are found. Returns an
+   integer count of how many sessions were found.
+
+   Can be disabled by :attr:`LP_ENABLE_DETACHED_SESSIONS`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_jobcount() -> var:lp_running_jobs, var:lp_stopped_jobs
+
+   Returns ``true`` if any shell background jobs are found. Returns an integer
+   count of how many jobs are running and how many are stopped.
+
+   Stopped jobs are jobs suspended with Ctrl-Z.
+
+   Running jobs are jobs started with the ``command &`` syntax, or stopped jobs
+   started again with the ``bg`` command.
+
+   Can be disabled by :attr:`LP_ENABLE_JOBS`.
+
+   .. versionadded:: 2.0
+
+Load
+----
+
+.. function:: _lp_cpu_load() -> var:lp_cpu_load
+
+   Returns a string of the system load average smallest increment, usually 1
+   minute. The return code is not defined.
+
+.. function:: _lp_load() -> var:lp_load, var:lp_load_adjusted
+
+   Returns ``true`` if the system load average scaled by CPU count is greater
+   than the threshold. Returns the system load average in *lp_load*, and the
+   average scaled by CPU count, multiplied by 100 in *lp_load_adjusted*. In
+   other words, the load average is multiplied by 100, then divided by the
+   number of CPU cores.
+
+   *lp_load* should be displayed to the user, while *lp_load_adjusted* should be
+   used to compare values between machines using :attr:`LP_LOAD_CAP`. The
+   default theme uses this to generate a color scale.
+
+   .. note::
+      :attr:`LP_LOAD_CAP` is a raw floating point configuration value that is
+      difficult to do math on. ``_LP_LOAD_CAP`` contains the same value, but
+      multiplied by 100 to make comparisons to *lp_load_adjusted* simple. Use
+      it along with *lp_load_adjusted* as arguments to :func:`_lp_color_map`.
+
+   If the threshold is not surpassed, the load average is still returned.
+
+   The threshold is configured with :attr:`LP_LOAD_THRESHOLD`.
+
+   Can be disabled by :attr:`LP_ENABLE_LOAD`.
+
+   .. versionadded:: 2.0
+
+OS
+--
+
+.. function:: _lp_chroot() -> var:lp_chroot
+
+   Returns ``true`` if a chroot environment is detected. Returns a string
+   matching the chroot string if one is found.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hostname() -> var:lp_hostname
+
+   Returns ``true`` if a hostname should be displayed. Returns ``1`` if the
+   connection type is local and :attr:`LP_HOSTNAME_ALWAYS` is not ``1``.
+
+   Returns the hostname string.
+
+   .. note::
+
+      The returned string is not the real hostname, instead it is the shell
+      escape code for hostname, so the shell will substitute the real user ID
+      when it evaluates :envvar:`PS1`.
+
+   .. deprecated:: 2.0
+      Also sets :attr:`LP_HOST_SYMBOL` to the same return string.
+
+   Can be disabled by :attr:`LP_HOSTNAME_ALWAYS` set to ``-1``.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_sudo_active()
+
+   Returns ``true`` if ``sudo`` is currently activated with valid credentials.
+   If ``sudo`` is configured to always allow a user to run commands with no
+   password, this will always return ``true``.
+
+   Can be disabled by :attr:`LP_ENABLE_SUDO`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_user()
+
+   Returns a return code depending on the logged in user:
+
+   * ``2`` - the user is root
+   * ``1`` - the user is a user other than the original login user
+   * ``0`` - the user is the login user
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_username() -> var:lp_username
+
+   Returns ``true`` if a username should be displayed. Returns ``1`` if the
+   user is the login user and :attr:`LP_USER_ALWAYS` is not ``1``.
+
+   Returns the current user ID.
+
+   .. note::
+
+      The returned string is not a real user ID, instead it is the shell escape
+      code for user, so the shell will substitute the real user ID when it
+      evaluates :envvar:`PS1`.
+
+   Can be disabled by :attr:`LP_USER_ALWAYS` set to ``-1``.
+
+   .. versionadded:: 2.0
+
+Path
+----
+
+.. function:: _lp_path_format(path_format=$LP_COLOR_PATH, \
+   last_directory_format=$path_format, vcs_root_format=$last_directory_format, \
+   shortened_directory_format=$path_format, separator="/", \
+   [separator_format]) -> var:lp_path, var:lp_path_format
+
+   Returns a shortened and formatted string indicating the current working
+   directory path. *lp_path* contains the path without any formatting or custom
+   separators, intended for use in the terminal title. *lp_path_format* contains
+   the complete formatted path, to be inserted into the prompt.
+
+   The behavior of the shortening is controlled by
+   :attr:`LP_ENABLE_SHORTEN_PATH`, :attr:`LP_PATH_METHOD`,
+   :attr:`LP_PATH_LENGTH`, :attr:`LP_PATH_KEEP`, :attr:`LP_PATH_CHARACTER_KEEP`,
+   and :attr:`LP_PATH_VCS_ROOT`. See their descriptions for details on how they
+   change the output of this function.
+
+   The last directory in the displayed path will be shown with the
+   *last_directory_format*.
+
+   If a VCS repository is detected with :func:`_lp_find_vcs`, the root of the
+   VCS repository is formatted with *vcs_root_format*. The detection method is
+   the same as for all other VCS display, so if a VCS type or directory is
+   disabled, it will not be detected.
+
+   If the path shortening shortens a directory (or multiple consecutive
+   directories), they will be formatted with *shortened_directory_format*.
+
+   A custom *separator* will only be substituted in the *lp_path_format* output.
+   Note that this will cut into maximum path length if the separator is longer
+   than one character.
+
+   With no specified *separator_format*, each separator will take the format of
+   the directory section preceding it. Otherwise every separator will be
+   formatted with *separator_format*. Note that the root directory is treated as
+   a directory, and is formatted as such.
+
+   .. versionadded:: 2.0
+
+Runtime
+-------
+
+.. function:: _lp_runtime_format() -> var:lp_runtime_format
+
+   Returns ``true`` if the last command runtime was greater than the threshold.
+   Returns a formatted string of the total runtime, split into days, hours,
+   minutes, and seconds. Ex: ``3h27m6s``.
+
+   The threshold is configured with :attr:`LP_RUNTIME_THRESHOLD`.
+
+   Can be disabled by :attr:`LP_ENABLE_RUNTIME`.
+
+   .. versionadded:: 2.0
+
+Temperature
+-----------
+
+.. function:: _lp_temperature() -> var:lp_temperature
+
+   Returns ``true`` if the highest system temperature is greater than the
+   threshold. Returns the highest temperature integer.
+
+   If the threshold is not surpassed, the highest temperature is still returned.
+
+   If no temperature data is found, returns ``false`` and *lp_temperature* will
+   not be set.
+
+   The threshold is configured with :attr:`LP_TEMP_THRESHOLD`.
+
+   Can be disabled by :attr:`LP_ENABLE_TEMP`.
+
+   .. versionadded:: 2.0
+      Note that a function by this name was renamed to
+      ``_lp_temperature_color``.
+
+Time
+----
+
+.. function:: _lp_time() -> var:lp_time
+
+   Returns ``true`` if digital time is enabled. Returns the current digital time
+   string.
+
+   .. note::
+
+      The returned string is not the real time, instead it is the shell escape
+      code for time, so the shell will substitute the real current time when it
+      evaluates :envvar:`PS1`.
+
+   Can be disabled by :attr:`LP_ENABLE_TIME` or :attr:`LP_TIME_ANALOG` set to
+   ``1``.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_analog_time() -> var:lp_analog_time
+
+   Returns ``true`` if analog time is enabled. Returns the current analog time
+   as a single Unicode character, accurate to the closest 30 minutes.
+
+   Can be disabled by :attr:`LP_ENABLE_TIME` or :attr:`LP_TIME_ANALOG` set to
+   ``0``.
+
+   .. versionadded:: 2.0
+
diff -pruN 1.11-3/docs/functions/internal.rst 2.0.3-1/docs/functions/internal.rst
--- 1.11-3/docs/functions/internal.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions/internal.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,277 @@
+Internal Functions
+******************
+
+.. contents::
+   :local:
+
+These functions are designed to be used only by Liquidprompt internals and data
+functions. These functions should not be used by users or themes, as they are
+not guaranteed to be stable between versions. There are documented here for
+information for those developing Liquidprompt.
+
+Config
+------
+
+.. function:: __lp_source_config([--no-config])
+
+   Load the user config and default config values. This function is called by
+   :func:`lp_activate`.
+
+   Also setup color variables that can be used by the user for their color
+   config. Those variables are local to this function.
+
+   If the ``--no-config`` flag is passed, defaults are set, but no config file
+   is sourced.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_source_config``.
+      Added ``--no-config`` flag.
+
+Formatting
+----------
+
+.. function:: __lp_background_color(color) -> var:ab_color
+
+   Returns the terminal escape code to set the background color to the
+   `ANSI escape color code`_ integer *color*. No checking is done for invalid
+   color codes.
+
+   .. versionadded:: 1.12
+
+   .. versionchanged:: 2.0
+      Renamed from ``background_color``.
+
+.. function:: __lp_foreground_color(color) -> var:af_color
+
+   Returns the terminal escape code to set the foreground color to the
+   `ANSI escape color code`_ integer *color*. No checking is done for invalid
+   color codes.
+
+   .. versionadded:: 1.12
+
+   .. versionchanged:: 2.0
+      Renamed from ``foreground_color``.
+
+.. _`ANSI escape color code`: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
+
+Git
+---
+
+.. function:: __lp_git_diff_shortstat_files(diff_shortstat) -> var:lp_git_diff_shortstat_files
+
+   Processes the input *diff_shortstat* as the output of a ``git diff
+   --shortstat`` command, returning the number of changed files. This allows for
+   the comparison of any two states, as :func:`__lp_git_diff_shortstat_files`
+   does not run any specific ``git diff`` command.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_git_diff_shortstat_lines(diff_shortstat) -> var:lp_git_diff_shortstat_lines
+
+   Processes the input *diff_shortstat* as the output of a ``git diff
+   --shortstat`` command, returning the number of changed lines. This allows for
+   the comparison of any two states, as :func:`__lp_git_diff_shortstat_files`
+   does not run any specific ``git diff`` command.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_git_diff_shortstat_staged() -> var:_lp_git_diff_shortstat_staged
+
+   Returns the output of a ``git diff --shortstat`` command, comparing the
+   staging area to the HEAD commit.
+
+   The return variable is supposed to be a cache, set as local in
+   :func:`__lp_set_prompt`, preventing duplicate calls to ``git``.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_git_diff_shortstat_uncommitted() -> var:_lp_git_diff_shortstat_uncommitted
+
+   Returns the output of a ``git diff --shortstat`` command, comparing the
+   working directory to the HEAD commit.
+
+   The return variable is supposed to be a cache, set as local in
+   :func:`__lp_set_prompt`, preventing duplicate calls to ``git``.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_git_diff_shortstat_unstaged() -> var:_lp_git_diff_shortstat_unstaged
+
+   Returns the output of a ``git diff --shortstat`` command, comparing the
+   working directory to the staging area.
+
+   The return variable is supposed to be a cache, set as local in
+   :func:`__lp_set_prompt`, preventing duplicate calls to ``git``.
+
+   .. versionadded:: 2.0
+
+Load
+----
+
+.. function:: __lp_cpu_count() -> var:_lp_CPUNUM
+
+   Returns the number of CPUs on the machine. The implementation depends on the
+   operating system.
+
+   .. versionadded:: 2.0
+
+OS
+--
+
+.. function:: __lp_hostname_hash() -> var:lp_hostname_hash
+
+   Returns the hash of the hostname as computed by ``cksum``.
+
+   .. versionadded:: 2.0
+
+Path
+----
+
+.. function:: __lp_end_path_left_shortening()
+
+   Terminate a multi-directory shortening, checking if the shortening actually
+   made a shorter path, and if so, adding the shortened mark. If not, adds the
+   real path to the output. Only used internally by :func:`_lp_path_format`.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_get_unique_directory(path) -> var:lp_unique_directory
+
+   Returns the shortest unique directory prefix matching the real directory
+   input. Only used internally by :func:`_lp_path_format`.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_pwd_tilde([path]) -> var:lp_pwd_tilde
+
+   Returns *path*, or :envvar:`PWD` if *path* is not set, with the user's home
+   directory replaced with a tilde ("~").
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_get_home_tilde_collapsed``.
+      Return method changed from stdout.
+      Optional parameter *path* added.
+
+Prompt
+------
+
+.. function:: __lp_set_prompt()
+
+   Setup features that need to be handled outside of the themes, like
+   :func:`_lp_error` (since last return code must be recorded first), non
+   printing features like :attr:`LP_ENABLE_RUNTIME_BELL` and
+   :attr:`LP_ENABLE_TITLE`, track current directory changes, and initialize data
+   source cache variables. This function also calls the current theme functions.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_set_prompt``.
+
+Runtime
+-------
+
+.. function:: __lp_runtime_before()
+
+   Hooks into the shell to run directly after the user hits return on a command,
+   to record the current time before the command runs.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_runtime_before``.
+
+.. function:: __lp_runtime_after()
+
+   Hooks into the shell to run directly after the user command returns, to
+   record the current time, and calculate how long the command ran for.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_runtime_after``.
+
+Theme
+-----
+
+.. function:: __lp_theme_list() -> var:lp_theme_list
+
+   Returns an array of Liquidprompt themes currently loaded in memory. Looks for
+   functions matching ``_lp_*_theme_prompt``.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_theme_bash_complete() -> var:COMPREPLY
+
+   Uses :func:`__lp_theme_list` to provide Bash autocompletion for
+   :func:`lp_theme`.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_theme_zsh_complete()
+
+   Uses :func:`__lp_theme_list` to provide Zsh autocompletion for
+   :func:`lp_theme`.
+
+   .. versionadded:: 2.0
+
+Temperature
+-----------
+.. function:: __lp_temp_detect() -> var:_LP_TEMP_FUNCTION
+
+   Attempts to run the possible temperature backend functions below to find one
+   that works correctly. When one correctly returns a value, it is saved to
+   ``_LP_TEMP_FUNCTION`` for use by :func:`_lp_temperature`.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_temp_detect``.
+
+.. function:: __lp_temp_acpi() -> var:lp_temperature
+
+   A temperature backend using ``acpi``.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_temp_acpi``.
+      Return variable changed from ``temperature``.
+
+.. function:: __lp_temp_sensors() -> var:lp_temperature
+
+   A temperature backend using lm-sensors provided ``sensors``.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_temp_sensors``.
+      Return variable changed from ``temperature``.
+
+Utility
+---------
+
+.. function:: __lp_escape(string) -> var:ret
+
+   Escape shell escape characters so they print correctly in :envvar:`PS1`.
+
+   In Bash, backslashes (``\``) are used to escape codes, so backslashes are
+   replaced by two backslashes.
+
+   In Zsh, percents (``%``) are used to escape codes, so percents are replaced
+   by two percents.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_escape``.
+      Return method changed from stdout.
+
+.. function:: __lp_floating_scale(number, scale) -> var:ret
+
+   Returns the input floating point *number* multiplied by the input *scale*.
+   The input *scale* must be a power of 10.
+
+   Shells do not support floating point math, so this is used to scale up
+   floating point numbers to integers with the needed precision.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_is_function(function)
+
+   Returns ``true`` if *function* is the name of a function.
+
+   .. versionadded:: 2.0
+
+.. function:: __lp_line_count(string) -> var:count
+
+   Count the number of newline characters (``\n``) in *string*. A faster drop-in
+   replacement for ``wc -l``.
+
+   .. versionadded:: 2.0
diff -pruN 1.11-3/docs/functions/public.rst 2.0.3-1/docs/functions/public.rst
--- 1.11-3/docs/functions/public.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions/public.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,140 @@
+Public Functions
+****************
+
+These functions are designed to be used by users on the command line or in
+their config.
+
+.. function:: lp_activate()
+
+   Reload the user config.
+
+   This function is called when sourcing ``liquidprompt``, unless the flag
+   ``--no-activate`` is passed.
+
+   The config is sourced, and the environment scanned again for programs needed
+   for specific features.
+
+   Lastly, :func:`prompt_on` is called to enabled the prompt.
+
+   .. versionadded:: 2.0
+
+.. function:: lp_title([title_string])
+
+   Set *title_string* as the terminal title. This overrides any title set by the
+   current theme.
+
+   .. note::
+      The input string is not escaped in any way; if it contains characters
+      that the shell will interpret, the user must escape them if that behavior
+      is not desired.
+
+   To unset the manual title, call :func:`lp_title` with no arguments.
+
+   To set a blank title, call :func:`lp_title` with an empty string argument
+   (``''``).
+
+   This function will do nothing and return ``2`` if :attr:`LP_ENABLE_TITLE`
+   is ``0``.
+
+   .. versionadded:: 2.0
+
+.. function:: lp_theme(theme_id | --list)
+
+   Load and activate the theme named *theme_id*. The theme functions must be
+   loaded into memory before :func:`lp_theme` can be called, normally by
+   sourcing the theme file.
+
+   The optional flag ``--list`` will instead list all currently loaded
+   themes.
+
+   This function supports shell autocompletion.
+
+   .. versionadded:: 2.0
+
+.. function:: lp_terminal_format(foreground_color, [background_color], \
+                                 [bold], [underline], \
+                                 [fallback_foreground_color], \
+                                 [fallback_background_color]) \
+                                 -> var:lp_terminal_format
+
+   Generate a shell escaped terminal formatting string for use in :envvar:`PS1`.
+
+   The start of the formatting string always resets back to terminal defaults.
+
+   *foreground_color* and *background_color* accept an
+   `ANSI escape color code`_ integer to set the color of the foreground and
+   background, respectively. The behavior depends on the integer:
+
+   * ``>= 0 && < max_color`` - The color is used directly.
+   * ``>= max_color`` - If the terminal reports that the number of colors it
+     supports is less than the input color code, the
+     *fallback_foreground_color* or *fallback_background_color* is used instead.
+   * ``-1`` - No color is set. This does not mean that the previous color will
+     continue over, as all formatting is reset to default at the start of the
+     sequence. This means the default coloring is effectively set.
+   * ``-2`` - The previous color of the field is set. If no color was
+     previously set, no color will be set. Note that the output is a static
+     formatting string; the string will not keep the same color as the terminal
+     previously had, but the color that was last selected when
+     :func:`lp_terminal_format` was last run.
+   * ``-3`` - Same as ``-2``, except the opposite field color is copied. In
+     other words, if *foreground_color* is set to ``-3``, it will copy the
+     color of *background_color* the last time :func:`lp_terminal_format`
+     was run.
+
+   *bold* and *underline* enable their respective formats when set to ``1``.
+   If omitted or set to ``0``, they are not enabled. To use fallback colors,
+   they will need to be set to be able to set the other options.
+
+   *fallback_foreground_color* and *fallback_background_color* are used when the
+   normal colors are higher than the terminal supported colors. The special
+   negative inputs do not work for these options, and they are not checked for
+   compatibility before being used, so it is recommended that they are in the
+   range ``0-7``.
+   When setting *foreground_color* or *background_color* to negative inputs,
+   these options are never checked.
+
+   For example, to set the error color to a bright, bold pink, with a fallback
+   color of red::
+
+      lp_terminal_format 204 -1 1 0 1
+      LP_COLOR_ERR=$lp_terminal_format
+
+   To set the prompt mark color to black on a white background::
+
+      lp_terminal_format 0 7
+      LP_COLOR_MARK=$lp_terminal_format
+
+   .. versionadded:: 2.0
+
+   .. _`ANSI escape color code`: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
+
+.. function:: prompt_on()
+
+   Enable the prompt generation and setting.
+
+   This function is called when sourcing ``liquidprompt``, unless the flag
+   ``--no-activate`` is passed.
+
+.. function:: prompt_off()
+
+   Disable the prompt generation and setting, and restore the old :envvar:`PS1`.
+
+   If the shell is Bash, also restore the old :envvar:`PROMPT_COMMAND`.
+
+   If the shell is Zsh, also restore the old prompt theme.
+
+.. function:: prompt_OFF()
+
+   Same as :func:`prompt_off`, except instead of restoring the previous
+   :envvar:`PS1`, it is set to "$ " on Bash, "% " on Zsh.
+
+.. function:: prompt_tag([prefix_string])
+
+   Sets a prefix that will be displayed before every prompt. Postpends a space
+   to the input string.
+
+   Internally, this function sets :attr:`LP_PS1_PREFIX` to *prefix_string*.
+   If a trailing space is not wanted, set :attr:`LP_PS1_PREFIX` manually.
+
+   To unset the prefix, call :func:`prompt_tag` with no arguments.
diff -pruN 1.11-3/docs/functions/theme.rst 2.0.3-1/docs/functions/theme.rst
--- 1.11-3/docs/functions/theme.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions/theme.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,244 @@
+Default Theme Functions
+***********************
+
+.. contents::
+   :local:
+
+These functions are designed to be used by the default theme, but are documented
+here so that other themes can use these functions to reduce duplication if
+sections from the default theme are wanted.
+
+Theme Functions
+---------------
+
+.. function:: _lp_default_theme_activate()
+
+   Setup the defaults and static pieces of the default theme.
+
+   Uses colors:
+
+   * :attr:`LP_COLOR_IN_MULTIPLEXER`
+   * :attr:`LP_COLOR_MARK`
+   * :attr:`LP_COLOR_MARK_ROOT`
+   * :attr:`LP_COLOR_PATH_ROOT`
+   * :attr:`LP_COLOR_USER_ALT`
+   * :attr:`LP_COLOR_USER_LOGGED`
+   * :attr:`LP_COLOR_USER_ROOT`
+
+   And marks:
+
+   * :attr:`LP_MARK_BRACKET_OPEN`
+   * :attr:`LP_MARK_BRACKET_CLOSE`
+   * :attr:`LP_MARK_DEFAULT`
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_default_theme_directory()
+
+   Setup the colors for the directory when the current working directory
+   changes.
+
+   Uses colors:
+
+   * :attr:`LP_COLOR_NOWRITE`
+   * :attr:`LP_COLOR_PATH`
+   * :attr:`LP_COLOR_WRITE`
+
+   And mark :attr:`LP_MARK_PERM`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_default_theme_prompt()
+
+   Runs :func:`_lp_default_theme_prompt_data` then
+   :func:`_lp_default_theme_prompt_template`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_default_theme_prompt_data()
+
+   Runs all of the below theme data functions, and writes values to the
+   :doc:`../theme/default` variables. Can be used to generate all the default
+   theme sections, then modify them before running a user template.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_default_theme_prompt_template()
+
+   If :attr:`LP_PS1_FILE` is set, sources it.
+
+   Then, if :attr:`LP_PS1` is set, uses it as :envvar:`PS1`. Otherwise, uses the
+   default theme layout to construct :envvar:`PS1`. Can be used to set different
+   template sections than the default theme, but still use the same template
+   engine.
+
+   .. versionadded:: 2.0
+
+Theme Data Functions
+--------------------
+
+These functions wrap :doc:`data` with color and/or other formatting. Their
+return codes are the same as the data functions they wrap unless otherwise
+documented.
+
+The interface of the functions will not change between minor versions, but the
+specific text and formatting may change.
+
+.. function:: _lp_analog_time_color() -> var:lp_analog_time_color
+
+   Returns :func:`_lp_analog_time` with color from :attr:`LP_COLOR_TIME`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_battery_color() -> var:lp_battery_color
+
+   Returns data from :func:`_lp_battery`, colored with:
+
+   * :attr:`LP_COLOR_CHARGING_ABOVE`
+   * :attr:`LP_COLOR_CHARGING_UNDER`
+   * :attr:`LP_COLOR_DISCHARGING_ABOVE`
+   * :attr:`LP_COLOR_DISCHARGING_UNDER`
+   * :attr:`LP_COLORMAP`
+
+   And using marks:
+
+   * :attr:`LP_MARK_ADAPTER`
+   * :attr:`LP_MARK_BATTERY`
+
+   Adds battery value if :attr:`LP_PERCENTS_ALWAYS` is ``1``.
+
+   .. versionchanged:: 2.0
+      Return code matches data function.
+      Return method changed from stdout.
+
+.. function:: _lp_dirstack_color() -> var:lp_dirstack_color
+
+    Returns :func:`_lp_dirstack`, prefixed with :attr:`LP_MARK_DIRSTACK`, all
+    colored with :attr:`LP_COLOR_DIRSTACK`.
+
+    .. versionadded:: 2.0
+
+.. function:: _lp_error_color() -> var:lp_error_color
+
+   Returns :func:`_lp_error` with color from :attr:`LP_COLOR_ERR`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_hostname_color() -> var:lp_hostname_color
+
+   Returns :func:`_lp_hostname`, with added data from :func:`_lp_chroot`.
+   Color from :attr:`LP_COLOR_HOST`, :attr:`LP_COLOR_SSH`,
+   :attr:`LP_COLOR_HOST_HASH`, and :attr:`LP_COLOR_TELNET`, depending on the
+   output of :func:`_lp_connection`.
+
+   Added color from :func:`_lp_connected_display`: either
+   :attr:`LP_COLOR_X11_ON` or :attr:`LP_COLOR_X11_OFF`.
+
+   Return code is :func:`_lp_hostname` ORed with :func:`_lp_chroot`: both must
+   return no data for :func:`_lp_hostname_color` to return no data.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_http_proxy_color() -> var:lp_http_proxy_color
+
+   Returns :func:`_lp_http_proxy` with color from :attr:`LP_COLOR_PROXY`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_jobcount_color() -> var:lp_jobcount_color
+
+   Returns :func:`_lp_detached_sessions` with color from :attr:`LP_COLOR_JOB_D`
+   and :func:`_lp_jobcount` with colors from :attr:`LP_COLOR_JOB_R` and
+   :attr:`LP_COLOR_JOB_Z`.
+
+   Return code is :func:`_lp_detached_sessions` ORed with :func:`_lp_jobcount`:
+   both must return no data for :func:`_lp_jobcount_color` to return no data.
+
+   .. versionchanged:: 2.0
+      Return code matches data function.
+      Return method changed from stdout.
+
+.. function:: _lp_load_color() -> var:lp_load_color
+
+   Returns :func:`_lp_load` with color from :attr:`LP_COLORMAP` and mark from
+   :attr:`LP_MARK_LOAD`.
+
+   Adds load value if :attr:`LP_PERCENTS_ALWAYS` is ``1``.
+
+   .. versionchanged:: 2.0
+      Return code matches data function.
+      Return method changed from stdout.
+
+.. function:: _lp_python_env_color() -> var:lp_python_env_color
+
+   Returns :func:`_lp_python_env` with color from :attr:`LP_COLOR_VIRTUALENV`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_runtime_color() -> var:lp_runtime_color
+
+   Returns :func:`_lp_runtime_format` with color from :attr:`LP_COLOR_RUNTIME`.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_runtime``.
+      Return code matches data function.
+      Return method changed from stdout.
+
+.. function:: _lp_software_collections_color() -> var:lp_software_collections_color
+
+   Returns :func:`_lp_software_collections` with color from
+   :attr:`LP_COLOR_VIRTUALENV`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_sudo_active_color() -> var:lp_sudo_active_color
+
+   Returns :func:`_lp_sudo_active` with color and marks from
+   :attr:`LP_COLOR_MARK_SUDO` if sudo is active, or
+   :attr:`LP_COLOR_MARK_NO_SUDO` if not.
+
+   Does not return ``1`` if sudo is not active, as the return string is still
+   needed.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_sudo_check``.
+      Always defined instead of only when :attr:`LP_ENABLE_SUDO` is enabled.
+      Return variable changed from ``LP_COLOR_MARK``.
+
+.. function:: _lp_temperature_color() -> var:lp_temperature_color
+
+   Returns :func:`_lp_temperature` with color from :attr:`LP_COLORMAP` and mark
+   from :attr:`LP_MARK_TEMP`.
+
+   .. versionchanged:: 2.0
+      Renamed from ``_lp_temperature``.
+      Return code matches data function.
+      Return method changed from stdout.
+
+.. function:: _lp_time_color() -> var:lp_time_color
+
+   Returns :func:`_lp_time` with color from :attr:`LP_COLOR_TIME`.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_vcs_details_color() -> var:lp_vcs_details_color
+
+   Returns data from all generic :doc:`data/vcs`, colored with:
+
+   * :attr:`LP_COLOR_CHANGES`
+   * :attr:`LP_COLOR_COMMITS`
+   * :attr:`LP_COLOR_COMMITS_BEHIND`
+   * :attr:`LP_COLOR_DIFF`
+   * :attr:`LP_COLOR_UP`
+
+   And using marks:
+
+   * :attr:`LP_MARK_STASH`
+   * :attr:`LP_MARK_UNTRACKED`
+
+   This function should only be called when in a VCS repository; use
+   :func:`_lp_find_vcs` or :func:`_lp_vcs_active` before.
+
+   The return code is undefined; a string should always be returned.
+
+   .. versionadded:: 2.0
diff -pruN 1.11-3/docs/functions/util.rst 2.0.3-1/docs/functions/util.rst
--- 1.11-3/docs/functions/util.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions/util.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,93 @@
+Utility Functions
+*****************
+
+These functions are designed to be used by themes.
+
+.. function:: _lp_as_text(string) -> stdout
+
+   Return *string* with all shell escaped substrings removed.
+
+.. function:: _lp_bool(variable, [code])
+
+   .. deprecated:: 2.0
+
+   Stores the *code* in a variable named *variable*. If *code* is not set, uses
+   the last return code instead.
+
+.. function:: _lp_color_map(value, scale=100) -> var:ret
+
+   Returns a color from the configured or default color map based on *value*
+   and optional *scale*.
+
+   Values below 0 or above *scale* will be capped.
+
+   The returned string is a fully escaped terminal formatting sequence.
+
+.. function:: _lp_sb(string) -> stdout
+
+   .. deprecated:: 2.0
+      Use the return code of the source data function to determine if any
+      string was returned.
+
+   If *string* is set and not empty, returns *string* padded with an extra space
+   on the right and the left.
+
+.. function:: _lp_sl(string) -> stdout
+
+   .. deprecated:: 2.0
+      Use the return code of the source data function to determine if any
+      string was returned.
+
+   If *string* is set and not empty, returns *string* padded with an extra space
+   on the left.
+
+.. function:: _lp_sr(string) -> stdout
+
+   .. deprecated:: 2.0
+      Use the return code of the source data function to determine if any
+      string was returned.
+
+   If *string* is set and not empty, returns *string* padded with an extra space
+   on the right.
+
+.. function:: _lp_smart_mark([vcs_type]) -> var:lp_smart_mark
+
+   Returns a string set to the configured mark matching *vcs_type*. If
+   *vcs_type* is not set, uses the value of ``lp_vcs_type`` instead.
+
+   If the type is "git", extra checks are done to see if the repository is of
+   type VCSH or git-svn instead, and return their marks if so.
+
+.. function:: _lp_title(title) -> stdout
+
+   .. deprecated:: 2.0
+      Use :attr:`_lp_formatted_title` instead.
+
+   Formats *title* with title escape codes. The input is escaped using
+   :func:`_lp_as_text` to strip terminal formatting from being added to the
+   title. The output should be added to :envvar:`PS1` to be printed as a title.
+
+   This function will do nothing if :attr:`LP_ENABLE_TITLE` is disabled.
+
+.. function:: _lp_formatted_title(title)
+
+   Sets the theme generated title to *title*. The input is escaped using
+   :func:`_lp_as_text` to strip terminal formatting from being added to the
+   title.
+
+   This function will do nothing and return ``2`` if :attr:`LP_ENABLE_TITLE`
+   is disabled.
+
+   .. versionadded:: 2.0
+
+.. function:: _lp_raw_title(title)
+
+   Sets the theme generated title to *title*. The input is not escaped in any
+   way: if the input contains terminal formatting, use :func:`_lp_title`
+   instead.
+
+   This function will do nothing and return ``2`` if :attr:`LP_ENABLE_TITLE`
+   is disabled.
+
+   .. versionadded:: 2.0
+
diff -pruN 1.11-3/docs/functions.rst 2.0.3-1/docs/functions.rst
--- 1.11-3/docs/functions.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/functions.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,21 @@
+Functions
+*********
+
+Functions starting with ``lp`` or any other alphanumeric character are **public**
+functions designed to be used by users on the command line or in their config.
+
+Functions starting with ``_lp`` are **theme** level functions, designed to be used
+by themes. These include data, theme, and utility functions.
+
+Functions starting with ``__lp`` are **internal** functions, designed to be used
+only by Liquidprompt internals. These functions should not be used by users or
+themes, as they are not guaranteed to not change between versions.
+
+.. toctree::
+   :maxdepth: 1
+
+   functions/public
+   functions/data
+   functions/theme
+   functions/util
+   functions/internal
diff -pruN 1.11-3/docs/.gitignore 2.0.3-1/docs/.gitignore
--- 1.11-3/docs/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/.gitignore	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,2 @@
+_build/
+venv/
diff -pruN 1.11-3/docs/index.rst 2.0.3-1/docs/index.rst
--- 1.11-3/docs/index.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/index.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,31 @@
+.. Liquidprompt documentation master file, created by
+   sphinx-quickstart on Wed Nov 18 11:00:53 2020.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to Liquidprompt's documentation!
+========================================
+
+Liquidprompt is an adaptive prompt for Bash & Zsh that gives you a nicely
+displayed prompt with useful information when you need it. It does this with a
+powerful theming engine and a large array of data sources.
+
+To get started, view the :doc:`install` documentation, which includes
+instructions for trying Liquidprompt temporarily.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   install
+   config
+   theme
+   functions
+   release-notes
+   upgrading
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
diff -pruN 1.11-3/docs/install/packages.rst 2.0.3-1/docs/install/packages.rst
--- 1.11-3/docs/install/packages.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/install/packages.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,94 @@
+Packages
+********
+
+.. contents::
+   :local:
+
+Liquidprompt is packaged for many operating systems, though the latest version
+in those repositories is not always up to date.
+
+Latest Versions
+===============
+
+.. image:: https://repology.org/badge/vertical-allrepos/liquidprompt.svg
+   :alt: Liquidprompt packaging status
+
+Source: `repology.org <https://repology.org/project/liquidprompt/versions>`_.
+
+Install commands
+================
+
+Archlinux
+---------
+
+.. image:: https://repology.org/badge/version-for-repo/aur/liquidprompt.svg
+   :alt: Archlinux package
+   :target: https://aur.archlinux.org/packages/liquidprompt
+
+.. code-block::
+
+   pacman -S liquidprompt
+
+Debian
+------
+
+... and Debian derivatives.
+
+.. image:: https://repology.org/badge/version-for-repo/debian_stable/liquidprompt.svg
+   :alt: Debian Stable package
+   :target: https://packages.debian.org/stable/source/liquidprompt
+
+.. image:: https://repology.org/badge/version-for-repo/ubuntu_20_10/liquidprompt.svg
+   :alt: Ubuntu 20.10 package
+   :target: https://packages.ubuntu.com/source/groovy/liquidprompt
+
+.. image:: https://repology.org/badge/version-for-repo/mx_19_testing/liquidprompt.svg
+   :alt: MX Linux MX-19 Testing package
+   :target: http://mxrepo.com/mx/testrepo/pool/test/l/liquidprompt/
+
+.. code-block::
+
+   apt-get install liquidprompt
+
+A small script, ``liquidprompt_activate`` (not to be confused with
+:func:`lp_activate`) is included to ease activation of the prompt, which can be
+used instead of the :ref:`shell-installation` instructions.
+
+This will set the required environment:
+
+* The files ``~/.bashrc`` and/or ``~/.zshrc`` are modified to load Liquidprompt
+  at startup.
+* If no previous ``~/.config/liquidpromptrc`` file exists, it will be created.
+
+So, to get Liquidprompt working simply run:
+
+.. code-block::
+
+   liquidprompt_activate
+   source ~/.bashrc  # or ~/.zshrc
+
+Be aware that multiple invocations of the ``liquidprompt_activate`` command may
+pollute ``~/.bashrc`` and/or ``~/.zshrc`` files.
+
+Homebrew
+--------
+
+.. image:: https://repology.org/badge/version-for-repo/homebrew/liquidprompt.svg
+   :alt: Homebrew package
+   :target: https://formulae.brew.sh/formula/liquidprompt
+
+.. code-block::
+
+   brew install liquidprompt
+
+Nix
+---
+
+.. image:: https://repology.org/badge/version-for-repo/nix_stable/liquidprompt.svg
+   :alt: nixpkgs stable package
+   :target: https://github.com/NixOS/nixpkgs/blob/master/pkgs/shells/liquidprompt/default.nix
+
+.. code-block::
+
+   nix-env -i liquidprompt
+
diff -pruN 1.11-3/docs/install.rst 2.0.3-1/docs/install.rst
--- 1.11-3/docs/install.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/install.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,104 @@
+Installation
+************
+
+.. contents::
+   :local:
+
+.. toctree::
+   :maxdepth: 1
+
+   install/packages
+
+Download
+========
+
+You can either download the latest release from Github, or using your OS package
+manager with our :doc:`install/packages`.
+
+To download to ``~/liquidprompt``, run::
+
+   git clone --branch stable https://github.com/nojhan/liquidprompt.git ~/liquidprompt
+
+Or, if you want to use the development (non-stable) branch::
+
+   git clone https://github.com/nojhan/liquidprompt.git ~/liquidprompt
+
+If you do not have ``git``, you can download and extract the source in zip or
+gzip format directly from the `release page
+<https://github.com/nojhan/liquidprompt/releases/latest>`_.
+
+Installation via Antigen
+------------------------
+
+To install via `Antigen <https://antigen.sharats.me/>`_, simply add the
+following line in your ``.zshrc`` after activating Antigen::
+
+   antigen bundle nojhan/liquidprompt
+
+Installation via Zinit
+----------------------
+
+To install via `Zinit <https://github.com/zdharma/zinit>`_, simply add the
+following lines in your ``.zshrc`` after activating Zinit::
+
+    zinit ice ver"stable" lucid nocd
+    zinit light nojhan/liquidprompt
+
+Dependencies
+============
+
+Liquidprompt uses commands that should be available on a large variety of Unix
+systems:
+
+   * ``awk``
+   * ``grep``
+   * ``logname``
+   * ``ps``
+   * ``sed``
+   * ``uname``
+   * ``who``
+
+Some features depend on specific commands. If you do not install them, the
+corresponding feature will not be available, but no error will be displayed. See
+the :doc:`config` for more information about available features and what tools
+they require.
+
+   * Battery status requires ``acpi`` on GNU/Linux.
+   * Temperature status requires ``acpi`` or ``sensors`` on GNU/Linux.
+   * Terminal formatting requires ``tput``.
+   * Detached session status looks for ``screen`` and/or ``tmux``.
+   * VCS support features require ``git``, ``hg``, ``svn``, ``bzr`` or
+     ``fossil`` for their respective repositories.
+
+Test Drive
+==========
+
+To test the prompt immediately after download, run::
+
+   source ~/liquidprompt/liquidprompt
+
+Adjust the path if you installed to a different location that the suggested
+``~/liquidprompt``.
+
+.. _shell-installation:
+
+Shell Installation
+==================
+
+To use Liquidprompt every time you start a shell, add the following lines to
+your ``.bashrc`` (if you use Bash) or ``.zshrc`` (if you use zsh)::
+
+   # Only load Liquidprompt in interactive shells, not from a script or from scp
+   [[ $- = *i* ]] && source ~/liquidprompt/liquidprompt
+
+Adjust the path if you installed to a different location that the suggested
+``~/liquidprompt``.
+
+.. warning::
+   Check in your ``.bashrc`` that the :envvar:`PROMPT_COMMAND` variable is not
+   set, or else the prompt will not be available. If you must set it or use a
+   add-on that sets it, make sure to set :envvar:`PROMPT_COMMAND` **before** you
+   source Liquidprompt to avoid history and timing issues. Do not export
+   :envvar:`PROMPT_COMMAND`.
+
+Next up are the :doc:`config`.
diff -pruN 1.11-3/docs/make.bat 2.0.3-1/docs/make.bat
--- 1.11-3/docs/make.bat	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/make.bat	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,35 @@
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set SOURCEDIR=.
+set BUILDDIR=_build
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% >NUL 2>NUL
+if errorlevel 9009 (
+	echo.
+	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+	echo.installed, then set the SPHINXBUILD environment variable to point
+	echo.to the full path of the 'sphinx-build' executable. Alternatively you
+	echo.may add the Sphinx directory to PATH.
+	echo.
+	echo.If you don't have Sphinx installed, grab it from
+	echo.http://sphinx-doc.org/
+	exit /b 1
+)
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff -pruN 1.11-3/docs/Makefile 2.0.3-1/docs/Makefile
--- 1.11-3/docs/Makefile	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/Makefile	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+SPHINXOPTS    ?=
+SPHINXBUILD   ?= sphinx-build
+SOURCEDIR     = .
+BUILDDIR      = _build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff -pruN 1.11-3/docs/release-notes/v1.12.rst 2.0.3-1/docs/release-notes/v1.12.rst
--- 1.11-3/docs/release-notes/v1.12.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/release-notes/v1.12.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,40 @@
+Version 1.12 Release Notes
+**************************
+
+Most of the changes in 1.12 are accumulated bug fixes, but a few features made
+it in as well.
+
+.. contents::
+   :local:
+
+Runtime Bell
+============
+
+A new feature, similar to the displayed last command runtime, is to ring the
+terminal bell when the running command exits, if the runtime was over a
+threshold. This can be used to notify when a long running command has finished.
+
+See the :attr:`LP_ENABLE_RUNTIME_BELL` and :attr:`LP_RUNTIME_BELL_THRESHOLD`
+config options.
+
+Permissions Mark
+================
+
+The ``:`` mark between the hostname and the current directory was a constant
+string, but now it has a config option: :attr:`LP_MARK_PERM`.
+
+Preset Color Aliases
+====================
+
+The ``5`` value of the basic colors is often named "magenta", but in
+Liquidprompt it has always been "purple", and the bold version is "pink".
+
+To make the options more standard, an alias for ``PURPLE`` is ``MAGENTA``, and
+``PINK`` now has aliases of ``BOLD_PURPLE`` and ``BOLD_MAGENTA``.
+
+Speed Improvements
+==================
+
+Improvements to the startup process have cut startup times by at least 30% in
+all cases.
+
diff -pruN 1.11-3/docs/release-notes/v2.0.rst 2.0.3-1/docs/release-notes/v2.0.rst
--- 1.11-3/docs/release-notes/v2.0.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/release-notes/v2.0.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,97 @@
+Version 2.0 Release Notes
+*************************
+
+Version 2.0 had to break a few eggs, but got a lot of reward out of it. This
+release is full of new features and improvements.
+
+.. contents::
+   :local:
+
+Speed Improvements
+==================
+
+By removing subshells, ``exec``, and other ``fork`` ing calls, the whole project
+has seen incredible speed improvements, anywhere from 1.5 to 10 times as fast.
+
+Theme Engine
+============
+
+Thanks to the new data source functions (see below), themes are able to change
+*everything* about how the prompt is displayed, instead of only color and
+element order.
+See :doc:`../theme`.
+
+Example Themes
+==============
+
+Liquidprompt now ships with some example themes showcasing how the new theme
+engine works. They are also fulling working themes that you can use as your
+daily drivers.
+See :doc:`../theme/included`.
+
+Data Sources
+============
+
+To power the themes, all of the data sources in Liquidprompt have been broken
+out into individual data functions that can be called by themes. They are also
+documented in detail in :doc:`../functions/data`.
+
+Path Advanced Formatting
+========================
+
+The current directory path has had an overhaul, now supporting formatting for
+different path sections, highlighting the last directory and the VCS repository
+root directory. Any shortened directories are lowlighted instead. Multiple path
+shortening methods are now supported as well.
+
+See :attr:`LP_PATH_METHOD` and :attr:`LP_COLOR_PATH` for more information.
+
+Version Control Interface
+=========================
+
+Before, each version control provider had its own function for displaying
+repository information. Now there is a unifying interface over all VCS providers
+that themes can use to display any VCS provider the same as all the others.
+See :doc:`../functions/data/vcs`.
+
+The default theme now uses this interface to display all VCS providers in the
+same way (similar to how Git was displayed before).
+See :doc:`../functions/theme`.
+
+Version Control Tracking updates without directory change
+=========================================================
+
+Before, if ``git init`` or similar was run in a directory, Liquidprompt would
+not display any repository information until the current directory was changed.
+Thanks to the speed improvements, Liquidprompt now checks for a repository at
+each prompt, while still being faster than version 1.12.
+
+Activate Function
+=================
+
+Before, when changing the user config file, a user needed to source
+``liquidprompt`` again to load their config changes (or ``exec bash`` or ``exec
+zsh``). Now that all of the initialization code has been refactored into
+:attr:`lp_activate`, running :attr:`lp_activate` after modifying the config file
+or installing a new feature dependent program like ``git`` is all that is
+needed!
+
+Documentation
+=============
+
+The often lacking README documentation has been re-written with Sphinx to make
+this much improved documentation source.
+
+Unit Tests
+==========
+
+A whole suite of unit tests has been added to test the data and untility
+functions. A handful of bugs were caught using the tests, so the investment has
+already paid off!
+
+Dirstack Feature
+================
+
+Shell directory stack display is now in the prompt! If there are directories on
+the stack (from ``pushd``), the number of directories in the stack is shown next
+to the current path. See :attr:`LP_ENABLE_DIRSTACK` for more information.
diff -pruN 1.11-3/docs/release-notes.rst 2.0.3-1/docs/release-notes.rst
--- 1.11-3/docs/release-notes.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/release-notes.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,17 @@
+Release Notes
+*************
+
+The release documents here are a brief overview of the most important changes in
+a release. See the `Changelog`_ for a full description of what has changed.
+
+For a full description of what a user needs to do to upgrade, see
+:doc:`upgrading`.
+
+.. _`Changelog`: https://github.com/nojhan/liquidprompt/blob/master/CHANGELOG.md
+
+.. toctree::
+   :maxdepth: 2
+   :reversed:
+
+   release-notes/v1.12
+   release-notes/v2.0
diff -pruN 1.11-3/docs/requirements.txt 2.0.3-1/docs/requirements.txt
--- 1.11-3/docs/requirements.txt	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/requirements.txt	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,2 @@
+sphinx==3.3.1
+sphinx_rtd_theme==0.5.0
diff -pruN 1.11-3/docs/theme/custom.rst 2.0.3-1/docs/theme/custom.rst
--- 1.11-3/docs/theme/custom.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/theme/custom.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,81 @@
+Custom Themes
+*************
+
+.. contents::
+   :local:
+
+Defining a Theme
+================
+
+A theme should be contained in one file with a ``.theme`` file suffix. There
+should be no "top level" code in the file, or in other words, all code should be
+contained in functions. Sourcing the file should run no code, as a user sourcing
+the theme file might not want to activate it yet.
+
+Prompt Function
+---------------
+
+Every theme must have a prompt function that is called for every prompt to
+generate the prompt. It *must* be set to ``_lp_<theme_id>_theme_prompt()``.
+
+This function could do anything, but generally it should generate a prompt and
+store it in :envvar:`PS1`.
+
+Directory Function
+------------------
+
+Optionally, a theme can have a directory function. It must be set to
+``_lp_<theme_id>_theme_directory()``.
+
+This function is called every time the user changes directories. This allows the
+theme to only run generating code that depends on the current directory when it
+is needed.
+
+Activate Function
+-----------------
+
+Optionally, a theme can have an activate function. It must be set to
+``_lp_<theme_id>_theme_activate()``.
+
+This function is called when the theme is first activated, and every time the
+user runs :func:`lp_activate`. Prompt pieces that never change (such as hostname
+and username) should be generated here. This is also where the theme's default
+values should be set. This function will always be called after the user config
+is already loaded.
+
+Other Functions
+---------------
+
+If a theme is moderately complicated, it will need other functions defined to
+help generate a prompt. These should be named following the :doc:`../functions`
+guidelines concerning underscore prefixes.
+
+The prefix of a function should always be either ``_<theme_id>_`` or
+``_lp_<theme_id>_`` to prevent overwriting functions already defined by the
+user.
+
+Getting Data
+============
+
+A theme must call :doc:`../functions/data` to be able to display useful
+information to the user. A theme might also need to use :doc:`../functions/util`
+to process that data.
+
+Examples
+========
+
+The :doc:`included/alternate_vcs` is a good example of creating a theme based on
+the default theme.
+
+The :doc:`included/powerline` is a good example of creating a detailed theme.
+
+Sharing Your Theme
+==================
+
+First see the `Theme sharing`_ wiki page for things you should do to make your
+theme shareable.
+
+The `Themes`_ wiki page is where you can share your theme with other users.
+
+.. _`Themes`: https://github.com/nojhan/liquidprompt/wiki/Themes
+.. _`Theme sharing`: https://github.com/nojhan/liquidprompt/wiki/Theme-sharing
Binary files 1.11-3/docs/theme/default-long.png and 2.0.3-1/docs/theme/default-long.png differ
Binary files 1.11-3/docs/theme/default-med.png and 2.0.3-1/docs/theme/default-med.png differ
diff -pruN 1.11-3/docs/theme/default.rst 2.0.3-1/docs/theme/default.rst
--- 1.11-3/docs/theme/default.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/theme/default.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,242 @@
+Default Theme
+*************
+
+.. contents::
+   :local:
+
+
+Preview
+=======
+
+If there is nothing special about the current context, the appearance of
+Liquidprompt is similar to that of a default prompt:
+
+.. image:: default-short.png
+   :alt: [user:~] $
+
+If you are running a background command and are also in the "main" branch of a
+Git repository on a server:
+
+.. image:: default-med.png
+   :alt: 1& [user@server:~/liquidprompt] main ±
+
+When Liquidprompt is displaying nearly everything (a rare event!), it may look
+like this:
+
+.. image:: default-long.png
+   :alt: 🕤 ⌁24% ⌂1.68 θ90° 3d/2&/1z [user@server:~/ … /liquidprompt/docs/theme ⚞3] [pyenv] main(+10/-5,+3/-1)+* 20s 125 ±
+
+See :ref:`Templates <templates>` for what each section will look like.
+
+Configuation
+============
+
+As the default theme, all of the normal :doc:`../config` are respected.
+
+.. attribute:: LP_PS1_FILE
+   :type: string
+   :value: ""
+
+   A template file that is sourced for each prompt. Must set :attr:`LP_PS1`.
+   See :ref:`Templates <templates>` for details.
+
+.. attribute:: LP_PS1
+   :type: string
+   :value: ""
+
+   If set, the default theme sets :envvar:`PS1` to this value. Not very useful
+   to set it in the config, instead set it in the :attr:`LP_PS1_FILE`.
+
+.. _templates:
+
+Templates
+=========
+
+The default theme supports templated sections. Each piece of the theme is saved
+to a variable, and can be arranged in any order in a template. If you want to
+change the theme enough to move things around, but not enough to make your own
+theme, templates will let you change the order of the default theme's pieces.
+
+As the default theme of Liquidprompt was the only theme until version 2.0,
+templates were sometimes referred to as "themes" in version 1.X.
+
+For a template file to be loaded, its filepath must be set in
+:attr:`LP_PS1_FILE`.
+
+A template file does nothing more than set :attr:`LP_PS1` to a value. The
+following sections are available to be used.
+
+An example template file is available: liquid.ps1_.
+
+.. _liquid.ps1: https://github.com/nojhan/liquidprompt/blob/master/liquid.ps1
+
+Template Sections
+-----------------
+
+All of the available template sections are listed below. Their order is the
+default order if the user does not configure a different template.
+
+.. note::
+   Omitting a template section from your template will **not** disable that
+   feature. While it will not be displayed in the prompt, Liquidprompt does not
+   know that, and will still generate that template section. If you want to
+   speed up your prompt by disabling a section, you must disable it with its
+   respective ``LP_ENABLE_*`` option.
+
+:attr:`LP_PS1_PREFIX`:
+
+   Not actually a part of the default theme, it is used in the default template
+   as the starting section. See :attr:`LP_PS1_PREFIX` and :func:`prompt_tag`
+   for details.
+
+.. attribute:: LP_TIME
+
+   The current time, displayed as either numeric values or as an analog clock,
+   depending on the value of :attr:`LP_TIME_ANALOG`. See :attr:`LP_ENABLE_TIME`.
+
+.. attribute:: LP_BATT
+
+   The current battery status:
+
+   * a green ⏚ (:attr:`LP_MARK_BATTERY`) if charging, above the given threshold,
+     but not charged
+   * a yellow ⏚ if charging and under the given threshold
+   * a yellow ⌁ (:attr:`LP_MARK_ADAPTER`) if discharging but above the given
+     threshold
+   * a red ⌁ if discharging and under the given threshold
+
+   And if :attr:`LP_PERCENTS_ALWAYS` is enabled, also the current battery
+   percent. See :attr:`LP_ENABLE_BATT`.
+
+.. attribute:: LP_LOAD
+
+   The average of the processors load, displayed with an intensity color map as
+   load increases. See :attr:`LP_ENABLE_LOAD`.
+
+.. attribute:: LP_TEMP
+
+   The highest temperature of the available system sensors, displayed with an
+   intensity color map as temperature increases. See :attr:`LP_ENABLE_TEMP`.
+
+.. attribute:: LP_JOBS
+
+   The number of detached sessions. See :attr:`LP_ENABLE_DETACHED_SESSIONS`.
+
+   Also the number of running and sleeping shell jobs. See
+   :attr:`LP_ENABLE_JOBS`.
+
+.. attribute:: LP_BRACKET_OPEN
+
+   An opening bracket, designed to go around the core of the prompt (generally
+   user, host, current working directory). See :attr:`LP_MARK_BRACKET_OPEN`.
+
+   If running in a terminal multiplexer, will be colored. See
+   :attr:`LP_COLOR_IN_MULTIPLEXER`.
+
+.. attribute:: LP_USER
+
+   The current user, in bold yellow if it is root and in light white if it is
+   not the same as the login user. See :attr:`LP_USER_ALWAYS`.
+
+.. attribute:: LP_HOST
+
+   A green ``@`` if the connection has X11 support; a yellow one if not.
+
+   The current host – in bold red if you are connected via a ``telnet``
+   connection and blue (or other unique colors) if connected via SSH. See
+   :attr:`LP_HOSTNAME_ALWAYS`.
+
+.. attribute:: LP_PERM
+
+   A green colon (:attr:`LP_MARK_PERM`) if the user has write permissions in the
+   current directory and a red one if not. See :attr:`LP_ENABLE_PERM`.
+
+.. attribute:: LP_PWD
+
+   The current working directory in bold, shortened if it takes too much space.
+   See :attr:`LP_ENABLE_SHORTEN_PATH`.
+
+.. attribute:: LP_DIRSTACK
+
+   The size of the directory stack, prefixed with :attr:`LP_MARK_DIRSTACK`, all
+   colored with :attr:`LP_COLOR_DIRSTACK`. Can be enabled by
+   :attr:`LP_ENABLE_DIRSTACK`.
+
+.. attribute:: LP_BRACKET_CLOSE
+
+   A closing bracket, designed to go around the core of the prompt (generally
+   user, host, current working directory). See :attr:`LP_MARK_BRACKET_CLOSE`.
+
+   If running in a terminal multiplexer, will be colored. See
+   :attr:`LP_COLOR_IN_MULTIPLEXER`.
+
+.. attribute:: LP_SCLS
+
+   The current Red Hat Software Collections environment. See
+   :attr:`LP_ENABLE_SCLS`.
+
+.. attribute:: LP_VENV
+
+   The current Python (or Conda) virtual environment. See
+   :attr:`LP_ENABLE_VIRTUALENV`.
+
+.. attribute:: LP_PROXY
+
+   A ↥ (:attr:`LP_MARK_PROXY`) if an HTTP proxy is in use. See
+   :attr:`LP_ENABLE_PROXY`.
+
+.. attribute:: LP_VCS
+
+   * The name of the current branch if you are in a version control repository
+     (Git, Mercurial, Subversion, Bazaar, or Fossil):
+
+      * in green if everything is up-to-date
+      * in red if there are changes
+      * in yellow if there are pending commits to push
+   * The number of added/deleted lines if changes have been made and the number
+     of pending commits
+   * The number of commits ahead/behind the remote tracking branch
+   * A yellow + (:attr:`LP_MARK_STASH`) if there are stashed modifications
+   * a red \* (:attr:`LP_MARK_UNTRACKED`) if there are untracked files in the
+     repository
+
+.. attribute:: LP_RUNTIME
+
+   The runtime of the last command, if it has exceeded a certain threshold. See
+   :attr:`LP_ENABLE_RUNTIME`.
+
+.. attribute:: LP_ERR
+
+   The error code of the last command, if it is non-zero. See
+   :attr:`LP_ENABLE_ERROR`.
+
+:attr:`LP_MARK_PREFIX`
+
+   Not actually a part of the default theme, it is used in the default template
+   as the last thing before the prompt mark. See :attr:`LP_MARK_PREFIX` for
+   details.
+
+:attr:`LP_COLOR_MARK`
+
+   Bold normally, red if you have ``sudo`` rights or for the root user.
+
+   Separate from :attr:`LP_MARK` for historical reasons.
+
+.. attribute:: LP_MARK
+
+   A smart mark at the end of the prompt:
+
+   * $ or % (:attr:`LP_MARK_DEFAULT`) for a simple user
+   * # for the root user
+   * ⌘ (:attr:`LP_MARK_FOSSIL`) for Fossil
+   * ± (:attr:`LP_MARK_GIT`) for Git
+   * ☿ (:attr:`LP_MARK_HG`) for Mercurial
+   * ‡ (:attr:`LP_MARK_SVN`) for Subversion
+   * ‡± for Git-Subversion
+   * \|±\| (:attr:`LP_MARK_VCSH`) for VCSH
+
+:attr:`LP_PS1_POSTFIX`
+
+   Not actually a part of the default theme, it is used in the default template
+   as the final section. See :attr:`LP_PS1_POSTFIX` for details.
+
Binary files 1.11-3/docs/theme/default-short.png and 2.0.3-1/docs/theme/default-short.png differ
Binary files 1.11-3/docs/theme/included/alternate_vcs-demo.png and 2.0.3-1/docs/theme/included/alternate_vcs-demo.png differ
Binary files 1.11-3/docs/theme/included/alternate_vcs-long.png and 2.0.3-1/docs/theme/included/alternate_vcs-long.png differ
Binary files 1.11-3/docs/theme/included/alternate_vcs-med.png and 2.0.3-1/docs/theme/included/alternate_vcs-med.png differ
diff -pruN 1.11-3/docs/theme/included/alternate_vcs.rst 2.0.3-1/docs/theme/included/alternate_vcs.rst
--- 1.11-3/docs/theme/included/alternate_vcs.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/theme/included/alternate_vcs.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,105 @@
+***************************
+Alternate VCS Details Theme
+***************************
+
+The included ``themes/powerline/alternate_vcs.theme`` file includes a theme
+extending the default theme but replacing the VCS details display.
+
+.. contents::
+   :local:
+
+Alternate VCS
+*************
+
+The ``alternate_vcs`` theme is an extension of the default theme.
+
+This prompt is a fully usable theme, designed to be more flexible than the
+default theme in terms of what VCS information is shown in the prompt.
+
+It is also an example of how to build a theme extending the default theme while
+replacing one of the template sections.
+
+.. versionadded:: 2.0
+
+Preview
+=======
+
+If there is nothing special about the current context, the appearance of
+Alternate VCS might be as simple as this:
+
+.. image:: alternate_vcs-short.png
+   :alt: [user:~] $
+
+If you are running a background command and are also in the "main" branch of a
+Git repository on a server:
+
+.. image:: alternate_vcs-med.png
+   :alt: 1& [user@server:~/liquidprompt] main ±
+
+When Liquidprompt is displaying nearly everything, it may look like this:
+
+.. image:: alternate_vcs-long.png
+   :alt: 🕤 ⌁24% ⌂1.68 θ90° 3d/2&/1z [user@server:~/ … /liquidprompt/docs/theme ⚞3] [pyenv] main(U2 ?1 +10/-5,+3/-1)+ 20s 125 ±
+
+A demo of what disabling the configuration options might look like:
+
+.. image:: alternate_vcs-demo.png
+   :alt: [user@server:~/liquidprompt] main(U1 ?1 +8/-1,+1/-3)+ ±
+
+Configuration
+=============
+
+Liquidprompt Configuration
+--------------------------
+All Liquidprompt config options are respected, **except for**:
+
+* :attr:`LP_MARK_UNTRACKED` when :attr:`LP_ENABLE_ALT_VCS_STATUS` is enabled.
+
+Theme Configuration
+-------------------
+
+Alternate VCS adds these config options:
+
+Features
+________
+
+.. attribute:: LP_ALWAYS_ALT_VCS_TAG
+   :type: bool
+   :value: 0
+
+   Determine when a matching VCS tag should be displayed:
+
+   * ``0`` - Only when there is no current branch or bookmark
+   * ``1`` - Always
+
+.. attribute:: LP_ENABLE_ALT_VCS_COMMITS
+   :type: bool
+   :value: 1
+
+   Display commits ahead or behind the remote tracking branch.
+
+.. attribute:: LP_ENABLE_ALT_VCS_DIFF
+   :type: bool
+   :value: 1
+
+   Display the number of changed lines.
+
+.. attribute:: LP_ENABLE_ALT_VCS_STATUS
+   :type: bool
+   :value: 1
+
+   Display the number(s) of changed files, of type staged (if VCS supports
+   staging), non-staged (or non-committed if no staging), and untracked.
+
+   If disabled, a marker will be added to the end of the display to show if
+   there are untracked files (the behavior of the default theme).
+
+Markers
+_______
+
+.. attribute:: LP_MARK_ALT_VCS_TAG
+   :type: string
+   :value: "🔖"
+
+   The marker string used to indicate the following string is a VCS tag.
+
Binary files 1.11-3/docs/theme/included/alternate_vcs-short.png and 2.0.3-1/docs/theme/included/alternate_vcs-short.png differ
Binary files 1.11-3/docs/theme/included/powerline_full-long.png and 2.0.3-1/docs/theme/included/powerline_full-long.png differ
Binary files 1.11-3/docs/theme/included/powerline_full-med.png and 2.0.3-1/docs/theme/included/powerline_full-med.png differ
Binary files 1.11-3/docs/theme/included/powerline_full-short.png and 2.0.3-1/docs/theme/included/powerline_full-short.png differ
Binary files 1.11-3/docs/theme/included/powerline-long.png and 2.0.3-1/docs/theme/included/powerline-long.png differ
Binary files 1.11-3/docs/theme/included/powerline-med.png and 2.0.3-1/docs/theme/included/powerline-med.png differ
diff -pruN 1.11-3/docs/theme/included/powerline.rst 2.0.3-1/docs/theme/included/powerline.rst
--- 1.11-3/docs/theme/included/powerline.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/theme/included/powerline.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,439 @@
+***************
+Powerline Theme
+***************
+
+The included ``themes/powerline/powerline.theme`` file includes two themes:
+
+.. contents::
+   :local:
+
+Powerline
+*********
+
+The ``powerline`` theme is a clone of the `Powerline prompt`_. It copies the
+`default segments`_ of the Powerline prompt for Shell.
+
+This prompt is a proof of (a specific) concept: that Liquidprompt can do what
+Powerline does, but faster.
+That said, this is a fully usable theme.
+
+.. versionadded:: 2.0
+
+.. _`Powerline prompt`: https://github.com/powerline/powerline
+.. _`default segments`: https://github.com/powerline/powerline/blob/2.8/powerline/config_files/themes/shell/default.json
+
+Preview
+=======
+
+If there is nothing special about the current context, the appearance of
+Powerline might be as simple as this:
+
+.. image:: powerline-short.png
+   :alt:  user  ~  
+
+If you are running a background command and are also in the "main" branch of a
+Git repository on a server:
+
+.. image:: powerline-med.png
+   :alt:   server  user  ~  liquidprompt  1   main  
+
+When Liquidprompt is displaying nearly everything, it may look like this:
+
+.. image:: powerline-long.png
+   :alt:   server  user  (e) pyenv  ~   …   liquidprompt   …   theme  3   main  ST 1  125  
+
+.. note::
+   The above "everything" image looks like it is missing some parts because this
+   theme does not implement all data sources of Liquidprompt. This is by design
+   to clone basic Powerline. For a Powerline theme that does show all data
+   sources, see :ref:`Powerline Full <powerline_full>` below.
+
+Setup
+=====
+
+By default, the dividers and markers used are the Powerline private characters.
+You will either need a compatible font, or to configure the dividers and markers
+to use other characters.
+
+See the `Powerline Fonts installation docs`_ for help.
+
+.. _`Powerline fonts installation docs`: https://powerline.readthedocs.io/en/latest/installation.html#fonts-installation
+
+Configuation
+============
+
+Liquidprompt Configuration
+--------------------------
+The following Liquidprompt config options are respected:
+
+* :attr:`LP_DISABLED_VCS_PATHS`
+* :attr:`LP_ENABLE_BZR`
+* :attr:`LP_ENABLE_COLOR`
+* :attr:`LP_ENABLE_ERROR`
+* :attr:`LP_ENABLE_FOSSIL`
+* :attr:`LP_ENABLE_FQDN`
+* :attr:`LP_ENABLE_GIT`
+* :attr:`LP_ENABLE_HG`
+* :attr:`LP_ENABLE_JOBS`
+* :attr:`LP_ENABLE_RUNTIME_BELL`
+* :attr:`LP_ENABLE_SCREEN_TITLE`
+* :attr:`LP_ENABLE_SHORTEN_PATH`
+* :attr:`LP_ENABLE_SVN`
+* :attr:`LP_ENABLE_TITLE`
+* :attr:`LP_ENABLE_VCS_ROOT`
+* :attr:`LP_ENABLE_VIRTUALENV`
+* :attr:`LP_HOSTNAME_ALWAYS`
+* :attr:`LP_PATH_CHARACTER_KEEP`
+* :attr:`LP_PATH_KEEP`
+* :attr:`LP_PATH_LENGTH`
+* :attr:`LP_PATH_METHOD`
+* :attr:`LP_PATH_VCS_ROOT`
+* :attr:`LP_RUNTIME_BELL_THRESHOLD`
+* :attr:`LP_USER_ALWAYS`
+
+Theme Configuration
+-------------------
+
+Powerline adds these config options:
+
+Markers
+_______
+
+.. attribute:: POWERLINE_HARD_DIVIDER
+   :type: string
+   :value: ""  # U+E0B0
+
+   The divider character between sections, defaults to the private character
+   used in Powerline fonts that looks like a solid right arrow.
+
+.. attribute:: POWERLINE_PYTHON_ENV_MARKER
+   :type: string
+   :value: "(e) "
+
+   The marker string used to indicate the following string is a Python
+   environment.
+
+.. attribute:: POWERLINE_ROOT_MARKER
+   :type: string
+   :value: "#"
+
+   The marker character used to indicate a root session.
+
+.. attribute:: POWERLINE_SECURE_MARKER
+   :type: string
+   :value: ""  # U+E0A2
+
+   The marker character used to indicate a SSH session, defaults to the
+   private character used in Powerline fonts that looks like a lock.
+
+.. attribute:: POWERLINE_SOFT_DIVIDER
+   :type: string
+   :value: ""  # U+E0B1
+
+   The divider character between similar sections, defaults to the private
+   character used in Powerline fonts that looks like a thin right arrow.
+
+.. attribute:: POWERLINE_SPACER
+   :type: string
+   :value: " "  # U+00A0: non-breaking space
+
+   The marker character used to pad sections, defaults to the
+   non-breaking space character.
+
+   To add more padding, add more spaces to this string.
+
+   A non-breaking space is needed in some fonts to prevent multiple spaces from
+   collapsing to one space, loosing the padding.
+
+.. attribute:: POWERLINE_STASH_MARKER
+   :type: string
+   :value: "ST"
+
+   The marker string used to indicate stashes exist in the VCS repository.
+
+.. attribute:: POWERLINE_VCS_MARKER
+   :type: string
+   :value: ""  # U+E0A0
+
+   The marker character used to indicate a VCS repository, defaults to the
+   private character used in Powerline fonts that looks like a branching commit
+   history.
+
+Colors
+______
+
+These color config options take an array of integers, which are arguments to
+:func:`lp_terminal_format`.
+
+.. note::
+   Arrays are set without commas (``,``). The default values are displayed with
+   commas for clarity.
+
+.. attribute:: POWERLINE_ERROR_COLOR
+   :type: array<int>
+   :value: (231, 52, 0, 0, 7, 1)
+
+   Color for the error code section.
+
+.. attribute:: POWERLINE_HOST_COLOR
+   :type: array<int>
+   :value: (220, 166, 0, 0, 3, 2)
+
+   Color for the hostname section.
+
+.. attribute:: POWERLINE_JOBS_COLOR
+   :type: array<int>
+   :value: (220, 166, 0, 0, 3, 2)
+
+   Color for the shell jobs section.
+
+.. attribute:: POWERLINE_PATH_COLOR
+   :type: array<int>
+   :value: (250, 240, 0, 0, 7, 0)
+
+   Color for the current working directory section.
+
+.. attribute:: POWERLINE_PATH_LAST_COLOR
+   :type: array<int>
+   :value: (252, 240, 1, 0, 7, 0)
+
+   Color for the current working directory last subsection.
+
+.. attribute:: POWERLINE_PATH_SEPARATOR_COLOR
+   :type: array<int>
+   :value: (245, 240, 0, 0, 7, 0)
+
+   Color for the current working directory subsection separator.
+
+.. attribute:: POWERLINE_PATH_SHORTENED_COLOR
+   :type: array<int>
+   :value: (245, 240, 0, 0, 7, 0)
+
+   Color for any sections in the current working directory that are shortened to
+   make the path fit in :attr:`LP_PATH_LENGTH`.
+
+.. attribute:: POWERLINE_PATH_VCS_COLOR
+   :type: array<int>
+   :value: (147, 240, 1, 0, 4, 0)
+
+   Color for the current working directory segment corresponding to the current
+   VCS repository root directory.
+
+   :attr:`LP_PATH_VCS_ROOT` must be enabled to have any effect.
+
+.. attribute:: POWERLINE_PYTHON_ENV_COLOR
+   :type: array<int>
+   :value: (231, 74, 0, 0, 7, 4)
+
+   Color for the Python environment section.
+
+.. attribute:: POWERLINE_USER_COLOR
+   :type: array<int>
+   :value: (231, 31, 1, 0, 7, 6)
+
+   Color for the username section.
+
+.. attribute:: POWERLINE_VCS_CLEAN_COLOR
+   :type: array<int>
+   :value: (250, 236, 0, 0, 7, 0)
+
+   Color for the VCS section if the repository is clean.
+
+.. attribute:: POWERLINE_VCS_DIRTY_COLOR
+   :type: array<int>
+   :value: (220, 236, 0, 0, 3, 0)
+
+   Color for the VCS section if the repository is not clean.
+
+.. attribute:: POWERLINE_VCS_STASH_COLOR
+   :type: array<int>
+   :value: (220, 236, 0, 0, 3, 0)
+
+   Color for the VCS stash subsection.
+
+.. _powerline_full:
+
+Powerline Full
+**************
+
+An extension of the ``powerline`` theme, ``powerline_full`` includes all data
+sources that Liquidprompt provides. The ordering is the same as the default
+theme.
+
+.. versionadded:: 2.0
+
+Preview
+=======
+
+If there is nothing special about the current context, the appearance of
+Powerline might be as simple as this:
+
+.. image:: powerline_full-short.png
+   :alt:  user  ~  
+
+If you are running a background command and are also in the "main" branch of a
+Git repository on a server:
+
+.. image:: powerline_full-med.png
+   :alt:  1&  user   server  ~  liquidprompt  main  
+
+When Liquidprompt is displaying nearly everything, it may look like this:
+
+.. image:: powerline_full-long.png
+   :alt:  🕤  ⌁24%  ⌂1.68  θ90°  3d/2&/1z  user   server  ~   …   liquidprompt   …   theme  ⚞3  (e) pyenv  main(+10/-5,+3/-1)+*  20s  125  
+
+Setup
+=====
+
+Like the ``powerline`` theme, you will need a compatible font.
+See the `Powerline Fonts installation docs`_ for help.
+
+Configuation
+============
+
+Liquidprompt Configuration
+--------------------------
+All Liquidprompt config options are respected, **except for**:
+
+* :attr:`LP_COLOR_DIRSTACK`
+* :attr:`LP_COLOR_ERR`
+* :attr:`LP_COLOR_HOST`
+* :attr:`LP_COLOR_IN_MULTIPLEXER`
+* :attr:`LP_COLOR_JOB_D`
+* :attr:`LP_COLOR_JOB_R`
+* :attr:`LP_COLOR_JOB_Z`
+* :attr:`LP_COLOR_MARK`
+* :attr:`LP_COLOR_MARK_ROOT`
+* :attr:`LP_COLOR_MARK_SUDO`
+* :attr:`LP_COLOR_NOWRITE`
+* :attr:`LP_COLOR_PATH`
+* :attr:`LP_COLOR_PATH_ROOT`
+* :attr:`LP_COLOR_PROXY`
+* :attr:`LP_COLOR_RUNTIME`
+* :attr:`LP_COLOR_SSH`
+* :attr:`LP_COLOR_SU`
+* :attr:`LP_COLOR_TELNET`
+* :attr:`LP_COLOR_TIME`
+* :attr:`LP_COLOR_USER_ALT`
+* :attr:`LP_COLOR_USER_LOGGED`
+* :attr:`LP_COLOR_USER_ROOT`
+* :attr:`LP_COLOR_VIRTUALENV`
+* :attr:`LP_COLOR_WRITE`
+* :attr:`LP_COLOR_X11_OFF`
+* :attr:`LP_COLOR_X11_ON`
+* :attr:`LP_ENABLE_PERM`
+* :attr:`LP_ENABLE_SSH_COLORS`
+* :attr:`LP_ENABLE_SUDO`
+* :attr:`LP_MARK_BRACKET_OPEN`
+* :attr:`LP_MARK_BRACKET_CLOSE`
+* :attr:`LP_MARK_BZR`
+* :attr:`LP_MARK_DEFAULT`
+* :attr:`LP_MARK_DISABLED`
+* :attr:`LP_MARK_FOSSIL`
+* :attr:`LP_MARK_GIT`
+* :attr:`LP_MARK_HG`
+* :attr:`LP_MARK_PERM`
+* :attr:`LP_MARK_PREFIX`
+* :attr:`LP_MARK_PROXY`
+* :attr:`LP_MARK_SVN`
+* :attr:`LP_MARK_VCSH`
+
+Theme Configuration
+-------------------
+
+Powerline Full uses all the config options of the above Powerline theme,
+**except for**:
+
+* :attr:`POWERLINE_STASH_MARKER`
+* :attr:`POWERLINE_VCS_DIRTY_COLOR`
+* :attr:`POWERLINE_VCS_MARKER`
+* :attr:`POWERLINE_VCS_STASH_COLOR`
+
+Powerline Full adds these config options:
+
+Markers
+_______
+
+.. attribute:: POWERLINE_CHROOT_MARKER
+   :type: string
+   :value: "chroot: "
+
+   The marker string used to indicate the following string is a chroot.
+
+.. attribute:: POWERLINE_PROXY_MARKER
+   :type: string
+   :value: "proxy: "
+
+   The marker string used to indicate the following string is a HTTP proxy.
+
+.. attribute:: POWERLINE_SOFTWARE_COLLECTION_MARKER
+   :type: string
+   :value: "(sc) "
+
+   The marker string used to indicate the following string is a Red Hat Software
+   Collection.
+
+Colors
+______
+
+.. attribute:: POWERLINE_BATTERY_COLOR
+   :type: array<int>
+   :value: (-1, 238, 0, 0, -1, 0)
+
+   Color for the battery section.
+
+.. attribute:: POWERLINE_CHROOT_COLOR
+   :type: array<int>
+   :value: (219, 30, 0, 0, 7, 4)
+
+   Color for the chroot section.
+
+.. attribute:: POWERLINE_DIRSTACK_COLOR
+   :type: array<int>
+   :value: $POWERLINE_NEUTRAL_COLOR
+
+   Color for the directory stack section.
+
+.. attribute:: POWERLINE_LOAD_COLOR
+   :type: array<int>
+   :value: (-1, 148, 0, 0, -1, 3)
+
+   Color for the CPU load section.
+
+.. attribute:: POWERLINE_NEUTRAL_COLOR
+   :type: array<int>
+   :value: (252, 234, 0, 0, 7, 0)
+
+   Color for all neutral sections, :attr:`LP_PS1_PREFIX` and
+   :attr:`LP_PS1_POSTFIX`.
+
+.. attribute:: POWERLINE_PROXY_COLOR
+   :type: array<int>
+   :value: (21, 219, 1, 0, 4, 7)
+
+   Color for the HTTP proxy section.
+
+.. attribute:: POWERLINE_RUNTIME_COLOR
+   :type: array<int>
+   :value: (226, 17, 0, 0, 3, 4)
+
+   Color for the command runtime section.
+
+.. attribute:: POWERLINE_SOFTWARE_COLLECTIONS_COLOR
+   :type: array<int>
+   :value: (231, 62, 0, 0, 7, 5)
+
+   Color for the Red Hat Software Collections section.
+
+.. attribute:: POWERLINE_TEMPERATURE_COLOR
+   :type: array<int>
+   :value: (-1, 240, 0, 0, -1, 0)
+
+   Color for the temperature section.
+
+.. attribute:: POWERLINE_TIME_COLOR
+   :type: array<int>
+   :value: (33, 17, 0, 0, 5, 4)
+
+   Color for the current time section.
+
Binary files 1.11-3/docs/theme/included/powerline-short.png and 2.0.3-1/docs/theme/included/powerline-short.png differ
diff -pruN 1.11-3/docs/theme/included.rst 2.0.3-1/docs/theme/included.rst
--- 1.11-3/docs/theme/included.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/theme/included.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,12 @@
+Included Themes
+***************
+
+Liquidprompt ships with some included themes that will have features added to
+them as they are added to Liquidprompt.
+
+.. toctree::
+   :maxdepth: 2
+
+   included/alternate_vcs
+   included/powerline
+
diff -pruN 1.11-3/docs/theme.rst 2.0.3-1/docs/theme.rst
--- 1.11-3/docs/theme.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/theme.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,60 @@
+Theming
+*******
+
+Liquidprompt has a strong data and theming engine, allowing it to be extremely
+flexible and customizable.
+
+The :doc:`theme/default` has a templating engine (previously called "themes" in
+Liquidprompt version 1), that allows for custom prompt ordering in the default
+theme.
+
+Liquidprompt ships with some :doc:`theme/included` other than the default as
+well.
+
+See the `Liquidprompt Theme List`_ on the wiki for user created themes.
+
+If you want to create your own theme, see :doc:`theme/custom`.
+
+.. _`Liquidprompt Theme List`: https://github.com/nojhan/liquidprompt/wiki/Themes
+
+.. toctree::
+   :maxdepth: 2
+
+   theme/default
+   theme/included
+   theme/custom
+
+.. contents::
+   :local:
+
+Switching Themes
+----------------
+
+Liquidprompt can switch between themes on the fly. The shell does not need to be
+reloaded, and no files need to be sourced after the initial source.
+
+To load (but not activate) a theme, simply source the theme file. For example,
+to load the included Powerline theme, source the theme file::
+
+   $ source themes/powerline/powerline.theme
+
+Now both the default theme and Powerline are loaded. To show what themes are
+loaded and available, run :func:`lp_theme`::
+
+   $ lp_theme --list
+   default
+   powerline_full
+   powerline
+
+To switch to a different theme, call :func:`lp_theme` with the name of the theme
+as the argument::
+
+   $ lp_theme powerline
+
+The prompt will immediately take on the new theme.
+
+To switch back to the default theme, call :func:`lp_theme` again with
+``default`` as the argument instead.
+
+If you add the theme source commands to your shell startup file, you will have
+your favorite themes ready to be switched to at any time.
diff -pruN 1.11-3/docs/upgrading/v2.0.rst 2.0.3-1/docs/upgrading/v2.0.rst
--- 1.11-3/docs/upgrading/v2.0.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/upgrading/v2.0.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,718 @@
+Version 2.0 Upgrade Notes
+*************************
+
+Most of the changes in 2.0 are in private functions and variables.  There are a
+few public API changes that could impact users: :ref:`$lp_err <lp_err>`,
+:ref:`$LP_DISABLED_VCS_PATH <lp_disabled_vcs_path>`, :ref:`$LP_PATH_DEFAULT
+<lp_path_default>`, :ref:`$PROMPT_DIRTRIM <prompt_dirtrim>`,
+:ref:`$LP_PATH_KEEP=-1 <lp_path_keep>`, and :ref:`_lp_title() <lp_title>`.  The
+rest are private API changes, but are still documented here.
+
+.. contents::
+   :local:
+
+Breaking Changes
+++++++++++++++++
+
+Public Breaking Changes
+=======================
+
+.. _lp_err:
+
+$lp_err
+-------
+
+Renamed to ``$lp_error``. Instead of referencing it directly, use
+:func:`_lp_error`.
+
+Private Breaking Changes
+========================
+
+$_LP_SHELL_bash
+---------------
+
+Now returns ``1`` or ``0`` instead of ``true`` or ``false``
+
+Replace test statements like::
+
+   if $_LP_SHELL_bash; then
+
+with::
+
+   if (( $_LP_SHELL_bash )); then
+
+$_LP_SHELL_zsh
+--------------
+
+Now returns ``1`` or ``0`` instead of ``true`` or ``false``
+
+Replace test statements like::
+
+   if $_LP_SHELL_zsh; then
+
+with::
+
+   if (( $_LP_SHELL_zsh )); then
+
+_lp_battery()
+-------------
+
+Return changed from stdout to ``$lp_battery``
+
+Replace assignment statements like::
+
+   battery="$(_lp_battery)"
+
+with::
+
+   local lp_battery
+   _lp_battery
+   battery=$lp_battery
+
+See also: :func:`_lp_battery`.
+
+_lp_battery_color()
+-------------------
+
+Return changed from stdout to ``$lp_battery_color``
+
+Replace assignment statements like::
+
+   battery_color="$(_lp_battery_color)"
+
+with::
+
+   local lp_battery_color
+   _lp_battery_color
+   battery_color=$lp_battery_color
+
+See also: :func:`_lp_battery_color`.
+
+_lp_bzr_branch()
+----------------
+
+Return changed from stdout to ``$lp_vcs_branch``
+
+Recommended that :func:`_lp_vcs_branch` is used instead.
+
+Replace assignment statements like::
+
+   branch="$(_lp_bzr_branch)"
+
+with::
+
+   local lp_vcs_branch
+   if _lp_bzr_branch; then
+       branch=$lp_vcs_branch
+   fi
+
+_lp_bzr_branch_color()
+----------------------
+
+Removed, replace by :func:`_lp_vcs_details_color`.
+
+If the exact previous output is needed, you can implement a theme function using
+:doc:`../functions/data/vcs`.
+
+Replace assignment statements like::
+
+   LP_VCS="$(_lp_bzr_branch_color)"
+
+with::
+
+   if _lp_find_vcs;
+       local lp_vcs_details_color
+       _lp_vcs_details_color
+       LP_VCS=$lp_vcs_details_color
+   fi
+
+_lp_color_map()
+---------------
+
+Return changed from stdout to ``$ret``
+
+Replace assignment statements like::
+
+   output="$(_lp_color_map "$input")"
+
+with::
+
+   local ret
+   _lp_color_map "$input"
+   output=$ret
+
+See also: :func:`_lp_color_map`.
+
+_lp_connection()
+----------------
+
+Return changed from stdout to ``$lp_connection``
+
+Replace assignment statements like::
+
+   connection="$(_lp_connection)"
+
+with::
+
+   local lp_connection
+   _lp_connection
+   connection=$lp_connection
+
+See also: :func:`_lp_connection`.
+
+_lp_escape()
+------------
+
+Renamed to :attr:`__lp_escape`.
+Return changed from stdout to ``$ret``
+
+Replace assignment statements like::
+
+   output="$(_lp_escape "$input")"
+
+with::
+
+   local ret
+   __lp_escape "$input"
+   output=$ret
+
+_lp_fossil_branch()
+-------------------
+
+Return changed from stdout to ``$lp_vcs_branch``
+
+Recommended that :func:`_lp_vcs_branch` is used instead.
+
+No longer returns "no-branch" if branch not found.
+
+Replace assignment statements like::
+
+   branch="$(_lp_fossil_branch)"
+
+with::
+
+   local lp_vcs_branch
+   if _lp_fossil_branch; then
+       branch=$lp_vcs_branch
+   else
+       branch="no-branch"
+   fi
+
+_lp_fossil_branch_color()
+-------------------------
+
+Removed, replace by :func:`_lp_vcs_details_color`.
+
+If the exact previous output is needed, you can implement a theme function using
+:doc:`../functions/data/vcs`.
+
+Replace assignment statements like::
+
+   LP_VCS="$(_lp_fossil_branch_color)"
+
+with::
+
+   if _lp_find_vcs;
+       local lp_vcs_details_color
+       _lp_vcs_details_color
+       LP_VCS=$lp_vcs_details_color
+   fi
+
+_lp_get_home_tilde_collapsed()
+------------------------------
+
+Renamed to :func:`__lp_pwd_tilde`.
+
+Return changed from stdout to ``$lp_pwd_tilde``
+
+Recommended that :attr:`lp_path` is used instead.
+
+Replace assignment statements like::
+
+   working_dir="$(_lp_get_home_tilde_collapsed)"
+
+with::
+
+   local lp_pwd_tilde
+   __lp_pwd_tilde
+   working_dir=$lp_pwd_tilde
+
+_lp_git_branch()
+----------------
+
+Return changed from stdout to ``$lp_vcs_branch``
+
+Recommended that :func:`_lp_vcs_branch` is used instead.
+
+No longer returns commit hash if branch not found.
+
+Replace assignment statements like::
+
+   branch="$(_lp_git_branch)"
+
+with::
+
+   local lp_vcs_branch
+   if _lp_git_branch; then
+       branch=$lp_vcs_branch
+   else
+       local lp_vcs_commit_id
+       _lp_git_commit_id
+       branch=$lp_vcs_commit_id
+   fi
+
+_lp_git_branch_color()
+----------------------
+
+Removed, replace by :func:`_lp_vcs_details_color`.
+
+Replace assignment statements like::
+
+   LP_VCS="$(_lp_git_branch_color)"
+
+with::
+
+   if _lp_find_vcs;
+       local lp_vcs_details_color
+       _lp_vcs_details_color
+       LP_VCS=$lp_vcs_details_color
+   fi
+
+_lp_git_head_status()
+---------------------
+
+Return changed from stdout to ``$lp_vcs_head_status``
+
+Recommended that :func:`_lp_vcs_head_status` is used instead.
+
+Replace assignment statements like::
+
+   head_status="$(_lp_git_head_status)"
+
+with::
+
+   local lp_vcs_head_status
+   _lp_git_head_status
+   head_status=$lp_vcs_head_status
+
+See also: :func:`_lp_git_head_status`.
+
+_lp_hg_branch()
+---------------
+
+Return changed from stdout to ``$lp_vcs_branch``
+
+Recommended that :func:`_lp_vcs_branch` is used instead.
+
+Replace assignment statements like::
+
+   branch="$(_lp_hg_branch)"
+
+with::
+
+   local lp_vcs_branch
+   if _lp_hg_branch; then
+       branch=$lp_vcs_branch
+   fi
+
+_lp_hg_branch_color()
+---------------------
+
+Removed, replace by :func:`_lp_vcs_details_color`.
+
+If the exact previous output is needed, you can implement a theme function using
+:doc:`../functions/data/vcs`.
+
+Replace assignment statements like::
+
+   LP_VCS="$(_lp_hg_branch_color)"
+
+with::
+
+   if _lp_find_vcs;
+       local lp_vcs_details_color
+       _lp_vcs_details_color
+       LP_VCS=$lp_vcs_details_color
+   fi
+
+_lp_jobcount_color()
+--------------------
+
+Return changed from stdout to ``$lp_jobcount_color``
+
+Replace assignment statements like::
+
+   jobcount_color="$(_lp_jobcount_color)"
+
+with::
+
+   local lp_jobcount_color
+   _lp_jobcount_color
+   jobcount_color=$lp_jobcount_color
+
+See also: :func:`_lp_jobcount_color`.
+
+_lp_load_color()
+----------------
+
+Return changed from stdout to ``$lp_load_color``
+
+Replace assignment statements like::
+
+   load_color="$(_lp_load_color)"
+
+with::
+
+   local lp_load_color
+   _lp_load_color
+   load_color=$lp_load_color
+
+See also: :func:`_lp_load_color`.
+
+_lp_runtime()
+-------------
+
+Renamed to :func:`_lp_runtime_color`.
+
+Return changed from stdout to ``$lp_runtime_color``
+
+Replace assignment statements like::
+
+   runtime_color="$(_lp_runtime)"
+
+with::
+
+   local lp_runtime_color
+   _lp_runtime_color
+   runtime_color=$lp_runtime_color
+
+_lp_runtime_after()
+-------------------
+
+Renamed to :func:`__lp_runtime_after`.
+
+Recommended to not use this internal function.
+
+_lp_runtime_before()
+--------------------
+
+Renamed to :func:`__lp_runtime_before`.
+
+Recommended to not use this internal function.
+
+_lp_set_dirtrim()
+-----------------
+
+Renamed to :func:`__lp_set_dirtrim`.
+
+Recommended that :attr:`lp_path` is used instead.
+
+_lp_set_prompt()
+----------------
+
+Renamed to :attr:`__lp_set_prompt`.
+
+Recommended to not use this internal function.
+
+_lp_shorten_path()
+------------------
+
+Removed and replaced by :func:`_lp_path_format`.
+
+Replace assignment statements like::
+
+   cwd="$(_lp_shorten_path)"
+
+with::
+
+   local lp_path_format
+   _lp_path_format "$LP_COLOR_PATH" "$LP_COLOR_PATH_LAST_DIR" "$LP_COLOR_PATH_VCS_ROOT" "$LP_COLOR_PATH_SHORTENED" "/" "$LP_COLOR_PATH_SEPARATOR"
+   cwd=$lp_path_format
+
+_lp_smart_mark()
+----------------
+
+Return changed from stdout to ``$lp_smart_mark``
+
+Replace assignment statements like::
+
+   mark="$(_lp_smart_mark)"
+
+with::
+
+   local lp_smart_mark
+   _lp_smart_mark
+   mark=$lp_smart_mark
+
+See also: :func:`_lp_smart_mark`.
+
+_lp_source_config()
+-------------------
+
+Renamed to :attr:`__lp_source_config`.
+
+Recommended to not use this internal function.
+
+_lp_svn_branch()
+----------------
+
+Return changed from stdout to ``$lp_vcs_branch``
+
+Recommended that :func:`_lp_vcs_branch` is used instead.
+
+No longer returns directory name if branch not found.
+
+Replace assignment statements like::
+
+   branch="$(_lp_svn_branch)"
+
+with::
+
+   local lp_vcs_branch
+   if _lp_svn_branch; then
+       branch=$lp_vcs_branch
+   else
+       local lp_vcs_commit_id
+       _lp_svn_commit_id
+       branch=$lp_vcs_commit_id
+   fi
+
+_lp_svn_branch_color()
+----------------------
+
+Removed, replace by :func:`_lp_vcs_details_color`.
+
+If the exact previous output is needed, you can implement a theme function using
+:doc:`../functions/data/vcs`.
+
+Replace assignment statements like::
+
+   LP_VCS="$(_lp_svn_branch_color)"
+
+with::
+
+   if _lp_find_vcs;
+       local lp_vcs_details_color
+       _lp_vcs_details_color
+       LP_VCS=$lp_vcs_details_color
+   fi
+
+_lp_temp_acpi()
+---------------
+
+Renamed to :func:`__lp_temp_acpi`.
+
+Recommended that :func:`_lp_temperature` is used instead.
+
+Return changed from ``$temperature`` to ``$lp_temperature``.
+
+Replace statements like::
+
+   _lp_temp_acpi
+   # use $temperature
+
+with::
+
+   __lp_temp_acpi
+   # use $lp_temperature
+
+_lp_temp_detect()
+-----------------
+
+Renamed to :func:`__lp_temp_detect`.
+
+Recommended to not use this internal function.
+
+_lp_temp_sensors()
+------------------
+
+Renamed to :func:`__lp_temp_sensors`.
+
+Recommended that :func:`_lp_temperature` is used instead.
+
+Return changed from ``$temperature`` to ``$lp_temperature``.
+
+Replace statements like::
+
+   _lp_temp_sensors
+   # use $temperature
+
+with::
+
+   __lp_temp_sensors
+   # use $lp_temperature
+
+_lp_temperature()
+-----------------
+
+Renamed to :func:`_lp_temperature_color`.
+
+Return changed from stdout to ``$lp_temperature_color``
+
+Replace assignment statements like::
+
+   temp_color="$(_lp_temperature)"
+
+with::
+
+   local lp_temperature_color
+   _lp_temperature_color
+   temp_color=$lp_temperature_color
+
+Not to be confused with the new :func:`_lp_temperature`.
+
+_lp_time()
+----------
+
+Split into :func:`_lp_time()`, :func:`_lp_time_color()`,
+:func:`_lp_analog_time()`, and  `_lp_analog_time_color()`.
+
+The return value is no longer stored in ``LP_TIME``.
+
+Replace statements like::
+
+   _lp_time
+
+with::
+
+   local lp_time_color lp_analog_time_color
+   if _lp_time_color; then
+       LP_TIME="${lp_time_color} "
+   elif _lp_analog_time_color; then
+       LP_TIME="${lp_analog_time_color} "
+   else
+       LP_TIME=
+   fi
+
+_lp_upwards_find()
+------------------
+
+Replaced by :func:`_lp_find_vcs`.
+
+Replace statements like::
+
+   _lp_upwards_find .hg || return
+
+with::
+
+   local lp_vcs_type lp_vcs_root
+   _lp_find_vcs && [[ $lp_vcs_type == hg ]] || return
+
+Deprecations
+++++++++++++
+
+Public Deprecations
+===================
+
+.. _lp_disabled_vcs_path:
+
+$LP_DISABLED_VCS_PATH
+---------------------
+
+Replaced by :attr:`LP_DISABLED_VCS_PATHS` array variable.
+
+Replace a set statement like::
+
+   LP_DISABLED_VCS_PATH="/my/one/path:/my/other/path"
+
+with::
+
+   LP_DISABLED_VCS_PATHS=("/my/one/path" "/my/other/path")
+
+.. _lp_path_default:
+
+$LP_PATH_DEFAULT
+----------------
+
+Replaced by :attr:`LP_PATH_METHOD`.
+
+If one of the many new shortening methods does not effectively replace your use
+case, please open an enhancement request.
+
+.. _prompt_dirtrim:
+
+$PROMPT_DIRTRIM
+---------------
+
+``$PROMPT_DIRTRIM`` calculation is no longer supported. Replaced by
+:attr:`LP_PATH_METHOD` set to ``truncate_chars_from_path_left``.
+
+.. _lp_path_keep:
+
+$LP_PATH_KEEP=-1
+----------------
+
+:attr:`LP_PATH_KEEP` set to ``-1`` is replaced by :attr:`LP_PATH_METHOD` set to
+``truncate_to_last_dir``.
+
+.. _lp_title:
+
+_lp_title()
+-----------
+
+Replaced by :func:`_lp_formatted_title`.
+
+Most likely would have been used in a template or ``.ps1`` file.
+
+Replace a call like::
+
+   LP_TITLE="$(_lp_title "$PS1")"
+   PS1="${LP_TITLE}${PS1}"
+
+with::
+
+   _lp_formatted_title "$PS1"
+
+Private Deprecations
+====================
+
+_lp_bool()
+----------
+
+Replaced by manually storing return codes.
+
+Most often, the return code can be used in an ``if`` block, and never needs to
+be stored::
+
+   if _lp_http_proxy; then
+   ...
+
+If the function returns a more complicated return code, you can store it like
+this::
+
+   _lp_user
+   local -i code="$?"
+
+or like this if the code only matters if it is not zero::
+
+   _lp_user || local -i code="$?"
+
+_lp_sb()
+--------
+
+Replaced by data functions indicating if they returned data or not. For
+example::
+
+   if _lp_http_proxy; then
+       my_data="${lp_http_proxy} "
+   else
+       my_data=""
+   fi
+
+If the string source is not a data function, you can replace this function with
+a structure like::
+
+   [[ -n $my_data ]] && my_data=" ${my_data} "
+
+With spaces before or after as needed.
+
+_lp_sl()
+--------
+
+See ``_lp_sb()`` above.
+
+_lp_sr()
+--------
+
+See ``_lp_sb()`` above.
+
diff -pruN 1.11-3/docs/upgrading.rst 2.0.3-1/docs/upgrading.rst
--- 1.11-3/docs/upgrading.rst	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/docs/upgrading.rst	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,13 @@
+Upgrading Liquidprompt
+**********************
+
+We try our best to make new versions of Liquidprompt backwards compatible with
+previous versions, but sometimes things need to change to make forward progress.
+If a version introduces breaking changes or deprecation notices, a detailed
+document describing what changes a user needs to make will be linked below.
+
+.. toctree::
+   :maxdepth: 2
+   :reversed:
+
+   upgrading/v2.0
diff -pruN 1.11-3/.github/ISSUE_TEMPLATE/bug.md 2.0.3-1/.github/ISSUE_TEMPLATE/bug.md
--- 1.11-3/.github/ISSUE_TEMPLATE/bug.md	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.github/ISSUE_TEMPLATE/bug.md	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,53 @@
+---
+name: Bug report
+about: Create a report to help us improve Liquidprompt
+title: ''
+labels: 'bug'
+assignees: ''
+
+---
+<!--- Provide a general summary of the issue in the title above -->
+
+<!---
+  Shell name and version.
+  Find with
+  `echo $BASH_VERSION`
+  or
+  `echo $ZSH_VERSION`
+  Example: "bash 4.4.19(1)-release"
+-->
+Shell: 
+<!---
+  Operating system name and version.
+  Find with
+  `uname -a`
+  and either
+  `lsb_release -a` or `cat /etc/*release` or `cat /etc/issue*` or `cat /proc/version`
+  Example: "Linux 4.18.0-147.8.1.el8_1.x86_64, CentOS release 8.1.1911 (Core)"
+-->
+Operating system: 
+<!---
+  Liquidprompt version, tag, or commit.
+  Find with `git describe --tags --exact-match`
+  or `git rev-parse HEAD` in the liquidprompt repo.
+  Please only report bugs that you have tested against the master branch
+  Example: "v1.12"
+-->
+Liquidprompt version: 
+
+### Steps to Reproduce
+<!--- Provide an unambiguous set of steps to reproduce this bug.
+      Include code to reproduce, if relevant -->
+1.
+2.
+3.
+
+### Expected Behavior
+<!--- Tell us what should happen -->
+
+### Current Behavior
+<!--- Tell us what happens instead of the expected behavior -->
+
+### Possible Solution
+<!--- Optional, suggest an idea for fixing the bug -->
+
diff -pruN 1.11-3/.github/ISSUE_TEMPLATE/config.yml 2.0.3-1/.github/ISSUE_TEMPLATE/config.yml
--- 1.11-3/.github/ISSUE_TEMPLATE/config.yml	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.github/ISSUE_TEMPLATE/config.yml	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1 @@
+blank_issues_enabled: false
diff -pruN 1.11-3/.github/ISSUE_TEMPLATE/enhancement.md 2.0.3-1/.github/ISSUE_TEMPLATE/enhancement.md
--- 1.11-3/.github/ISSUE_TEMPLATE/enhancement.md	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.github/ISSUE_TEMPLATE/enhancement.md	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for Liquidprompt
+title: ''
+labels: 'enhancement'
+assignees: ''
+
+---
+<!--- Provide a general summary of the issue in the title above -->
+<!--- This is only a template, feel free to expand -->
+
+### Description
+<!--- Tell us what should happen -->
+
+### How will this be useful?
+<!--- Tell/show us how this feature will be used -->
+
+### Example prompt
+<!--- Show us what a prompt with this feature enabled would look like -->
+
diff -pruN 1.11-3/.github/ISSUE_TEMPLATE.md 2.0.3-1/.github/ISSUE_TEMPLATE.md
--- 1.11-3/.github/ISSUE_TEMPLATE.md	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/.github/ISSUE_TEMPLATE.md	1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-Shell: bash/zsh
-Operating system: 
-Liquid Prompt version (tag, commit): 
-
diff -pruN 1.11-3/.github/workflows/docs-lint.yml 2.0.3-1/.github/workflows/docs-lint.yml
--- 1.11-3/.github/workflows/docs-lint.yml	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.github/workflows/docs-lint.yml	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,24 @@
+name: Lint Documentation
+on:
+  push:
+    paths:
+      - 'docs/**'
+  pull_request:
+jobs:
+  docs-lint:
+    name: Lint Documentation
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 1
+      - name: Set up Python
+        uses: actions/setup-python@v2
+        with:
+          python-version: '3.x'
+      - name: Lint
+        run: |
+          cd docs/
+          python3 -m pip install -r requirements.txt
+          make dummy
+          make linkcheck
diff -pruN 1.11-3/.github/workflows/release.yml 2.0.3-1/.github/workflows/release.yml
--- 1.11-3/.github/workflows/release.yml	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.github/workflows/release.yml	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,52 @@
+on:
+  push:
+    tags:
+    - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
+
+name: Create Release With Assets
+
+jobs:
+  build:
+    name: Upload Release Asset
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 1
+      - name: Set up Python
+        uses: actions/setup-python@v2
+        with:
+          python-version: '3.x'
+      - name: Install Python dependencies
+        working-directory: ./docs
+        run: python3 -m pip install -r requirements.txt
+      - name: Build manual pages
+        working-directory: ./docs
+        run: make man
+      - name: Create output directory
+        run: mkdir -v ./.output
+      - name: Create release tarball
+        run: tar --exclude-vcs --exclude='./.*' --transform 's/^\./liquidprompt/' -zcvf ./.output/liquidprompt.tar.gz .
+      - name: Create Release
+        id: create_release
+        uses: actions/create-release@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          tag_name: ${{ github.ref }}
+          release_name: Release ${{ github.ref }}
+          draft: true
+          prerelease: false
+      - name: Get the tag name
+        id: tag_name
+        run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
+      - name: Upload Release Asset
+        uses: actions/upload-release-asset@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }}
+          asset_path: ./.output/liquidprompt.tar.gz
+          asset_name: liquidprompt-${{ steps.tag_name.outputs.tag }}.tar.gz
+          asset_content_type: application/gzip
diff -pruN 1.11-3/.github/workflows/tests.yml 2.0.3-1/.github/workflows/tests.yml
--- 1.11-3/.github/workflows/tests.yml	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.github/workflows/tests.yml	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,26 @@
+name: tests
+on:
+  push:
+    paths-ignore:
+      - 'docs/**'
+  pull_request:
+jobs:
+  tests:
+    strategy:
+      matrix:
+        os:
+          - ubuntu-16.04
+          - ubuntu-18.04
+          - ubuntu-20.04
+          - macos-10.15
+          - windows-latest
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 1
+      - name: Install zsh
+        run: sudo apt-get --yes install zsh
+        if: runner.os == 'Linux'
+      - run: ./tests.sh
+        shell: bash
diff -pruN 1.11-3/liquidprompt 2.0.3-1/liquidprompt
--- 1.11-3/liquidprompt	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/liquidprompt	2021-05-30 15:33:14.000000000 +0000
@@ -3,7 +3,6 @@
 # An intelligent and non-intrusive prompt for Bash and zsh
 ################################################################################
 
-
 # Licensed under the AGPL version 3
 #
 # This program is free software: you can redistribute it and/or modify
@@ -19,52 +18,21 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-###########
-# AUTHORS #
-###########
-
-# Alex Prengère     <alexprengere@gmail.com>      # Untracked git files
-# Anthony Gelibert  <anthony.gelibert@me.com>     # Several fix
-# Aurelien Requiem  <aurelien@requiem.fr>         # Major clean refactoring, variable path length, error codes, several bugfixes.
-# Brendan Fahy      <bmfahy@gmail.com>            # Postfix variable
-# Clément Mathieu   <clement@unportant.info>      # Bazaar support
-# David Loureiro    <david.loureiro@sysfera.com>  # Small portability fix
-# Étienne Deparis   <etienne@depar.is>            # Fossil support
-# Florian Le Frioux <florian@lefrioux.fr>         # Use ± mark when root in VCS dir.
-# François Schmidts <francois.schmidts@gmail.com> # Initial PROMPT_DIRTRIM support
-# Frédéric Lepied   <flepied@gmail.com>           # Python virtual env
-# Jonas Bengtsson   <jonas.b@gmail.com>           # Git remotes fix
-# Joris Dedieu      <joris@pontiac3.nfrance.com>  # Portability framework, FreeBSD support, bugfixes.
-# Joris Vaillant    <joris.vaillant@gmail.com>    # Small git fix
-# Luc Didry         <luc@fiat-tux.fr>             # ZSH port, several fix
-# Ludovic Rousseau  <ludovic.rousseau@gmail.com>  # Lot of bugfixes.
-# Markus Dreseler   <github@dreseler.de>          # Runtime of last command
-# Nicolas Lacourte  <nicolas@dotinfra.fr>         # Screen title
-# nojhan            <nojhan@gmail.com>            # Original author.
-# Olivier Mengué    <dolmen@cpan.org>             # Major optimizations, refactorings everywhere; current maintainer
-# Poil              <poil@quake.fr>               # Speed improvements
-# Rolf Morel        <rolfmorel@gmail.com>         # "Shorten path" refactoring and fixes
-# Thomas Debesse    <thomas.debesse@gmail.com>    # Fix columns use.
-# Yann 'Ze' Richard <ze@nbox.org>                 # Do not fail on missing commands.
-# Austen Adler      <stonewareslord@gmail.com>    # ZSH runtime
-
 # See the README.md file for a summary of features.
 
 # Issue #161: do not load if not an interactive shell
-test -z "$TERM" -o "x$TERM" = xdumb && return
+# Do not exit if '--no-activate' flag was passed, as it overrides this check
+[ "x${-##*i}" = "x$-" ] || [ -z "${TERM-}" ] || [ "x${TERM-}" = xdumb ] && [ "x${1-}" != "x--no-activate" ] && return
 
-# Check for recent enough version of bash.
-if test -n "${BASH_VERSION-}" -a -n "$PS1" ; then
-    bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
-    if (( bmajor < 3 || ( bmajor == 3 && bminor < 2 ) )); then
-        unset bash bmajor bminor
+if test -n "${BASH_VERSION-}"; then
+    # Check for recent enough version of bash.
+    if (( ${BASH_VERSINFO[0]:-0} < 3 || ( ${BASH_VERSINFO[0]:-0} == 3 && ${BASH_VERSINFO[1]:-0} < 2 ) )); then
+        echo "liquidprompt: Bash version $BASH_VERSION not supported" 2>&1
         return
     fi
 
-    unset bash bmajor bminor
-
-    _LP_SHELL_bash=true
-    _LP_SHELL_zsh=false
+    _LP_SHELL_bash=1
+    _LP_SHELL_zsh=0
     _LP_OPEN_ESC="\["
     _LP_CLOSE_ESC="\]"
 
@@ -73,29 +41,30 @@ if test -n "${BASH_VERSION-}" -a -n "$PS
     _LP_FQDN_SYMBOL="\H"
     _LP_TIME_SYMBOL="\t"
     _LP_MARK_SYMBOL='\$'
-    _LP_PWD_SYMBOL="\\w"
-    _LP_DIR_SYMBOL="\\W"
 
     _LP_FIRST_INDEX=0
     _LP_PERCENT='%'    # must be escaped on zsh
     _LP_BACKSLASH='\\' # must be escaped on bash
 
+    # Sed expression using extended regexp to match terminal
+    # escape sequences with their wrappers
+    _LP_CLEAN_ESC='\\\[([^\]+|\\[^]])*\\\]'
+
     # Escape the given strings
     # Must be used for all strings injected in PS1 that may comes from remote sources,
     # like $PWD, VCS branch names...
-    _lp_escape()
-    {
-        echo -nE "${1//\\/\\\\}"
+    __lp_escape() {
+        ret="${1//\\/\\\\}"
     }
-
-    # Disable the DEBUG trap used by the RUNTIME feature
-    # (in case we are reloading LP in the same shell after disabling
-    # the feature in .liquidpromptrc)
-    # FIXME this doesn't seem to work :(
-    [[ -n "${LP_ENABLE_RUNTIME-}" ]] && trap - DEBUG
 elif test -n "${ZSH_VERSION-}" ; then
-    _LP_SHELL_bash=false
-    _LP_SHELL_zsh=true
+    # Check for recent enough version of zsh.
+    if (( ${ZSH_VERSION:0:1} < 5 )); then
+        echo "liquidprompt: Zsh version $ZSH_VERSION not supported" 2>&1
+        return
+    fi
+
+    _LP_SHELL_bash=0
+    _LP_SHELL_zsh=1
     _LP_OPEN_ESC="%{"
     _LP_CLOSE_ESC="%}"
 
@@ -104,63 +73,28 @@ elif test -n "${ZSH_VERSION-}" ; then
     _LP_FQDN_SYMBOL="%M"
     _LP_TIME_SYMBOL="%*"
     _LP_MARK_SYMBOL='%(!.#.%%)'
-    _LP_PWD_SYMBOL="%~"
-    _LP_DIR_SYMBOL="%1~"
 
     _LP_FIRST_INDEX=1
     _LP_PERCENT='%%'
     _LP_BACKSLASH="\\"
 
-    _lp_escape()
-    {
-        arg="${1//\\/\\\\}"
-        echo -nE "${arg//\%/$_LP_PERCENT}"
-    }
-
-    # For ZSH, autoload required functions
-    autoload -Uz add-zsh-hook
+    _LP_CLEAN_ESC='%\{([^%]+|%[^}])*%\}'
 
-    # Disable previous hooks as options that set them
-    # may have changed
-    {
-        add-zsh-hook -d precmd  _lp_set_prompt
-        add-zsh-hook -d preexec _lp_runtime_before
-        add-zsh-hook -d precmd  _lp_runtime_after
-    } >/dev/null
+    __lp_escape() {
+        local arg="${1//\\/\\\\}"
+        ret="${arg//\%/$_LP_PERCENT}"
+    }
 else
     echo "liquidprompt: shell not supported" >&2
     return
 fi
 
-
-# Store $2 (or $?) as a true/false value in variable named $1
-# $? is propagated
-#   _lp_bool foo 5
-#   => foo=false
-#   _lp_bool foo 0
-#   => foo=true
-_lp_bool()
-{
-    local res=${2:-$?}
-    if (( res )); then
-        eval $1=false
-    else
-        eval $1=true
-    fi
-    return $res
-}
-
-# Save $IFS as we want to restore the default value at the beginning of the
-# prompt function
-_LP_IFS="$IFS"
-
-
 ###############
 # OS specific #
 ###############
 
 # LP_OS detection, default to Linux
-case $(uname) in
+case "$(uname)" in
     FreeBSD)   LP_OS=FreeBSD ;;
     DragonFly) LP_OS=FreeBSD ;;
     OpenBSD)   LP_OS=OpenBSD ;;
@@ -169,141 +103,91 @@ case $(uname) in
     *)         LP_OS=Linux   ;;
 esac
 
-# Get cpu count
-case "$LP_OS" in
-    Linux)   _lp_CPUNUM=$( nproc 2>/dev/null || \grep -c '^[Pp]rocessor' /proc/cpuinfo ) ;;
-    FreeBSD|Darwin|OpenBSD) _lp_CPUNUM=$( sysctl -n hw.ncpu ) ;;
-    SunOS)   _lp_CPUNUM=$( kstat -m cpu_info | \grep -c "module: cpu_info" ) ;;
-esac
-
 # Extended regexp patterns for sed
 # GNU/BSD sed
 _LP_SED_EXTENDED=r
 [[ "$LP_OS" = Darwin ]] && _LP_SED_EXTENDED=E
 
-
-# get current load
-case "$LP_OS" in
-    Linux)
-        _lp_cpu_load () {
-            local eol
-            read lp_cpu_load eol < /proc/loadavg
-        }
-        ;;
-    FreeBSD|Darwin|OpenBSD)
-        _lp_cpu_load () {
-            local bol eol
-            # If you have problems with syntax coloring due to the following
-            # line, do this: ln -s liquidprompt liquidprompt.bash
-            # and edit liquidprompt.bash
-            read bol lp_cpu_load eol <<<"$( LANG=C sysctl -n vm.loadavg )"
-        }
-        ;;
-    SunOS)
-        _lp_cpu_load () {
-            read lp_cpu_load <<<"$( LANG=C uptime | awk '{print substr($10,0,length($10))}' )"
-        }
-esac
-
-
 #################
 # CONFIGURATION #
 #################
 
-# The following code is run just once. But it is encapsulated in a function
-# to benefit of 'local' variables.
-#
-# What we do here:
-# 1. Setup variables that can be used by the user: the "API" of Liquid Prompt
-#    for config/theme. Those variables are local to the function.
-#    In practice, this is only color variables.
-# 2. Setup default values
-# 3. Load the configuration
-_lp_source_config()
-{
+# Load the user configuration and setup defaults.
+__lp_source_config() {
 
-    # TermInfo feature detection
-    local ti_sgr0="$( { tput sgr0 || tput me ; } 2>/dev/null )"
-    local ti_bold="$( { tput bold || tput md ; } 2>/dev/null )"
-    local ti_setaf
-    local ti_setab
-    if tput setaf 0 >/dev/null 2>&1; then
-        ti_setaf() { tput setaf "$1" ; }
-    elif tput AF 0 >/dev/null 2>&1; then
-        # FreeBSD
-        ti_setaf() { tput AF "$1" ; }
-    elif tput AF 0 0 0 >/dev/null 2>&1; then
-        # OpenBSD
-        ti_setaf() { tput AF "$1" 0 0 ; }
-    else
-        echo "liquidprompt: terminal $TERM not supported" >&2
-        ti_setaf () { : ; }
-    fi
-    if tput setab 0 >/dev/null 2>&1; then
-        ti_setab() { tput setab "$1" ; }
-    elif tput AB 0 >/dev/null 2>&1; then
-        # FreeBSD
-        ti_setab() { tput AB "$1" ; }
-    elif tput AB 0 0 0 >/dev/null 2>&1; then
-        # OpenBSD
-        ti_setab() { tput AB "$1" 0 0 ; }
-    else
-        echo "liquidprompt: terminal $TERM not supported" >&2
-        ti_setab() { : ; }
-    fi
+    local lp_terminal_format af_color= ab_color=
 
     # Colors: variables are local so they will have a value only
     # during config loading and will not conflict with other values
     # with the same names defined by the user outside the config.
-    local BOLD="${_LP_OPEN_ESC}${ti_bold}${_LP_CLOSE_ESC}"
-
-    local BLACK="${_LP_OPEN_ESC}$(ti_setaf 0)${_LP_CLOSE_ESC}"
-    local BOLD_GRAY="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 0)${_LP_CLOSE_ESC}"
-    local WHITE="${_LP_OPEN_ESC}$(ti_setaf 7)${_LP_CLOSE_ESC}"
-    local BOLD_WHITE="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 7)${_LP_CLOSE_ESC}"
-
-    local RED="${_LP_OPEN_ESC}$(ti_setaf 1)${_LP_CLOSE_ESC}"
-    local BOLD_RED="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 1)${_LP_CLOSE_ESC}"
-    local WARN_RED="${_LP_OPEN_ESC}$(ti_setaf 0 ; ti_setab 1)${_LP_CLOSE_ESC}"
-    local CRIT_RED="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 7 ; ti_setab 1)${_LP_CLOSE_ESC}"
-    local DANGER_RED="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 3 ; ti_setab 1)${_LP_CLOSE_ESC}"
-
-    local GREEN="${_LP_OPEN_ESC}$(ti_setaf 2)${_LP_CLOSE_ESC}"
-    local BOLD_GREEN="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 2)${_LP_CLOSE_ESC}"
-
-    local YELLOW="${_LP_OPEN_ESC}$(ti_setaf 3)${_LP_CLOSE_ESC}"
-    local BOLD_YELLOW="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 3)${_LP_CLOSE_ESC}"
+    local BOLD="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${_LP_CLOSE_ESC}"
 
-    local BLUE="${_LP_OPEN_ESC}$(ti_setaf 4)${_LP_CLOSE_ESC}"
-    local BOLD_BLUE="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 4)${_LP_CLOSE_ESC}"
-
-    local PURPLE="${_LP_OPEN_ESC}$(ti_setaf 5)${_LP_CLOSE_ESC}"
-    local PINK="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 5)${_LP_CLOSE_ESC}"
-
-    local CYAN="${_LP_OPEN_ESC}$(ti_setaf 6)${_LP_CLOSE_ESC}"
-    local BOLD_CYAN="${_LP_OPEN_ESC}${ti_bold}$(ti_setaf 6)${_LP_CLOSE_ESC}"
+    # Foreground colors
+    __lp_foreground_color 0
+    local BLACK="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_GRAY="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+
+    __lp_foreground_color 1
+    local RED="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_RED="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+    __lp_foreground_color 0
+    __lp_background_color 1
+    local WARN_RED="${_LP_OPEN_ESC}${af_color}${ab_color}${_LP_CLOSE_ESC}"
+    __lp_foreground_color 7
+    local CRIT_RED="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${ab_color}${_LP_CLOSE_ESC}"
+    __lp_foreground_color 3
+    local DANGER_RED="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${ab_color}${_LP_CLOSE_ESC}"
+
+    __lp_foreground_color 2
+    local GREEN="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_GREEN="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+
+    __lp_foreground_color 3
+    local YELLOW="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_YELLOW="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+
+    __lp_foreground_color 4
+    local BLUE="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_BLUE="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+
+    __lp_foreground_color 5
+    local PURPLE="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local MAGENTA="${PURPLE}"
+    local PINK="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_PURPLE="${PINK}"
+    local BOLD_MAGENTA="${PINK}"
+
+    __lp_foreground_color 6
+    local CYAN="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_CYAN="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
+
+    __lp_foreground_color 7
+    local WHITE="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
+    local BOLD_WHITE="${_LP_OPEN_ESC}${_LP_TI_BOLD-}${af_color}${_LP_CLOSE_ESC}"
 
     # NO_COL is special: it will be used at runtime, not just during config loading
-    NO_COL="${_LP_OPEN_ESC}${ti_sgr0}${_LP_CLOSE_ESC}"
+    NO_COL="${_LP_OPEN_ESC}${_LP_TI_RESET-}${_LP_CLOSE_ESC}"
 
-    # compute the hash of the hostname
-    # and get the corresponding number in [1-6] (red,green,yellow,blue,purple or cyan)
-    # FIXME check portability of cksum and add more formats (bold? 256 colors?)
-    local hash=$(( 1 + $(hostname | cksum | cut -d " " -f 1) % 6 ))
-    LP_COLOR_HOST_HASH="${_LP_OPEN_ESC}$(ti_setaf $hash)${_LP_CLOSE_ESC}"
-
-    unset ti_sgr0 ti_bold
-    unset -f ti_setaf ti_setab
+    # compute the hash of the hostname and get the corresponding number in
+    # [1-6] (red,green,yellow,blue,purple or cyan)
+    local lp_hostname_hash
+    __lp_hostname_hash
+    __lp_foreground_color "$(( 1 + lp_hostname_hash % 6 ))"
+    LP_COLOR_HOST_HASH="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
 
 
     # Default values (globals)
     LP_BATTERY_THRESHOLD=${LP_BATTERY_THRESHOLD:-75}
-    LP_LOAD_THRESHOLD=${LP_LOAD_THRESHOLD:-60}
+    LP_LOAD_THRESHOLD=${LP_LOAD_THRESHOLD:-0.60}
+    LP_LOAD_CAP=${LP_LOAD_CAP:-2.0}
     LP_TEMP_THRESHOLD=${LP_TEMP_THRESHOLD:-60}
     LP_RUNTIME_THRESHOLD=${LP_RUNTIME_THRESHOLD:-2}
+    LP_RUNTIME_BELL_THRESHOLD=${LP_RUNTIME_BELL_THRESHOLD:-10}
     LP_PATH_LENGTH=${LP_PATH_LENGTH:-35}
     LP_PATH_KEEP=${LP_PATH_KEEP:-2}
-    LP_PATH_DEFAULT="${LP_PATH_DEFAULT:-$_LP_PWD_SYMBOL}"
+    LP_PATH_CHARACTER_KEEP=${LP_PATH_CHARACTER_KEEP:-3}
+    LP_PATH_METHOD=${LP_PATH_METHOD:-truncate_chars_from_path_left}
+    LP_PATH_VCS_ROOT=${LP_PATH_VCS_ROOT:-1}
     LP_HOSTNAME_ALWAYS=${LP_HOSTNAME_ALWAYS:-0}
     LP_USER_ALWAYS=${LP_USER_ALWAYS:-1}
     LP_PERCENTS_ALWAYS=${LP_PERCENTS_ALWAYS:-1}
@@ -316,16 +200,18 @@ _lp_source_config()
     LP_ENABLE_PROXY=${LP_ENABLE_PROXY:-1}
     LP_ENABLE_TEMP=${LP_ENABLE_TEMP:-1}
     LP_ENABLE_JOBS=${LP_ENABLE_JOBS:-1}
+    LP_ENABLE_DETACHED_SESSIONS=${LP_ENABLE_DETACHED_SESSIONS:-1}
     LP_ENABLE_LOAD=${LP_ENABLE_LOAD:-1}
     LP_ENABLE_BATT=${LP_ENABLE_BATT:-1}
     LP_ENABLE_GIT=${LP_ENABLE_GIT:-1}
     LP_ENABLE_SVN=${LP_ENABLE_SVN:-1}
-    LP_ENABLE_VCSH=${LP_ENABLE_VCSH:-1}
     LP_ENABLE_FOSSIL=${LP_ENABLE_FOSSIL:-1}
     LP_ENABLE_HG=${LP_ENABLE_HG:-1}
     LP_ENABLE_BZR=${LP_ENABLE_BZR:-1}
     LP_ENABLE_TIME=${LP_ENABLE_TIME:-0}
+    LP_TIME_ANALOG=${LP_TIME_ANALOG:-0}
     LP_ENABLE_RUNTIME=${LP_ENABLE_RUNTIME:-1}
+    LP_ENABLE_RUNTIME_BELL=${LP_ENABLE_RUNTIME_BELL:-0}
     LP_ENABLE_VIRTUALENV=${LP_ENABLE_VIRTUALENV:-1}
     LP_ENABLE_SCLS=${LP_ENABLE_SCLS:-1}
     LP_ENABLE_VCS_ROOT=${LP_ENABLE_VCS_ROOT:-0}
@@ -333,8 +219,11 @@ _lp_source_config()
     LP_ENABLE_SCREEN_TITLE=${LP_ENABLE_SCREEN_TITLE:-0}
     LP_ENABLE_SSH_COLORS=${LP_ENABLE_SSH_COLORS:-0}
     LP_ENABLE_FQDN=${LP_ENABLE_FQDN:-0}
-    # LP_DISABLED_VCS_PATH="${LP_DISABLED_VCS_PATH}"
+    LP_DISABLED_VCS_PATHS=( ${LP_DISABLED_VCS_PATHS[@]+"${LP_DISABLED_VCS_PATHS[@]}"} )
     LP_ENABLE_SUDO=${LP_ENABLE_SUDO:-0}
+    LP_ENABLE_COLOR=${LP_ENABLE_COLOR:-1}
+    LP_ENABLE_ERROR=${LP_ENABLE_ERROR:-1}
+    LP_ENABLE_DIRSTACK=${LP_ENABLE_DIRSTACK:-0}
 
     LP_MARK_DEFAULT="${LP_MARK_DEFAULT:-$_LP_MARK_SYMBOL}"
     LP_MARK_BATTERY="${LP_MARK_BATTERY:-"⌁"}"
@@ -355,8 +244,16 @@ _lp_source_config()
     LP_MARK_BRACKET_CLOSE="${LP_MARK_BRACKET_CLOSE:-"]"}"
     LP_MARK_SHORTEN_PATH="${LP_MARK_SHORTEN_PATH:-" … "}"
     LP_MARK_PREFIX="${LP_MARK_PREFIX:-" "}"
+    LP_MARK_PERM="${LP_MARK_PERM:-":"}"
+    LP_MARK_DIRSTACK="${LP_MARK_DIRSTACK:-"⚞"}"
 
-    LP_COLOR_PATH=${LP_COLOR_PATH:-$BOLD}
+    LP_COLOR_PATH=${LP_COLOR_PATH:-$NO_COL}
+    lp_terminal_format 8 -1 0 0 -1
+    LP_COLOR_PATH_SEPARATOR=${LP_COLOR_PATH_SEPARATOR:-$lp_terminal_format}
+    LP_COLOR_PATH_SHORTENED=${LP_COLOR_PATH_SHORTENED:-$lp_terminal_format}
+    lp_terminal_format -1 -1 1 0
+    LP_COLOR_PATH_VCS_ROOT=${LP_COLOR_PATH_VCS_ROOT:-$lp_terminal_format}
+    LP_COLOR_PATH_LAST_DIR=${LP_COLOR_PATH_LAST_DIR:-$lp_terminal_format}
     LP_COLOR_PATH_ROOT=${LP_COLOR_PATH_ROOT:-$BOLD_YELLOW}
     LP_COLOR_PROXY=${LP_COLOR_PROXY:-$BOLD_BLUE}
     LP_COLOR_JOB_D=${LP_COLOR_JOB_D:-$YELLOW}
@@ -390,6 +287,7 @@ _lp_source_config()
     LP_COLOR_IN_MULTIPLEXER=${LP_COLOR_IN_MULTIPLEXER:-$BOLD_BLUE}
     LP_COLOR_RUNTIME=${LP_COLOR_RUNTIME:-$YELLOW}
     LP_COLOR_VIRTUALENV=${LP_COLOR_VIRTUALENV:-$CYAN}
+    LP_COLOR_DIRSTACK=${LP_COLOR_DIRSTACK:-$BOLD_YELLOW}
 
     if [[ -z "${LP_COLORMAP-}" ]]; then
         LP_COLORMAP=(
@@ -409,33 +307,41 @@ _lp_source_config()
     # Debugging flags
     LP_DEBUG_TIME=${LP_DEBUG_TIME:-0}
 
-
-    local configfile
+    if [[ ${1-} == --no-config ]]; then
+        return
+    fi
 
     # Default config file may be the XDG standard ~/.config/liquidpromptrc,
     # but heirloom dotfile has priority.
+    local -a configfiles
+    configfiles=("$HOME/.liquidpromptrc" "${XDG_CONFIG_HOME:-"$HOME/.config"}/liquidpromptrc")
 
-    if [[ -f "$HOME/.liquidpromptrc" ]]; then
-        configfile="$HOME/.liquidpromptrc"
-    else
-        local first
-        local search
-        # trailing ":" is so that ${search#*:} always removes something
-        search="${XDG_CONFIG_HOME:-"$HOME/.config"}:${XDG_CONFIG_DIRS:-/etc/xdg}:"
-        while [[ -n "$search" ]]; do
-            first="${search%%:*}"
-            search="${search#*:}"
-            if [[ -f "$first/liquidpromptrc" ]]; then
-                configfile="$first/liquidpromptrc"
-                break
-            fi
-        done
-    fi
+    # trailing ":" is so that ${search#*:} always removes something
+    local configfile search="${XDG_CONFIG_DIRS:-/etc/xdg}:"
+    while [[ -n "$search" ]]; do
+        configfiles+=("${search%%:*}/liquidpromptrc")
+        search="${search#*:}"
+    done
+
+    configfiles+=("/etc/liquidpromptrc")
+
+    for configfile in "${configfiles[@]}"; do
+        if [[ -f "$configfile" ]]; then
+            source "$configfile"
+            break
+        fi
+    done
+
+    # Deprecations and compatability shims
 
-    if [[ -n "$configfile" ]]; then
-        source "$configfile"
-    elif [[ -f "/etc/liquidpromptrc" ]]; then
-        source "/etc/liquidpromptrc"
+    if [[ -n "${LP_DISABLED_VCS_PATH-}" ]]; then
+        echo "liquidprompt: LP_DISABLED_VCS_PATH is deprecated. Update your config to use LP_DISABLED_VCS_PATHS array." >&2
+
+        (( _LP_SHELL_zsh )) && setopt local_options && setopt sh_word_split
+        local _path IFS=:
+        for _path in $LP_DISABLED_VCS_PATH; do
+            LP_DISABLED_VCS_PATHS+=("$_path")
+        done
     fi
 
     # Delete this code in version 1.11
@@ -456,788 +362,1810 @@ _lp_source_config()
         unset LP_COLORMAP_0 LP_COLORMAP_1 LP_COLORMAP_2 LP_COLORMAP_3 LP_COLORMAP_4 \
               LP_COLORMAP_5 LP_COLORMAP_6 LP_COLORMAP_7 LP_COLORMAP_8 LP_COLORMAP_9
     fi
-}
-# do source config files
-_lp_source_config
-unset -f _lp_source_config
-
-# Disable feature if the tool is not installed
-_lp_require_tool()
-{
-    (( LP_ENABLE_$1 )) && { command -v $2 >/dev/null || eval LP_ENABLE_$1=0 ; }
-}
-
-_lp_require_tool GIT git
-_lp_require_tool SVN svn
-_lp_require_tool FOSSIL fossil
-_lp_require_tool HG hg
-_lp_require_tool BZR bzr
-
-if [[ "$LP_OS" = Darwin ]]; then
-    _lp_require_tool BATT pmset
-else
-    _lp_require_tool BATT acpi
-fi
-
-unset -f _lp_require_tool
-
-if (( LP_ENABLE_JOBS )); then
-    typeset -i _LP_ENABLE_DETACHED_SESSION _LP_ENABLE_SCREEN _LP_ENABLE_TMUX
-    command -v screen >/dev/null ; _LP_ENABLE_SCREEN=!$?
-    command -v tmux >/dev/null   ; _LP_ENABLE_TMUX=!$?
-    (( _LP_ENABLE_DETACHED_SESSIONS = ( _LP_ENABLE_SCREEN || _LP_ENABLE_TMUX ) ))
-fi
-
-# Use standard path symbols inside Midnight Commander
-[[ -n "${MC_SID-}" ]] && LP_ENABLE_SHORTEN_PATH=0
 
-# If we are running in a terminal multiplexer, brackets are colored
-if [[ "$TERM" == screen* ]]; then
-    LP_BRACKET_OPEN="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_OPEN}${NO_COL}"
-    LP_BRACKET_CLOSE="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_CLOSE}${NO_COL}"
-    (( LP_ENABLE_TITLE = LP_ENABLE_TITLE && LP_ENABLE_SCREEN_TITLE ))
-    LP_TITLE_OPEN="$(printf '\033k')"
-    # "\e\" but on bash \ must be escaped
-    LP_TITLE_CLOSE="$(printf '\033%s' "$_LP_BACKSLASH")"
-else
-    LP_BRACKET_OPEN="${LP_MARK_BRACKET_OPEN}"
-    LP_BRACKET_CLOSE="${LP_MARK_BRACKET_CLOSE}"
-    LP_TITLE_OPEN="$(printf '\e]0;')"
-    LP_TITLE_CLOSE="$(printf '\a')"
-fi
+    if [[ -n ${LP_PATH_DEFAULT-} ]]; then
+        echo "liquidprompt: LP_PATH_DEFAULT is deprecated. Update your config to set LP_PATH_METHOD." >&2
+        if (( ! LP_ENABLE_SHORTEN_PATH )); then
+            # There is just no elegant way to handle this. Fallback to the old way with basic formatting support.
+            _lp_path_format() {
+                lp_path=$LP_PATH_DEFAULT
+                lp_path_format="${LP_COLOR_PATH}${lp_path}${NO_COL}"
+            }
+        fi
+    fi
 
-[[ "_$TERM" == _linux* ]] && LP_ENABLE_TITLE=0
+    if [[ -n ${PROMPT_DIRTRIM-} ]] && (( ! LP_ENABLE_SHORTEN_PATH )); then
+        echo "liquidprompt: PROMPT_DIRTRIM support is deprecated. Update your config to set
+            LP_PATH_METHOD='truncate_chars_from_path_left' instead." >&2
+        # This does mostly the same thing, but with our formatting.
+        LP_ENABLE_SHORTEN_PATH=1
+        LP_PATH_METHOD="truncate_chars_from_path_left"
+        LP_PATH_KEEP=1
+    fi
+
+    if [[ $LP_PATH_KEEP == "-1" ]]; then
+        echo "liquidprompt: LP_PATH_KEEP set to '-1' is deprecated. Update your config to set
+              LP_PATH_METHOD='truncate_to_last_dir' instead." >&2
+        LP_PATH_METHOD="truncate_to_last_dir"
+    fi
+}
 
-# update_terminal_cwd is a shell function available on MacOS X Lion that
-# will update an icon of the directory displayed in the title of the terminal
-# window.
-# See http://hints.macworld.com/article.php?story=20110722211753852
-if [[ "${TERM_PROGRAM-}" == Apple_Terminal ]] && command -v update_terminal_cwd >/dev/null; then
-    _LP_TERM_UPDATE_DIR=update_terminal_cwd
-    # Remove "update_terminal_cwd; " that has been add by Apple in /et/bashrc.
-    # See issue #196
-    PROMPT_COMMAND="${PROMPT_COMMAND//update_terminal_cwd; /}"
-else
-    _LP_TERM_UPDATE_DIR=:
-fi
+# Initialize features based on the user config.
+lp_activate() {
+    if (( _LP_SHELL_bash )); then
+        # Disable the DEBUG trap used by the RUNTIME feature
+        # (in case we are reloading LP in the same shell after disabling
+        # the feature in .liquidpromptrc)
+        (( ${LP_ENABLE_RUNTIME-0} || ${LP_ENABLE_RUNTIME_BELL-0} )) && trap - DEBUG
 
-# Default value for LP_PERM when LP_ENABLE_PERM is 0
-LP_PERM=:   # without color
+        complete -F __lp_theme_bash_complete lp_theme
+    else # zsh
+        # For ZSH, autoload required functions
+        autoload -Uz add-zsh-hook
 
-# Same as bash '\l', but inlined as a constant as the value will not change
-# during the shell's life
-LP_TTYN="$(basename -- "$(tty)" 2>/dev/null)"
+        # Disable previous hooks as options that set them
+        # may have changed
+        {
+            add-zsh-hook -d precmd  __lp_set_prompt
+            add-zsh-hook -d preexec __lp_runtime_before
+            add-zsh-hook -d precmd  __lp_runtime_after
+        } >/dev/null
 
+        # Enable the autocomplete if the autocomplete system is initialized.
+        __lp_is_function compdef && compdef __lp_theme_zsh_complete lp_theme
+    fi
 
+    # TermInfo feature detection
+    _lp_af_colors=() _lp_ab_colors=()
 
-###############
-# Who are we? #
-###############
-command -v _lp_sudo_check >/dev/null && unset -f _lp_sudo_check
+    __lp_foreground_color() { return 2 ; }
+    __lp_background_color() { return 2 ; }
 
-# Yellow for root, bold if the user is not the login one, else no color.
-if (( EUID != 0 )); then  # if user is not root
-    # if user is not login user
-    if [[ "${USER}" != "$(logname 2>/dev/null || echo "$LOGNAME")" ]]; then
-        LP_USER="${LP_COLOR_USER_ALT}${_LP_USER_SYMBOL}${NO_COL}"
-    elif (( LP_USER_ALWAYS )); then
-        LP_USER="${LP_COLOR_USER_LOGGED}${_LP_USER_SYMBOL}${NO_COL}"
-    else
-        LP_USER=""
-    fi
-    # "sudo -n" is only supported from sudo 1.7.0
-    if (( LP_ENABLE_SUDO )) \
-            && command -v sudo >/dev/null \
-            && LC_MESSAGES=C sudo -V | GREP_OPTIONS= \grep -qE '^Sudo version (1(\.([789]\.|[1-9][0-9])|[0-9])|[2-9])'
-    then
-        LP_COLOR_MARK_NO_SUDO="$LP_COLOR_MARK"
-        # Test the code with the commands:
-        #   sudo id   # sudo, enter your credentials
-        #   sudo -K   # revoke your credentials
-        _lp_sudo_check()
-        {
-            if sudo -n true 2>/dev/null; then
-                LP_COLOR_MARK=$LP_COLOR_MARK_SUDO
-            else
-                LP_COLOR_MARK=$LP_COLOR_MARK_NO_SUDO
-            fi
-        }
-    fi
-else # root!
-    LP_USER="${LP_COLOR_USER_ROOT}${_LP_USER_SYMBOL}${NO_COL}"
-    LP_COLOR_MARK="${LP_COLOR_MARK_ROOT}"
-    LP_COLOR_PATH="${LP_COLOR_PATH_ROOT}"
-    # Disable VCS info for all paths
-    if (( ! LP_ENABLE_VCS_ROOT )); then
-        LP_DISABLED_VCS_PATH=/
-        LP_MARK_DISABLED="$_LP_MARK_SYMBOL"
+    # TODO handle this case better. With no colors, no need for any escaping
+    if ! command -v tput >/dev/null; then
+        echo "liquidprompt: 'tput' not available; will not be able to format terminal" >&2
+        LP_ENABLE_COLOR=0
+    else
+        _LP_TI_RESET="$( { tput sgr0 || tput me ; } 2>/dev/null )"
+        _LP_TI_BOLD="$( { tput bold || tput md ; } 2>/dev/null )"
+        _LP_TI_UNDERLINE="$( { tput smul || tput us ; } 2>/dev/null )"
+        _LP_TI_COLORS="$( tput colors 2>/dev/null )"
+        _LP_TI_COLORS=${_LP_TI_COLORS:-8}
+
+        _LP_TI_BELL="$( { tput bel || tput bl ; } 2>/dev/null )"
+
+        if tput setaf 0 >/dev/null 2>&1; then
+            __lp_foreground_color() { af_color="${_lp_af_colors[$1+1]:=$(tput setaf "$1")}"; }
+        elif tput AF 0 >/dev/null 2>&1; then
+            # FreeBSD
+            __lp_foreground_color() { af_color="${_lp_af_colors[$1+1]:=$(tput AF "$1")}"; }
+        elif tput AF 0 0 0 >/dev/null 2>&1; then
+            # OpenBSD
+            __lp_foreground_color() { af_color="${_lp_af_colors[$1+1]:=$(tput AF "$1" 0 0)}"; }
+        else
+            echo "liquidprompt: terminal '${TERM-}' does not support foreground colors" >&2
+        fi
+        if tput setab 0 >/dev/null 2>&1; then
+            __lp_background_color() { ab_color="${_lp_ab_colors[$1+1]:=$(tput setab "$1")}"; }
+        elif tput AB 0 >/dev/null 2>&1; then
+            # FreeBSD
+            __lp_background_color() { ab_color="${_lp_ab_colors[$1+1]:=$(tput AB "$1")}"; }
+        elif tput AB 0 0 0 >/dev/null 2>&1; then
+            # OpenBSD
+            __lp_background_color() { ab_color="${_lp_ab_colors[$1+1]:=$(tput AB "$1" 0 0)}"; }
+        else
+            echo "liquidprompt: terminal '${TERM-}' does not support background colors" >&2
+        fi
     fi
-fi
 
-# Empty _lp_sudo_check if root or sudo disabled
-if ! command -v _lp_sudo_check >/dev/null; then
-    _lp_sudo_check() { :; }
-fi
+    # If tput doesn't exist or lookup failed, still try to send bell
+    _LP_TI_BELL=${_LP_TI_BELL:-$'\a'}
 
+    __lp_source_config "$@"
 
-#################
-# Where are we? #
-#################
+    # Disable feature if the tool is not installed
+    _lp_require_tool()
+    {
+        (( LP_ENABLE_$1 )) && { command -v "$2" >/dev/null || eval LP_ENABLE_$1=0 ; }
+    }
 
-_lp_connection()
-{
-    if [[ -n "${SSH_CLIENT-}${SSH2_CLIENT-}${SSH_TTY-}" ]]; then
-        echo ssh
+    _lp_require_tool GIT git
+    _lp_require_tool SVN svn
+    _lp_require_tool FOSSIL fossil
+    _lp_require_tool HG hg
+    _lp_require_tool BZR bzr
+
+    _LP_ENABLED_VCSS=()
+    (( LP_ENABLE_GIT )) && _LP_ENABLED_VCSS+=(git)
+    (( LP_ENABLE_SVN )) && _LP_ENABLED_VCSS+=(svn)
+    (( LP_ENABLE_HG )) && _LP_ENABLED_VCSS+=(hg)
+    (( LP_ENABLE_BZR )) && _LP_ENABLED_VCSS+=(bzr)
+
+    if [[ "$LP_OS" = Darwin ]]; then
+        _lp_require_tool BATT pmset
     else
-        # tmux: see GH #304
-        # TODO check on *BSD
-        local whoami="$(LANG=C who am i)"
-        local sess_parent="$(ps -o comm= -p $PPID 2> /dev/null)"
-        if [[ x"$whoami" != *'('* || x"$whoami" = *'(:'* || x"$whoami" = *'(tmux'* ]]; then
-            echo lcl  # Local
-        elif [[ "$sess_parent" = "su" || "$sess_parent" = "sudo" ]]; then
-            echo su   # Remote su/sudo
-        else
-            echo tel  # Telnet
-        fi
+        _lp_require_tool BATT acpi
     fi
-}
 
-# Put the hostname if not locally connected
-# color it in cyan within SSH, and a warning red if within telnet
-# else display the host without color
-# The connection is not expected to change from inside the shell, so we
-# build this just once
-LP_HOST=""
+    unset -f _lp_require_tool
 
-# Only process hostname elements if we haven't turned them off
-if (( LP_HOSTNAME_ALWAYS != -1 )); then
+    if (( LP_ENABLE_DETACHED_SESSIONS )); then
+        command -v screen >/dev/null ; _LP_ENABLE_SCREEN=$(( ! $? ))
+        command -v tmux >/dev/null   ; _LP_ENABLE_TMUX=$(( ! $? ))
+    fi
 
-    [[ -r /etc/debian_chroot ]] && LP_HOST="($(< /etc/debian_chroot))"
+    # Use standard path symbols inside Midnight Commander
+    [[ -n "${MC_SID-}" ]] && LP_ENABLE_SHORTEN_PATH=0
 
-    # Which host symbol should we use?
-    if (( LP_ENABLE_FQDN )); then
-        LP_HOST_SYMBOL="${_LP_FQDN_SYMBOL}"
+    # If we are running in a terminal multiplexer, special title escapes
+    if _lp_multiplexer; then
+        (( LP_ENABLE_TITLE = LP_ENABLE_TITLE && LP_ENABLE_SCREEN_TITLE ))
+        LP_TITLE_OPEN=$'\Ek'
+        # "\e\" but on bash \ must be escaped
+        LP_TITLE_CLOSE=$'\E'"$_LP_BACKSLASH"
     else
-        LP_HOST_SYMBOL="${_LP_HOST_SYMBOL}"
+        LP_TITLE_OPEN=$'\E]0;'
+        LP_TITLE_CLOSE=$'\a'
     fi
 
-    # If we are connected with a X11 support
-    if [[ -n "$DISPLAY" ]]; then
-        LP_HOST="${LP_COLOR_X11_ON}${LP_HOST}@${NO_COL}"
+    [[ "_${TERM-}" == _linux* ]] && LP_ENABLE_TITLE=0
+
+    # update_terminal_cwd is a shell function available on MacOS X Lion that
+    # will update an icon of the directory displayed in the title of the terminal
+    # window.
+    # See http://hints.macworld.com/article.php?story=20110722211753852
+    if [[ "${TERM_PROGRAM-}" == Apple_Terminal ]] && command -v update_terminal_cwd >/dev/null; then
+        _LP_TERM_UPDATE_DIR=update_terminal_cwd
+        # Remove "update_terminal_cwd; " that has been add by Apple in /et/bashrc.
+        # See issue #196
+        PROMPT_COMMAND="${PROMPT_COMMAND//update_terminal_cwd; /}"
     else
-        LP_HOST="${LP_COLOR_X11_OFF}${LP_HOST}@${NO_COL}"
+        _LP_TERM_UPDATE_DIR=:
     fi
 
-    case "$(_lp_connection)" in
-    lcl)
-        if (( LP_HOSTNAME_ALWAYS )); then
-            LP_HOST+="${LP_COLOR_HOST}${_LP_HOST_SYMBOL}${NO_COL}"
+    ###############
+    # Who are we? #
+    ###############
+
+    _lp_user
+    local -i user="$?"
+
+    if (( user < 2 )); then  # if user is not root
+        # "sudo -n" is only supported from sudo 1.7.0
+        if (( LP_ENABLE_SUDO )); then
+            command -v sudo >/dev/null \
+            && LC_MESSAGES=C sudo -V | GREP_OPTIONS= \grep -qE '^Sudo version (1(\.([789]\.|[1-9][0-9])|[0-9])|[2-9])' \
+            || LP_ENABLE_SUDO=0
+        fi
+
+        if (( user == 1 )); then
+            LP_COLOR_USER=$LP_COLOR_USER_ALT
         else
-            # FIXME do we want to display the chroot if local?
-            LP_HOST="" # no hostname if local
+            LP_COLOR_USER=$LP_COLOR_USER_LOGGED
+        fi
+    else # root!
+        LP_ENABLE_SUDO=0
+        if (( ! LP_ENABLE_VCS_ROOT )); then
+            LP_DISABLED_VCS_PATHS=("/")
         fi
-        ;;
-    ssh)
-        # If we want a different color for each host
-        (( LP_ENABLE_SSH_COLORS )) && LP_COLOR_SSH="$LP_COLOR_HOST_HASH"
-        LP_HOST+="${LP_COLOR_SSH}${_LP_HOST_SYMBOL}${NO_COL}"
-        ;;
-    su)
-        LP_HOST+="${LP_COLOR_SU}${_LP_HOST_SYMBOL}${NO_COL}"
-        ;;
-    tel)
-        LP_HOST+="${LP_COLOR_TELNET}${_LP_HOST_SYMBOL}${NO_COL}"
-        ;;
-    *)
-        LP_HOST+="${_LP_HOST_SYMBOL}" # defaults to no color
-        ;;
-    esac
 
-fi
+        LP_COLOR_MARK=$LP_COLOR_MARK_ROOT
+        LP_COLOR_PATH=$LP_COLOR_PATH_ROOT
+        LP_COLOR_USER=$LP_COLOR_USER_ROOT
+    fi
 
-# Useless now, so undefine
-unset -f _lp_connection
+    #################
+    # Where are we? #
+    #################
 
+    _LP_RUNTIME_LAST_SECONDS=$SECONDS
 
-_lp_get_home_tilde_collapsed()
-{
-    local tilde="~"
-    echo "${PWD/#$HOME/$tilde}"
-}
-
-# Shorten the path of the current working directory
-# * Show only the current directory
-# * Show as much of the cwd path as possible, if shortened display a
-#   leading mark, such as ellipses, to indicate that part is missing
-# * show at least LP_PATH_KEEP leading dirs and current directory
-_lp_shorten_path()
-{
-
-    if (( ! LP_ENABLE_SHORTEN_PATH )); then
-        # We are not supposed to come here often as this case is already
-        # optimized at install time
-        LP_PWD="${LP_COLOR_PATH}${LP_PATH_DEFAULT}$NO_COL"
-        return
+    if (( LP_ENABLE_RUNTIME || LP_ENABLE_RUNTIME_BELL)); then
+        if (( _LP_SHELL_zsh )); then
+            add-zsh-hook preexec __lp_runtime_before
+            add-zsh-hook precmd  __lp_runtime_after
+        else
+            _LP_AT_PROMPT=0
+            # __lp_runtime_before gets called just before bash executes a command,
+            # including $PROMPT_COMMAND
+            # Pass $_ to this call, because it sets $_ to what it already was
+            trap '__lp_runtime_before "$_"' DEBUG
+        fi
     fi
 
-    local ret=
+    if (( LP_ENABLE_TEMP )); then
+        # Try each _lp_temp method
+        # If no function worked, disable the feature
+        __lp_temp_detect acpi sensors || LP_ENABLE_TEMP=0
+    fi
 
-    local p="$(_lp_get_home_tilde_collapsed)"
-    local mask="${LP_MARK_SHORTEN_PATH}"
-    local -i max_len=$(( ${COLUMNS:-80} * LP_PATH_LENGTH / 100 ))
-
-    if (( LP_PATH_KEEP == -1 )); then
-        # only show the current directory, excluding any parent dirs
-        ret="${p##*/}" # discard everything up to and including the last slash
-        [[ "${ret}" == "" ]] && ret="/" # if in root directory
-    elif (( ${#p} <= max_len )); then
-        ret="${p}"
-    elif (( LP_PATH_KEEP == 0 )); then
-        # len is over max len, show as much of the tail as is allowed
-        ret="${p##*/}" # show at least complete current directory
-        p="${p:0:${#p} - ${#ret}}"
-        ret="${mask}${p:${#p} - (${max_len} - ${#ret} - ${#mask})}${ret}"
-    else
-        # len is over max len, show at least LP_PATH_KEEP leading dirs and
-        # current directory
-        local tmp="${p//\//}"
-        local -i delims=$(( ${#p} - ${#tmp} ))
-
-        for (( dir=0; dir < LP_PATH_KEEP; dir++ )); do
-            (( dir == delims )) && break
-
-            local left="${p#*/}"
-            local name="${p:0:${#p} - ${#left}}"
-            p="${left}"
-            ret+="${name%/}/"
-        done
+    if (( LP_ENABLE_LOAD )); then
+        # Find and save the number of CPUs
+        __lp_cpu_count
 
-        if (( delims <= LP_PATH_KEEP )); then
-            # no dirs between LP_PATH_KEEP leading dirs and current dir
-            ret+="${p##*/}"
+        # Convert load config values into usable integers.
+        local ret
+        # if load threshold does not have a period in it.
+        if [[ -z ${LP_LOAD_THRESHOLD//[!\.]} ]]; then
+            # This is an old value, no need to convert
+            _LP_LOAD_THRESHOLD=$LP_LOAD_THRESHOLD
         else
-            local base="${p##*/}"
+            __lp_floating_scale "$LP_LOAD_THRESHOLD" 100
+            _LP_LOAD_THRESHOLD=$ret
+        fi
+        __lp_floating_scale "$LP_LOAD_CAP" 100
+        _LP_LOAD_CAP=$ret
+    fi
 
-            p="${p:0:${#p} - ${#base}}"
+    if [[ -n ${_LP_THEME_ACTIVATE_FUNCTION-} ]]; then
+        # Reactivate current theme
+        "$_LP_THEME_ACTIVATE_FUNCTION"
+        prompt_on
+    else
+        # Set default theme if no theme set
+        lp_theme default
+    fi
+}
 
-            [[ ${ret} != "/" ]] && ret="${ret%/}" # strip trailing slash
+#####################
+# Utility Functions #
+#####################
 
-            local -i len_left=$(( max_len - ${#ret} - ${#base} - ${#mask} ))
+# Remove all colors and escape characters of the given string and return a pure text
+_lp_as_text() {
+    # Remove all terminal sequences that we wrapped with $_LP_OPEN_ESC and
+    # $_LP_CLOSE_ESC.
+    printf '%s' "$1" | sed "-$_LP_SED_EXTENDED" "s,$_LP_CLEAN_ESC,,g"
+}
 
-            ret+="${mask}${p:${#p} - ${len_left}}${base}"
-        fi
+# Store $2 (or $?) as a true/false value in variable named $1
+# Deprecated since v2.0.
+_lp_bool() {
+    local res="${2:-$?}"
+    if (( res )); then
+        eval "$1=false"
+    else
+        eval "$1=true"
     fi
-    # Escape special chars
-    LP_PWD="${LP_COLOR_PATH}$(_lp_escape "$ret")$NO_COL"
+    return "$res"
 }
 
-if (( LP_ENABLE_SHORTEN_PATH )); then
-    if (( LP_PATH_KEEP == -1 )); then
-        # _lp_shorten_path becomes a noop
-        _lp_shorten_path()
-        {
-            :
-        }
-        # Will never change
-        LP_PWD="${LP_COLOR_PATH}${_LP_DIR_SYMBOL}$NO_COL"
+_lp_color_map() {
+    # Default scale: 0..100
+    # Custom scale: 0..$2
+    local -i scale value
+    scale=${2:-100}
+    if (( $1 >= scale )); then
+      value=scale-1
+    elif (( $1 < 0 )); then
+      value=0
+    else
+      value=$1
     fi
-else
-    # Will never change
-    LP_PWD="${LP_COLOR_PATH}${LP_PATH_DEFAULT}$NO_COL"
+    # Transform the value to a 0..${#COLOR_MAP} scale
+    ret="${LP_COLORMAP[_LP_FIRST_INDEX+value*${#LP_COLORMAP[*]}/scale]}"
+}
 
-    if $_LP_SHELL_bash && [[ -n "$PROMPT_DIRTRIM" ]]; then
-        unset -f _lp_shorten_path
-        alias _lp_shorten_path=_lp_set_dirtrim
+# Return true if the input is the name of a function.
+__lp_is_function() {
+    if (( _LP_SHELL_bash )); then
+        [[ $(LC_ALL=C \type -t "$1") == function ]]
+    else
+        [[ $(LC_ALL=C \type -w "$1") == *function ]]
     fi
-fi
+}
 
+# Count the number of lines in the input string. A faster subsitute for 'wc -l'.
+__lp_line_count() {
+  local var="${1//[!$'\n']}"
+  count=${#var}
+}
+
+__lp_hostname_hash() {
+    # cksum is separated with tab on SunOS, space on others
+    local cksum="$(hostname | cksum)"
+    lp_hostname_hash=${cksum%%[$' \t']*}
+}
+
+__lp_floating_scale() {
+    local integer decimal=0 scale=$(( ${#2} - 1 ))
+    integer=${1%\.*}
 
-# In Bash shells, PROMPT_DIRTRIM is the number of directories to keep at the end
-# of the displayed path (if "\w" is present in the PS1 var).
-# Liquid Prompt can calculate this number under two conditions, path shortening
-# must be disabled and PROMPT_DIRTRIM must be already set.
-_lp_set_dirtrim() {
-    local p="$(_lp_get_home_tilde_collapsed)"
-    local -i max_len="${COLUMNS:-80}*$LP_PATH_LENGTH/100"
-    local -i dt=0
-
-    if (( ${#p} > max_len )); then
-        local q="/${p##*/}"
-        local show="$q"
-        # +3 because of the ellipsis: "..."
-        while (( ${#show}+3 < max_len )); do
-            (( dt++ ))
-            p="${p%$q}"
-            q="/${p##*/}"
-            show="$q$show"
+    if [[ -n ${1//[!\.]} ]]; then
+        decimal=${1#*\.}
+        decimal=${decimal:0:$scale}
+
+        while (( ${#decimal} < scale )); do
+            decimal+='0'
+        done
+
+        while [[ ${decimal:0:1} == '0' ]]; do
+            decimal=${decimal:1}
         done
-        (( dt == 0 )) && dt=1
     fi
-    PROMPT_DIRTRIM=$dt
-    # For debugging
-    # echo PROMPT_DIRTRIM=$PROMPT_DIRTRIM >&2
+
+    ret=$(( integer * $2 + decimal ))
 }
 
+# Return $PWD with $HOME at the start replaced by "~".
+__lp_pwd_tilde() {  # [path]
+    # Needs to be in a variable, as different versions of Bash treat '~' in a
+    # substitution differently
+    local _path=${1:-$PWD} tilde="~"
+    lp_pwd_tilde="${_path/#$HOME/$tilde}"
+}
 
+# insert a space on the right
+# Deprecated since v2.0.
+_lp_sr() {
+    [[ -n "$1" ]] && echo -nE "$1 "
+}
 
-################
-# Related jobs #
-################
+# insert a space on the left
+# Deprecated since v2.0.
+_lp_sl() {
+    [[ -n "$1" ]] && echo -nE " $1"
+}
+
+# insert two spaces, before and after
+# Deprecated since v2.0.
+_lp_sb() {
+    [[ -n "$1" ]] && echo -nE " $1 "
+}
+
+# Generates a terminal escape sequence to format the terminal.
+lp_terminal_format() {  # fg, bg, bold, underline, fallback_fg, fallback_bg
+    lp_terminal_format=
+    (( LP_ENABLE_COLOR )) || return 2
+
+    local af_color ab_color fg bg previous_af_color
+    fg=$1
+    bg=${2:-"-1"}
+    previous_af_color=${_lp_last_af_color-}
+
+    lp_terminal_format=${_LP_OPEN_ESC}${_LP_TI_RESET}
 
-# Display the count of each if non-zero:
-# - detached screens sessions and/or tmux sessions running on the host
-# - attached running jobs (started with $ myjob &)
-# - attached stopped jobs (suspended with Ctrl-Z)
-_lp_jobcount_color()
-{
-    (( LP_ENABLE_JOBS )) || return
-
-    local ret=""
-    local -i r s
-
-    # Count detached sessions
-    if (( _LP_ENABLE_DETACHED_SESSIONS )); then
-        local -i detached=0
-        (( _LP_ENABLE_SCREEN )) && detached=$(screen -ls 2> /dev/null | \grep -c '[Dd]etach[^)]*)$')
-        (( _LP_ENABLE_TMUX )) && detached+=$(tmux list-sessions 2> /dev/null | \grep -cv 'attached')
-        (( detached > 0 )) && ret+="${LP_COLOR_JOB_D}${detached}d${NO_COL}"
+    if (( $fg >= _LP_TI_COLORS )) && [[ -n ${5-} ]]; then
+        _lp_last_af_color=$5
+    elif (( $fg == -2 )); then
+        :  # do nothing, _lp_last_af_color already correct
+    elif (( $fg == -3 )); then
+        _lp_last_af_color=$_lp_last_ab_color
+    elif (( $fg >= 0 )); then
+        _lp_last_af_color=$fg
+    else  # -1
+        _lp_last_af_color=-1
     fi
 
-    # Count running jobs
-    if (( r = $(jobs -r | wc -l) )); then
-        [[ -n "$ret" ]] && ret+='/'
-        ret+="${LP_COLOR_JOB_R}${r}&${NO_COL}"
+    if (( ${_lp_last_af_color:-"-1"} >= 0 )); then
+        __lp_foreground_color "$_lp_last_af_color" && lp_terminal_format+=$af_color
     fi
 
-    # Count stopped jobs
-    if (( s = $(jobs -s | wc -l) )); then
-        [[ -n "$ret" ]] && ret+='/'
-        ret+="${LP_COLOR_JOB_Z}${s}z${NO_COL}"
+    if (( $bg >= _LP_TI_COLORS )) && [[ -n ${6-} ]]; then
+        _lp_last_ab_color=$6
+    elif (( $bg == -2 )); then
+        :  # do nothing, _lp_last_ab_color already correct
+    elif (( $bg == -3 )); then
+        _lp_last_ab_color=$previous_af_color
+    elif (( $bg >= 0 )); then
+        _lp_last_ab_color=$bg
+    else  # -1
+        _lp_last_ab_color=-1
     fi
 
-    echo -nE "$ret"
-}
+    if (( ${_lp_last_ab_color:-"-1"} >= 0 )); then
+        __lp_background_color "$_lp_last_ab_color" && lp_terminal_format+=$ab_color
+    fi
 
+    # It turns out there are sequences to reset bold and underline to normal
+    # (\E[22m and \E[24m in xterm), but they aren't universally supported. This
+    # means we must reset to all defaults then enable if they are wanted.
+    # Explicit is safer anyway.
+    if (( ${3:-0} )); then
+        lp_terminal_format+=$_LP_TI_BOLD
+    fi
 
+    if (( ${4:-0} )); then
+        lp_terminal_format+=$_LP_TI_UNDERLINE
+    fi
 
-######################
-# VCS branch display #
-######################
+    lp_terminal_format+=$_LP_CLOSE_ESC
+}
+
+# Get a list of themes currently loaded. Looks for functions matching
+# _lp_<theme>_theme_prompt().
+__lp_theme_list() {
+    lp_theme_list=()
+
+    local -a _functions
+    if (( _LP_SHELL_zsh )); then
+        _functions=( "${(ko)functions[@]}" )
+    else
+        local IFS=$'\n'
+        _functions=( $(declare -F) )
+    fi
 
-_lp_are_vcs_enabled()
-{
-    [[ -z "$LP_DISABLED_VCS_PATH" ]] && return 0
-    $_LP_SHELL_zsh && setopt local_options && setopt sh_word_split
-    local path
-    local IFS=:
-    for path in $LP_DISABLED_VCS_PATH; do
-        [[ "$PWD" == *"$path"* ]] && return 1
+    local function
+    for function in "${_functions[@]}"; do
+        if [[ $function == *_lp_*_theme_prompt ]]; then
+            function=${function#*_lp_}
+            lp_theme_list+=("${function%_theme_prompt}")
+        fi
     done
-    return 0
 }
 
-# GIT #
+__lp_theme_bash_complete() {
+    COMPREPLY=()
+    local -a lp_theme_list
+    local theme partial_theme
+    partial_theme=${2-}
+
+    __lp_theme_list
+
+    for theme in "${lp_theme_list[@]}"; do
+        [[ -n $partial_theme && $theme != "$partial_theme"* ]] && continue
+        COMPREPLY+=("$theme")
+    done
+}
 
-# Get the branch name of the current directory
-_lp_git_branch()
-{
-    (( LP_ENABLE_GIT )) || return
+__lp_theme_zsh_complete() {
+    local -a lp_theme_list
+    __lp_theme_list
+    _describe 'theme' lp_theme_list
+}
+
+##########################
+# Working Directory Path #
+##########################
+
+__lp_get_unique_directory() {
+    local directory=${1##*/} root=${1%/*}
+    local -a matching
+    local -i i
+    for (( i=1; i < ${#directory}; i++ )); do
+        lp_unique_directory=${directory:0:$i}
+        matching=("${root}/${lp_unique_directory}"*/)
+        if (( ${#matching[@]} == 1 )); then
+            return 0
+        fi
+    done
 
-    \git rev-parse --is-inside-work-tree >/dev/null 2>&1 || return
+    return 1
+}
 
-    local branch
-    # Recent versions of Git support the --short option for symbolic-ref, but
-    # not 1.7.9 (Ubuntu 12.04)
-    if branch="$(\git symbolic-ref -q HEAD)"; then
-        _lp_escape "${branch#refs/heads/}"
-    else
-        # In detached head state, use commit instead
-        # No escape needed
-        \git rev-parse --short -q HEAD
+__lp_end_path_left_shortening() {
+    if (( is_shortening )); then
+        shortened_path_length+=${#separator}
+        if (( shortened_path_length < unshortened_path_length )); then
+            lp_path_format+="${shortened_directory_format}${LP_MARK_SHORTEN_PATH}"
+            # This indescriminate adding of a separator can sometimes mean the path
+            # is slightly longer than it should be, but it is more clear.
+            lp_path_format+="${separator_format}${separator}"
+            lp_path+="${LP_MARK_SHORTEN_PATH}/"
+        else
+            lp_path+=$unshortened_path_shorten_string
+            lp_path_format+=$unshortened_path_format_shorten_string
+            shortened_path_length=$unshortened_path_length
+        fi
+        is_shortening=0
     fi
 }
 
+# methods:
+#   truncate_chars_from_path_left
+#   truncate_chars_from_dir_middle
+#   truncate_chars_from_dir_right
+#   truncate_chars_to_unique_dir
+#   truncate_to_last_dir
+_lp_path_format() {
+    local path_format=${1-$LP_COLOR_PATH}
+    local last_directory_format=${2:-$path_format}
+    local vcs_root_format=${3:-$last_directory_format}
+    local shortened_directory_format=${4:-$path_format}
+    local separator=${5-"/"}
+    local separator_format=${6-}
+
+    lp_path=
+    lp_path_format=
+
+    local lp_pwd_tilde
+    __lp_pwd_tilde
+    local display_path=$lp_pwd_tilde
+
+    local -i path_length=${#display_path}
+
+    local lp_vcs_root lp_vcs_type
+    local vcs_root_directory=
+    if (( LP_PATH_VCS_ROOT )) && _lp_find_vcs; then
+        __lp_pwd_tilde "$lp_vcs_root"
+        vcs_root_directory=$lp_pwd_tilde
+    fi
+
+    if [[ $path_length == 1 || $LP_PATH_METHOD == "truncate_to_last_dir" ]]; then
+        if [[ $path_length > 1 ]]; then
+            lp_path=${display_path##*/}
+        else
+            # only root or home to show
+            lp_path=$display_path
+        fi
 
-# Display additional information if HEAD is in merging, rebasing
-# or cherry-picking state
-_lp_git_head_status() {
-    local gitdir
-    gitdir="$(\git rev-parse --git-dir 2>/dev/null)"
-    if [[ -f "${gitdir}/MERGE_HEAD" ]]; then
-        echo " MERGING"
-    elif [[ -d "${gitdir}/rebase-apply" || -d "${gitdir}/rebase-merge" ]]; then
-        echo " REBASING"
-    elif [[ -f "${gitdir}/CHERRY_PICK_HEAD" ]]; then
-        echo " CHERRY-PICKING"
+        if [[ $display_path == $vcs_root_directory ]]; then
+            lp_path_format="${vcs_root_format}${lp_path}"
+        else
+            lp_path_format="${last_directory_format}${lp_path}"
+        fi
+        return
+    else
+        if [[ $separator != "/" && ${display_path:0:1} == "/" ]]; then
+            # The root directory ('/') becomes a directory name instead of a leading separator
+            # Add one to account for the first / needing to be both replaced and shown
+            path_length+=1
+        fi
+        if [[ ${#separator} > 1 ]]; then
+            # Add length to account for multichar separators
+            local slash_count="${display_path//[!\/]}"
+            path_length+=$(( ${#slash_count} * ( ${#separator} - 1 ) ))
+        fi
     fi
-}
-
-# Set a color depending on the branch state:
-# - green if the repository is up to date
-# - yellow if there is some commits not pushed
-# - red if there is changes to commit
-#
-# Add the number of pending commits and the impacted lines.
-_lp_git_branch_color()
-{
-    (( LP_ENABLE_GIT )) || return
 
-    local branch
-    branch="$(_lp_git_branch)"
-    if [[ -n "$branch" ]]; then
+    local path_to_proccess="${display_path}/" current_path="" current_directory="" lp_unique_directory
 
-        local end
-        end="${LP_COLOR_CHANGES}$(_lp_git_head_status)${NO_COL}"
+    local -i max_len=$(( ${COLUMNS:-80} * LP_PATH_LENGTH / 100 )) directory_count=0 needed_length
+    local -i shortened_path_length=$path_length is_shortening=0 unshortened_path_length
+    local unshortened_path_shorten_string unshortened_path_format_shorten_string shortened_path
 
-        if LC_ALL=C \git status --porcelain 2>/dev/null | \grep -Eq '^\?\?'; then
-            end="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED$end"
-        fi
+    while [[ -n $path_to_proccess ]]; do
 
-        if [[ -n "$(\git stash list -n 1 2>/dev/null)" ]]; then
-            end="$LP_COLOR_COMMITS$LP_MARK_STASH$end"
-        fi
-
-        local remote
-        remote="$(\git config --get branch.${branch}.remote 2>/dev/null)"
-
-        local has_commit=""
-        local commit_ahead
-        local commit_behind
-        if [[ -n "$remote" ]]; then
-            local remote_branch
-            remote_branch="$(\git config --get branch.${branch}.merge)"
-            if [[ -n "$remote_branch" ]]; then
-                remote_branch=${remote_branch/refs\/heads/refs\/remotes\/$remote}
-                commit_ahead="$(\git rev-list --count $remote_branch..HEAD 2>/dev/null)"
-                commit_behind="$(\git rev-list --count HEAD..$remote_branch 2>/dev/null)"
-                if [[ "$commit_ahead" -ne "0" && "$commit_behind" -ne "0" ]]; then
-                    has_commit="${LP_COLOR_COMMITS}+$commit_ahead${NO_COL}/${LP_COLOR_COMMITS_BEHIND}-$commit_behind${NO_COL}"
-                elif [[ "$commit_ahead" -ne "0" ]]; then
-                    has_commit="${LP_COLOR_COMMITS}$commit_ahead${NO_COL}"
-                elif [[ "$commit_behind" -ne "0" ]]; then
-                    has_commit="${LP_COLOR_COMMITS_BEHIND}-$commit_behind${NO_COL}"
-                fi
+        if [[ ${path_to_proccess:0:1} == "/" ]]; then
+            # Start of root
+            current_directory="/"
+        else
+            current_directory=${path_to_proccess%%/*}
+            if [[ -n $current_path && $current_path != "/" ]]; then
+                current_path+="/"
             fi
         fi
 
-        local ret
-        local shortstat # only to check for uncommitted changes
-        shortstat="$(LC_ALL=C \git diff --shortstat HEAD 2>/dev/null)"
+        directory_count+=1
+        current_path+=${current_directory}
+        path_to_proccess=${path_to_proccess#*/}
+
+        if [[ $current_path == $vcs_root_directory ]]; then
+            __lp_end_path_left_shortening
+            # No shortening
+            lp_path+=$current_directory
+            lp_path_format+="${vcs_root_format}${current_directory}"
+        elif [[ -z $path_to_proccess ]]; then
+            __lp_end_path_left_shortening
+            # Last directory
+            lp_path+=$current_directory
+            lp_path_format+="${last_directory_format}${current_directory}"
+        elif (( LP_ENABLE_SHORTEN_PATH && directory_count > LP_PATH_KEEP \
+            && ( shortened_path_length > max_len || ( shortened_path_length >= max_len && is_shortening ) ) )); then
+
+            if [[ $LP_PATH_METHOD == "truncate_chars_to_unique_dir" ]] && \
+                __lp_get_unique_directory "$current_path"; then
+
+                lp_path+=$lp_unique_directory
+                lp_path_format+="${shortened_directory_format}${lp_unique_directory}"
+                shortened_path_length=$(( shortened_path_length - ${#current_directory} + ${#lp_unique_directory} ))
+            elif [[ $LP_PATH_METHOD == "truncate_chars_from_path_left" ]]; then
+                # The only way to know if this consecutive directory shortening
+                # will actually shorten the path is to both do it and do not and
+                # compare at the end.
+
+                if (( ! is_shortening )); then
+                    unshortened_path_shorten_string=
+                    unshortened_path_format_shorten_string=
+                    unshortened_path_length=$shortened_path_length
+                    shortened_path_length+=${#LP_MARK_SHORTEN_PATH}
+                fi
+                needed_length=$(( shortened_path_length - max_len ))
 
-        if [[ -n "$shortstat" ]]; then
-            local u_stat # shorstat of *unstaged* changes
-            u_stat="$(LC_ALL=C \git diff --shortstat 2>/dev/null)"
-            u_stat=${u_stat/*changed, /} # removing "n file(s) changed"
-
-            local i_lines # inserted lines
-            if [[ "$u_stat" = *insertion* ]]; then
-                i_lines=${u_stat/ inser*}
-            else
-                i_lines=0
-            fi
+                unshortened_path_shorten_string+="${current_directory}/"
+                unshortened_path_format_shorten_string+="${path_format}${current_directory}${separator_format}${separator}"
 
-            local d_lines # deleted lines
-            if [[ "$u_stat" = *deletion* ]]; then
-                d_lines=${u_stat/*\(+\), }
-                d_lines=${d_lines/ del*/}
-            else
-                d_lines=0
-            fi
+                if (( needed_length >= ${#current_directory} )); then
+                    # One directory was not enough, need to shorten more.
+                    # Shorten by current directory length plus separator.
+                    shortened_path_length=$(( shortened_path_length - ${#current_directory} - ${#separator} ))
+                    is_shortening=1
+                else
+                    # Do not need to check if the shortened version is actually shorter.
+                    # If we got to here, it wasn't a forced ending, which means it is.
+                    shortened_path_length=$(( shortened_path_length - needed_length ))
+
+                    shortened_path="${LP_MARK_SHORTEN_PATH}${current_directory:$needed_length}"
+                    lp_path+=$shortened_path
+                    lp_path_format+="${shortened_directory_format}${shortened_path}"
 
-            local has_lines
-            has_lines="+$i_lines/-$d_lines"
+                    is_shortening=0
+                fi
+            elif [[ $LP_PATH_METHOD == "truncate_chars_from_dir_right" ]] && \
+                (( ${#LP_MARK_SHORTEN_PATH} + LP_PATH_CHARACTER_KEEP < ${#current_directory} )); then
 
-            if [[ -n "$has_commit" ]]; then
-                # Changes to commit and commits to push
-                ret="${LP_COLOR_CHANGES}${branch}${NO_COL}(${LP_COLOR_DIFF}$has_lines${NO_COL},$has_commit)"
+                shortened_path="${current_directory:0:$LP_PATH_CHARACTER_KEEP}${LP_MARK_SHORTEN_PATH}"
+                lp_path+=$shortened_path
+                lp_path_format+="${shortened_directory_format}${shortened_path}"
+                shortened_path_length=$(( shortened_path_length - ${#current_directory} + ${#LP_MARK_SHORTEN_PATH} + LP_PATH_CHARACTER_KEEP ))
+            elif [[ $LP_PATH_METHOD == "truncate_chars_from_dir_middle" ]] && \
+                (( ${#LP_MARK_SHORTEN_PATH} + LP_PATH_CHARACTER_KEEP * 2 < ${#current_directory} )); then
+
+                shortened_path="${current_directory:0:$LP_PATH_CHARACTER_KEEP}${LP_MARK_SHORTEN_PATH}${current_directory: -$LP_PATH_CHARACTER_KEEP}"
+                lp_path+=$shortened_path
+                lp_path_format+="${shortened_directory_format}${shortened_path}"
+                shortened_path_length=$(( shortened_path_length - ${#current_directory} + ${#LP_MARK_SHORTEN_PATH} + LP_PATH_CHARACTER_KEEP * 2 ))
             else
-                ret="${LP_COLOR_CHANGES}${branch}${NO_COL}(${LP_COLOR_DIFF}$has_lines${NO_COL})" # changes to commit
-            fi
-        elif [[ -n "$has_commit" ]]; then
-            # some commit(s) to push
-            if [[ "$commit_behind" -gt "0" ]]; then
-                ret="${LP_COLOR_COMMITS_BEHIND}${branch}${NO_COL}($has_commit)"
-            else
-                ret="${LP_COLOR_COMMITS}${branch}${NO_COL}($has_commit)"
+                # Need to shorten, but no method matched, or the matched method
+                # did not make the string any shorter.
+                lp_path+=$current_directory
+                lp_path_format+="${path_format}${current_directory}"
             fi
         else
-            ret="${LP_COLOR_UP}${branch}" # nothing to commit or push
+            __lp_end_path_left_shortening
+            lp_path+=$current_directory
+            lp_path_format+="${path_format}${current_directory}"
         fi
-        echo -nE "$ret$end"
-    fi
-}
 
-# Search upwards through a directory structure looking for a file/folder with
-# the given name.  Used to avoid invoking 'hg' and 'bzr'.
-_lp_upwards_find()
-{
-    local dir
-    dir="$PWD"
-    while [[ -n "$dir" ]]; do
-        [[ -d "$dir/$1" ]] && return 0
-        dir="${dir%/*}"
+        if [[ -n $path_to_proccess && ( $current_path != "/" || $separator != "/" ) ]] && (( ! is_shortening )); then
+            if [[ $current_path != "/" ]]; then
+                lp_path+="/"
+            fi
+            lp_path_format+="${separator_format}${separator}"
+        fi
     done
-    return 1
 }
 
-# MERCURIAL #
+###############
+# Environment #
+###############
 
-# Get the branch name of the current directory
-_lp_hg_branch()
-{
-    (( LP_ENABLE_HG )) || return
-
-    # First do a simple search to avoid having to invoke hg -- at least on my
-    # machine, the python startup causes a noticeable hitch when changing
-    # directories.
-    _lp_upwards_find .hg || return
+# If we are connected with a X11 support
+_lp_connected_display() {
+    [[ -n "${DISPLAY-}" ]]
+}
+
+_lp_connection() {
+    if [[ -n "${SSH_CLIENT-}${SSH2_CLIENT-}${SSH_TTY-}" ]]; then
+        lp_connection=ssh
+        return
+    fi
 
-    # We found an .hg folder, so we need to invoke hg and see if we're actually
-    # in a repository.
+    # tmux: see GH #304
+    # TODO check on *BSD
+    local whoami="$(LC_ALL=C who am i)"
+    if [[ x"$whoami" != *'('* || x"$whoami" = *'(:'* || x"$whoami" = *'(tmux'* ]]; then
+        lp_connection=lcl  # Local
+        return
+    fi
 
-    local branch
-    branch="$(hg branch 2>/dev/null)"
+    local sess_parent="$(ps -o comm= -p "$PPID" 2> /dev/null)"
+    if [[ "$sess_parent" = "su" || "$sess_parent" = "sudo" ]]; then
+        lp_connection=su   # Remote su/sudo
+    else
+        lp_connection=tel  # Telnet
+    fi
+}
 
-    (( $? == 0 )) && _lp_escape "$branch"
+_lp_chroot() {
+    if [[ -r /etc/debian_chroot ]]; then
+        IFS= read -r lp_chroot </etc/debian_chroot
+        if [[ -n "$lp_chroot" ]]; then
+            local ret
+            __lp_escape "$lp_chroot"
+            lp_chroot=$ret
+            return 0
+        fi
+    fi
+    return 1
 }
 
-# Set a color depending on the branch state:
-# - green if the repository is up to date
-# - red if there is changes to commit
-# - TODO: yellow if there is some commits not pushed
-_lp_hg_branch_color()
-{
-    (( LP_ENABLE_HG )) || return
+_lp_error() {
+    (( LP_ENABLE_ERROR )) || return 2
+
+    (( lp_error != 0 ))
+}
+
+_lp_error_color() {
+    _lp_error || return "$?"
+
+    lp_error_color="${LP_COLOR_ERR}${lp_error}${NO_COL}"
+}
+
+_lp_multiplexer() {
+    if [[ -n ${TMUX-} ]]; then
+        lp_mulitplexer=tmux
+        return 0
+    elif [[ "${TERM-}" == screen* ]]; then
+        lp_mulitplexer=screen
+        return 0
+    fi
+    return 1
+}
+
+_lp_http_proxy() {
+    (( LP_ENABLE_PROXY )) || return 2
+
+    if [[ -n "${http_proxy-}${HTTP_PROXY-}${https_proxy-}${HTTPS_PROXY-}${all_proxy-}${ALL_PROXY-}" ]]; then
+        local ret
+        __lp_escape "${http_proxy:-${HTTP_PROXY:-${https_proxy:-${HTTPS_PROXY:-${all_proxy:-$ALL_PROXY}}}}}"
+        lp_http_proxy=$ret
+    else
+        return 1
+    fi
+}
+
+_lp_http_proxy_color() {
+    _lp_http_proxy || return "$?"
+
+    lp_http_proxy_color="${LP_COLOR_PROXY}${LP_MARK_PROXY}${NO_COL}"
+}
+
+_lp_python_env() {
+    (( LP_ENABLE_VIRTUALENV )) || return 2
 
-    local branch
     local ret
-    branch="$(_lp_hg_branch)"
-    if [[ -n "$branch" ]]; then
 
-        local has_untracked
-        has_untracked=
-        if hg status -u 2>/dev/null | \grep -q '^\?' >/dev/null ; then
-            has_untracked="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED"
-        fi
-
-        # Count local commits waiting for a push
-        #
-        # Unfortunately this requires contacting the remote, so this is always slow
-        # => disabled  https://github.com/nojhan/liquidprompt/issues/217
-        local -i commits
-        #commits=$(hg outgoing --no-merges ${branch} 2>/dev/null | \grep -c '\(^changeset\:\)')
-        commits=0
-
-        # Check if there is some uncommitted stuff
-        if [[ -z "$(hg status --quiet -n)" ]]; then
-            if (( commits > 0 )); then
-                # some commit(s) to push
-                ret="${LP_COLOR_COMMITS}${branch}${NO_COL}(${LP_COLOR_COMMITS}$commits${NO_COL})${has_untracked}${NO_COL}"
-            else
-                # nothing to commit or push
-                ret="${LP_COLOR_UP}${branch}${has_untracked}${NO_COL}"
-            fi
-        else
-            local has_lines
-            # Parse the last line of the diffstat-style output
-            has_lines="$(hg diff --stat 2>/dev/null | sed -n '$ s!^.*, \([0-9]*\) .*, \([0-9]*\).*$!+\1/-\2!p')"
-            if (( commits > 0 )); then
-                # Changes to commit and commits to push
-                ret="${LP_COLOR_CHANGES}${branch}${NO_COL}(${LP_COLOR_DIFF}$has_lines${NO_COL},${LP_COLOR_COMMITS}$commits${NO_COL})${has_untracked}${NO_COL}"
-            else
-                ret="${LP_COLOR_CHANGES}${branch}${NO_COL}(${LP_COLOR_DIFF}$has_lines${NO_COL})${has_untracked}${NO_COL}" # changes to commit
-            fi
-        fi
-        echo -nE "$ret"
+    # Why are these trunkated to the last '/' section? It has always been this
+    # way, and the original author didn't explain why.
+    if [[ -n "${VIRTUAL_ENV-}" ]]; then
+        __lp_escape "${VIRTUAL_ENV##*/}"
+        lp_python_env=$ret
+    elif [[ -n "${CONDA_DEFAULT_ENV-}" ]]; then
+        __lp_escape "${CONDA_DEFAULT_ENV##*/}"
+        lp_python_env=$ret
+    else
+        return 1
     fi
 }
 
-# SUBVERSION #
+_lp_python_env_color() {
+    _lp_python_env || return "$?"
 
-# Get the branch name of the current directory
-# For the first level of the repository, gives the repository name
-_lp_svn_branch()
-{
-    (( LP_ENABLE_SVN )) || return
-
-    local root=
-    local url=
-    eval "$(LANG=C LC_ALL=C svn info 2>/dev/null | sed -n 's/^URL: \(.*\)/url="\1"/p;s/^Repository Root: \(.*\)/root="\1"/p' )"
-    [[ -z "${root-}" ]] && return
+    lp_python_env_color="[${LP_COLOR_VIRTUALENV}${lp_python_env}${NO_COL}]"
+}
 
-    # Make url relative to root
-    url="${url:${#root}}"
-    if [[ "$url" == */trunk* ]]; then
-        echo -n trunk
-    elif [[ "$url" == */branches/?* ]]; then
-        url="${url##*/branches/}"
-        _lp_escape "${url%/*}"
-    elif [[ "$url" == */tags/?* ]]; then
-        url="${url##*/tags/}"
-        _lp_escape "${url%/*}"
+_lp_software_collections() {
+    (( LP_ENABLE_SCLS )) || return 2
+
+    if [[ -n "${X_SCLS-}" ]]; then
+        local ret
+        __lp_escape "${X_SCLS%"${X_SCLS##*[![:space:]]}"}"
+        lp_software_collections=$ret
     else
-        _lp_escape "${root##*/}"
+        return 1
     fi
 }
 
-# Set a color depending on the branch state:
-# - green if the repository is clean
-#   (use $LP_SVN_STATUS_OPTIONS to define what that means with
-#    the --depth option of 'svn status')
-# - red if there is changes to commit
-# Note that, due to subversion way of managing changes,
-# informations are only displayed for the CURRENT directory.
-_lp_svn_branch_color()
-{
-    (( LP_ENABLE_SVN )) || return
+_lp_software_collections_color() {
+    _lp_software_collections || return "$?"
 
-    local branch
-    branch="$(_lp_svn_branch)"
-    if [[ -n "$branch" ]]; then
-        local changes
-        changes=$(( $(svn status ${LP_SVN_STATUS_OPTIONS-} | \grep -c -v "?") ))
-        if (( changes == 0 )); then
-            echo -nE "${LP_COLOR_UP}${branch}${NO_COL}"
+    lp_software_collections_color="[${LP_COLOR_VIRTUALENV}${lp_software_collections}${NO_COL}]"
+}
+
+# Same as bash '\l', but can be inlined as a constant as the value will not
+# change during the shell's life.
+_lp_terminal_device() {
+    lp_terminal_device="$(basename -- "$(tty)" 2>/dev/null)"
+}
+
+# Determine what type of user we are
+_lp_user() {
+    if (( EUID == 0 )); then
+        # user is root
+        return 2
+    elif [[ "${USER-}" != "$(logname 2>/dev/null || printf '%s' "${LOGNAME-}")" ]]; then
+        # user is not login user
+        return 1
+    else
+        return 0
+    fi
+}
+
+# Return the username (if we should display one).
+_lp_username() {
+    if (( LP_USER_ALWAYS == -1 )); then
+        # No username ever
+        lp_username=''
+        return 2
+    elif (( LP_USER_ALWAYS )) || ! _lp_user; then
+        lp_username=${_LP_USER_SYMBOL}
+        return 0
+    else
+        lp_username=''
+        return 1
+    fi
+}
+
+_lp_username_color() {
+    _lp_username || return "$?"
+
+    lp_username_color="${LP_COLOR_USER}${lp_username}${NO_COL}"
+}
+
+# Test the code with the commands:
+#   sudo id   # sudo, enter your credentials
+#   sudo -K   # revoke your credentials
+_lp_sudo_active() {
+    (( LP_ENABLE_SUDO )) || return 2
+    \sudo -n true 2>/dev/null || return 1
+}
+
+_lp_sudo_active_color() {
+    (( LP_ENABLE_SUDO )) || return 2
+
+    if _lp_sudo_active; then
+        lp_sudo_active_color=$LP_COLOR_MARK_SUDO
+    else
+        lp_sudo_active_color=$LP_COLOR_MARK_NO_SUDO
+    fi
+}
+
+_lp_hostname() {
+    # Only process hostname elements if we haven't turned them off
+    if (( LP_HOSTNAME_ALWAYS != -1 )); then
+
+        # Which host symbol should we use?
+        if (( LP_ENABLE_FQDN )); then
+            LP_HOST_SYMBOL="${_LP_FQDN_SYMBOL}"
         else
-            echo -nE "${LP_COLOR_CHANGES}${branch}${NO_COL}(${LP_COLOR_DIFF}$changes${NO_COL})" # changes to commit
+            LP_HOST_SYMBOL="${_LP_HOST_SYMBOL}"
+        fi
+
+        lp_hostname=${LP_HOST_SYMBOL}
+
+        _lp_connection
+        if [[ $lp_connection == lcl ]] && ! (( LP_HOSTNAME_ALWAYS )); then
+            # no hostname if local
+            return 1
         fi
+    else
+        return 2
     fi
 }
 
+# Put the hostname if not locally connected
+# color it in cyan within SSH, and a warning red if within telnet
+# else display the host without color
+_lp_hostname_color() {
+    if _lp_connected_display; then
+        lp_hostname_color="${LP_COLOR_X11_ON}"
+    else
+        lp_hostname_color="${LP_COLOR_X11_OFF}"
+    fi
 
-# FOSSIL #
+    if _lp_chroot; then
+        lp_hostname_color+="(${lp_chroot})"
+    fi
 
-# Get the tag name of the current directory
-_lp_fossil_branch()
-{
-    (( LP_ENABLE_FOSSIL )) || return
-    local branch
-    branch=$(fossil status 2>/dev/null | sed -n -$_LP_SED_EXTENDED 's/^tags:\s+(\w*)$/\1/p')
-    if [[ -n "$branch" ]]; then
-        echo -nE "$branch"
-    elif fossil info &>/dev/null ; then
-        echo -n "no-tag"
+    if _lp_hostname; then
+        case "$lp_connection" in
+        lcl)
+            lp_hostname_color+="@${LP_COLOR_HOST}${lp_hostname}${NO_COL}"
+            ;;
+        ssh)
+            # If we want a different color for each host
+            (( LP_ENABLE_SSH_COLORS )) && LP_COLOR_SSH="$LP_COLOR_HOST_HASH"
+            lp_hostname_color+="@${LP_COLOR_SSH}${lp_hostname}${NO_COL}"
+            ;;
+        su)
+            lp_hostname_color+="@${LP_COLOR_SU}${lp_hostname}${NO_COL}"
+            ;;
+        tel)
+            lp_hostname_color+="@${LP_COLOR_TELNET}${lp_hostname}${NO_COL}"
+            ;;
+        *)
+            lp_hostname_color+="@${NO_COL}${lp_hostname}" # defaults to no color
+            ;;
+        esac
+    else
+        if [[ -n ${lp_chroot-} ]]; then
+            # End the color of the chroot
+            lp_hostname_color+=${NO_COL}
+        else
+            # Nothing to display
+            lp_hostname_color=""
+            return 1
+        fi
     fi
 }
 
-# Set a color depending on the branch state:
-# - green if the repository is clean
-# - red if there is changes to commit
-# - yellow if the branch has no tag name
-#
-# Add the number of impacted files with a
-# + when files are ADDED or EDITED
-# - when files are DELETED
-_lp_fossil_branch_color()
-{
-    (( LP_ENABLE_FOSSIL )) || return
+_lp_dirstack() {
+    (( LP_ENABLE_DIRSTACK )) || return 2
+
+    local count dir_stack
+    dir_stack=$(dirs -p; printf x)
+
+    __lp_line_count "${dir_stack%x}"
+    lp_dirstack=$count
+
+    (( lp_dirstack > 1 ))
+}
+
+_lp_dirstack_color() {
+    _lp_dirstack || return "$?"
+
+    lp_dirstack_color="${LP_COLOR_DIRSTACK}${LP_MARK_DIRSTACK}${lp_dirstack}${NO_COL}"
+}
+
+################
+# Related jobs #
+################
+
+# Return the count of detached screen and/or tmux sessions.
+_lp_detached_sessions() {
+    (( LP_ENABLE_DETACHED_SESSIONS )) || return 2
+
+    local -i count=0
+    (( _LP_ENABLE_SCREEN )) && count=$(screen -ls 2> /dev/null | \grep -c '[Dd]etach[^)]*)$')
+    (( _LP_ENABLE_TMUX )) && count+=$(tmux list-sessions 2> /dev/null | \grep -cv 'attached')
+    lp_detached_sessions=$count
+
+    (( lp_detached_sessions ))
+}
+
+# Return the count of attached running shell jobs (started with $ myjob &) and/or
+# stopped jobs (suspended with Ctrl-Z).
+_lp_jobcount() {
+    (( LP_ENABLE_JOBS )) || return 2
+
+    local jobs
+    local -i count
+    # Count running jobs
+    # The $(...) syntax strips trailing newlines, so add a character to the end
+    # then remove it to prevent that. Otherwise 0 and 1 jobs look the same.
+    jobs="$(jobs -r; printf x)"
+    __lp_line_count "${jobs%x}"
+    lp_running_jobs=$count
+
+    # Count stopped jobs
+    jobs="$(jobs -s; printf x)"
+    __lp_line_count "${jobs%x}"
+    lp_stopped_jobs=$count
+
+    (( lp_running_jobs || lp_stopped_jobs ))
+}
+
+# Display the count of detached sessions and shell jobs if not zero.
+_lp_jobcount_color() {
+    (( LP_ENABLE_JOBS || LP_ENABLE_DETACHED_SESSIONS )) || return 2
+
+    lp_jobcount_color=
+
+    _lp_detached_sessions && lp_jobcount_color="${LP_COLOR_JOB_D}${lp_detached_sessions}d${NO_COL}"
+
+    if _lp_jobcount; then
+        if (( lp_running_jobs > 0 )); then
+            [[ -n "$lp_jobcount_color" ]] && lp_jobcount_color+='/'
+            lp_jobcount_color+="${LP_COLOR_JOB_R}${lp_running_jobs}&${NO_COL}"
+        fi
+        if (( lp_stopped_jobs > 0 )); then
+            [[ -n "$lp_jobcount_color" ]] && lp_jobcount_color+='/'
+            lp_jobcount_color+="${LP_COLOR_JOB_Z}${lp_stopped_jobs}z${NO_COL}"
+        fi
+    fi
+
+    [[ -n "$lp_jobcount_color" ]]
+}
+
+######################
+# VCS branch display #
+######################
+
+_lp_are_vcs_enabled() {
+    local _path
+    for _path in ${LP_DISABLED_VCS_PATHS[@]+"${LP_DISABLED_VCS_PATHS[@]}"}; do
+        if [[ -n "$_path" && "$PWD" == "$_path"* ]]; then
+            return 1
+        fi
+    done
+    return 0
+}
+
+# Search upwards through a directory structure looking for a sign of a VCS
+# repository. Used to avoid invoking VCS binaries to discover if in a repo.
+_lp_find_vcs() {
+    if ! _lp_are_vcs_enabled; then
+        lp_vcs_type="disabled"
+        lp_vcs_root=
+        return 2
+    fi
+
+    local vcs
+
+    lp_vcs_root="$PWD"
+    while [[ -n "$lp_vcs_root" ]]; do
+        for vcs in ${_LP_ENABLED_VCSS[@]+"${_LP_ENABLED_VCSS[@]}"}; do
+            if [[ -d "$lp_vcs_root/.$vcs" ]]; then
+                lp_vcs_type="$vcs"
+                return 0
+            fi
+        done
+
+        if (( LP_ENABLE_GIT )) && [[ -f "$lp_vcs_root/.git" ]]; then
+            lp_vcs_type="git"
+            return 0
+        fi
+
+        if (( LP_ENABLE_FOSSIL)) && [[ -f "$lp_vcs_root/_FOSSIL_" || -f "$lp_vcs_root/.fslckout" ]]; then
+            lp_vcs_type="fossil"
+            return 0
+        fi
+
+        lp_vcs_root="${lp_vcs_root%/*}"
+    done
+
+    lp_vcs_type=
+    lp_vcs_root=
+    return 1
+}
+
+# Set the prompt mark depending on the current VCS.
+_lp_smart_mark() {
+    case "${1:-$lp_vcs_type}" in
+    git)
+        lp_smart_mark="$LP_MARK_GIT"
+
+        if [[ -n "${VCSH_DIRECTORY-}" ]]; then
+            lp_smart_mark="$LP_MARK_VCSH$LP_MARK_GIT$LP_MARK_VCSH"
+        elif [[ -d "${lp_vcs_root}/.git/svn" ]]; then
+            lp_smart_mark="$LP_MARK_GIT$LP_MARK_SVN"
+        fi
+        ;;
+    hg)       lp_smart_mark="$LP_MARK_HG"              ;;
+    svn)      lp_smart_mark="$LP_MARK_SVN"             ;;
+    fossil)   lp_smart_mark="$LP_MARK_FOSSIL"          ;;
+    bzr)      lp_smart_mark="$LP_MARK_BZR"             ;;
+    disabled) lp_smart_mark="$LP_MARK_DISABLED"        ;;
+    *)        lp_smart_mark="$LP_MARK_DEFAULT"         ;;
+    esac
+}
 
+# GENERIC VCS #
+
+# Create a formatted string describing the status of the repo.
+_lp_vcs_details_color() {
     local branch
-    branch="$(_lp_fossil_branch)"
+    if _lp_vcs_branch; then
+        branch="$lp_vcs_branch"
 
-    if [[ -n "$branch" ]]; then
-        local -i C2E # Modified files (added or edited)
-        local C2A # Extras files
-        local ret
-        C2E=$(fossil changes | wc -l)
-        C2A=$(fossil extras | wc -l)
-        ret=$(fossil diff -i -v | awk "/^(+[^+])|(+$)/ { plus+=1; } /^(-[^-])|(-$)/ { minus+=1; } END { total=\"\"; if(plus>0){ total=\"+\"plus; if(minus>0) total=total\"/\"; } if(minus>0) total=total\"-\"minus; print total;}")
+        if _lp_vcs_bookmark; then
+            branch+=": $lp_vcs_bookmark"
+        fi
+    elif _lp_vcs_bookmark; then
+        branch="$lp_vcs_bookmark"
+    elif _lp_vcs_tag; then
+        branch="tag: $lp_vcs_tag"
+    else
+        _lp_vcs_commit_id
+        branch="${lp_vcs_commit_id:0:7}"
+    fi
 
-        if (( C2E > 0 )); then
-            [[ -n "$ret" ]] && ret+=" in "
-            ret="(${LP_COLOR_DIFF}${ret}${C2E}${NO_COL})"
+    lp_vcs_details_color="$LP_COLOR_UP"
+
+    local has_commit=
+    if _lp_vcs_commits_off_remote; then
+        lp_vcs_details_color="$LP_COLOR_COMMITS_BEHIND"
+        if [[ "$lp_vcs_commit_ahead" -ne "0" && "$lp_vcs_commit_behind" -ne "0" ]]; then
+            has_commit="${LP_COLOR_COMMITS}+$lp_vcs_commit_ahead${NO_COL}/${LP_COLOR_COMMITS_BEHIND}-$lp_vcs_commit_behind${NO_COL}"
+        elif [[ "$lp_vcs_commit_ahead" -ne "0" ]]; then
+            has_commit="${LP_COLOR_COMMITS}$lp_vcs_commit_ahead${NO_COL}"
+            lp_vcs_details_color="$LP_COLOR_COMMITS"
+        elif [[ "$lp_vcs_commit_behind" -ne "0" ]]; then
+            has_commit="${LP_COLOR_COMMITS_BEHIND}-$lp_vcs_commit_behind${NO_COL}"
         fi
+    fi
 
-        if (( C2A > 0 )); then
-            C2A="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED"
+    local ret has_lines=
+    if _lp_vcs_uncommitted_files; then
+        _lp_vcs_unstaged_lines; ret=$?
+        # Only show unstaged changes if the VCS supports staging, otherwise
+        # show uncommitted changes
+        if (( ret == 0 )); then
+            has_lines="+$lp_vcs_unstaged_i_lines/-$lp_vcs_unstaged_d_lines"
+        elif (( ret == 1 )); then
+            has_lines="+0/-0"
         else
-            C2A=""
+            _lp_vcs_uncommitted_lines
+            has_lines="+$lp_vcs_uncommitted_i_lines/-$lp_vcs_uncommitted_d_lines"
+        fi
+        lp_vcs_details_color="$LP_COLOR_CHANGES"
+    fi
+
+    lp_vcs_details_color+="$branch"
+    if [[ -n "$has_lines" || -n "$has_commit" ]]; then
+        lp_vcs_details_color+="${NO_COL}("
+        if [[ -n "$has_lines" ]]; then
+            lp_vcs_details_color+="${LP_COLOR_DIFF}${has_lines}${NO_COL}${has_commit:+,}"
+        fi
+        lp_vcs_details_color+="${has_commit})"
+    fi
+
+    if _lp_vcs_stash_count; then
+        lp_vcs_details_color+="$LP_COLOR_COMMITS$LP_MARK_STASH"
+    fi
+
+    if _lp_vcs_untracked_files; then
+        lp_vcs_details_color+="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED"
+    fi
+
+    if _lp_vcs_head_status; then
+        lp_vcs_details_color+=" $LP_COLOR_CHANGES$lp_vcs_head_status"
+        if [[ -n "${lp_vcs_head_details-}" ]]; then
+            lp_vcs_details_color+="(${lp_vcs_head_details})"
         fi
+    fi
+
+    lp_vcs_details_color+="$NO_COL"
+}
+
+# Check if the detected VCS is enabled in Liquidprompt and the current
+# directory is a valid repository of that type.
+_lp_vcs_active() {
+    "_lp_${lp_vcs_type}_active" 2>/dev/null
+}
+
+# Get the branch name of the repo in the current directory.
+_lp_vcs_branch() {
+    "_lp_${lp_vcs_type}_branch" 2>/dev/null
+}
+
+# Get the bookmark name of the repo in the current directory.
+_lp_vcs_bookmark() {
+    "_lp_${lp_vcs_type}_bookmark" 2>/dev/null
+}
 
-        if [[ "$branch" = "no-tag" ]]; then
-            # Warning, your branch has no tag name !
-            branch="${LP_COLOR_COMMITS}$branch${NO_COL}$ret${LP_COLOR_COMMITS}$C2A${NO_COL}"
-        elif (( C2E == 0 )); then
-            # All is up-to-date
-            branch="${LP_COLOR_UP}$branch$C2A${NO_COL}"
+# Get a tag name of the repo in the current directory.
+_lp_vcs_tag() {
+    "_lp_${lp_vcs_type}_tag" 2>/dev/null
+}
+
+# Get the current commit string for the repo in the current directory.
+_lp_vcs_commit_id() {
+    "_lp_${lp_vcs_type}_commit_id" 2>/dev/null
+}
+
+# Get additional information if the repo is in a special or unusual state.
+_lp_vcs_head_status() {
+    "_lp_${lp_vcs_type}_head_status" 2>/dev/null
+    # TODO: set lp_vcs_head_details if not set?
+}
+
+# Get the number of stashes in the repo.
+_lp_vcs_stash_count() {
+    "_lp_${lp_vcs_type}_stash_count" 2>/dev/null
+}
+
+# Get the number of commits ahead and behind the upstream branch.
+_lp_vcs_commits_off_remote() {
+    "_lp_${lp_vcs_type}_commits_off_remote" 2>/dev/null
+}
+
+# Get the number of untracked aka extra files in the repo.
+_lp_vcs_untracked_files() {
+    "_lp_${lp_vcs_type}_untracked_files" 2>/dev/null
+}
+
+# Get the number of changed files compared to the last or checked out commit.
+_lp_vcs_uncommitted_files() {
+    "_lp_${lp_vcs_type}_uncommitted_files" 2>/dev/null
+}
+
+# Get the number of changed lines compared to the last or checked out commit.
+_lp_vcs_uncommitted_lines() {
+    "_lp_${lp_vcs_type}_uncommitted_lines" 2>/dev/null
+}
+
+# Get the number of changed files compared to staging.
+_lp_vcs_unstaged_files() {
+    "_lp_${lp_vcs_type}_unstaged_files" 2>/dev/null
+}
+
+# Get the number of changed lines compared to staging.
+_lp_vcs_unstaged_lines() {
+    "_lp_${lp_vcs_type}_unstaged_lines" 2>/dev/null
+}
+
+# Get the number of changed files in staging compared to the last or checked out commit.
+_lp_vcs_staged_files() {
+    "_lp_${lp_vcs_type}_staged_files" 2>/dev/null
+}
+
+# Get the number of changed lines in staging compared to the last or checked out commit.
+_lp_vcs_staged_lines() {
+    "_lp_${lp_vcs_type}_staged_lines" 2>/dev/null
+}
+
+# GIT #
+
+# Check if Git is enabled in Liquidprompt and the current directory is a valid
+# Git repository.
+_lp_git_active() {
+    (( LP_ENABLE_GIT )) || return 2
+    \git rev-parse --is-inside-work-tree >/dev/null 2>&1 || return 1
+}
+
+# Get the branch name of the Git repo in the current directory.
+_lp_git_branch() {
+    local branch ret
+    # Recent versions of Git support the --short option for symbolic-ref, but
+    # not 1.7.9 (Ubuntu 12.04)
+    if branch="$(\git symbolic-ref -q HEAD 2>/dev/null)"; then
+        __lp_escape "${branch#refs/heads/}"
+        lp_vcs_branch="$ret"
+    else
+        return 1
+    fi
+}
+
+# Get a tag name of the Git repo in the current directory.
+_lp_git_tag() {
+    local tag ret
+    if tag="$(\git describe --tags --exact-match 2>/dev/null)"; then
+        __lp_escape "$tag"
+        lp_vcs_tag="$ret"
+    else
+        return 1
+    fi
+}
+
+# Get the current full commit hash of the repo in the current directory.
+_lp_git_commit_id() {
+    lp_vcs_commit_id="$(\git rev-parse -q HEAD 2>/dev/null)"
+}
+
+# Get additional information if HEAD is in merging, rebasing or cherry-picking state.
+_lp_git_head_status() {
+    local gitdir="${lp_vcs_root}/.git" IFS= step total
+
+    if [[ -f "${gitdir}/MERGE_HEAD" ]]; then
+        lp_vcs_head_status="MERGING"
+    elif [[ -d "${gitdir}/rebase-merge" ]]; then
+        read step <"${gitdir}/rebase-merge/msgnum"
+        read total <"${gitdir}/rebase-merge/end"
+        if [ -f "${gitdir}/rebase-merge/interactive" ]; then
+            lp_vcs_head_status="REBASE-i"
         else
-            # There're some changes to commit
-            branch="${LP_COLOR_CHANGES}$branch${NO_COL}$ret${LP_COLOR_CHANGES}$C2A${NO_COL}"
+            lp_vcs_head_status="REBASE-m"
         fi
-        echo -nE "$branch"
+    elif [[ -d "${gitdir}/rebase-apply" ]]; then
+        read step <"${gitdir}/rebase-apply/next"
+        read total <"${gitdir}/rebase-apply/last"
+        if [ -f "${gitdir}/rebase-apply/rebasing" ]; then
+            lp_vcs_head_status="REBASE"
+        elif [ -f "${gitdir}/rebase-apply/applying" ]; then
+            lp_vcs_head_status="AM"
+        else
+            lp_vcs_head_status="AM/REBASE"
+        fi
+    elif [[ -f "${gitdir}/CHERRY_PICK_HEAD" ]]; then
+        lp_vcs_head_status="CHERRY-PICKING"
+    elif [[ -f "${gitdir}/REVERT_HEAD" ]]; then
+        lp_vcs_head_status="REVERTING"
+    elif [[ -f "${gitdir}/BISECT_START" ]]; then
+        lp_vcs_head_status="BISECTING"
+    else
+        return 1
+    fi
+
+    if [[ -n "$step" && -n "$total" ]]; then
+        lp_vcs_head_details="${step}/${total}"
+    else
+        lp_vcs_head_details=
+    fi
+}
+
+# Get the number of Git stashes in the repo.
+_lp_git_stash_count() {
+    lp_vcs_stash_count="$(\git rev-list --walk-reflogs --count refs/stash 2>/dev/null)"
+    (( lp_vcs_stash_count ))
+}
+
+# Count commits behind and ahead on the remote tracking branch of the current
+# local branch.
+_lp_git_commits_off_remote() {
+    local counts
+    # The "@{upstream}" notation was added in Git 1.7.0, so this should work for everyone
+    counts="$(\git rev-list --count --left-right '@{upstream}...HEAD' 2>/dev/null)" || return 2
+    IFS=$' \t' read lp_vcs_commit_behind lp_vcs_commit_ahead <<<"$counts"
+    (( lp_vcs_commit_behind || lp_vcs_commit_ahead ))
+}
+
+# Get the number of untracked files in the repo.
+_lp_git_untracked_files() {
+    lp_vcs_untracked_files="$(LC_ALL=C \git status --porcelain 2>/dev/null | \grep -c '^??')"
+    (( lp_vcs_untracked_files ))
+}
+
+# Get the number of changed files.
+__lp_git_diff_shortstat_files() {  # diff_shortstat
+    local stat="$1"
+
+    if [[ "$stat" = *changed* ]]; then
+        stat="${stat/ file*}"
+        lp_git_diff_shortstat_files=${stat//[$' \t']}
+    else
+        return 1
+    fi
+}
+
+# Get the number of changed lines.
+__lp_git_diff_shortstat_lines() {  # diff_shortstat
+    local stat="$1"
+
+    stat=${stat/*changed, /} # removing "n file(s) changed"
+
+    if [[ "$stat" = *insertion* ]]; then
+        lp_git_diff_shortstat_i_lines=${stat/ inser*}
+    else
+        lp_git_diff_shortstat_i_lines=0
+    fi
+
+    if [[ "$stat" = *deletion* ]]; then
+        stat=${stat/*\(+\), }
+        lp_git_diff_shortstat_d_lines=${stat/ del*/}
+    else
+        lp_git_diff_shortstat_d_lines=0
+    fi
+
+    (( lp_git_diff_shortstat_i_lines || lp_git_diff_shortstat_d_lines ))
+}
+
+__lp_git_diff_shortstat_uncommitted() {
+    if [[ -z ${_lp_git_diff_shortstat_uncommitted-} ]]; then
+        _lp_git_diff_shortstat_uncommitted="$(LC_ALL=C \git diff --shortstat HEAD -- 2>/dev/null)"
+    fi
+}
+
+# Get the number of changed files compared to HEAD.
+_lp_git_uncommitted_files() {
+    __lp_git_diff_shortstat_uncommitted
+
+    local lp_git_diff_shortstat_files
+    __lp_git_diff_shortstat_files "$_lp_git_diff_shortstat_uncommitted" || return "$?"
+
+    lp_vcs_uncommitted_files=$lp_git_diff_shortstat_files
+}
+
+# Get the number of changed lines compared to HEAD.
+_lp_git_uncommitted_lines() {
+    __lp_git_diff_shortstat_uncommitted
+
+    local lp_git_diff_shortstat_i_lines lp_git_diff_shortstat_d_lines
+    __lp_git_diff_shortstat_lines "$_lp_git_diff_shortstat_uncommitted" || return "$?"
+
+    lp_vcs_uncommitted_i_lines=$lp_git_diff_shortstat_i_lines
+    lp_vcs_uncommitted_d_lines=$lp_git_diff_shortstat_d_lines
+}
+
+__lp_git_diff_shortstat_unstaged() {
+    if [[ -z ${_lp_git_diff_shortstat_unstaged-} ]]; then
+        _lp_git_diff_shortstat_unstaged="$(LC_ALL=C \git diff --shortstat 2>/dev/null)"
+    fi
+}
+
+# Get the number of changed files compared to staging.
+_lp_git_unstaged_files() {
+    __lp_git_diff_shortstat_unstaged
+
+    local lp_git_diff_shortstat_files
+    __lp_git_diff_shortstat_files "$_lp_git_diff_shortstat_unstaged" || return "$?"
+
+    lp_vcs_unstaged_files=$lp_git_diff_shortstat_files
+}
+
+# Get the number of changed lines compared to staging.
+_lp_git_unstaged_lines() {
+    __lp_git_diff_shortstat_unstaged
+
+    local lp_git_diff_shortstat_i_lines lp_git_diff_shortstat_d_lines
+    __lp_git_diff_shortstat_lines "$_lp_git_diff_shortstat_unstaged" || return "$?"
+
+    lp_vcs_unstaged_i_lines=$lp_git_diff_shortstat_i_lines
+    lp_vcs_unstaged_d_lines=$lp_git_diff_shortstat_d_lines
+}
+
+__lp_git_diff_shortstat_staged() {
+    if [[ -z ${_lp_git_diff_shortstat_staged-} ]]; then
+        _lp_git_diff_shortstat_staged="$(LC_ALL=C \git diff --shortstat --cached 2>/dev/null)"
+    fi
+}
+
+# Get the number of changed files in staging compared to HEAD.
+_lp_git_staged_files() {
+    __lp_git_diff_shortstat_staged
+
+    local lp_git_diff_shortstat_files
+    __lp_git_diff_shortstat_files "$_lp_git_diff_shortstat_staged" || return "$?"
+
+    lp_vcs_staged_files=$lp_git_diff_shortstat_files
+}
+
+# Get the number of changed lines in staging compared to HEAD.
+_lp_git_staged_lines() {
+    __lp_git_diff_shortstat_staged
+
+    local lp_git_diff_shortstat_i_lines lp_git_diff_shortstat_d_lines
+    __lp_git_diff_shortstat_lines "$_lp_git_diff_shortstat_staged" || return "$?"
+
+    lp_vcs_staged_i_lines=$lp_git_diff_shortstat_i_lines
+    lp_vcs_staged_d_lines=$lp_git_diff_shortstat_d_lines
+}
+
+# MERCURIAL #
+# Note that Mercurial has no staging area
+
+# Check if Mercurial is enabled in Liquidprompt and the current directory is a
+# valid Mercurial repository.
+_lp_hg_active() {
+    (( LP_ENABLE_HG )) || return 2
+    \hg root >/dev/null 2>&1 || return 1
+}
+
+# Get the branch name of the Mercurial repo in the current directory.
+_lp_hg_branch() {
+    local branch ret
+    if branch="$(\hg branch 2>/dev/null)"; then
+        __lp_escape "$branch"
+        lp_vcs_branch="$ret"
+    else
+        # This should never happen. Should this function return a branch name
+        # only if the head of the branch is checked out? But there can be
+        # multiple heads of a branch...
+        return 1
+    fi
+}
+
+# Get the bookmark name of the Mercurial repo in the current directory.
+_lp_hg_bookmark() {
+    local bookmark ret
+    if bookmark="$(\hg bookmark --list --quiet . 2>/dev/null)"; then
+        __lp_escape "$bookmark"
+        lp_vcs_bookmark="$ret"
+    else
+        return 1
+    fi
+}
+
+# Get the most recent tag that refers to the current revision.
+_lp_hg_tag() {
+    local tags ret
+    tags="$(\hg identify --template='{tags}' 2>/dev/null)"
+    if [[ -n "$tags" ]]; then
+        # Tags are separated by ':', get the first one
+        __lp_escape "${tags%%:*}"
+        lp_vcs_tag="$ret"
+    else
+        return 1
+    fi
+}
+
+# Get the current global revision id for the repo in the current directory.
+_lp_hg_commit_id() {
+    lp_vcs_commit_id="$(\hg identify --id 2>/dev/null)"
+}
+
+# Get additional information if the repo is in any unfinished state.
+_lp_hg_head_status() {
+    local hgdir="${lp_vcs_root}/.hg"
+    if [[ -d "${hgdir}/merge" ]]; then
+        lp_vcs_head_status="MERGING"
+    elif [[ -f "${hgdir}/rebasestate" ]]; then
+        lp_vcs_head_status="REBASING"
+    elif [[ -f "${hgdir}/updatestate" ]]; then
+        lp_vcs_head_status="UPDATING"
+    elif [[ -f "${hgdir}/bisect.state" ]]; then
+        lp_vcs_head_status="BISECTING"
+    elif [[ -f "${hgdir}/shelvedstate" ]]; then
+        lp_vcs_head_status="SHELVING"
+    elif [[ -f "${hgdir}/graftstate" ]]; then
+        lp_vcs_head_status="GRAFTING"
+    else
+        return 1
+    fi
+}
+
+# Get the number of Mercurial shelves in the repo.
+_lp_hg_stash_count() {
+    local shelves count
+    shelves="$(\hg shelve --list 2>/dev/null; printf x)"
+    __lp_line_count "${shelves%x}"
+    lp_vcs_stash_count="$count"
+    (( lp_vcs_stash_count ))
+}
+
+# https://github.com/nojhan/liquidprompt/issues/217
+# return: always false (3: disabled).
+_lp_hg_commits_off_remote() {
+    #commits=$(\hg outgoing --no-merges 2>/dev/null | \grep -c '\(^changeset\:\)')
+    return 3
+}
+
+# Get the number of untracked files in the Mercurial repo.
+_lp_hg_untracked_files() {
+    local untracked
+    untracked="$(\hg status --unknown --template '{status}' 2>/dev/null)"
+    lp_vcs_untracked_files="${#untracked}"
+    (( lp_vcs_untracked_files ))
+}
+
+# Get the number of changed files compared to the base revision.
+_lp_hg_uncommitted_files() {
+    local files
+    files="$(\hg status --modified --template '{status}' 2>/dev/null)"
+    lp_vcs_uncommitted_files="${#files}"
+    (( lp_vcs_uncommitted_files ))
+}
+
+# Get the number of changed lines compared to the base revision.
+_lp_hg_uncommitted_lines() {
+    IFS=' ' read lp_vcs_uncommitted_i_lines lp_vcs_uncommitted_d_lines \
+        <<<"$(\hg diff --stat 2>/dev/null | sed -n '$ s/^.*, \([0-9]*\) .*, \([0-9]*\).*$/\1 \2/p')"
+
+    (( lp_vcs_uncommitted_i_lines || lp_vcs_uncommitted_d_lines ))
+}
+
+# SUBVERSION #
+# Note that Subversion has no tags, stashes, or staging area. It also has no
+# concept of a remote, since it is not distributed and always must be in sync.
+
+# Check if Subversion is enabled in Liquidprompt and the current directory is a
+# valid Subversion repository.
+_lp_svn_active() {
+    (( LP_ENABLE_SVN )) || return 2
+    \svn info >/dev/null 2>&1 || return 1
+}
+
+# Get the branch name of the repo in the current directory.
+_lp_svn_branch() {
+    local ret url
+    # SVN info shows repository-relative URLs since v1.8
+    url="$(LC_ALL=C \svn info 2>/dev/null)"
+    url="${url#*Relative URL: }"
+    url="${url%%$'\n'*}"
+    [[ -z "$url" ]] && return 1
+
+    if [[ "$url" == */trunk* ]]; then
+        lp_vcs_branch=trunk
+    elif [[ "$url" == */branches/?* ]]; then
+        url="${url##*/branches/}"
+        __lp_escape "${url%/*}"
+        lp_vcs_branch="$ret"
+    elif [[ "$url" == */tags/?* ]]; then
+        url="${url##*/tags/}"
+        __lp_escape "${url%/*}"
+        lp_vcs_branch="tag/$ret"
+    else
+        return 1
+    fi
+}
+
+# Get the current revision number for the repo in the current directory.
+_lp_svn_commit_id() {
+    lp_vcs_commit_id="$(\svn info --show-item revision 2>/dev/null)"
+}
+
+# Get the number of untracked files in the Subversion repo.
+_lp_svn_untracked_files() {
+    lp_vcs_untracked_files="$(LC_ALL=C \svn status 2>/dev/null | \grep -c '^?')"
+    (( lp_vcs_untracked_files ))
+}
+
+# Get the number of changed files compared to the base revision.
+_lp_svn_uncommitted_files() {
+    local files count
+    # svn status is unsafe with newline chars in filenames, which will throw
+    # off this count
+    files="$(\svn status --quiet 2>/dev/null; printf x)"
+    __lp_line_count "${files%x}"
+    lp_vcs_uncommitted_files="$count"
+    (( lp_vcs_uncommitted_files ))
+}
+
+# Get the number of changed lines compared to the base revision.
+_lp_svn_uncommitted_lines() {
+    IFS=' ' read lp_vcs_uncommitted_i_lines lp_vcs_uncommitted_d_lines \
+        <<<"$(\svn diff --internal-diff 2>/dev/null | awk '
+        BEGIN { plus=0; minus=0 }
+        /^(\+[^+])|(\+$)/ { plus+=1 }
+        /^(-[^-])|(-$)/ { minus+=1 }
+        END {
+            print plus" "minus
+        }')"
+
+    (( lp_vcs_uncommitted_i_lines || lp_vcs_uncommitted_d_lines ))
+}
+
+# FOSSIL #
+# Note that Fossil has no staging area, bookmarks, or unique tags.
+
+# Check if Fossil is enabled in Liquidprompt and the current directory is a
+# valid Fossil repository.
+_lp_fossil_active() {
+    (( LP_ENABLE_FOSSIL )) || return 2
+    \fossil status >/dev/null 2>&1 || return 1
+}
+
+# Get the branch name of the repo in the current directory.
+_lp_fossil_branch() {
+    local branch ret
+
+    # branch current command added in fossil 2.7
+    if ! branch="$(\fossil branch current 2>/dev/null)"; then
+        # Almost any character can be in a branch name, but we have no way of
+        # knowing if a newline is part of the name or not. In fact, there is no
+        # way to prevent a branch containing the string '\n* ' to not break
+        # this. Just hope that no one crazy enough to do that to their branch
+        # names is running Fossil <2.7
+        branch="$(\fossil branch list 2>/dev/null)"
+        branch="${branch#*$'\n\* '}"
+        # If the current branch is the first in the list, the above check would
+        # not have removed anything
+        branch="${branch#\* }"
+        branch="${branch%%$'\n'*}"
+    fi
+
+    if [[ -n "$branch" ]]; then
+        __lp_escape "$branch"
+        lp_vcs_branch="$ret"
+    else
+        return 1
+    fi
+}
+
+# Get the current full commit hash of the Fossil repo in the current directory.
+_lp_fossil_commit_id() {
+    lp_vcs_commit_id="$(LC_ALL=C \fossil status 2>/dev/null | sed -n 's/^checkout:[[:space:]]*\([^[:space:]]*\).*/\1/p')"
+}
+
+# Get additional information if the check-out is in merging before a commit.
+_lp_fossil_head_status() {
+    local option
+    option="$(LC_ALL=C \fossil undo --dry-run 2>/dev/null)"
+
+    if [[ "$option" == *"fossil merge"* ]]; then
+        lp_vcs_head_status="MERGING"
+    else
+        return 1
     fi
 }
 
+# Get the number of Fossil stashes in the repo.
+_lp_fossil_stash_count() {
+    local stashes count
+    stashes="$(\fossil stash list 2>/dev/null; printf x)"
+    __lp_line_count "${stashes%x}"
+    # Each stash takes up two lines, and no stashes is one line
+    lp_vcs_stash_count=$(( count / 2 ))
+    (( lp_vcs_stash_count ))
+}
+
+# Get the number of extra files in the Fossil repo.
+_lp_fossil_untracked_files() {
+    local extras count
+    extras="$(\fossil extras 2>/dev/null; printf x)"
+    __lp_line_count "${extras%x}"
+    lp_vcs_untracked_files=$count
+    (( lp_vcs_untracked_files ))
+}
+
+# Get the number of changed files compared to the checked-out version.
+_lp_fossil_uncommitted_files() {
+    local files
+    files="$(\fossil changes 2>/dev/null; printf x)"
+    __lp_line_count "${files%x}"
+    lp_vcs_uncommitted_files=$count
+    (( lp_vcs_uncommitted_files ))
+}
+
+# Get the number of changed lines compared to the checked-out version.
+_lp_fossil_uncommitted_lines() {
+    IFS=' ' read lp_vcs_uncommitted_i_lines lp_vcs_uncommitted_d_lines \
+        <<<"$(\fossil diff --internal --verbose 2>/dev/null | awk '
+        BEGIN { plus=0; minus=0 }
+        /^(\+[^+])|(\+$)/ { plus+=1 }
+        /^(-[^-])|(-$)/ { minus+=1 }
+        END {
+            print plus" "minus
+        }')"
+
+    (( lp_vcs_uncommitted_i_lines || lp_vcs_uncommitted_d_lines ))
+}
+
 # Bazaar #
+# Note that Bazaar has no staging area, bookmarks, remote tracking branches, or extra statuses.
+
+# Check if Bazaar is enabled in Liquidprompt and the current directory is a
+# valid Bazaar repository. This check should be done before running any other
+# _lp_bzr_* data functions.
+_lp_bzr_active() {
+    (( LP_ENABLE_BZR )) || return 2
+    \bzr status >/dev/null 2>&1 || return 1
+}
 
 # Get the branch name of the current directory
-_lp_bzr_branch()
-{
-    (( LP_ENABLE_BZR )) || return
-
-    # First do a simple search to avoid having to invoke bzr -- at least on my
-    # machine, the python startup causes a noticeable hitch when changing
-    # directories.
-    _lp_upwards_find .bzr || return
+_lp_bzr_branch() {
+    local branch ret
+    if branch="$(\bzr nick 2> /dev/null)"; then
+        __lp_escape "$branch"
+        lp_vcs_branch="$ret"
+    else
+        return 1
+    fi
+}
+
+# Get the most recent tag that refers to the current revision.
+_lp_bzr_tag() {
+    local tag ret eol
+    IFS=$' \t' read tag eol <<<"$(LC_ALL=C \bzr tags --revision=last:1 2>/dev/null)"
+    if [[ -n "$tag" ]]; then
+        __lp_escape "$tag"
+        lp_vcs_tag="$ret"
+    else
+        return 1
+    fi
+}
 
-    # We found an .bzr folder, so we need to invoke bzr and see if we're
-    # actually in a repository.
+# Get the current full commit hash of the repo in the current directory.
+_lp_bzr_commit_id() {
+    lp_vcs_commit_id="$(\bzr revno 2>/dev/null)"
+}
 
-    local branch
-    branch="$(bzr nick 2> /dev/null)"
-    (( $? != 0 )) && return
-    _lp_escape "$branch"
+# Get the number of Bazaar shelves in the repo.
+_lp_bzr_stash_count() {
+    local shelves count
+    shelves="$(\bzr shelve --list 2>/dev/null)"
+    local -i ret="$?"
+
+    if (( ret == 0 )); then
+        # No error code means no shelves.
+        lp_vcs_stash_count=0
+    elif (( ret == 1 )); then
+        # Return of 1 means there are shelves.
+        # The usual "printf x" trick can't be used, as it squashes the error code.
+        __lp_line_count "$shelves"
+        lp_vcs_stash_count=$(( $count + 1 ))
+    else
+        return 1
+    fi
+
+    (( lp_vcs_stash_count ))
 }
 
+# Get the number of unknown files in the repo.
+_lp_bzr_untracked_files() {
+    lp_vcs_untracked_files="$(LC_ALL=C \bzr status --short 2>/dev/null | \grep -c '^?')"
 
-# Set a color depending on the branch state:
-# - green if the repository is up to date
-# - red if there is changes to commit
-# - TODO: yellow if there is some commits not pushed
-#
-# Add the number of pending commits and the impacted lines.
-_lp_bzr_branch_color()
-{
-    (( LP_ENABLE_BZR )) || return
-
-    # First do a simple search to avoid having to invoke bzr -- at least on my
-    # machine, the python startup causes a noticeable hitch when changing
-    # directories.
-    _lp_upwards_find .bzr || return
-
-    # We found an .bzr folder, so we need to invoke bzr and see if we're
-    # actually in a repository.
-
-    local output
-    output="$(bzr version-info --check-clean --custom --template='{branch_nick} {revno} {clean}' 2> /dev/null)"
-    (( $? != 0 )) && return
-    $_LP_SHELL_zsh && setopt local_options && setopt sh_word_split
-    local tuple
-    tuple=($output)
-    $_LP_SHELL_zsh && unsetopt sh_word_split
-    local branch=${tuple[_LP_FIRST_INDEX+0]}
-    local revno=${tuple[_LP_FIRST_INDEX+1]}
-    local clean=${tuple[_LP_FIRST_INDEX+2]}
-    local ret=
+    (( lp_vcs_untracked_files ))
+}
 
-    if [[ -n "$branch" ]]; then
-        if (( clean == 0 )); then
-            ret="${LP_COLOR_CHANGES}${branch}${NO_COL}(${LP_COLOR_COMMITS}$revno${NO_COL})"
-        else
-            ret="${LP_COLOR_UP}${branch}${NO_COL}(${LP_COLOR_COMMITS}$revno${NO_COL})"
-        fi
+# Get the number of changed files compared to the checked-out version.
+_lp_bzr_uncommitted_files() {
+    lp_vcs_uncommitted_files="$(LC_ALL=C \bzr status --short 2>/dev/null | \grep -vc '^?')"
 
-    fi
-    echo -nE "$ret"
+    (( lp_vcs_uncommitted_files ))
 }
 
+# Get the number of changed lines compared to the checked-out version.
+_lp_bzr_uncommitted_lines() {
+    IFS=' ' read lp_vcs_uncommitted_i_lines lp_vcs_uncommitted_d_lines \
+        <<<"$(\bzr diff 2>/dev/null | awk '
+        BEGIN { plus=0; minus=0 }
+        /^(\+[^+])|(\+$)/ { plus+=1 }
+        /^(-[^-])|(-$)/ { minus+=1 }
+        END {
+            print plus" "minus
+        }')"
+
+    (( lp_vcs_uncommitted_i_lines || lp_vcs_uncommitted_d_lines ))
+}
 
 ####################
 # Wifi link status #
 ####################
-_lp_wifi()
-{
+
+# TODO: test/fix/implement this
+_lp_wifi() {
     # Linux
     sed -n '3s/^ *[^ ]*  *[^ ]*  *\([0-9]*\).*/\1/p' /proc/net/wireless
 }
@@ -1246,588 +2174,571 @@ _lp_wifi()
 # Battery status #
 ##################
 
-# Get the battery status in percent
-# returns 0 (and battery level) if battery is discharging and under threshold
-# returns 1 (and battery level) if battery is discharging and above threshold
-# returns 2 (and battery level) if battery is charging but under threshold
-# returns 3 (and battery level) if battery is charging and above threshold
-# returns 4 if no battery support
+# Get the battery status in percent.
 case "$LP_OS" in
     Linux)
-    _lp_battery()
-    {
-        (( LP_ENABLE_BATT )) || return 4
+    _lp_battery() {
+        (( LP_ENABLE_BATT )) || return 5
         local acpi
         acpi="$(acpi --battery 2>/dev/null)"
         # Extract the battery load value in percent
         # First, remove the beginning of the line...
-        local bat="${acpi#Battery *, }"
-        bat="${bat%%%*}" # remove everything starting at '%'
+        lp_battery="${acpi#Battery *, }"
+        lp_battery="${lp_battery%%%*}" # remove everything starting at '%'
 
-        if [[ -z "${bat}" ]]; then
+        if [[ -z "${lp_battery}" ]]; then
             # no battery level found
             return 4
         fi
-        echo -nE "$bat"
         # discharging
         if [[ "$acpi" == *"Discharging"* ]]; then
             # under => 0, above => 1
-            return $(( bat > LP_BATTERY_THRESHOLD ))
+            return "$(( lp_battery > LP_BATTERY_THRESHOLD ))"
+        # not charging
+        elif [[ "$acpi" == *"Not charging"* ]]; then
+            return 4
         # charging
         else
             # under => 2, above => 3
-            return $(( 1 + ( bat > LP_BATTERY_THRESHOLD ) ))
+            return "$(( 2 + ( lp_battery > LP_BATTERY_THRESHOLD ) ))"
         fi
     }
     ;;
     Darwin)
-    _lp_battery()
-    {
-        (( LP_ENABLE_BATT )) || return 4
+    _lp_battery() {
+        (( LP_ENABLE_BATT )) || return 5
         local percent batt_status
-        eval "$(pmset -g batt | sed -n 's/^ -InternalBattery[^	 ]*[	 ]\([0-9]*[0-9]\)%; \([^;]*\).*$/percent=\1 batt_status='\'\\2\'/p)"
+        IFS=';' read -r lp_battery batt_status <<<"$(pmset -g batt | sed -n 's/^ -InternalBattery.*[[:space:]]\([0-9]*[0-9]\)%; \([^;]*\).*$/\1;\2/p')"
         case "$batt_status" in
             charged | "")
             return 4
             ;;
             discharging)
-                echo -nE "$percent"
                 # under => 0, above => 1
-                return $(( percent > LP_BATTERY_THRESHOLD ))
+                return "$(( lp_battery > LP_BATTERY_THRESHOLD ))"
             ;;
             *)  # "charging", "AC attached"
-                echo -nE "$percent"
                 # under => 2, above => 3
-                return $(( 1 + ( percent > LP_BATTERY_THRESHOLD ) ))
+                return "$(( 2 + ( lp_battery > LP_BATTERY_THRESHOLD ) ))"
             ;;
         esac
     }
     ;;
+    *)
+    _lp_battery() {
+        return 5
+    }
+    ;;
 esac
 
-# Compute a gradient of background/foreground colors depending on the battery status
-# Display:
-# a  green ⏚ if the battery is charging    and above threshold
-# a yellow ⏚ if the battery is charging    and under threshold
-# a yellow ⌁ if the battery is discharging but above threshold
-# a    red ⌁ if the battery is discharging and above threshold
-_lp_battery_color()
-{
-    (( LP_ENABLE_BATT )) || return
-
-    local mark=$LP_MARK_BATTERY
-    local chargingmark=$LP_MARK_ADAPTER
-    local -i bat ret
-    bat="$(_lp_battery)"
-    ret=$?
+# Compute a gradient of background/foreground colors depending on the battery status.
+_lp_battery_color() {
+    (( LP_ENABLE_BATT )) || return 2
+
+    _lp_battery
+    local -i _status="$?"
 
-    if (( ret == 4 || bat == 100 )); then
+    if (( _status >= 4 || lp_battery == 100 )); then
         # no battery support or battery full: nothing displayed
-        :
-    elif (( ret == 3 && bat != 100 )); then
+        return 1
+    elif (( _status == 3 && lp_battery != 100 )); then
         # charging and above threshold and not 100%
         # green ⏚
-        echo -nE "${LP_COLOR_CHARGING_ABOVE}$chargingmark${NO_COL}"
-    elif (( ret == 2 )); then
+        lp_battery_color="${LP_COLOR_CHARGING_ABOVE}${LP_MARK_ADAPTER}${NO_COL}"
+    elif (( _status == 2 )); then
         # charging but under threshold
         # yellow ⏚
-        echo -nE "${LP_COLOR_CHARGING_UNDER}$chargingmark${NO_COL}"
-    elif (( ret == 1 )); then
+        lp_battery_color="${LP_COLOR_CHARGING_UNDER}${LP_MARK_ADAPTER}${NO_COL}"
+    elif (( _status == 1 )); then
         # discharging but above threshold
         # yellow ⌁
-        echo -nE "${LP_COLOR_DISCHARGING_ABOVE}$mark${NO_COL}"
+        lp_battery_color="${LP_COLOR_DISCHARGING_ABOVE}${LP_MARK_BATTERY}${NO_COL}"
     # discharging and under threshold
     else
-        local res
-        res="${LP_COLOR_DISCHARGING_UNDER}${mark}${NO_COL}"
+        lp_battery_color="${LP_COLOR_DISCHARGING_UNDER}${LP_MARK_BATTERY}${NO_COL}"
 
         if (( LP_PERCENTS_ALWAYS )); then
             local -i idx
-            if   (( bat <=  0 )); then
+            if   (( lp_battery <=  0 )); then
                 idx=0
-            elif (( bat <=  5 )); then         #  5
+            elif (( lp_battery <=  5 )); then         #  5
                 idx=9
-            elif (( bat <= 10 )); then         #  5
+            elif (( lp_battery <= 10 )); then         #  5
                 idx=8
-            elif (( bat <= 20 )); then         # 10
+            elif (( lp_battery <= 20 )); then         # 10
                 idx=7
-            elif (( bat <= 30 )); then         # 10
+            elif (( lp_battery <= 30 )); then         # 10
                 idx=6
-            elif (( bat <= 40 )); then         # 10
+            elif (( lp_battery <= 40 )); then         # 10
                 idx=5
-            elif (( bat <= 50 )); then         # 10
+            elif (( lp_battery <= 50 )); then         # 10
                 idx=4
-            elif (( bat <= 65 )); then         # 15
+            elif (( lp_battery <= 65 )); then         # 15
                 idx=3
-            elif (( bat <= 80 )); then         # 15
+            elif (( lp_battery <= 80 )); then         # 15
                 idx=2
-            elif (( bat < 100 )); then         # 20
+            elif (( lp_battery < 100 )); then         # 20
                 idx=1
             else # >= 100
                 idx=0
             fi
 
-            res+="${LP_COLORMAP[idx+_LP_FIRST_INDEX]}${bat}$_LP_PERCENT${NO_COL}"
-        fi # LP_PERCENTS_ALWAYS
-        echo -nE "${res}"
+            local ret
+            _lp_color_map "$idx" 10
+            lp_battery_color+="${ret}${lp_battery}${_LP_PERCENT}${NO_COL}"
+        fi
     fi
 }
 
-_lp_color_map() {
-    # Default scale: 0..100
-    # Custom scale: 0..$2
-    local -i scale idx
-    scale=${2:-100}
-    # Transform the value to a 0..${#COLOR_MAP} scale
-    idx=_LP_FIRST_INDEX+100*$1/scale/${#LP_COLORMAP[*]}
-    echo -nE "${LP_COLORMAP[idx]}"
-}
-
 ###########################
-# runtime of last command #
+# Runtime of last command #
 ###########################
 
-_LP_RUNTIME_LAST_SECONDS=$SECONDS
+_lp_runtime_format() {
+    (( LP_ENABLE_RUNTIME )) || return 2
 
-_lp_runtime()
-{
-    if (( LP_ENABLE_RUNTIME && _LP_RUNTIME_SECONDS >= LP_RUNTIME_THRESHOLD ))
-    then
-        echo -nE "${LP_COLOR_RUNTIME}"
+    lp_runtime_format=
+    if (( _LP_RUNTIME_SECONDS >= LP_RUNTIME_THRESHOLD )); then
         # display runtime seconds as days, hours, minutes, and seconds
-        (( _LP_RUNTIME_SECONDS >= 86400 )) && echo -n $((_LP_RUNTIME_SECONDS / 86400))d
-        (( _LP_RUNTIME_SECONDS >= 3600 )) && echo -n $((_LP_RUNTIME_SECONDS % 86400 / 3600))h
-        (( _LP_RUNTIME_SECONDS >= 60 )) && echo -n $((_LP_RUNTIME_SECONDS % 3600 / 60))m
-        echo -n $((_LP_RUNTIME_SECONDS % 60))"s${NO_COL}"
-    fi
-    :
+        (( _LP_RUNTIME_SECONDS >= 86400 )) && lp_runtime_format=$((_LP_RUNTIME_SECONDS / 86400))d
+        (( _LP_RUNTIME_SECONDS >= 3600 )) && lp_runtime_format+=$((_LP_RUNTIME_SECONDS % 86400 / 3600))h
+        (( _LP_RUNTIME_SECONDS >= 60 )) && lp_runtime_format+=$((_LP_RUNTIME_SECONDS % 3600 / 60))m
+        lp_runtime_format+=$((_LP_RUNTIME_SECONDS % 60))s
+    else
+        return 1
+    fi
 }
 
-if (( LP_ENABLE_RUNTIME )); then
-    if $_LP_SHELL_zsh; then
-        _lp_runtime_before() {
-          _LP_RUNTIME_LAST_SECONDS=$SECONDS
-        }
-        _lp_runtime_after() {
-            if [[ -n "$_LP_RUNTIME_LAST_SECONDS" ]]; then
-                (( _LP_RUNTIME_SECONDS=SECONDS-_LP_RUNTIME_LAST_SECONDS ))
-                unset _LP_RUNTIME_LAST_SECONDS
-            fi
-        }
-
-        add-zsh-hook preexec _lp_runtime_before
-        add-zsh-hook precmd  _lp_runtime_after
-    else
-        _lp_runtime_before()
-        {
-            # For debugging
-            #echo "XXX $BASH_COMMAND"
+if (( _LP_SHELL_zsh )); then
+    __lp_runtime_before() {
+      _LP_RUNTIME_LAST_SECONDS=$SECONDS
+    }
+else
+    __lp_runtime_before() {
+        # For debugging
+        #echo "XXX $BASH_COMMAND"
+
+        # If this is the first time after the user submitted the command,
+        # record the time
+        if (( _LP_AT_PROMPT )); then
+            _LP_RUNTIME_SECONDS=-1 _LP_RUNTIME_LAST_SECONDS=$SECONDS _LP_AT_PROMPT=0
+        fi
+        # If this is when the prompt is being drawn, the command is done,
+        # so calculate the time. Note these two events could be at the same
+        # time, so no elif is used
+        if [[ "$BASH_COMMAND" == "${PROMPT_COMMAND-}" ]]; then
+            _LP_AT_PROMPT=1
+            __lp_runtime_after
+        fi
+    }
+fi
 
-            # If the previous command was just the refresh of the prompt,
-            # reset the counter
-            if (( _LP_RUNTIME_SKIP )); then
-                _LP_RUNTIME_SECONDS=-1 _LP_RUNTIME_LAST_SECONDS=$SECONDS
-            else
-                # Compute number of seconds since program was started
-                (( _LP_RUNTIME_SECONDS=SECONDS-_LP_RUNTIME_LAST_SECONDS ))
-            fi
+# Compute number of seconds since the command was started
+__lp_runtime_after() {
+    if [[ -n "${_LP_RUNTIME_LAST_SECONDS-}" ]]; then
+        (( _LP_RUNTIME_SECONDS=SECONDS-_LP_RUNTIME_LAST_SECONDS ))
+        unset _LP_RUNTIME_LAST_SECONDS
+    fi
+}
 
-            # If the command to run is the prompt, we'll have to ignore it
-            [[ "$BASH_COMMAND" != "$PROMPT_COMMAND" ]]
-            _LP_RUNTIME_SKIP=$?
-        }
+_lp_runtime_color() {
+    _lp_runtime_format || return "$?"
 
-        _LP_RUNTIME_SKIP=0
-        # _lp_runtime_before gets called just before bash executes a command,
-        # including $PROMPT_COMMAND
-        trap _lp_runtime_before DEBUG
-    fi
-fi
+    lp_runtime_color="${LP_COLOR_RUNTIME}${lp_runtime_format}${NO_COL}"
+}
 
 ###############
 # System load #
 ###############
 
-# Compute a gradient of background/forground colors depending on the battery status
-_lp_load_color()
-{
-    # Colour progression is important ...
-    #   bold gray -> bold green -> bold yellow -> bold red ->
-    #   black on red -> bold white on red
-    #
-    # Then we have to choose the values at which the colours switch, with
-    # anything past yellow being pretty important.
+# Get CPU count and current load
+case "$LP_OS" in
+    Linux)
+        __lp_cpu_count() {
+            _lp_CPUNUM=$( nproc 2>/dev/null || \grep -c '^[Pp]rocessor' /proc/cpuinfo )
+        }
+        _lp_cpu_load () {
+            local eol IFS=$' \t'
+            read lp_cpu_load eol < /proc/loadavg
+        }
+        ;;
+    FreeBSD|Darwin|OpenBSD)
+        __lp_cpu_count() {
+            _lp_CPUNUM=$( sysctl -n hw.ncpu )
+        }
+        _lp_cpu_load () {
+            local bol eol IFS=$' \t'
+            # If you have problems with syntax coloring due to the following
+            # line, do this: ln -s liquidprompt liquidprompt.bash
+            # and edit liquidprompt.bash
+            read bol lp_cpu_load eol <<<"$( LC_ALL=C sysctl -n vm.loadavg )"
+        }
+        ;;
+    SunOS)
+        __lp_cpu_count() {
+            _lp_CPUNUM=$( kstat -m cpu_info | \grep -c "module: cpu_info" )
+        }
+        _lp_cpu_load () {
+            lp_cpu_load="$( LC_ALL=C uptime | sed 's/.*load average: *\([0-9.]*\).*/\1/' )"
+        }
+esac
+
+_lp_load() {
+    (( LP_ENABLE_LOAD )) || return 2
 
-    (( LP_ENABLE_LOAD )) || return
+    local lp_cpu_load ret
 
-    local lp_cpu_load
     # Get value (OS-specific) into lp_cpu_load
     _lp_cpu_load
 
-    lp_cpu_load=${lp_cpu_load/./}   # Remove '.'
-    lp_cpu_load=${lp_cpu_load#0}    # Remove leading '0'
-    lp_cpu_load=${lp_cpu_load#0}    # Remove leading '0', again (ex: 0.09)
-    local -i load=${lp_cpu_load:-0}/$_lp_CPUNUM
+    __lp_escape "${lp_cpu_load:-0}"
+    lp_load=$ret
 
-    if (( load > LP_LOAD_THRESHOLD )); then
-        local ret="$(_lp_color_map $load)${LP_MARK_LOAD}"
+    __lp_floating_scale "${lp_cpu_load:-0}" 100
+    lp_load_adjusted=$(( ret / _lp_CPUNUM ))
 
-        if (( LP_PERCENTS_ALWAYS )); then
-            ret+="${load}${_LP_PERCENT}"
-        fi
-        echo -nE "${ret}${NO_COL}"
+    (( lp_load_adjusted >= _LP_LOAD_THRESHOLD ))
+}
+
+# Compute a gradient of background/forground colors depending on the load.
+_lp_load_color() {
+    _lp_load || return "$?"
+
+    local ret
+    _lp_color_map "$lp_load_adjusted" "$_LP_LOAD_CAP"
+    lp_load_color="${ret}${LP_MARK_LOAD}"
+
+    if (( LP_PERCENTS_ALWAYS )); then
+        lp_load_color+="${lp_load}"
     fi
+    lp_load_color+="$NO_COL"
 }
 
 ######################
 # System temperature #
 ######################
 
-# Will set _LP_TEMP_FUNCTION so the temperature monitoring feature use an
-# available command.
-if (( LP_ENABLE_TEMP )); then
-
-    # Backends for TEMP. Each backend must return the result in $temperature.
-
-    # Implementation using lm-sensors
-    _lp_temp_sensors()
-    {
-        # Return the hottest system temperature we get through the sensors command
-        # Only the integer part is retained
-        local -i i
-        for i in $(sensors -u |
-                sed -n 's/^  temp[0-9][0-9]*_input: \([0-9]*\)\..*$/\1/p'); do
-            (( $i > ${temperature:-0} )) && temperature=i
-        done
-    }
+# Backends for TEMP. Each backend must return the result in $lp_temperature.
 
-    # Implementation using 'acpi -t'
-    _lp_temp_acpi()
-    {
-        local -i i
-        # Only the integer part is retained
-        for i in $(LANG=C acpi -t |
-                sed 's/.* \(-\?[0-9]*\)\.[0-9]* degrees C$/\1/p'); do
-            (( $i > ${temperature:-0} )) && temperature=i
-        done
-    }
+# Implementation using lm-sensors
+__lp_temp_sensors() {
+    # Return the hottest system temperature we get through the sensors command
+    # Only the integer part is retained
+    local -i i
+    local IFS=$' \t\n'
+    for i in $(LC_ALL=C \sensors -u 2>/dev/null |
+            sed -n 's/^  temp[0-9][0-9]*_input: \([0-9]*\)\..*$/\1/p'); do
+        if [[ -z ${lp_temperature-} ]] || (( $i > ${lp_temperature:-0} )); then
+            lp_temperature=$i
+        fi
+    done
+}
 
-    # Dynamic selection of backend
-    _lp_temp_detect()
-    {
-        local -i temperature
-        local cmd
+# Implementation using 'acpi -t'
+__lp_temp_acpi() {
+    local -i i
+    local IFS=$' \t\n'
+    # Only the integer part is retained
+    for i in $(LC_ALL=C \acpi -t |
+            sed -n 's/.* \(-\{0,1\}[0-9]*\)\.[0-9]* degrees C$/\1/p'); do
+        if [[ -z ${lp_temperature-} ]] || (( $i > ${lp_temperature:-0} )); then
+            lp_temperature=$i
+        fi
+    done
+}
 
-        # Global variable
+# Dynamic selection of backend
+__lp_temp_detect() {
+    local lp_temperature cmd
+
+    # Global variable
+    unset _LP_TEMP_FUNCTION
+
+    for cmd
+    do
+        command -v "$cmd" >/dev/null || continue
+
+        _LP_TEMP_FUNCTION=__lp_temp_$cmd
+        # Check that we can retrieve temperature at least once
+        "$_LP_TEMP_FUNCTION" 2>/dev/null
+        # If $lp_temperature is set, success!
+        [[ -n "${lp_temperature-}" ]] && return 0
         unset _LP_TEMP_FUNCTION
+    done
+    return 1
+}
 
-        for cmd
-        do
-            command -v $cmd >/dev/null || continue
-
-            _LP_TEMP_FUNCTION=_lp_temp_$cmd
-            # Check that we can retrieve temperature at least once
-            $_LP_TEMP_FUNCTION 2>/dev/null
-            # If $temperature is set, success!
-            [[ -n "$temperature" ]] && return 0
-            unset -f $_LP_TEMP_FUNCTION
-            unset _LP_TEMP_FUNCTION
-        done
-        return 1
-    }
+# Returns current highest system temperature.
+_lp_temperature() {
+    (( LP_ENABLE_TEMP )) || return 2
 
-    # Try each _lp_temp method
-    # If no function worked, disable the feature
-    _lp_temp_detect acpi sensors || LP_ENABLE_TEMP=0
-    unset -f _lp_temp_detect
-fi
+    "$_LP_TEMP_FUNCTION"
 
+    [[ -z ${lp_temperature-} ]] && return 1
+    (( lp_temperature >= LP_TEMP_THRESHOLD ))
+}
+
+# Display the numeric value as we get from _lp_temperature and colorize it through _lp_color_map.
+_lp_temperature_color() {
+    _lp_temperature || return "$?"
 
-# Will display the numeric value as we get through the _LP_TEMP_FUNCTION
-# and colorize it through _lp_color_map.
-_lp_temperature()
-{
-    (( LP_ENABLE_TEMP )) || return
-
-    local -i temperature
-    temperature=0
-    $_LP_TEMP_FUNCTION
-    (( temperature >= LP_TEMP_THRESHOLD )) && \
-        echo -nE "${LP_MARK_TEMP}$(_lp_color_map $temperature 120)$temperature°${NO_COL}"
+    local ret
+    _lp_color_map "$lp_temperature" 120
+    lp_temperature_color="${LP_MARK_TEMP}${ret}${lp_temperature}°${NO_COL}"
 }
 
 ##########
-# DESIGN #
+# Title #
 ##########
 
+# Deprecated since 2.0
+_lp_title() {
+    (( LP_ENABLE_TITLE )) || return
 
-# Sed expression using extended regexp to match terminal
-# escape sequences with their wrappers
-if $_LP_SHELL_bash; then
-    _LP_CLEAN_ESC='\\\[([^\]+|\\[^]])*\\\]'
-else
-    _LP_CLEAN_ESC='%\{([^%]+|%[^}])*%\}'
-fi
-
-# Remove all colors and escape characters of the given string and return a pure text
-_lp_as_text()
-{
-    # Remove all terminal sequences that we wrapped with $_LP_OPEN_ESC and
-    # $_LP_CLOSE_ESC.
-    echo -nE "$1" | sed -$_LP_SED_EXTENDED "s,$_LP_CLEAN_ESC,,g"
+    # Get the input as pure text
+    printf '%s' "${_LP_OPEN_ESC}${LP_TITLE_OPEN}"
+    _lp_as_text "${1-}"
+    printf '%s' "${LP_TITLE_CLOSE}${_LP_CLOSE_ESC}"
 }
 
-_lp_title()
-{
-    (( LP_ENABLE_TITLE )) || return
+_lp_formatted_title() {
+    (( LP_ENABLE_TITLE )) || return 2
 
-    # Get the current computed prompt as pure text
-    echo -nE "${_LP_OPEN_ESC}${LP_TITLE_OPEN}"
-    _lp_as_text "$1"
-    echo -nE "${LP_TITLE_CLOSE}${_LP_CLOSE_ESC}"
-}
-
-# Set the prompt mark to ± if git, to ☿ if mercurial, to ‡ if subversion
-# to # if root and else $
-_lp_smart_mark()
-{
-    local mark
-    case "$LP_VCS_TYPE" in
-    git)      mark="$LP_MARK_GIT"             ;;
-    git-svn)  mark="$LP_MARK_GIT$LP_MARK_SVN" ;;
-    git-vcsh) mark="$LP_MARK_VCSH$LP_MARK_GIT$LP_MARK_VCSH";;
-    hg)       mark="$LP_MARK_HG"              ;;
-    svn)      mark="$LP_MARK_SVN"             ;;
-    fossil)   mark="$LP_MARK_FOSSIL"          ;;
-    bzr)      mark="$LP_MARK_BZR"             ;;
-    disabled) mark="$LP_MARK_DISABLED"        ;;
-    *)        mark="$LP_MARK_DEFAULT"         ;;
-    esac
-    echo -nE "${mark}${NO_COL}"
+    # Get the input as pure text
+    _lp_generated_title=$(_lp_as_text "${1-}")
 }
 
-# insert a space on the right
-_lp_sr()
-{
-    [[ -n "$1" ]] && echo -nE "$1 "
-}
+_lp_raw_title() {
+    (( LP_ENABLE_TITLE )) || return 2
 
-# insert a space on the left
-_lp_sl()
-{
-    [[ -n "$1" ]] && echo -nE " $1"
+    _lp_generated_title=${1-}
 }
 
-# insert two space, before and after
-_lp_sb()
-{
-    [[ -n "$1" ]] && echo -nE " $1 "
+lp_title() {
+    (( LP_ENABLE_TITLE )) || return 2
+
+    if [[ -n ${1+x} ]]; then
+        _lp_manual_title=$1
+    else
+        unset _lp_manual_title
+    fi
 }
 
 ###################
 # CURRENT TIME    #
 ###################
 
-# LP_TIME is set colored, with a space on the right side
-if (( LP_ENABLE_TIME )); then
-    if (( LP_TIME_ANALOG )); then
-        typeset -i _LP_CLOCK_PREV=-1
-        # The targeted unicode characters are the "CLOCK FACE" ones
-        # They are located in the codepages between:
-        #     U+1F550 (ONE OCLOCK) and U+1F55B (TWELVE OCLOCK), for the plain hours
-        #     U+1F55C (ONE-THIRTY) and U+1F567 (TWELVE-THIRTY), for the thirties
-        # Generated with:
-        # perl -C -E 'say join("", map {chr(0x1F550+$_)." ".chr(0x1F55C+$_)." "} 0..11)'
-        _LP_CLOCK=(🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🕛 🕧 )
+# The targeted unicode characters are the "CLOCK FACE" ones
+# They are located in the codepages between:
+#     U+1F550 (ONE OCLOCK) and U+1F55B (TWELVE OCLOCK), for the plain hours
+#     U+1F55C (ONE-THIRTY) and U+1F567 (TWELVE-THIRTY), for the thirties
+# Generated with:
+# perl -C -E 'say join("", map {chr(0x1F550+$_)." ".chr(0x1F55C+$_)." "} 0..11)'
+_LP_CLOCK=(🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🕛 🕧 )
 
-        _lp_time()
-        {
-            # %I: "00".."12"  %M: "00".."59"
-            # Bash interprets a '0' prefix as octal
-            # so we have to clean that
-            local hhmm="$(date "+hh=%I mm=%M")"
-            # hh:  1..12  mm: 0..59
-            local -i hh mm clock
-            eval ${hhmm//=0/=}  # Line split for zsh
-            # clock: 0 .. 25
-            #   1:00..1:14 -> 0
-            #   1:15..1:44 -> 1
-            #   1:45..2:15 -> 2
-            #   ...
-            #   12:15..12:44 -> 23
-            #   12:45..12:59 -> 0
-            if (( ( clock=((hh*60+mm-45)/30)%24 ) != _LP_CLOCK_PREV )); then
-                # There is a space just after the clock char because the glyph
-                # width is twice usual glyphs
-                LP_TIME="${LP_COLOR_TIME}${_LP_CLOCK[clock+_LP_FIRST_INDEX]} ${NO_COL} "
-                _LP_CLOCK_PREV=clock
-            fi
-        }
-    else
-        # Never changes
-        LP_TIME="${LP_COLOR_TIME}${_LP_TIME_SYMBOL}${NO_COL} "
-        _lp_time() { : ; }
-    fi
-else
-    LP_TIME=""
-    _lp_time() { : ; }
-fi
+_lp_analog_time() {
+    (( LP_ENABLE_TIME && LP_TIME_ANALOG )) || return 2
 
+    # %I: "00".."12"  %M: "00".."59"
+    # hh:  1..12  mm: 0..59
+    local hh mm
+    IFS=' ' read hh mm <<<"$(date '+%I %M')"
 
-########################
-# Construct the prompt #
-########################
+    # Bash interprets a '0' prefix as octal
+    # so we have to clean that
+    hh="${hh#0}"
+    mm="${mm#0}"
 
+    # clock: 0 .. 25
+    #   1:00..1:14 -> 0
+    #   1:15..1:44 -> 1
+    #   1:45..2:15 -> 2
+    #   ...
+    #   12:15..12:44 -> 23
+    #   12:45..12:59 -> 0
+    # There is a space just after the clock char because the glyph
+    # width is twice usual glyphs
+    lp_analog_time="${_LP_CLOCK[((hh*60+mm-45)/30)%24+_LP_FIRST_INDEX]} "
+}
 
-_lp_set_prompt()
-{
-    # Display the return value of the last command, if different from zero
-    # As this get the last returned code, it should be called first
-    local -i err=$?
-    if (( err != 0 )); then
-        LP_ERR=" $LP_COLOR_ERR$err$NO_COL"
+_lp_analog_time_color() {
+    _lp_analog_time || return "$?"
+
+    lp_analog_time_color="${LP_COLOR_TIME}${lp_analog_time}${NO_COL}"
+}
+
+_lp_time() {
+    (( LP_ENABLE_TIME && ! LP_TIME_ANALOG )) || return 2
+
+    lp_time=${_LP_TIME_SYMBOL}
+}
+
+_lp_time_color() {
+    _lp_time || return "$?"
+
+    lp_time_color="${LP_COLOR_TIME}${_LP_TIME_SYMBOL}${NO_COL}"
+}
+
+#################
+# Default theme #
+#################
+
+_lp_default_theme_activate() {
+    # Default value for LP_PERM when LP_ENABLE_PERM is 0
+    LP_PERM=${LP_MARK_PERM}   # without color
+
+    _lp_user
+    local -i user_type="$?"
+
+    if (( user_type < 2 )); then  # if user is not root
+        if (( LP_ENABLE_SUDO )); then
+            LP_COLOR_MARK_NO_SUDO="$LP_COLOR_MARK"
+        fi
+    else # root!
+        if (( ! LP_ENABLE_VCS_ROOT )); then
+            LP_MARK_DISABLED="$LP_MARK_DEFAULT"
+        fi
+    fi
+
+    # The user or connection type is not expected to change from inside the
+    # shell, so we build this just once.
+    if _lp_username_color; then
+        LP_USER="$lp_username_color"
     else
-        LP_ERR=''     # Hidden
+        LP_USER=
     fi
 
-    # Reset IFS to its default value to avoid strange behaviors
-    # (in case the user is playing with the value at the prompt)
-    local IFS="$_LP_IFS"
-    local GREP_OPTIONS=
+    _lp_hostname_color
+    LP_HOST="$lp_hostname_color"
 
-    # bash: execute the old prompt hook
-    eval "$LP_OLD_PROMPT_COMMAND"
+    # If we are running in a terminal multiplexer, brackets are colored
+    if _lp_multiplexer; then
+        LP_BRACKET_OPEN="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_OPEN}${NO_COL}"
+        LP_BRACKET_CLOSE="${LP_COLOR_IN_MULTIPLEXER}${LP_MARK_BRACKET_CLOSE}${NO_COL}"
+    else
+        LP_BRACKET_OPEN="${LP_MARK_BRACKET_OPEN}"
+        LP_BRACKET_CLOSE="${LP_MARK_BRACKET_CLOSE}"
+    fi
 
-    # left of main prompt: space at right
-    LP_JOBS="$(_lp_sr "$(_lp_jobcount_color)")"
-    LP_TEMP="$(_lp_sr "$(_lp_temperature)")"
-    LP_LOAD="$(_lp_sr "$(_lp_load_color)")"
-    LP_BATT="$(_lp_sr "$(_lp_battery_color)")"
-    _lp_time
-    _lp_sudo_check
+    _lp_terminal_device
+    LP_TTYN=$lp_terminal_device
 
-    # in main prompt: no space
-    if [[ "$LP_ENABLE_PROXY,${http_proxy-}" = 1,?* ]]; then
-        LP_PROXY="$LP_COLOR_PROXY$LP_MARK_PROXY$NO_COL"
+    if _lp_time_color; then
+        LP_TIME="${lp_time_color} "
     else
-        LP_PROXY=
+        LP_TIME=
     fi
+}
 
-    # Display the current Python virtual environment, if available
-    if [[ "$LP_ENABLE_VIRTUALENV,${VIRTUAL_ENV-}${CONDA_DEFAULT_ENV-}" = 1,?* ]]; then
-        if [[ -n "${VIRTUAL_ENV-}" ]]; then
-            LP_VENV=" [${LP_COLOR_VIRTUALENV}${VIRTUAL_ENV##*/}${NO_COL}]"
+_lp_default_theme_directory() {
+    # LP_PERM: shows a ":"
+    # - colored in green if user has write permission on the current dir
+    # - colored in red if not
+    # - can set another symbol with LP_MARK_PERM
+    if (( LP_ENABLE_PERM )); then
+        if [[ -w "${PWD}" ]]; then
+            LP_PERM="${LP_COLOR_WRITE}${LP_MARK_PERM}${NO_COL}"
         else
-            LP_VENV=" [${LP_COLOR_VIRTUALENV}${CONDA_DEFAULT_ENV##*/}${NO_COL}]"
+            LP_PERM="${LP_COLOR_NOWRITE}${LP_MARK_PERM}${NO_COL}"
         fi
-    else
-        LP_VENV=
     fi
 
-    # Display the current software collections enabled, if available
-    if [[ "$LP_ENABLE_SCLS,${X_SCLS-}" = 1,?* ]]; then
-        LP_SCLS=" [${LP_COLOR_VIRTUALENV}${X_SCLS%"${X_SCLS##*[![:space:]]}"}${NO_COL}]"
+    local lp_path lp_path_format
+    _lp_path_format "$LP_COLOR_PATH" "$LP_COLOR_PATH_LAST_DIR" "$LP_COLOR_PATH_VCS_ROOT" "$LP_COLOR_PATH_SHORTENED" "/" "$LP_COLOR_PATH_SEPARATOR"
+
+    LP_PWD="${lp_path_format}${NO_COL}"
+}
+
+_lp_default_theme_prompt_data() {
+    # left of main prompt: space at right
+    if _lp_jobcount_color; then
+        LP_JOBS="$lp_jobcount_color "
     else
-        LP_SCLS=
+        LP_JOBS=
+    fi
+    if _lp_temperature_color; then
+        LP_TEMP="$lp_temperature_color "
+    else
+        LP_TEMP=
+    fi
+    if _lp_load_color; then
+        LP_LOAD="$lp_load_color "
+    else
+        LP_LOAD=
+    fi
+    if _lp_battery_color; then
+        LP_BATT="$lp_battery_color "
+    else
+        LP_BATT=
     fi
 
-    LP_RUNTIME=$(_lp_sl "$(_lp_runtime)")
+    if _lp_analog_time_color; then
+        LP_TIME="$lp_analog_time_color "
+    fi
 
-    # if change of working directory
-    if [[ "${LP_OLD_PWD-}" != "LP:$PWD" ]]; then
-        # Update directory icon for MacOS X
-        $_LP_TERM_UPDATE_DIR
+    if _lp_sudo_active_color; then
+        LP_COLOR_MARK="$lp_sudo_active_color"
+    fi
 
-        LP_VCS=""
-        LP_VCS_TYPE=""
-        # LP_HOST is a global set at load time
-
-        # LP_PERM: shows a ":"
-        # - colored in green if user has write permission on the current dir
-        # - colored in red if not
-        if (( LP_ENABLE_PERM )); then
-            if [[ -w "${PWD}" ]]; then
-                LP_PERM="${LP_COLOR_WRITE}:${NO_COL}"
-            else
-                LP_PERM="${LP_COLOR_NOWRITE}:${NO_COL}"
-            fi
-        fi
+    if _lp_dirstack_color; then
+        LP_DIRSTACK=" $lp_dirstack_color"
+    else
+        LP_DIRSTACK=
+    fi
 
-        _lp_shorten_path   # set LP_PWD
+    # in main prompt: no space
+    if _lp_http_proxy_color; then
+        LP_PROXY="$lp_http_proxy_color"
+    else
+        LP_PROXY=
+    fi
 
-        if _lp_are_vcs_enabled; then
-            LP_VCS="$(_lp_git_branch_color)"
-            LP_VCS_TYPE="git"
-            if [[ -n "$LP_VCS" ]]; then
-                # If this is a vcsh repository
-                if [[ -n "${VCSH_DIRECTORY-}" ]]; then
-                    LP_VCS_TYPE="git-vcsh"
-                fi
-                # If this is a git-svn repository
-                if [[ -d "$(\git rev-parse --git-dir 2>/dev/null)/svn" ]]; then
-                    LP_VCS_TYPE="git-svn"
-                fi # git-svn
-            else
-                LP_VCS="$(_lp_hg_branch_color)"
-                LP_VCS_TYPE="hg"
-                if [[ -z "$LP_VCS" ]]; then
-                    LP_VCS="$(_lp_svn_branch_color)"
-                    LP_VCS_TYPE="svn"
-                    if [[ -z "$LP_VCS" ]]; then
-                        LP_VCS="$(_lp_fossil_branch_color)"
-                        LP_VCS_TYPE="fossil"
-                        if [[ -z "$LP_VCS" ]]; then
-                            LP_VCS="$(_lp_bzr_branch_color)"
-                            LP_VCS_TYPE="bzr"
-                            if [[ -z "$LP_VCS" ]]; then
-                                LP_VCS=""
-                                LP_VCS_TYPE=""
-                            fi # nothing
-                        fi # bzr
-                    fi # fossil
-                fi # svn
-            fi # hg
-
-        else # if this vcs rep is disabled
-            LP_VCS="" # not necessary, but more readable
-            LP_VCS_TYPE="disabled"
-        fi
+    if _lp_python_env_color; then
+        LP_VENV=" $lp_python_env_color"
+    else
+        LP_VENV=
+    fi
 
-        if [[ -z "$LP_VCS_TYPE" ]]; then
-            LP_VCS=""
-        else
-            LP_VCS="$(_lp_sl "${LP_VCS}")"
-        fi
+    if _lp_software_collections_color; then
+        LP_SCLS=" $lp_software_collections_color"
+    else
+        LP_SCLS=
+    fi
 
-        # end of the prompt line: double spaces
-        LP_MARK="$(_lp_sr "$(_lp_smart_mark $LP_VCS_TYPE)")"
+    if _lp_runtime_color; then
+        LP_RUNTIME=" $lp_runtime_color"
+    else
+        LP_RUNTIME=
+    fi
 
-        LP_OLD_PWD="LP:$PWD"
+    if _lp_error_color; then
+        LP_ERR=" $lp_error_color"
+    else
+        LP_ERR=
+    fi
 
-    # if do not change of working directory but...
-    elif [[ -n "$LP_VCS_TYPE" ]]; then # we are still in a VCS dir
-        case "$LP_VCS_TYPE" in
-            # git, git-svn
-            git*)    LP_VCS="$(_lp_sl "$(_lp_git_branch_color)")";;
-            hg)      LP_VCS="$(_lp_sl "$(_lp_hg_branch_color)")";;
-            svn)     LP_VCS="$(_lp_sl "$(_lp_svn_branch_color)")";;
-            fossil)  LP_VCS="$(_lp_sl "$(_lp_fossil_branch_color)")";;
-            bzr)     LP_VCS="$(_lp_sl "$(_lp_bzr_branch_color)")";;
-            disabled)LP_VCS="";;
-        esac
+    if _lp_find_vcs && _lp_vcs_details_color; then
+        LP_VCS=" $lp_vcs_details_color"
+    else
+        LP_VCS=
     fi
 
+    _lp_smart_mark
+    LP_MARK="${lp_smart_mark}${NO_COL} "
+}
+
+_lp_default_theme_prompt_template() {
     if [[ -f "${LP_PS1_FILE-}" ]]; then
         source "$LP_PS1_FILE"
     fi
 
-    if [[ -z "$LP_PS1" ]]; then
+    if [[ -z "${LP_PS1-}" ]]; then
         # add title escape time, jobs, load and battery
         PS1="${LP_PS1_PREFIX}${LP_TIME}${LP_BATT}${LP_LOAD}${LP_TEMP}${LP_JOBS}"
         # add user, host and permissions colon
         PS1+="${LP_BRACKET_OPEN}${LP_USER}${LP_HOST}${LP_PERM}"
 
-        PS1+="${LP_PWD}${LP_BRACKET_CLOSE}${LP_SCLS}${LP_VENV}${LP_PROXY}"
+        PS1+="${LP_PWD}${LP_DIRSTACK}${LP_BRACKET_CLOSE}${LP_SCLS}${LP_VENV}${LP_PROXY}"
 
         # Add VCS infos
         # If root, the info has not been collected unless LP_ENABLE_VCS_ROOT
@@ -1837,12 +2748,8 @@ _lp_set_prompt()
         # add return code and prompt mark
         PS1+="${LP_RUNTIME}${LP_ERR}${LP_MARK_PREFIX}${LP_COLOR_MARK}${LP_MARK}${LP_PS1_POSTFIX}"
 
-        # "invisible" parts
         # Get the current prompt on the fly and make it a title
-        LP_TITLE="$(_lp_title "$PS1")"
-
-        # Insert it in the prompt
-        PS1="${LP_TITLE}${PS1}"
+        _lp_formatted_title "$PS1"
 
         # Glue the bash prompt always go to the first column.
         # Avoid glitches after interrupting a command with Ctrl-C
@@ -1853,27 +2760,77 @@ _lp_set_prompt()
     fi
 }
 
-prompt_tag()
-{
-    export LP_PS1_PREFIX="$(_lp_sr "$1")"
+_lp_default_theme_prompt() {
+    _lp_default_theme_prompt_data
+    _lp_default_theme_prompt_template
+}
+
+########################
+# Construct the prompt #
+########################
+
+__lp_set_prompt() {
+    # Display the return value of the last command, if different from zero
+    # As this get the last returned code, it should be called first
+    local -i lp_error="$?"
+
+    #TODO: unused?
+    local GREP_OPTIONS=
+
+    # bash: execute the old prompt hook
+    eval "$LP_OLD_PROMPT_COMMAND"
+
+    if (( LP_ENABLE_RUNTIME_BELL && ${_LP_RUNTIME_SECONDS-0} >= LP_RUNTIME_BELL_THRESHOLD )); then
+        printf '%s' "$_LP_TI_BELL"
+    fi
+
+    # Localize cache data variables
+    local _lp_git_diff_shortstat_uncommitted _lp_git_diff_shortstat_unstaged _lp_git_diff_shortstat_staged
+
+    # if change of working directory
+    if [[ "${LP_OLD_PWD-}" != "LP:$PWD" ]]; then
+        # Update directory icon for MacOS X
+        "$_LP_TERM_UPDATE_DIR"
+
+        "$_LP_THEME_DIRECTORY_FUNCTION"
+
+        # Prefix with 'LP:' to prevent Zsh with AUTO_NAME_DIRS enabled using
+        # this var as a name for the working directory, that will be used by
+        # the '%' and related prompt sequences.
+        # See https://github.com/nojhan/liquidprompt/issues/124 for details.
+        LP_OLD_PWD="LP:$PWD"
+    fi
+
+    "$_LP_THEME_PROMPT_FUNCTION"
+
+    if (( LP_ENABLE_TITLE )); then
+        PS1="${_LP_OPEN_ESC}${LP_TITLE_OPEN}${_lp_manual_title:-${_lp_generated_title-${SHELL-}}}${LP_TITLE_CLOSE}${_LP_CLOSE_ESC}${PS1}"
+    fi
+}
+
+prompt_tag() {
+    if [[ -n "${1-}" ]]; then
+        export LP_PS1_PREFIX="$1 "
+    else
+        export LP_PS1_PREFIX=
+    fi
 }
 
 # Activate Liquid Prompt
-prompt_on()
-{
+prompt_on() {
     # Reset so all PWD dependent variables are computed after loading
     LP_OLD_PWD=""
 
     # if Liquid Prompt has not been already set
     if [[ -z "${LP_OLD_PS1-}" ]]; then
         LP_OLD_PS1="$PS1"
-        if $_LP_SHELL_bash; then
-            LP_OLD_PROMPT_COMMAND="$PROMPT_COMMAND"
+        if (( _LP_SHELL_bash )); then
+            LP_OLD_PROMPT_COMMAND="${PROMPT_COMMAND-}"
             _LP_OLD_SHOPT="$(shopt -p promptvars)"
         else # zsh
             LP_OLD_PROMPT_COMMAND=""
             _LP_ZSH_PROMPT_THEME=""
-            if [[ -n "$prompt_theme" && "$prompt_theme" != off ]]; then
+            if [[ -n "${prompt_theme-}" && "$prompt_theme" != off ]]; then
                 _LP_ZSH_PROMPT_THEME="$prompt_theme"
                 # Disable the prompt to disable its precmd hook
                 prompt off
@@ -1883,20 +2840,30 @@ prompt_on()
             for o in promptpercent promptbang promptsubst
             do
                 if [[ "${options[$o]}" = on ]]; then
-                    _LP_OLD_SETOPT+=$o
+                    _LP_OLD_SETOPT+=("$o")
                 else
-                    _LP_OLD_SETOPT+=no$o
+                    _LP_OLD_SETOPT+=("no$o")
                 fi
             done
         fi
     fi
-    if $_LP_SHELL_bash; then
+    if (( _LP_SHELL_bash )); then
+        # Prevent some cases where the user shoots in his own foot.
+        # PROMPT_COMMAND is not exported by default, but some users
+        # incorrectly export it from their profile/bashrc (GitHub #450),
+        # so we preventively UNexport it.
+        # TODO: warn the user if it was exported
+        if (( ${BASH_VERSINFO[0]:-0} > 4 || ( ${BASH_VERSINFO[0]:-0} == 4 && ${BASH_VERSINFO[1]:-0} >= 2 ) )); then
+            # -g is only available since bash 4.2
+            declare -g +x PROMPT_COMMAND
+        fi
+
         # Disable parameter/command expansion from PS1
         shopt -u promptvars
-        PROMPT_COMMAND=_lp_set_prompt
+        PROMPT_COMMAND=__lp_set_prompt
         (( LP_DEBUG_TIME )) && PROMPT_COMMAND="time $PROMPT_COMMAND" || true
     else # zsh
-        [[ -n "$_LP_ZSH_HOOK" ]] && add-zsh-hook -d precmd $_LP_ZSH_HOOK
+        [[ -n "${_LP_ZSH_HOOK-}" ]] && add-zsh-hook -d precmd "$_LP_ZSH_HOOK"
         # Set options that affect PS1 evaluation
         # Disable parameter/command expansion; enable percent expansion
         setopt promptpercent nopromptbang nopromptsubst
@@ -1904,44 +2871,83 @@ prompt_on()
         #if (( LP_DEBUG_TIME )); then
         #    _lp_main_precmd() {
         #        local TIMEFMT='Liquid Prompt build time: %*E'
-        #        time _lp_set_prompt
+        #        time __lp_set_prompt
         #    }
         #    _LP_ZSH_HOOK=_lp_main_precmd
         #else
-            _LP_ZSH_HOOK=_lp_set_prompt
+            _LP_ZSH_HOOK=__lp_set_prompt
         #fi
-        add-zsh-hook precmd $_LP_ZSH_HOOK
+        add-zsh-hook precmd "$_LP_ZSH_HOOK"
     fi
 }
 
 # Come back to the old prompt
-prompt_off()
-{
+prompt_off() {
     PS1=$LP_OLD_PS1
-    if $_LP_SHELL_bash; then
+    if (( _LP_SHELL_bash )); then
         eval "$_LP_OLD_SHOPT"
         PROMPT_COMMAND="$LP_OLD_PROMPT_COMMAND"
     else # zsh
-        add-zsh-hook -d precmd $_LP_ZSH_HOOK
-        setopt ${_LP_OLD_SETOPT}
-        (( ${#_LP_ZSH_PROMPT_THEME} )) && prompt $_LP_ZSH_PROMPT_THEME
+        add-zsh-hook -d precmd "$_LP_ZSH_HOOK"
+        setopt "${_LP_OLD_SETOPT[@]}"
+        (( ${#_LP_ZSH_PROMPT_THEME} )) && prompt "$_LP_ZSH_PROMPT_THEME"
     fi
 }
 
 # Use an empty prompt: just the \$ mark
-prompt_OFF()
-{
+prompt_OFF() {
     PS1="$_LP_MARK_SYMBOL "
-    if $_LP_SHELL_bash; then
+    if (( _LP_SHELL_bash )); then
         shopt -u promptvars
         PROMPT_COMMAND="$LP_OLD_PROMPT_COMMAND"
     else # zsh
-        add-zsh-hook -d precmd $_LP_ZSH_HOOK
+        add-zsh-hook -d precmd "$_LP_ZSH_HOOK"
         setopt promptpercent nopromptbang nopromptsubst
     fi
 }
 
+lp_theme() {
+    local theme="${1-}"
+
+    if [[ $theme == '--list' ]]; then
+        local -a lp_theme_list
+        __lp_theme_list
+        printf '%s\n' "${lp_theme_list[@]}"
+        return
+    fi
+
+    local f_prompt="_lp_${theme}_theme_prompt" f_dir="_lp_${theme}_theme_directory" f_activate="_lp_${theme}_theme_activate"
+
+    if [[ -z $theme ]]; then
+        printf '%s\n%s\n' \
+            'Must pass in the name of a theme. If you meant the default Liquidprompt theme, try "default".' \
+            'Run "lp_theme --list" to see all loaded and available themes.' 2>&1
+        return 1
+    fi
+
+    if ! __lp_is_function "$f_prompt"; then
+        printf 'Loading theme "%s" failed: cannot find function "%s". Please source the theme file first.\n' \
+            "$theme" "$f_prompt" 2>&1
+        return 2
+    fi
+    if ! __lp_is_function "$f_dir"; then
+        f_dir=":"
+    fi
+    if ! __lp_is_function "$f_activate"; then
+        f_activate=":"
+    fi
+
+    _LP_THEME_ACTIVATE_FUNCTION=$f_activate
+    _LP_THEME_DIRECTORY_FUNCTION=$f_dir
+    _LP_THEME_PROMPT_FUNCTION=$f_prompt
+
+    "$f_activate"
+    prompt_on
+}
+
 # By default, sourcing liquidprompt will activate Liquid Prompt
-prompt_on
+if [ "${1-}" != "--no-activate" ]; then
+    lp_activate
+fi
 
 # vim: set et sts=4 sw=4 tw=120 ft=sh:
diff -pruN 1.11-3/liquidpromptrc-dist 2.0.3-1/liquidpromptrc-dist
--- 1.11-3/liquidpromptrc-dist	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/liquidpromptrc-dist	2021-05-30 15:33:14.000000000 +0000
@@ -3,6 +3,10 @@
 # LIQUID PROMPT CONFIGURATION FILE #
 ####################################
 
+# This example config file does not contain all possible config options, nor
+# does it have detailed option descriptions. See the documentation for that:
+# https://liquidprompt.readthedocs.io/en/stable/config.html
+
 # If you want to use different themes and features,
 # you can load the corresponding files here:
 #source ~/.config/liquidprompt/nojhan.theme
@@ -12,110 +16,136 @@
 # BEHAVIOUR #
 #############
 
-# Maximal value under which the battery level is displayed
+# Display the battery level in more urgent color when the level is below this threshold.
 # Recommended value is 75
 LP_BATTERY_THRESHOLD=75
 
-# Minimal value after which the load average is displayed
-# Recommended value is 60
-LP_LOAD_THRESHOLD=60
+# Display the load average over the past minute when above this threshold.
+# This value is scaled per CPU, so on a quad-core machine, the load average
+# would need to be 2.40 or greater to be displayed.
+# Recommended value is 0.60
+LP_LOAD_THRESHOLD=0.60
 
-# Minimal value after which the temperature is displayed (in degrees Celsius)
+# Display the temperature when the temperate is above this threshold (in
+# degrees Celsius).
 # Recommended value is 60
 LP_TEMP_THRESHOLD=60
 
-# The maximum percentage of the screen width used to display the path
+# Use the shorten path feature if the path is too long to fit in the prompt
+# line.
+# Recommended value is 1
+LP_ENABLE_SHORTEN_PATH=1
+
+# The maximum percentage of the screen width used to display the path before
+# removing the center portion of the path and replacing with '...'.
 # Recommended value is 35
 LP_PATH_LENGTH=35
 
-# How many directories to keep at the beginning of a shortened path
+# The number of directories (including '/') to keep at the beginning of a
+# shortened path.
 # Recommended value is 2
 LP_PATH_KEEP=2
 
-# Do you want to display the hostname, even if not connected through network?
+# Determine if the hostname should always be displayed, even if not connecting
+# through network.
 # Defaults to 0 (do not display hostname when locally connected)
 # set to 1 if you want to always see the hostname
 # set to -1 if you want to never see the hostname
 LP_HOSTNAME_ALWAYS=0
 
-# Use the FQDN instead of the short hostname if the hostname is displayed
+# Use the fully qualified domain name (FQDN) instead of the short hostname when
+# the hostname is displayed
 LP_ENABLE_FQDN=0
 
-# Do you want to display the user, even if the user is the same as the one logged in?
-# Defaults to 1 (always display the user)
-# set to 0 if you want to hide the logged user (it will always display different users)
+# When to display the user name:
+# 1: always display the user name
+# 0: hide the logged user (always display different users)
+# -1: never display the user name
+# Default value is 1
 LP_USER_ALWAYS=1
 
-# Do you want to display the percentages of load/batteries along with their
-# corresponding marks? Set to 0 to only print the colored marks.
+# Display the actual values of load/batteries along with their
+# corresponding marks. Set to 0 to only print the colored marks.
 # Defaults to 1 (display percentages)
 LP_PERCENTS_ALWAYS=1
 
-# Do you want to use the permissions feature?
+# Use the permissions feature and display a red ':' before the prompt to show
+# when you don't have write permission to the current directory.
 # Recommended value is 1
 LP_ENABLE_PERM=1
 
-# Do you want to use the shorten path feature?
-# Recommended value is 1
-LP_ENABLE_SHORTEN_PATH=1
-
-# Do you want to use the proxy detection feature?
+# Enable the proxy detection feature.
 # Recommended value is 1
 LP_ENABLE_PROXY=1
 
-# Do you want to use the jobs feature?
+# Enable the jobs feature.
 # Recommended value is 1
 LP_ENABLE_JOBS=1
 
-# Do you want to use the load feature?
+# Enable the detached sessions feature.
+# Default value is 1
+LP_ENABLE_DETACHED_SESSIONS=1
+
+# Enable the load feature.
 # Recommended value is 1
 LP_ENABLE_LOAD=1
 
-# Do you want to use the battery feature?
+# Enable the battery feature.
 # Recommended value is 1
 LP_ENABLE_BATT=1
 
-# Do you want to use the 'sudo credentials' feature?
+# Enable the 'sudo credentials' feature.
 # Be warned that this may pollute the syslog if you don't have sudo
-# credentials, and the sysadmin will hate you.
+# credentials, and the sysadmin might hate you.
 LP_ENABLE_SUDO=0
 
-# Do you want to use VCS features with the root account?
+# Enable the directory stack support.
+LP_ENABLE_DIRSTACK=0
+
+# Enable the VCS features with the root account.
 # Recommended value is 0
 LP_ENABLE_VCS_ROOT=0
 
-# Do you want to use the Git special features?
+# Enable the Git special features.
 # Recommended value is 1
 LP_ENABLE_GIT=1
 
-# Do you want to use the Subversion special features?
+# Enable the Subversion special features.
 # Recommended value is 1
 LP_ENABLE_SVN=1
 
-# Do you want to use the Mercurial special features?
+# Enable the Mercurial special features.
 # Recommended value is 1
 LP_ENABLE_HG=1
 
-# Do you want to use the Fossil special features?
+# Enable the Fossil special features.
 # Recommended value is 1
 LP_ENABLE_FOSSIL=1
 
-# Do you want to use the Bazaar special features?
+# Enable the Bazaar special features.
 # Recommanded value is 1
 LP_ENABLE_BZR=1
 
-# Show time of the last prompt display
-# Recommended value is 0
+# Show time of when the current prompt was displayed.
 LP_ENABLE_TIME=0
 
-# Show runtime of the last command if over LP_RUNTIME_THRESHOLD
+# Show runtime of the previous command if over LP_RUNTIME_THRESHOLD
 # Recommended value is 0
 LP_ENABLE_RUNTIME=0
 
-# Minimal runtime to be displayed
+# Minimal runtime (in seconds) before the runtime will be displayed
 # Recommended value is 2
 LP_RUNTIME_THRESHOLD=2
 
+# Ring the terminal bell if the runtime of the previous command exceeded
+# LP_RUNTIME_BELL_THRESHOLD
+# Recommended value is 0
+LP_ENABLE_RUNTIME_BELL=0
+
+# Minimal runtime (in seconds) before the terminal bell will be rung.
+# Recommended value is 10
+LP_RUNTIME_BELL_THRESHOLD=10
+
 # Display the virtualenv that is currently activated, if any
 # Recommended value is 1
 LP_ENABLE_VIRTUALENV=1
@@ -124,32 +154,35 @@ LP_ENABLE_VIRTUALENV=1
 # Recommended value is 1
 LP_ENABLE_SCLS=1
 
-# Show average system temperature
+# Show highest system temperature
 LP_ENABLE_TEMP=1
 
-# When showing time, use an analog clock instead of numeric values.
-# The analog clock is "accurate" to the nearest half hour.
-# You must have a unicode-capable terminal and a font with the "CLOCK"
-# characters.
+# When showing the time, use an analog clock instead of numeric values.
 # Recommended value is 0
 LP_TIME_ANALOG=0
 
 # Use the prompt as the title of the terminal window
-# The content is not customizable, the implementation is very basic,
-# and this may not work properly on exotic terminals, thus the
-# recommended value is 0
-# See LP_TITLE_OPEN and LP_TITLE_CLOSE to change escape characters to adapt this
-# feature to your specific terminal.
+# Recommended value is 0
 LP_ENABLE_TITLE=0
 
-# Enable Title for screen and byobu
+# Enable Title for screen, byobu, and tmux
 LP_ENABLE_SCREEN_TITLE=0
 
-# Use differents colors for differents hosts you SSH in
+# Use different colors for the different hosts you SSH to
 LP_ENABLE_SSH_COLORS=0
 
-# Specify a list of complete and colon (":") separated paths in which, all vcs
-# will be disabled
-LP_DISABLED_VCS_PATH=""
+# Show the error code of the last command if it was not 0
+LP_ENABLE_ERROR=1
+
+# Specify an array of absolute paths in which all vcs will be disabled.
+# Ex: ("/root" "/home/me/large-remove-svn-repo")
+LP_DISABLED_VCS_PATHS=()
+
+# Use a local liquidpromptrc if it exists.
+# Can be helpful if you sync your primary config across machines, or if
+# there's a system-wide config at /etc/liquidpromptrc from which you'd
+# like to make only minor deviations.
+#LOCAL_RCFILE=$HOME/.liquidpromptrc.local
+#[ -f "$LOCAL_RCFILE" ] && source "$LOCAL_RCFILE"
 
 # vim: set et sts=4 sw=4 tw=120 ft=sh:
diff -pruN 1.11-3/liquid.ps1 2.0.3-1/liquid.ps1
--- 1.11-3/liquid.ps1	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/liquid.ps1	2021-05-30 15:33:14.000000000 +0000
@@ -1,53 +1,29 @@
 
 #######################################
-# LIQUID PROMPT DEFAULT TEMPLATE FILE #
+# LIQUID PROMPT EXAMPLE TEMPLATE FILE #
 #######################################
 
-# Available features:
-# LP_BATT battery
-# LP_LOAD load
-# LP_JOBS screen sessions/running jobs/suspended jobs
-# LP_USER user
-# LP_HOST hostname
-# LP_PERM a colon ":"
-# LP_PWD current working directory
-# LP_VENV Python virtual environment
-# LP_PROXY HTTP proxy
-# LP_VCS the content of the current repository
-# LP_ERR last error code
-# LP_MARK prompt mark
-# LP_TIME current time
-# LP_TTYN number of current terminal (useful in title for quick switching)
-# LP_RUNTIME runtime of last command
-# LP_MARK_PREFIX user-defined prompt mark prefix (helpful if you want 2-line prompts)
-# LP_PS1_PREFIX user-defined general-purpose prefix (default set a generic prompt as the window title)
-# LP_PS1_POSTFIX user-defined general-purpose postfix
-# LP_BRACKET_OPEN open bracket
-# LP_BRACKET_CLOSE close bracket
+# This file is not updated with new template sections. This is an example of
+# how to make a template, not what can go in one.
+# Available sections can be found in the documentation:
+# https://liquidprompt.readthedocs.io/en/stable/theme/default.html#templates
 
-# Remember that most features come with their corresponding colors,
-# see the README.
+# Remember that most features come with their corresponding colors.
 
 # add time, jobs, load and battery
-LP_PS1="${LP_PS1_PREFIX}${LP_TIME}${LP_BATT}${LP_LOAD}${LP_JOBS}"
+LP_PS1="${LP_PS1_PREFIX}${LP_TIME}${LP_BATT}${LP_LOAD}${LP_TEMP}${LP_JOBS}"
 # add user, host and permissions colon
-LP_PS1="${LP_PS1}${LP_BRACKET_OPEN}${LP_USER}${LP_HOST}${LP_PERM}"
+LP_PS1+="${LP_BRACKET_OPEN}${LP_USER}${LP_HOST}${LP_PERM}"
 
-LP_PS1="${LP_PS1}${LP_PWD}${LP_BRACKET_CLOSE}${LP_VENV}${LP_PROXY}"
+LP_PS1+="${LP_PWD}${LP_BRACKET_CLOSE}${LP_SCLS}${LP_VENV}${LP_PROXY}"
 
 # Add VCS infos
-# If root, the info has not been collected unless LP_ENABLE_VCS_ROOT
-# is set.
-LP_PS1="${LP_PS1}${LP_VCS}"
+LP_PS1+="${LP_VCS}"
 
 # add return code and prompt mark
-LP_PS1="${LP_PS1}${LP_RUNTIME}${LP_ERR}${LP_MARK_PREFIX}${LP_MARK}${LP_PS1_POSTFIX}"
+LP_PS1+="${LP_RUNTIME}${LP_ERR}${LP_MARK_PREFIX}${LP_COLOR_MARK}${LP_MARK}${LP_PS1_POSTFIX}"
 
-# "invisible" parts
 # Get the current prompt on the fly and make it a title
-LP_TITLE="$(_lp_title "$LP_PS1")"
-
-# Insert it in the prompt
-LP_PS1="${LP_TITLE}${LP_PS1}"
+_lp_formatted_title "$LP_PS1"
 
 # vim: set et sts=4 sw=4 tw=120 ft=sh:
diff -pruN 1.11-3/liquid.theme 2.0.3-1/liquid.theme
--- 1.11-3/liquid.theme	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/liquid.theme	2021-05-30 15:33:14.000000000 +0000
@@ -23,6 +23,7 @@ if [[ "$(locale -k LC_CTYPE | sed -n 's/
     LP_MARK_UNTRACKED="*"      # if git has untracked files
     LP_MARK_STASH="+"          # if git has stashs
     LP_MARK_SHORTEN_PATH=" … " # prompt mark in shortened paths
+    LP_MARK_PERM=":"           # separator between host and path
 else
     # If charset is anything else, fallback to ASCII chars
     LP_MARK_BATTERY="b"
@@ -38,6 +39,7 @@ else
     LP_MARK_UNTRACKED="*"
     LP_MARK_STASH="+"
     LP_MARK_SHORTEN_PATH=" ... "
+    LP_MARK_PERM=":"
 fi
 
 LP_MARK_BRACKET_OPEN="["  # open bracket
diff -pruN 1.11-3/.mailmap 2.0.3-1/.mailmap
--- 1.11-3/.mailmap	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/.mailmap	2021-05-30 15:33:14.000000000 +0000
@@ -1,8 +1,8 @@
 nojhan <nojhan@nojhan.net> <johann.dreo@thalesgroup.com>
 nojhan <nojhan@nojhan.net> <nojhan@gmail.com>
 Alexander Belaev (alexbel) <alexbel@lavabit.com>
-Alex Prengere <alexprengere@gmail.com> <alex.prengere@amadeus.com>
-Alex Prengere <alexprengere@gmail.com> Alex <alexprengere@gmail.com>
+Alex Prengère <alexprengere@gmail.com> <alex.prengere@amadeus.com>
+Alex Prengère <alexprengere@gmail.com>
 Aurélien Requiem <aurelien@requiem.fr> <aurelien.requiem@loadedtech.com.au>
 Aurélien Requiem <aurelien@requiem.fr>
 Clément Mathieu <clement@unportant.info>
@@ -11,7 +11,6 @@ François Schmidts (jaesivsm) <francois.
 François Schmidts (jaesivsm) <francois.schmidts@gmail.com> <fschmidts@olfeo.com>
 François Schmidts (jaesivsm) <francois.schmidts@gmail.com> <jaesivsm>
 Frédéric Lepied <flepied@gmail.com>
-Étienne Deparis <etienne@depar.is>
 Étienne Deparis <etienne@depar.is> <etienne.deparis@umaneti.net>
 Felix Chern (dryman) <idryman@gmail.com>
 Jean-Sébastien Leroy <jean.sebastien.leroy@gmail.com>
@@ -24,10 +23,8 @@ Matthew Micene (nzwulfin) <nzwulfin@gmai
 Nicolas Lacourte <nicolas@dotinfra.fr>
 Olivier Dupuis <oj.dupuis@gmail.com>
 Ying Li (cyli) <cyli@twistedmatrix.com>
-Poil <poil@quake.fr> M.Poil <?@?>
-Poil <poil@quake.fr> Poil <?@?>
+Poil <poil@quake.fr> <?@?>
 Thomas Debesse <thomas.debesse@gmail.com>
 Rolf Morel (polyphemus) <rolfmorel@gmail.com>
 Wilson Maravilha (algaerhythm) <algaerhythm@gmail.com>
-Yannack <yannack@gmail.com>
 Brad Beyenhof <bbeyenhof@gmail.com> <bbeyenhof@icloud.com>
diff -pruN 1.11-3/pmset-simulator 2.0.3-1/pmset-simulator
--- 1.11-3/pmset-simulator	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/pmset-simulator	1970-01-01 00:00:00.000000000 +0000
@@ -1,48 +0,0 @@
-
-# Simulator for "pmset -g batt" for testing the implementation of
-# battery display on MacOS X
-
-pmset()
-{
-	case "$pmset_sim" in
-	iMac|no-battery)
-		# https://github.com/nojhan/liquidprompt/issues/315
-		cat <<EOF
-Now drawing from 'AC Power'
-EOF
-		;;
-	attached)
-		# https://github.com/nojhan/liquidprompt/issues/326#issuecomment-66120495
-		cat <<'EOF'
-Now drawing from 'AC Power'
- -InternalBattery-0	37%; AC attached; not charging
-EOF
-		;;
-	charging)
-		# https://github.com/nojhan/liquidprompt/issues/326
-		cat <<'EOF'
-Now drawing from 'AC Power'
- -InternalBattery-0	8%; charging; 2:46 remaining
-EOF
-		;;
-	discharging)
-		# https://github.com/nojhan/liquidprompt/issues/326
-		cat <<'EOF'
-Now drawing from 'Battery Power'
- -InternalBattery-0	9%; discharging; (no estimate)
-EOF
-		;;
-	warning-Early)
-		# https://github.com/nojhan/liquidprompt/issues/326
-		cat <<'EOF'
-Now drawing from 'Battery Power'
- -InternalBattery-0	7%; discharging; 0:13 remaining
-    Battery Warning: Early
-EOF
-		;;
-	*)
-		echo "unsupported '$pmset_sim' pmset simulation"
-		;;
-	esac
-}
-
diff -pruN 1.11-3/README.md 2.0.3-1/README.md
--- 1.11-3/README.md	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/README.md	2021-05-30 15:33:14.000000000 +0000
@@ -1,6 +1,9 @@
 Liquid Prompt — a useful adaptive prompt for Bash & zsh
 =======================================================
 
+![Tests](https://github.com/nojhan/liquidprompt/workflows/tests/badge.svg)
+[![Documentation Status](https://readthedocs.org/projects/liquidprompt/badge/?version=stable)](https://liquidprompt.readthedocs.io/)
+
 Liquid Prompt gives you a nicely displayed prompt with useful information
 when you need it. It shows you what you need when you need it.
 You will notice what changes *when* it changes, saving time and frustration.
@@ -9,358 +12,38 @@ You can even use it with your favorite s
 ![Screenshot](https://raw.github.com/nojhan/liquidprompt/master/demo.png)
 
 
-## Features
-
-If there is nothing special about the current context, the appearance of Liquid
-Prompt is similar to that of a default prompt:
+## Documentation
 
-`[user:~] $ `
+See the [Liquidprompt documentation](https://liquidprompt.readthedocs.io/) for
+details on installing and configuring Liquidprompt.
 
-If you are running a background command and are also in the "myb" branch
-of a Git repository on a server:
-
-`1r [user@server:~/liquidprompt] myb ± `
-
-When Liquid Prompt is displaying everything (a rare event!), it may look like this:
-
-`code 🕤  ⌁24% ⌂42% 3d/2&/1z [user@server:~/ … /code/liquidprompt][pyenv]↥ master(+10/-5,3)*+ 125 ± `
-
-Here is an overview of what Liquid Prompt is capable of displaying:
-
-* a tag associated to the current shell session (you can easily add any
-  prefix tag to your prompt by invoking `prompt_tag MYTAG`)
-* the current time, displayed as either numeric values or as an analog clock
-* the current battery status:
-  * a green `⏚` if charging, above the given threshold, but not charged
-  * a yellow `⏚` if charging and under the given threshold
-  * a yellow `⌁` if discharging but above the given threshold
-  * a red `⌁` if discharging and under the given threshold
-* the remaining battery power if it is under the given threshold, displayed with
-  an increasingly red color map as remaining power decreases
-* the average of the processors load if it is over a given limit, displayed with
-  an intensity color map as load increases
-* the average temperature of the available system sensors (generally CPU and MB)
-* the number of detached sessions (`screen` or `tmux`)
-* the number of attached sleeping jobs (when you interrupt a command with Ctrl-Z
-  and bring it back with `fg`)
-* the number of attached running jobs (commands started with a `&`)
-* a pair of square brackets, in blue if your current shell is running in a
-  terminal multiplexer (`screen` or `tmux`)
-* the current user, in bold yellow if it is root and in light white if it is not
-  the same as the login user
-* a green `@` if the connection has X11 support; a yellow one if not
-* the current host – in bold red if you are connected via a `telnet` connection
-  and blue (or other unique colors) if connected via SSH
-* a green colon if the user has write permissions in the current directory and
-  a red one if not
-* the current directory in bold, shortened if it takes too much space while always
-  preserving the first two directory names
-* the current Python virtual environment
-* an up arrow if an HTTP proxy is in use
-* the name of the current branch if you are in a version control repository
-  (Git, Mercurial, Subversion, Bazaar, or Fossil):
-  * in green if everything is up-to-date
-  * in red if there are changes
-  * in yellow if there are pending commits to push
-* the number of added/deleted lines if changes have been made and the
-  number of pending commits
-* a yellow `+` if there are stashed modifications
-* a red `*` if there are untracked files in the repository
-* the runtime of the last command, if it has exceeded a certain threshold
-* the error code of the last command, if it has failed in some way
-* a smart mark at the end of the prompt:
-  * `±` for Git
-  * `☿` for Mercurial
-  * `‡` for Subversion
-  * `‡±` for Git-Subversion
-  * `⌘` for Fossil
-  * `$` or `%` for a simple user
-  * a red `#` for the root user
-* if desired, the prompt will be replicated in your terminal window's
-  title (without the colors)
-
-You can temporarily deactivate Liquid Prompt and revert to your previous prompt
-by typing `prompt_off`. Use `prompt_on` to bring it back. You can disable
-*all* prompts and simply use a single mark sign (`$ ` for user and `# ` for root)
-by using the `prompt_OFF` command.
-
-
-## Test Drive and Installation
-
-Installation is simple. The basic dependencies are standard Unix utilities/commands.
-If you experience some problems during the installation, please check that they
-are met; see the [dependencies](#dependencies) section for what you need specifically.
-
-Follow these steps:
-
-    cd
-    git clone https://github.com/nojhan/liquidprompt.git
-    source liquidprompt/liquidprompt
-
-To use it every time you start a shell, add the following lines to your
-`.bashrc` (if you use Bash) or `.zshrc` (if you use zsh):
-
-    # Only load Liquid Prompt in interactive shells, not from a script or from scp
-    [[ $- = *i* ]] && source ~/liquidprompt/liquidprompt
-
-Next up is the configuration; you can skip this step if you like the defaults:
-
-    cp ~/liquidprompt/liquidpromptrc-dist ~/.config/liquidpromptrc
-
-You can also copy the file to `~/.liquidpromptrc`.
-Use your favorite text editor to change the defaults.
-The `liquidpromptrc` file is richly commented and easy to set your own defaults.
-You can even theme Liquid Prompt and use a custom PS1 prompt. This is explained
-in the sections below.
-
-Check in your `.bashrc` that the `PROMPT_COMMAND` variable is not set, or else
-the prompt will not be available.
-
-### Installation via Antigen
-
-To install via antigen, simply add the following line in your `.zshrc` after activating antigen:
-
-    antigen bundle nojhan/liquidprompt
-
-
-## Dependencies
-
-Apart from obvious ones, some features depend on specific commands. If you do
-not install them, the corresponding feature will not be available, but no error
-will be displayed.
-
-* Battery status requires `acpi` on GNU/Linux.
-* Temperature status requires `acpi` or `lm-sensors` on GNU/Linux.
-* Detached session status looks for `screen` and/or `tmux`.
-* VCS support features require `git`, `hg`, `svn`, `bzr` or `fossil`, but you
-  probably already knew that.
-
-For other features, the script uses commands that should be available on a large
-variety of Unix systems: `tput`, `grep`, `awk`, `sed`, `ps`, `who`, and `expr`.
-
-
-## Feature Configuration
-
-You can configure some variables in the `~/.config/liquidpromptrc` file:
-
-* `LP_BATTERY_THRESHOLD`, the maximal value under which the battery level is displayed
-* `LP_LOAD_THRESHOLD`, the minimal value after which the load average is displayed
-* `LP_TEMP_THRESHOLD`, the minimal value after which the average temperature is displayed
-* `LP_RUNTIME_THRESHOLD`, the minimal value after which the runtime is displayed
-* `LP_PATH_LENGTH`, the maximum percentage of the screen width used to display the path
-* `LP_PATH_KEEP`, how many directories to keep at the beginning of a shortened path
-* `LP_HOSTNAME_ALWAYS`, a choice between always displaying the hostname or
-  showing it only when connected via a remote shell
-* `LP_USER_ALWAYS`, a choice between always displaying the user or showing
-  it only when he is different from the one that logged in
-
-You can also force some features to be disabled, to save some time in the
-prompt-building process:
-
-* `LP_ENABLE_PERM`, if you want to detect if the directory is writeable
-* `LP_ENABLE_SHORTEN_PATH`, if you want to shorten the path display
-* `LP_ENABLE_PROXY`, if you want to detect if a proxy is used
-* `LP_ENABLE_JOBS`, if you want to have jobs information
-* `LP_ENABLE_LOAD`, if you want to have load information
-* `LP_ENABLE_BATT`, if you want to have battery information
-* `LP_ENABLE_GIT`, if you want to have Git information
-* `LP_ENABLE_SVN`, if you want to have Subversion information
-* `LP_ENABLE_HG`, if you want to have Mercurial information
-* `LP_ENABLE_BZR`, if you want to have Bazaar information
-* `LP_ENABLE_FOSSIL`, if you want to have Fossil information
-* `LP_ENABLE_VCS_ROOT`, if you want to show VCS informations with root account
-* `LP_ENABLE_TITLE`, if you want to use the prompt as your terminal window's title
-* `LP_ENABLE_SCREEN_TITLE`, if you want to use the prompt as your screen window's title
-* `LP_ENABLE_SSH_COLORS`, if you want different colors for hosts you SSH into
-* `LP_ENABLE_RUNTIME`, if you want to display the runtime of the last command
-* `LP_ENABLE_SUDO`, if you want the prompt mark to change color while you have password-less root access
-* `LP_ENABLE_FQDN`, if you want the display of the fully qualified domain name
-* `LP_ENABLE_TIME`, if you want to display the time at which the prompt was shown
-* `LP_TIME_ANALOG`, if you want to show the time using an analog clock instead of numeric values
-
-Note that if required commands are not installed, enabling the corresponding
-feature will have no effect. Also, all the `LP_ENABLE_…` variables override the
-templates; i.e. if you use `$LP_BATT` in your template and you set `LP_ENABLE_BATT=0`
-in your configuration file, your prompt will not have any battery information.
-
-If you are using Bash and want to use the `PROMPT_DIRTRIM` built-in
-functionality to shorten but still want to have Liquid Prompt calculating the
-number of directories to keep in the path, precise a value for `PROMPT_DIRTRIM`
-before sourcing Liquid Prompt and it will override this value with one fitting
-the width of your terminal.
-
-You may face performances decrease when using VCS located in remote directories.
-To avoid this, you can set the `LP_DISABLED_VCS_PATH` variable to a list of
-absolute colon-separated paths where VCS-related features should be disabled.
-
-
-## Customizing the Prompt
-
-### Adding a Prefix/Postfix
-
-You can prefix the `LP_PS1` variable with anything you want using
-`LP_PS1_PREFIX`. The following example activate a custom window's title:
-
-    LP_PS1_PREFIX="\[\e]0;\u@\h: \w\a\]"
-
-To postfix the prompt, use the `LP_PS1_POSTFIX` variable. For example, to add a
-newline and a single character:
-
-    LP_PS1_POSTFIX="\n>"
-
-Note: the `prompt_tag` function is a convenient way to add a prefix. You can use
-it to add a keyword to each of your different terminals:
-
-    [:~/code/liquidprompt] develop ± prompt_tag mycode
-    mycode [:~/code/liquidprompt] develop ±
-
-
-### Rearranging the Prompt
-
-You can sort what you want to see by sourcing your favorite template file
-(`*.ps1`) in the configuration file.
-
-You can start from the `liquid.ps1` file, which show the default settings.
-To use your own configuration, just set `LP_PS1_FILE` to your own file path in
-your `~/.liquidpromptrc` and you're done.
-
-Those scripts basically export the `LP_PS1` variable, by appending features and
-theme colors.
-
-Available features:
-* `LP_BATT` battery
-* `LP_LOAD` load
-* `LP_TEMP` temperature
-* `LP_JOBS` detached `screen` or `tmux` sessions/running jobs/suspended jobs
-* `LP_USER` user
-* `LP_HOST` hostname
-* `LP_PERM` a colon (`:`)
-* `LP_PWD` current working directory
-* `LP_PROXY` HTTP proxy
-* `LP_VCS` informations concerning the current working repository
-* `LP_ERR` last error code
-* `LP_MARK` prompt mark
-* `LP_TITLE` the prompt as a window's title escaped sequences
-*  LP_TTYN  the terminal basename
-* `LP_BRACKET_OPEN` and `LP_BRACKET_CLOSE`, brackets enclosing the user+path part
-
-For example, if you just want to have a prompt displaying the user and the
-host, with a normal full path in blue and Git support only:
-
-    export LP_PS1=`echo -ne "[\${LP_USER}\${LP_HOST}:\${BLUE}\$(pwd)\${NO_COL}] \${LP_GIT} \\\$ "`
-
-Note that you need to properly escape dollar signs in a string that will be
-interpreted by Bash at each prompt.
-
-To erase your new formatting, just bind `LP_PS1` to a null string:
-
-    export LP_PS1=""
-
-
-## Themes
-
-You can change the colors and special characters of some parts of Liquid Prompt
-by sourcing your favorite theme file (`*.theme`) in the configuration file. See
-[`liquid.theme`](liquid.theme) for an example of the default Liquid Prompt theme.
-
-### Colors
-
-The available colours available for use are:
-
-`BOLD`, `BLACK`, `BOLD_GRAY`, `WHITE`, `BOLD_WHITE`, `GREEN`, `BOLD_GREEN`,
-`YELLOW`, `BOLD_YELLOW`, `BLUE`, `BOLD_BLUE`, `PINK`, `CYAN`, `BOLD_CYAN,`,
-`RED`, `BOLD_RED`, `WARN_RED`, `CRIT_RED`, `DANGER_RED`, and `NO_COL`.
-
-Set the variable to a null string (`""`) if you do not want color.
-
-* Current working directory
-    * `LP_COLOR_PATH` as normal user
-    * `LP_COLOR_PATH_ROOT` as root
-* Color of the proxy mark
-    * `LP_COLOR_PROXY`
-* Jobs count
-    * `LP_COLOR_JOB_D` Detached (`screen` / `tmux` sessions without attached clients)
-    * `LP_COLOR_JOB_R` Running (`xterm &`)
-    * `LP_COLOR_JOB_Z` Sleeping (Ctrl-Z)
-    * `LP_COLOR_IN_MULTIPLEXER` currently running in a terminal multiplexer
-* Last error code
-    * `LP_COLOR_ERR`
-* Prompt mark
-    * `LP_COLOR_MARK` as user
-    * `LP_COLOR_MARK_ROOT` as root
-    * `LP_COLOR_MARK_SUDO` when you did `sudo` and your credentials are still cached (use `sudo -K` to revoke them)
-    * `LP_MARK_PREFIX="\n"` put the prompt on the second line
-* Current user
-    * `LP_COLOR_USER_LOGGED` user who logged in
-    * `LP_COLOR_USER_ALT` user but not the one who logged in
-    * `LP_COLOR_USER_ROOT` root
-* Hostname
-    * `LP_COLOR_HOST` local host
-    * `LP_COLOR_SSH` connected via SSH
-    * `LP_COLOR_TELNET` connected via `telnet`
-    * `LP_COLOR_X11_ON` connected with X11 support
-    * `LP_COLOR_X11_OFF` connected without X11 support
-* Separation mark (by default, the colon before the path)
-    * `LP_COLOR_WRITE` have write permission
-    * `LP_COLOR_NOWRITE` do not have write permission
-* VCS
-    * `LP_COLOR_UP` repository is up-to-date / a push has been made
-    * `LP_COLOR_COMMITS` some commits have not been pushed
-    * `LP_COLOR_CHANGES` there are some changes to commit
-    * `LP_COLOR_DIFF` number of lines or files impacted by current changes
-* Battery
-    * `LP_COLOR_CHARGING_ABOVE` charging and above threshold
-    * `LP_COLOR_CHARGING_UNDER` charging but under threshold
-    * `LP_COLOR_DISCHARGING_ABOVE` discharging but above threshold
-    * `LP_COLOR_DISCHARGING_UNDER` discharging and under threshold
-
-
-### Special Characters
-
-* `LP_MARK_DEFAULT` (default: "") the mark you want at the end of your prompt
-  (leave empty to use your shell's default mark)
-* `LP_MARK_BATTERY` (default: "⌁") in front of the battery charge
-* `LP_MARK_ADAPTER` (default: "⏚") displayed when plugged-in
-* `LP_MARK_LOAD` (default: "⌂") in front of the load
-* `LP_MARK_PROXY` (default: "↥") indicate a proxy in use
-* `LP_MARK_HG` (default: "☿") prompt mark in Mercurial repositories
-* `LP_MARK_SVN` (default: "‡") prompt mark in Subversion repositories
-* `LP_MARK_GIT` (default: "±") prompt mark in Git repositories
-* `LP_MARK_FOSSIL` (default: "⌘") prompt mark in Fossil repositories
-* `LP_MARK_BZR` (default: "⚯") prompt mark in Bazaar repositories
-* `LP_MARK_DISABLED` (default: "⌀") prompt mark in disabled repositories
-  (see `LP_DISABLED_VCS_PATH`)
-* `LP_MARK_UNTRACKED` (default: "\*") if Git has untracked files
-* `LP_MARK_STASH` (default: "+") if Git has stashed modifications
-* `LP_MARK_BRACKET_OPEN` (default: "[") marks around the main part of the prompt
-* `LP_MARK_BRACKET_CLOSE` (default: "]") marks around the main part of the prompt
-* `LP_TITLE_OPEN` (default: "\e]0;") escape character opening a window's title
-* `LP_TITLE_CLOSE` (default: "\a") escape character closing a window's title
 
-
-## Known Limitations and Bugs
+## License
 
 Liquid Prompt is distributed under the [GNU Affero General Public License
 version 3](LICENSE).
 
+
+## Known Limitations and Bugs
+
 * Does not display the number of commits to be pushed in Mercurial repositories.
 * Browsing very large Subversion repositories may dramatically slow down
-  the display of Liquid Prompt (use `LP_DISABLED_VCS_PATH` to avoid that).
+  the display of Liquid Prompt (use `LP_DISABLED_VCS_PATHS` to avoid that).
 * Subversion repositories cannot display commits to be pushed because
   that's not how Subversion works
-* The proxy detection only uses the `$http_proxy` environment variable.
 * The window's title escape sequence may not work properly on some terminals
   (like `xterm-256`).
 * The analog clock requires a Unicode-aware terminal and at least a
   sufficiently complete font on your system. The [Symbola](http://users.teilar.gr/~g1951d/)
   font, designed by Georges Douros, is known to work well. On Debian or Ubuntu
   install try the `fonts-symbola` or `ttf-ancient-fonts` package.
+* The "sudo" feature is disabled by default as there is no way to detect
+  if the user has sudo rights without triggering a security alert
+  that will annoy the sysadmin.
 
 
 ## Authors
 
-Current Maintainer: [![endorse](https://api.coderwall.com/dolmen/endorsecount.png)](https://coderwall.com/dolmen)
-
-Original Author: [![endorse](https://api.coderwall.com/nojhan/endorsecount.png)](https://coderwall.com/nojhan)
+Current Maintainer: [Rycieos](https://github.com/Rycieos)
 
-And many contributors!
+And many [contributors](CONTRIBUTORS.md)!
diff -pruN 1.11-3/.readthedocs.yml 2.0.3-1/.readthedocs.yml
--- 1.11-3/.readthedocs.yml	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/.readthedocs.yml	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,16 @@
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+version: 2
+
+sphinx:
+  configuration: docs/conf.py
+
+formats:
+  - htmlzip
+  - pdf
+
+python:
+  version: 3
+  install:
+    - requirements: docs/requirements.txt
diff -pruN 1.11-3/tests/.gitignore 2.0.3-1/tests/.gitignore
--- 1.11-3/tests/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/.gitignore	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1 @@
+shunit2
diff -pruN 1.11-3/tests/test_acpi.sh 2.0.3-1/tests/test_acpi.sh
--- 1.11-3/tests/test_acpi.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_acpi.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,111 @@
+
+# Error on unset variables
+set -u
+
+# Load Linux version of _lp_battery()
+uname() { printf 'Linux'; }
+
+. ../liquidprompt --no-activate
+unset -f uname
+
+LP_ENABLE_BATT=1
+
+typeset -a battery_outputs battery_statuses battery_values temp_outputs temp_values
+
+# Add test cases to these arrays like below
+
+# Linux 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux Debian 10 (buster)
+battery_outputs+=(
+""
+)
+battery_statuses+=(4)
+battery_values+=("")
+temp_outputs+=(
+"Thermal 0: ok, 23.0 degrees C"
+)
+temp_values+=(23)
+
+# Unknown
+battery_outputs+=(
+"Battery 0: Discharging, 55%, 01:39:34 remaining"
+)
+battery_statuses+=(0)
+battery_values+=(55)
+temp_outputs+=(
+"Thermal 0: ok, -267.8 degrees C"
+)
+temp_values+=(-267)
+
+# VPS at OVH
+temp_outputs+=(
+""
+)
+temp_values+=("")
+
+function test_acpi_battery {
+
+  acpi() {
+    printf '%s\n' "$__battery_output"
+  }
+
+  for (( index=0; index < ${#battery_values[@]}; index++ )); do
+    __battery_output=${battery_outputs[$index]}
+
+    LP_BATTERY_THRESHOLD=100
+    _lp_battery
+    assertEquals "ACPI battery below returns at index ${index}" "${battery_statuses[$index]}" "$?"
+    assertEquals "ACPI battery value at index ${index}" "${battery_values[$index]}" "$lp_battery"
+
+    _status=${battery_statuses[$index]}
+    (( _status < 4 )) && _status=$(( _status + 1 ))
+
+    LP_BATTERY_THRESHOLD=0
+    _lp_battery
+    assertEquals "ACPI battery above returns at index ${index}" "$_status" "$?"
+    assertEquals "ACPI battery value at index ${index}" "${battery_values[$index]}" "$lp_battery"
+  done
+}
+
+function test_acpi_temperature {
+
+  LP_ENABLE_TEMP=1
+  LP_TEMP_THRESHOLD=-1000000
+
+  acpi() {
+    printf '%s\n' "$__temp_output"
+  }
+
+  local valid
+
+  for (( index=0; index < ${#temp_values[@]}; index++ )); do
+    __temp_output=${temp_outputs[$index]}
+    unset lp_temperature
+    __lp_temp_acpi
+    assertEquals "ACPI temperature output at index ${index}" "${temp_values[$index]}" "${lp_temperature-}"
+
+    if [[ -n ${temp_values[$index]} ]]; then
+      valid=0
+    else
+      valid=1
+    fi
+
+    __lp_temp_detect acpi
+    assertEquals "ACPI temperature detect at index ${index}" "$valid" "$?"
+
+    # Set the temp function in case the above detect said it was invalid.
+    # While we should never be in this situation, might as well make sure
+    # it doesn't crash.
+    _LP_TEMP_FUNCTION=__lp_temp_acpi
+    unset lp_temperature
+    _lp_temperature
+    assertEquals "ACPI temperature return at index ${index}" "$valid" "$?"
+    assertEquals "ACPI temperature return output at index ${index}" "${temp_values[$index]}" "${lp_temperature-}"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_connection.sh 2.0.3-1/tests/test_connection.sh
--- 1.11-3/tests/test_connection.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_connection.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,95 @@
+
+# Error on unset variables
+set -u
+
+. ../liquidprompt --no-activate
+
+typeset -a who_outputs ps_outputs values
+
+# Add test cases to these arrays like below
+
+# Linux 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 GNU/Linux CentOS Linux release 8.2.2004 (Core)
+who_outputs+=(
+"user     pts/0        Dec 17 11:06 (192.168.1.7)"
+)
+ps_outputs+=(
+"bash"
+)
+values+=(tel)
+
+# Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
+who_outputs+=(
+"user.lastname ttys135      Dec 21 19:08"
+)
+ps_outputs+=(
+"-bash"
+)
+values+=(lcl)
+
+# Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64 i386 Macmini7,1 Darwin
+who_outputs+=(
+"usernames ttys000      Dec 21 19:12 (fe80::12:a1b2:a123:fb84%en0)"
+)
+ps_outputs+=(
+"-bash"
+)
+values+=(tel)
+
+# Linux 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 GNU/Linux Ubuntu 20.04.1 LTS
+who_outputs+=(
+"usernam  pts/1        Dec 21 19:16 (2600:8801:9600:b64:9966:24a:dc6f:41fd)"
+)
+ps_outputs+=(
+"bash"
+)
+values+=(tel)
+
+# Linux 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 GNU/Linux Ubuntu 20.04.1 LTS
+who_outputs+=(
+""
+)
+ps_outputs+=(
+"bash"
+)
+values+=(lcl)
+
+# Linux 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 GNU/Linux Debian 9.13 (stretch)
+who_outputs+=(
+"user     pts/75       Dec 22 10:39 (10.0.0.117)"
+)
+ps_outputs+=(
+"bash"
+)
+values+=(tel)
+
+
+function test_connection {
+
+  who() {
+    printf '%s\n' "$__who_output"
+  }
+  ps() {
+    printf '%s\n' "$__ps_output"
+  }
+
+  for (( index=0; index < ${#values[@]}; index++ )); do
+    __who_output=${who_outputs[$index]}
+    __ps_output=${ps_outputs[$index]}
+    local SSH_CLIENT= SSH2_CLIENT= SSH_TTY=
+
+    _lp_connection
+    assertEquals "Connection output at index ${index}" "${values[$index]}" "$lp_connection"
+
+    SSH_CLIENT=foo
+    _lp_connection
+    assertEquals "Connection output at index ${index} with ssh" "ssh" "$lp_connection"
+    unset SSH_CLIENT
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_cpu_sysctl.sh 2.0.3-1/tests/test_cpu_sysctl.sh
--- 1.11-3/tests/test_cpu_sysctl.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_cpu_sysctl.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,58 @@
+
+# Error on unset variables
+set -u
+
+# Load MacOS version of CPU functions
+uname() { printf 'Darwin'; }
+
+. ../liquidprompt --no-activate
+
+typeset -a ncpu_outputs ncpu_values loadavg_outputs loadavg_values
+
+# Add test cases to these arrays like below
+
+# Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
+ncpu_outputs+=(
+"12"
+)
+ncpu_values+=(12)
+loadavg_outputs+=(
+"{ 2.38 2.82 4.17 }"
+)
+loadavg_values+=("2.38")
+
+
+function test_sysctl_hw_ncpu {
+
+  sysctl() {
+    printf '%s\n' "$__ncpu_output"
+  }
+
+  for (( index=0; index < ${#ncpu_values[@]}; index++ )); do
+    __ncpu_output=${ncpu_outputs[$index]}
+
+    __lp_cpu_count
+    assertEquals "CPU count at index ${index}" "${ncpu_values[$index]}" "$_lp_CPUNUM"
+  done
+}
+
+function test_sysctl_vm_loadavg {
+
+  sysctl() {
+    printf '%s\n' "$__loadavg_output"
+  }
+
+  for (( index=0; index < ${#loadavg_values[@]}; index++ )); do
+    __loadavg_output=${loadavg_outputs[$index]}
+
+    _lp_cpu_load
+    assertEquals "CPU load at index ${index}" "${loadavg_values[$index]}" "$lp_cpu_load"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_detached_sessions.sh 2.0.3-1/tests/test_detached_sessions.sh
--- 1.11-3/tests/test_detached_sessions.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_detached_sessions.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,108 @@
+
+# Error on unset variables
+set -u
+
+. ../liquidprompt --no-activate
+
+LP_ENABLE_DETACHED_SESSIONS=1
+_LP_ENABLE_SCREEN=1
+_LP_ENABLE_TMUX=1
+
+typeset -a screen_outputs screen_values tmux_outputs tmux_values
+
+# Add test cases to these arrays like below
+
+# Linux 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 GNU/Linux CentOS Linux release 8.2.2004 (Core)
+# Trailing "" are needed to prevent Git from converting \r\n into \n
+screen_outputs+=(
+"No Sockets found in /run/screen/S-user.
+""
+"
+)
+screen_values+=(0)
+screen_outputs+=(
+"There is a screen on:""
+	2261393.pts-1.server	(Detached)
+1 Socket in /run/screen/S-user.""
+"
+)
+screen_values+=(1)
+tmux_outputs+=(
+""
+)
+tmux_values+=(0)
+tmux_outputs+=(
+"0: 1 windows (created Thu Dec 17 15:19:13 2020) [179x96]
+"
+)
+tmux_values+=(1)
+
+# Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
+screen_outputs+=(
+"This room is empty (/var/folders/x3/gk96bn856xv__mnm_h8xnjqw0000gn/T/.screen).
+""
+"
+)
+screen_values+=(0)
+
+# Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64 i386 Macmini7,1 Darwin
+screen_outputs+=(
+"No Sockets found in /var/folders/s1/y_2wmcg90gl9x54bq2p4t9980000gn/T/.screen.
+""
+"
+)
+screen_values+=(0)
+
+# Linux 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 GNU/Linux Ubuntu 20.04.1 LTS
+screen_outputs+=(
+"There is a screen on:""
+	840.irssi	(12/12/20 09:49:29)	(Detached)
+1 Socket in /run/screen/S-usernam.""
+"
+)
+screen_values+=(1)
+
+# Linux 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 GNU/Linux Debian 9.13 (stretch)
+screen_outputs+=(
+"There is a screen on:""
+	30133.pts-6.hostnam	(08/03/20 09:10:09)	(Attached)
+1 Socket in /run/screen/S-user.""
+"
+)
+screen_values+=(0)
+
+
+function test_screen_sessions {
+
+  screen() {
+    printf '%s' "$__screen_output"
+  }
+  tmux() { : ; }
+
+  for (( index=0; index < ${#screen_values[@]}; index++ )); do
+    __screen_output=${screen_outputs[$index]}
+    _lp_detached_sessions
+    assertEquals "Screen sessions output at index ${index}" "${screen_values[$index]}" "$lp_detached_sessions"
+  done
+}
+
+function test_tmux_sessions {
+
+  tmux() {
+    printf '%s' "$__tmux_output"
+  }
+  screen() { : ; }
+
+  for (( index=0; index < ${#tmux_values[@]}; index++ )); do
+    __tmux_output=${tmux_outputs[$index]}
+    _lp_detached_sessions
+    assertEquals "Tmux sessions output at index ${index}" "${tmux_values[$index]}" "$lp_detached_sessions"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_hostname_hash.sh 2.0.3-1/tests/test_hostname_hash.sh
--- 1.11-3/tests/test_hostname_hash.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_hostname_hash.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,43 @@
+
+# Error on unset variables
+set -u
+
+. ../liquidprompt --no-activate
+
+typeset -a host_cksum_outputs values
+
+# Add test cases to these arrays like below
+
+# Linux 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 GNU/Linux CentOS Linux release 8.2.2004 (Core)
+host_cksum_outputs+=(
+"4172267268 7"
+)
+values+=("4172267268")
+
+# Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
+host_cksum_outputs+=(
+"3020151712 13"
+)
+values+=("3020151712")
+
+
+function test_hostname_hash {
+
+  cksum() {
+    printf '%s\n' "$__host_cksum_output"
+  }
+
+  for (( index=0; index < ${#values[@]}; index++ )); do
+    __host_cksum_output=${host_cksum_outputs[$index]}
+
+    __lp_hostname_hash
+    assertEquals "Hostname cksum hash at index ${index}" "${values[$index]}" "$lp_hostname_hash"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_pmset.sh 2.0.3-1/tests/test_pmset.sh
--- 1.11-3/tests/test_pmset.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_pmset.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,111 @@
+
+# Error on unset variables
+set -u
+
+# Load MacOS version of _lp_battery()
+uname() { printf 'Darwin'; }
+
+. ../liquidprompt --no-activate
+unset -f uname
+
+LP_ENABLE_BATT=1
+
+typeset -a outputs statuses values
+
+# Simulated, originally from ./pmset-simulator
+# https://github.com/nojhan/liquidprompt/issues/315
+outputs+=(
+"Now drawing from 'AC Power'"
+)
+statuses+=(4)
+values+=('')
+# https://github.com/nojhan/liquidprompt/issues/326#issuecomment-66120495
+outputs+=(
+"Now drawing from 'AC Power'
+ -InternalBattery-0 37%; AC attached; not charging"
+)
+statuses+=(2)
+values+=(37)
+# https://github.com/nojhan/liquidprompt/issues/326
+outputs+=(
+"Now drawing from 'AC Power'
+ -InternalBattery-0 8%; charging; 2:46 remaining"
+)
+statuses+=(2)
+values+=(8)
+# https://github.com/nojhan/liquidprompt/issues/326
+outputs+=(
+"Now drawing from 'Battery Power'
+ -InternalBattery-0 9%; discharging; (no estimate)"
+)
+statuses+=(0)
+values+=(9)
+# https://github.com/nojhan/liquidprompt/issues/326
+outputs+=(
+"Now drawing from 'Battery Power'
+ -InternalBattery-0 7%; discharging; 0:13 remaining
+    Battery Warning: Early"
+)
+statuses+=(0)
+values+=(7)
+
+# Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64
+outputs+=(
+"Now drawing from 'AC Power'
+ -InternalBattery-0 (id=5701731)	100%; charged; 0:00 remaining present: true"
+)
+statuses+=(4)
+values+=(100)
+outputs+=(
+"Now drawing from 'Battery Power'
+ -InternalBattery-0 (id=5701731)	100%; discharging; 2:49 remaining present: true"
+)
+statuses+=(0)
+values+=(100)
+
+# Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
+outputs+=(
+"Now drawing from 'AC Power'
+ -InternalBattery-0 (id=4325475)	100%; charged; 0:00 remaining present: true"
+)
+statuses+=(4)
+values+=(100)
+
+# Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64 i386 Macmini7,1 Darwin
+outputs+=(
+"Now drawing from 'AC Power'"
+)
+statuses+=(4)
+values+=('')
+
+
+function test_pmset {
+
+  pmset() {
+    printf '%s\n' "$__output"
+  }
+
+  for (( index=0; index < ${#values[@]}; index++ )); do
+    __output=${outputs[$index]}
+
+    LP_BATTERY_THRESHOLD=100
+    _lp_battery
+    assertEquals "pmset battery below returns at index ${index}" "${statuses[$index]}" "$?"
+    assertEquals "pmset battery value at index ${index}" "${values[$index]}" "$lp_battery"
+
+    _status=${statuses[$index]}
+    (( _status < 4 )) && _status=$(( _status + 1 ))
+
+    LP_BATTERY_THRESHOLD=0
+    _lp_battery
+    assertEquals "pmset battery above returns at index ${index}" "$_status" "$?"
+    assertEquals "pmset battery value at index ${index}" "${values[$index]}" "$lp_battery"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_sensors.sh 2.0.3-1/tests/test_sensors.sh
--- 1.11-3/tests/test_sensors.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_sensors.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,284 @@
+
+# Error on unset variables
+set -u
+
+. ../liquidprompt --no-activate
+
+typeset -a outputs values
+
+# Add test cases to these arrays like below
+
+# No output
+outputs+=("")
+values+=("")
+
+# Linux 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 GNU/Linux CentOS Linux release 8.2.2004 (Core)
+outputs+=(
+"k10temp-pci-00c3
+Adapter: PCI adapter
+CPU:
+  temp1_input: 15.000
+  temp1_max: 70.000
+  temp1_crit: 75.000
+  temp1_crit_hyst: 74.000
+
+acpitz-virtual-0
+Adapter: Virtual device
+temp1:
+  temp1_input: 25.000
+  temp1_crit: 80.000
+
+radeon-pci-0008
+Adapter: PCI adapter
+temp1:
+  temp1_input: 12.000
+  temp1_crit: 120.000
+  temp1_crit_hyst: 90.000"
+)
+values+=(25)
+
+# Linux 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 GNU/Linux Ubuntu 20.04.1 LTS
+outputs+=(
+"ath10k_hwmon-pci-0200
+Adapter: PCI adapter
+temp1:
+  temp1_input: 47.000
+
+coretemp-isa-0000
+Adapter: ISA adapter
+Package id 0:
+  temp1_input: 68.000
+  temp1_max: 100.000
+  temp1_crit: 100.000
+  temp1_crit_alarm: 0.000
+Core 0:
+  temp2_input: 68.000
+  temp2_max: 100.000
+  temp2_crit: 100.000
+  temp2_crit_alarm: 0.000
+Core 1:
+  temp3_input: 67.000
+  temp3_max: 100.000
+  temp3_crit: 100.000
+  temp3_crit_alarm: 0.000
+Core 2:
+  temp4_input: 66.000
+  temp4_max: 100.000
+  temp4_crit: 100.000
+  temp4_crit_alarm: 0.000
+Core 3:
+  temp5_input: 65.000
+  temp5_max: 100.000
+  temp5_crit: 100.000
+  temp5_crit_alarm: 0.000
+
+BAT0-acpi-0
+Adapter: ACPI interface
+in0:
+  in0_input: 12.642
+curr1:
+  curr1_input: 0.001
+
+dell_smm-virtual-0
+Adapter: Virtual device
+fan1:
+  fan1_input: 4921.000
+fan2:
+  fan2_input: 4921.000
+
+pch_skylake-virtual-0
+Adapter: Virtual device
+temp1:
+  temp1_input: 55.500
+
+acpitz-acpi-0
+Adapter: ACPI interface
+temp1:
+  temp1_input: 25.000
+  temp1_crit: 107.000
+"
+)
+values+=(68)
+
+# Linux 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 GNU/Linux Debian 9.13 (stretch)
+outputs+=(
+"coretemp-isa-0000
+Adapter: ISA adapter
+Physical id 0:
+  temp1_input: 51.000
+  temp1_max: 74.000
+  temp1_crit: 94.000
+  temp1_crit_alarm: 0.000
+Core 0:
+  temp2_input: 46.000
+  temp2_max: 74.000
+  temp2_crit: 94.000
+  temp2_crit_alarm: 0.000
+Core 1:
+  temp3_input: 52.000
+  temp3_max: 74.000
+  temp3_crit: 94.000
+  temp3_crit_alarm: 0.000
+Core 2:
+  temp4_input: 48.000
+  temp4_max: 74.000
+  temp4_crit: 94.000
+  temp4_crit_alarm: 0.000
+Core 3:
+  temp5_input: 43.000
+  temp5_max: 74.000
+  temp5_crit: 94.000
+  temp5_crit_alarm: 0.000
+"
+)
+values+=(52)
+
+# Linux 4.9.78-xxxx-std-ipv6-64 #2 SMP Wed Jan 24 10:27:15 CET 2018 x86_64 GNU/Linux Debian 10 (buster)
+outputs+=(
+"coretemp-isa-0000
+Adapter: ISA adapter
+Core 0:
+  temp2_input: 48.000
+  temp2_crit: 100.000
+  temp2_crit_alarm: 0.000
+Core 1:
+  temp3_input: 47.000
+  temp3_crit: 100.000
+  temp3_crit_alarm: 0.000
+
+w83627dhg-isa-0290
+Adapter: ISA adapter
+Vcore:
+  in0_input: 1.032
+  in0_min: 0.000
+  in0_max: 1.744
+  in0_alarm: 0.000
+in1:
+  in1_input: 1.008
+  in1_min: 2.024
+  in1_max: 1.056
+  in1_alarm: 1.000
+AVCC:
+  in2_input: 3.376
+  in2_min: 2.976
+  in2_max: 3.632
+  in2_alarm: 0.000
++3.3V:
+  in3_input: 3.376
+  in3_min: 2.976
+  in3_max: 3.632
+  in3_alarm: 0.000
+in4:
+  in4_input: 1.016
+  in4_min: 1.240
+  in4_max: 0.232
+  in4_alarm: 1.000
+in5:
+  in5_input: 1.512
+  in5_min: 1.760
+  in5_max: 0.576
+  in5_alarm: 1.000
+in6:
+  in6_input: 1.080
+  in6_min: 0.664
+  in6_max: 0.048
+  in6_alarm: 1.000
+3VSB:
+  in7_input: 3.392
+  in7_min: 2.976
+  in7_max: 3.632
+  in7_alarm: 0.000
+Vbat:
+  in8_input: 3.264
+  in8_min: 2.704
+  in8_max: 3.632
+  in8_alarm: 0.000
+fan1:
+  fan1_input: 0.000
+  fan1_min: 10546.000
+  fan1_alarm: 1.000
+  fan1_div: 128.000
+fan2:
+  fan2_input: 0.000
+  fan2_min: 10546.000
+  fan2_alarm: 1.000
+  fan2_div: 128.000
+fan3:
+  fan3_input: 0.000
+  fan3_min: 10546.000
+  fan3_alarm: 1.000
+  fan3_div: 128.000
+fan4:
+  fan4_input: 0.000
+  fan4_min: 10546.000
+  fan4_alarm: 1.000
+  fan4_div: 128.000
+fan5:
+  fan5_input: 0.000
+  fan5_min: 10546.000
+  fan5_alarm: 1.000
+  fan5_div: 128.000
+temp1:
+  temp1_input: 44.000
+  temp1_max: 3.000
+  temp1_max_hyst: 64.000
+  temp1_alarm: 0.000
+  temp1_type: 1.000
+  temp1_offset: 0.000
+temp3:
+  temp3_input: 44.500
+  temp3_max: 80.000
+  temp3_max_hyst: 75.000
+  temp3_alarm: 0.000
+  temp3_type: 1.000
+  temp3_offset: 0.000
+cpu0_vid:
+  cpu0_vid: 0.000
+intrusion0:
+  intrusion0_alarm: 1.000
+"
+)
+values+=(48)
+
+
+function test_sensors {
+
+  LP_ENABLE_TEMP=1
+  LP_TEMP_THRESHOLD=-1000000
+
+  sensors() {
+    printf '%s\n' "$__output"
+  }
+
+  for (( index=0; index < ${#values[@]}; index++ )); do
+    __output=${outputs[$index]}
+    unset lp_temperature
+    __lp_temp_sensors
+    assertEquals "Sensors temperature output at index ${index}" "${values[$index]}" "${lp_temperature-}"
+
+    if [[ -n ${values[$index]} ]]; then
+      valid=0
+    else
+      valid=1
+    fi
+
+    __lp_temp_detect sensors
+    assertEquals "Sensors temperature detect at index ${index}" "$valid" "$?"
+
+    # Set the temp function in case the above detect said it was invalid.
+    # While we should never be in this situation, might as well make sure
+    # it doesn't crash.
+    _LP_TEMP_FUNCTION=__lp_temp_sensors
+    unset lp_temperature
+    _lp_temperature
+    assertEquals "Sensors temperature return at index ${index}" "$valid" "$?"
+    assertEquals "Sensors temperature return output at index ${index}" "${values[$index]}" "${lp_temperature-}"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_shell.sh 2.0.3-1/tests/test_shell.sh
--- 1.11-3/tests/test_shell.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_shell.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,501 @@
+
+# Error on unset variables
+set -u
+
+function test_test {
+  assertTrue "[[ form of test" '[[ 1 -eq 1 ]]'
+
+  assertTrue "[[ -n" '[[ -n foo ]]'
+  assertTrue "[[ -n quoted" '[[ -n "foo" ]]'
+  assertFalse "[[ -n empty quoted" '[[ -n "" ]]'
+
+  assertFalse "[[ -z" '[[ -z foo ]]'
+  assertFalse "[[ -z quoted" '[[ -z "foo" ]]'
+  assertTrue "[[ -z empty quoted" '[[ -z "" ]]'
+}
+
+function test_redirection {
+  assertTrue "Redirection stdout" 'echo foo >/dev/null'
+  assertEquals "Redirection stdout" "" "$(echo foo >/dev/null)"
+  assertTrue "Redirection stderr" 'echo foo 2>/dev/null'
+  assertEquals "Redirection stdout" "foo" "$(echo foo 2>/dev/null)"
+  assertTrue "Redirection stdout and stderr" 'echo foo >/dev/null 2>&1'
+  assertEquals "Redirection stdout and stderr" "" "$(echo foo >/dev/null 2>&1)"
+}
+
+function test_block {
+  assertTrue "Basic block return code" '{ : ; }'
+  assertFalse "Basic block return code" '{ false; }'
+  assertTrue "Basic block redirection" '{ echo foo; } >/dev/null'
+  assertEquals "Basic block redirection" "" "$({ echo foo; } >/dev/null)"
+}
+
+function test_case {
+  case abcd in
+    ab*)
+      assertTrue ${SHUNIT_TRUE}
+      ;;
+    *)
+      fail "Case failed glob match"
+      ;;
+  esac
+
+  case abcd in
+    abcd|efgh)
+      assertTrue ${SHUNIT_TRUE}
+      ;;
+    *)
+      fail "Case failed or (|) match"
+      ;;
+  esac
+
+  case abcd in
+    efgh)
+      : ;;
+    *)
+      :
+      # Missing ;; on the last statement
+  esac
+  assertTrue "Missing ';;' on case statement not ignored" $?
+
+  case abcd in
+    efgh)
+      : ;;
+  esac
+  assertTrue "Missing default on case statement not ignored" $?
+}
+
+function test_unset {
+  assertTrue "var should start unset" '[[ -z ${var+x} ]]'
+  var=""
+  assertFalse "var should now be set" '[[ -z ${var+x} ]]'
+  unset var
+  assertTrue "var should again be unset" '[[ -z ${var+x} ]]'
+
+  assertFalse "function should start unset" 'typeset -f local_function'
+  function local_function { :; }
+  assertTrue "function should now be set" 'typeset -f local_function >/dev/null'
+  unset -f local_function
+  assertFalse "function should again be unset" 'typeset -f local_function'
+}
+
+function test_local {
+  typeset a
+  a=2
+  assertEquals "Local assignment" 2 "$a"
+
+  typeset b=3
+  assertEquals "Local inline assignment" 3 "$b"
+
+  function local_function {
+    typeset c=4
+  }
+
+  local_function
+  assertNull "c should not be set" "${c+x}"
+
+  function local_function {
+    assertEquals "c should inherit from outer scope" 5 "$c"
+    typeset c=4
+    assertEquals "c should be overriden by inner scope" 4 "$c"
+  }
+
+  c=5
+  local_function
+  assertEquals "c should not be modified" 5 "$c"
+
+  function local_function {
+    typeset d=6 e=7
+    assertEquals "d should be set in inner scope" 6 "$d"
+    assertEquals "e should be set in inner scope" 7 "$e"
+  }
+
+  local_function
+  assertNull "d should not be set" "${d+x}"
+  assertNull "e should not be set" "${e+x}"
+
+  unset -f local_function
+}
+
+function test_here_string {
+  assertEquals "Here string failed" "foobar" $(cat <<< "foobar")
+}
+
+function test_read {
+  typeset IFS=' '
+  # The check of the vars must be done in the same subshell as the read, as
+  # they won't exist after the pipeline terminates
+  printf '%s %s %s' foo bar baz | { read a b c
+    assertEquals "read first var" "foo" "$a"
+    assertEquals "read second var" "bar" "$b"
+    assertEquals "read last var" "baz" "$c"
+  }
+
+  printf '%s %s %s' foo bar baz | { read a eof
+    assertEquals "read first var" "foo" "$a"
+    assertEquals "read ending vars" "bar baz" "$eof"
+  }
+
+  # Same as above, but with here-string
+  read a eof <<<"foo bar baz"
+  assertEquals "read first var" "foo" "$a"
+  assertEquals "read ending vars" "bar baz" "$eof"
+
+  # Test -r
+  read -r a b <<<"foo \bar"
+  assertEquals "read first var" "foo" "$a"
+  assertEquals "read backslash var" "\bar" "$b"
+
+  # Test empty vars
+  read a b <<<"foo"
+  assertEquals "read first var" "foo" "$a"
+  assertEquals "read empty var" "" "$b"
+}
+
+function test_parameter_expansion_unset {
+  assertEquals "Parameter expansion unset replace unset" "foo" "${var:-foo}"
+  assertEquals "Parameter expansion unset replace unset" "foo" "${var-foo}"
+  # zsh treats `typeset var` equal to `typeset var=`, while ksh and bash treat
+  # them differently. This makes the `${var-replace}` form not safe
+  typeset var=
+  assertEquals "Parameter expansion unset replace empty" "foo" "${var:-foo}"
+  assertEquals "Parameter expansion unset replace empty" "" "${var-foo}"
+  var=bar
+  assertEquals "Parameter expansion unset don't replace" "bar" "${var:-foo}"
+  assertEquals "Parameter expansion unset don't replace" "bar" "${var-foo}"
+  unset var
+
+  # This form is only useful if the `set -u` option is set, to prevent the shell
+  # From erroring on accessing an unset variable. Think of it as a declaration
+  # that you know it might be unset and it doesn't matter.
+  assertEquals "Parameter expansion unset replace unset with null" "" "${var-}"
+
+  assertEquals "Parameter expansion unset replace unset quoted" "foo" "${var-"foo"}"
+  assertEquals "Parameter expansion unset replace unset with dash" "foo-bar" "${var-foo-bar}"
+}
+
+function test_parameter_expansion_set {
+  assertEquals "Parameter expansion unset replace set" "" "${var:+foo}"
+  assertEquals "Parameter expansion unset replace set" "" "${var+foo}"
+  # zsh treats `typeset var` equal to `typeset var=""`
+  # This makes the `${var-replace}` form not safe
+  typeset var=""
+  assertEquals "Parameter expansion unset replace nonempty" "" "${var:+foo}"
+  assertEquals "Parameter expansion unset replace notset" "foo" "${var+foo}"
+  var=bar
+  assertEquals "Parameter expansion unset do replace" "foo" "${var:+foo}"
+  assertEquals "Parameter expansion unset do replace" "foo" "${var+foo}"
+}
+
+function test_parameter_expansion_assign {
+  assertEquals "Parameter expansion assign unset" "foo" "${var:=foo}"
+  assertEquals "Parameter expansion assign unset assigned" "foo" "$var"
+  unset var
+  assertEquals "Parameter expansion assign unset" "foo" "${var=foo}"
+  assertEquals "Parameter expansion assign unset assigned" "foo" "$var"
+  unset var
+
+  typeset var=""
+  assertEquals "Parameter expansion assign empty" "foo" "${var:=foo}"
+  assertEquals "Parameter expansion assign unset assigned" "foo" "$var"
+  var=""
+  assertEquals "Parameter expansion assign empty" "" "${var=foo}"
+  assertEquals "Parameter expansion assign empty assigned" "" "$var"
+
+  var=bar
+  assertEquals "Parameter expansion don't assign" "bar" "${var:=foo}"
+  assertEquals "Parameter expansion not assigned" "bar" "$var"
+  assertEquals "Parameter expansion don't assign" "bar" "${var=foo}"
+  assertEquals "Parameter expansion not assigned" "bar" "$var"
+}
+
+function test_parameter_expansion_cut {
+  typeset var=abcdabcd
+
+  assertEquals "Parameter expansion shortest starting cut" cdabcd "${var#ab}"
+  assertEquals "Parameter expansion shortest starting cut" $var "${var#b}"
+  assertEquals "Parameter expansion shortest starting cut glob" cdabcd "${var#*b}"
+  assertEquals "Parameter expansion longest starting cut glob" cd "${var##*ab}"
+
+  assertEquals "Parameter expansion shortest trailing cut" abcdab "${var%cd}"
+  assertEquals "Parameter expansion shortest trailing cut" $var "${var%c}"
+  assertEquals "Parameter expansion shortest trailing cut glob" abcdab "${var%c*}"
+  assertEquals "Parameter expansion longest trailing cut glob" ab "${var%%cd*}"
+
+  assertEquals "Parameter expansion nothing starting cut" "$var" "${var#foo}"
+  assertEquals "Parameter expansion nothing starting cut glob" "$var" "${var##*foo}"
+  assertEquals "Parameter expansion nothing trailing cut" "$var" "${var%foo}"
+  assertEquals "Parameter expansion nothing trailing cut glob" "$var" "${var%%foo*}"
+}
+
+function test_parameter_expansion_replace {
+  typeset var=abcdabcd
+
+  assertEquals "Parameter expansion replace" cdabcd "${var/ab}"
+  assertEquals "Parameter expansion replace ?" dabcd "${var/ab?}"
+  assertEquals "Parameter expansion replace *" d "${var/a*c}"
+  assertEquals "Parameter expansion replace all" cdcd "${var//ab}"
+  assertEquals "Parameter expansion replace all ?" dd "${var//ab?}"
+  assertEquals "Parameter expansion replace all *" d "${var//a*c}"
+
+  assertEquals "Parameter expansion replace start" cdabcd "${var/#ab}"
+  assertEquals "Parameter expansion replace start no match" $var "${var/#b}"
+
+  assertEquals "Parameter expansion replace end" abcdab "${var/%cd}"
+  assertEquals "Parameter expansion replace end no match" $var "${var/%c}"
+}
+
+function test_parameter_expansion_nested {
+  typeset foo=bar
+
+  assertEquals "Parameter expansion nested null" "bar" "${var:-$foo}"
+  assertEquals "Parameter expansion nested unset" "bar" "${var-$foo}"
+  assertEquals "Parameter expansion nested null quoted" "bar" "${var:-"$foo"}"
+  assertEquals "Parameter expansion nested unset quoted" "bar" "${var-"$foo"}"
+  assertEquals "Parameter expansion nested null brackets" "bar" "${var:-${foo}}"
+  assertEquals "Parameter expansion nested unset brackets" "bar" "${var-${foo}}"
+}
+
+function test_substring {
+  typeset var=abcdabcd
+
+  assertEquals "Parameter expansion substring" "$var" "${var:0}"
+  assertEquals "Parameter expansion substring" "bcdabcd" "${var:1}"
+  assertEquals "Parameter expansion substring" "" "${var:0:0}"
+  assertEquals "Parameter expansion substring" "a" "${var:0:1}"
+  assertEquals "Parameter expansion substring" "ab" "${var:0:2}"
+
+  assertEquals "Parameter expansion substring" "c" "${var:6:1}"
+  assertEquals "Parameter expansion substring" "cd" "${var:6:2}"
+  assertEquals "Parameter expansion substring" "cd" "${var:6:3}"
+  assertEquals "Parameter expansion substring" "d" "${var:7:1}"
+  assertEquals "Parameter expansion substring" "d" "${var:7:2}"
+  assertEquals "Parameter expansion substring" "" "${var:8:1}"
+
+  assertEquals "Parameter expansion substring" "d" "${var: -1:1}"
+  assertEquals "Parameter expansion substring" "" "${var: -1:0}"
+  assertEquals "Parameter expansion substring" "bcd" "${var: -3:5}"
+
+  assertEquals "Parameter expansion substring" "bcd" "${var: -3}"
+
+  # Negative second parameters were not supported until Bash 4.2
+}
+
+function test_ansi_c_quoted_string {
+  typeset newline='
+'
+  assertEquals "ANSI C quoted newline" "$newline" $'\n'
+  assertEquals "ANSI C quoted tab" "	" $'\t'
+}
+
+function test_advanced_test {
+  assertTrue "[[ -z empty var" '[[ -z ${var-} ]]'
+  assertTrue "[[ -z empty var quoted" '[[ -z "${var-}" ]]'
+  assertFalse "[[ -n empty var" '[[ -n ${var-} ]]'
+  assertFalse "[[ -n empty var quoted" '[[ -n "${var-}" ]]'
+
+  assertTrue "[[ -f" '[[ -f ./shunit2 ]]'
+  assertFalse "[[ -f not a file" '[[ -f / ]]'
+
+  assertTrue "[[ -r file" '[[ -r ./shunit2 ]]'
+  assertTrue "[[ -r dir" '[[ -r / ]]'
+  assertFalse "[[ -r locked file" '[[ -r /root ]]'
+
+  assertTrue "[[ -w file" '[[ -w ./shunit2 ]]'
+  assertFalse "[[ -w locked file" '[[ -w /root ]]'
+
+  assertTrue "[[ -d dir" '[[ -d / ]]'
+  assertFalse "[[ -d dir" '[[ -d ./shunit2 ]]'
+
+  assertTrue "[[ =" '[[ 1 = 1 ]]'
+  assertFalse "[[ =" '[[ 1 = 0 ]]'
+  assertTrue "[[ ==" '[[ 1 == 1 ]]'
+  assertFalse "[[ ==" '[[ 1 == 0 ]]'
+
+  assertTrue "[[ !=" '[[ 1 != 0 ]]'
+  assertFalse "[[ !=" '[[ 1 != 1 ]]'
+
+  assertTrue "[[ == *" '[[ abcd == ab* ]]'
+  assertFalse "[[ == *" '[[ abcd == ef* ]]'
+  assertFalse "[[ == *" '[[ abcd == b* ]]'
+  assertTrue "[[ == *" '[[ abcd == *b* ]]'
+  assertFalse "[[ == *" '[[ abcd == *ef* ]]'
+  assertTrue "[[ == *" '[[ abcd == * ]]'
+
+  assertTrue "[[ == ?" '[[ abcd == abc? ]]'
+  assertFalse "[[ == ?" '[[ abcd == ab? ]]'
+  assertFalse "[[ == ?" '[[ abcd == ?b? ]]'
+  assertTrue "[[ == ?" '[[ abcd == ???? ]]'
+  assertFalse "[[ == ?" '[[ abcd == ? ]]'
+  assertTrue "[[ == ?" '[[ abcd == ?* ]]'
+  assertFalse "[[ == ?" '[[ "" == ? ]]'
+
+  assertTrue "[[ -eq" '[[ 1 -eq 1 ]]'
+  assertFalse "[[ -eq" '[[ 1 -eq 0 ]]'
+  assertTrue "[[ -ne" '[[ 1 -ne 0 ]]'
+  assertFalse "[[ -ne" '[[ 1 -ne 1 ]]'
+
+  assertTrue "[[ &&" '[[ 1 -eq 1 && 0 -eq 0 ]]'
+  assertFalse "[[ &&" '[[ 1 -eq 1 && 1 -eq 0 ]]'
+
+  assertTrue "[[ ||" '[[ 1 -eq 1 || 1 -eq 1 ]]'
+  assertTrue "[[ ||" '[[ 1 -eq 1 || 1 -eq 0 ]]'
+  assertFalse "[[ ||" '[[ 0 -eq 1 || 1 -eq 0 ]]'
+
+  assertTrue "[[ -gt" '[[ 1 -gt 0 ]]'
+  assertFalse "[[ -gt" '[[ 1 -gt 1 ]]'
+  assertFalse "[[ -gt" '[[ 1 -gt 2 ]]'
+
+  assertTrue "[[ !" '[[ ! 1 == 0 ]]'
+  assertFalse "[[ !" '[[ ! 1 == 1 ]]'
+}
+
+function test_echo {
+  # Actually testing that echo -n doesn't print a newline is hard, since the
+  # command substitution strips trailing newline chars. This test should be
+  # enough, since if echo doesn't support the -n, it will print it literally
+  assertEquals "echo -n was ignored as an option" "$(echo -n foo)" "$(echo foo)"
+}
+
+function test_printf {
+  assertEquals "printf string" "test string" "$(printf 'test string')"
+  assertEquals "printf string substitute" "test string" "$(printf %s 'test string')"
+  assertEquals "printf literal escape" "\012" "$(printf %s '\012')"
+  assertEquals "printf ignored extra arguments" "abc" "$(printf %s 'a' 'b' 'c')"
+  assertEquals "printf ignored extra arguments" $'a\nb\nc' "$(printf '%s\n' 'a' 'b' 'c')"
+}
+
+function test_arithmetic_command {
+  assertTrue "Command truthy" "(( 1 ))"
+  assertFalse "Command falsey" "(( 0 ))"
+  assertTrue "Command addition" "(( 1 + 1 ))"
+
+  assertTrue "Command or" "(( 1 || 1 ))"
+  assertTrue "Command or" "(( 1 || 0 ))"
+  assertFalse "Command or" "(( 0 || 0 ))"
+  assertTrue "Command and" "(( 1 && 1 ))"
+  assertFalse "Command and" "(( 1 && 0 ))"
+  assertTrue "Command nesting" "(( 1 || ( 1 && 1 ) ))"
+
+  typeset a=2
+  assertTrue "Command equals" "(( a == 2 ))"
+  assertFalse "Command equals false" "(( a == 1 ))"
+  assertTrue "Command not equals" "(( a != 1 ))"
+  assertFalse "Command not equals false" "(( a != 2 ))"
+  assertTrue "Command equals with addition" "(( a = 1 + 1 ))"
+
+  assertTrue "Command less than" "(( a < 3 ))"
+  assertFalse "Command less than" "(( a < 2 ))"
+  assertFalse "Command less than" "(( a < 1 ))"
+  assertTrue "Command less than equal" "(( a <= 3 ))"
+  assertTrue "Command less than equal" "(( a <= 2 ))"
+  assertFalse "Command less than equal" "(( a <= 1 ))"
+  assertTrue "Command greater than" "(( a > 1 ))"
+  assertFalse "Command greater than" "(( a > 2 ))"
+  assertFalse "Command greater than" "(( a > 3 ))"
+  assertTrue "Command greater than equal" "(( a >= 1 ))"
+  assertTrue "Command greater than equal" "(( a >= 2 ))"
+  assertFalse "Command greater than equal" "(( a >= 3 ))"
+
+  typeset b=1
+  assertTrue "Command true" "(( b ))"
+  b=0
+  assertFalse "Command false" "(( b ))"
+
+  (( b = 1 ))
+  assertTrue "Command assignment true" $?
+  assertEquals "Command assignment result" 1 $b
+  (( b = 0 ))
+  assertFalse "Command assignment false" $?
+  assertEquals "Command assignment result" 0 $b
+
+  assertTrue "Command negation" "(( ! 0 ))"
+  assertFalse "Command negation" "(( ! 1 ))"
+}
+
+function test_integer {
+  typeset -i int=1
+  assertTrue "Int equals" "(( int == 1 ))"
+  assertFalse "Int equals" "(( int == 2 ))"
+  assertTrue "Int true" "(( int ))"
+
+  # This assignment returns 0, which evaluates as false
+  (( int = 0 ))
+  assertFalse "Int assignment" $?
+  assertFalse "Int false" "(( int ))"
+
+  int+=1
+  assertEquals "Int increment" 1 $int
+
+  int+=5
+  assertEquals "Int increment" 6 $int
+}
+
+function test_array {
+  # Since some shells do index 1 based instead of 0 based, we need to keep
+  # assumptions out of the code. If we assign an array with the array=(...)
+  # notation, then we can only itterate over it, never access an element.
+  # If we assign by index (array[idx]=...), then we can access by element, but
+  # must make sure we never use index 0, often by adding 1 to all indexes used
+
+  typeset -a array_a
+  array_a=(foo foo foo)
+
+  for item in "${array_a[@]}"; do
+    assertEquals "array element" "foo" "$item"
+  done
+
+  typeset IFS=' '
+  assertEquals "whole array" "foo foo foo" "${array_a[*]}"
+  assertEquals "size of array" 3 "${#array_a[@]}"
+
+  typeset -a array_b
+  array_b[1]=foo
+  array_b[2]=bar
+  array_b[5]=baz
+
+  assertEquals "array index element" "foo" "${array_b[1]}"
+  assertEquals "array index element" "bar" "${array_b[2]}"
+  assertEquals "array index element" "baz" "${array_b[5]}"
+  assertNull "null array index element" "${array_b[3]:+x}"
+}
+
+function test_source {
+  file="${SHUNIT_TMPDIR}/sourced_file"
+  printf '%s' 'foo=bar' > "$file"
+  typeset foo
+
+  source "$file"
+  assertTrue "sourcing" $?
+  assertEquals "sourced var" "bar" "$foo"
+
+  rm "$file"
+}
+
+function test_command {
+  assertTrue "sh command doesn't exist" 'command -v sh >/dev/null'
+  assertFalse "no-command-foo-bar command exists, who would have thought" 'command -v no-command-foo-bar >/dev/null'
+}
+
+function test_dynamic_function_call {
+  typeset foo=bar baz=qux
+
+  function my_bar {
+    :
+  }
+  function my_qux {
+    false
+  }
+
+  assertTrue "called my_bar" 'my_$foo'
+  assertFalse "called my_qux" 'my_$baz'
+
+  unset -f my_bar my_qux
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_terminal_device.sh 2.0.3-1/tests/test_terminal_device.sh
--- 1.11-3/tests/test_terminal_device.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_terminal_device.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,49 @@
+
+# Error on unset variables
+set -u
+
+. ../liquidprompt --no-activate
+
+typeset -a tty_outputs values
+
+# Add test cases to these arrays like below
+
+# Linux 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 GNU/Linux CentOS Linux release 8.2.2004 (Core)
+tty_outputs+=(
+"/dev/pts/0"
+)
+values+=("0")
+
+# Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
+tty_outputs+=(
+"/dev/ttys135"
+)
+values+=("ttys135")
+
+# Linux 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 GNU/Linux Debian 9.13 (stretch)
+tty_outputs+=(
+"/dev/pts/75"
+)
+values+=("75")
+
+
+function test_terminal_device {
+
+  tty() {
+    printf '%s\n' "$__tty_output"
+  }
+
+  for (( index=0; index < ${#values[@]}; index++ )); do
+    __tty_output=${tty_outputs[$index]}
+
+    _lp_terminal_device
+    assertEquals "Terminal device basename at index ${index}" "${values[$index]}" "$lp_terminal_device"
+  done
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit ksh_arrays
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_tools.sh 2.0.3-1/tests/test_tools.sh
--- 1.11-3/tests/test_tools.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_tools.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,25 @@
+
+# Error on unset variables
+set -u
+
+LP_ROOT="${PWD%/tests}"
+
+function setUp {
+  cd "$LP_ROOT"
+}
+
+function test_theme_preview {
+  # This does not really test the tool, just verify that it does not error.
+  . ./tools/theme-preview.sh default
+}
+
+function test_external_tool_tester {
+  . ./tools/external-tool-tester.sh >/dev/null
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit
+fi
+
+. ./shunit2
diff -pruN 1.11-3/tests/test_utils.sh 2.0.3-1/tests/test_utils.sh
--- 1.11-3/tests/test_utils.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests/test_utils.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,665 @@
+
+# Error on unset variables
+set -u
+
+. ../liquidprompt --no-activate
+
+function test_as_text {
+  # The escape sequences are different on Bash and Zsh
+  assertEquals "basic text removal" "a normal string without colors" \
+    "$(_lp_as_text "${_LP_OPEN_ESC}bad text${_LP_CLOSE_ESC}a normal string without ${_LP_OPEN_ESC}color${_LP_CLOSE_ESC}colors")"
+
+  assertEquals "control character removal" "string" \
+    "$(_lp_as_text "${_LP_OPEN_ESC}"$'\a\b'"${_LP_CLOSE_ESC}str${_LP_OPEN_ESC}"$'\001\E'"${_LP_CLOSE_ESC}ing")"
+}
+
+function test_line_count {
+  typeset test_string="a normal string"
+  __lp_line_count "$test_string"
+  assertEquals "normal 1 line string" $(printf %s "$test_string" | wc -l) $count
+
+  test_string="\
+    a
+    longer
+    string"
+  __lp_line_count "$test_string"
+  assertEquals "3 line string" $(printf %s "$test_string" | wc -l) $count
+
+  test_string="\
+    a
+
+    longer
+
+    string
+
+
+    with many consecutive breaks"
+  __lp_line_count "$test_string"
+  assertEquals "consecutive blank lines string" $(printf %s "$test_string" | wc -l) $count
+
+  test_string=""
+  __lp_line_count "$test_string"
+  assertEquals "null string" $(printf %s "$test_string" | wc -l) $count
+}
+
+function test_floating_scale {
+  typeset ret
+
+  __lp_floating_scale '1.23' 100
+  assertEquals "scaling 100" '123' "$ret"
+
+  __lp_floating_scale '1.00' 100
+  assertEquals "scaling 100" '100' "$ret"
+
+  __lp_floating_scale '1.' 100
+  assertEquals "scaling 100" '100' "$ret"
+
+  __lp_floating_scale '1' 100
+  assertEquals "scaling 100" '100' "$ret"
+
+  __lp_floating_scale '.01' 100
+  assertEquals "scaling 100" '1' "$ret"
+
+  __lp_floating_scale '.01' 100
+  assertEquals "scaling 100" '1' "$ret"
+
+  __lp_floating_scale '.10' 100
+  assertEquals "scaling 100" '10' "$ret"
+
+  __lp_floating_scale '.1' 100
+  assertEquals "scaling 100" '10' "$ret"
+
+  __lp_floating_scale '.001' 100
+  assertEquals "scaling 100" '0' "$ret"
+
+  __lp_floating_scale '1000001.001' 100
+  assertEquals "scaling 100" '100000100' "$ret"
+
+  __lp_floating_scale '11.1' 1000
+  assertEquals "scaling 1000" '11100' "$ret"
+
+  __lp_floating_scale '12.3' 1
+  assertEquals "scaling 1" '12' "$ret"
+
+  __lp_floating_scale '12.3' 10
+  assertEquals "scaling 10" '123' "$ret"
+
+  __lp_floating_scale '12.34' 10
+  assertEquals "scaling 10" '123' "$ret"
+
+  __lp_floating_scale '12.345' 10
+  assertEquals "scaling 10" '123' "$ret"
+}
+
+function test_pwd_tilde {
+  typeset HOME="/home/user"
+  typeset PWD="/a/test/path"
+  __lp_pwd_tilde
+  assertEquals "unchanged path" "$PWD" "$lp_pwd_tilde"
+
+  PWD="/home/user/a/test/path"
+  __lp_pwd_tilde
+  assertEquals "shorted home path" "~/a/test/path" "$lp_pwd_tilde"
+
+  __lp_pwd_tilde "/home/user/a/different/path"
+  assertEquals "shorted home path" "~/a/different/path" "$lp_pwd_tilde"
+}
+
+function pathSetUp {
+  # We cannot use SHUNIT_TEMPDIR because we need to know the start of the path
+  typeset long_path="/tmp/_lp/a/very/long/pathname"
+  mkdir -p "${long_path}/" "${long_path/name/foo}/"
+}
+
+function pathTearDown {
+  rm -r "/tmp/_lp/"
+}
+
+function test_get_unique_directory {
+  pathSetUp
+
+  typeset lp_unique_directory
+
+  __lp_get_unique_directory "/"
+  assertFalse "No shortening on '/'" "$?"
+
+  __lp_get_unique_directory "~"
+  assertFalse "No shortening on '~'" "$?"
+
+  __lp_get_unique_directory "/tmp/_lp/a"
+  assertFalse "No shortening on 'a'" "$?"
+
+  __lp_get_unique_directory "/tmp/_lp/a/very"
+  assertTrue "Shortening on 'very'" "$?"
+  assertEquals "Shortening on 'very'" "v" "$lp_unique_directory"
+
+  __lp_get_unique_directory "/tmp/_lp/a/very/long/pathname"
+  assertTrue "Partial shortening on 'pathname'" "$?"
+  assertEquals "Partial shortening on 'pathname'" "pathn" "$lp_unique_directory"
+
+  pathTearDown
+}
+
+function test_path_format_from_path_left() {
+  typeset HOME="/home/user"
+  typeset PWD="/"
+
+  _lp_find_vcs() {
+    return 1
+  }
+
+  LP_ENABLE_SHORTEN_PATH=1
+  typeset COLUMNS=100
+  LP_PATH_LENGTH=100
+  LP_PATH_KEEP=0
+  LP_PATH_VCS_ROOT=1
+  LP_PATH_METHOD=truncate_chars_from_path_left
+  LP_MARK_SHORTEN_PATH="..."
+
+  typeset lp_path lp_path_format
+
+  _lp_path_format '{format}'
+  assertEquals "root directory" '/' "$lp_path"
+  assertEquals "root directory formatting" '{format}/' "$lp_path_format"
+
+  _lp_path_format '{format}' '' '' '' '['
+  assertEquals "root directory ignore separator" '/' "$lp_path"
+  assertEquals "root directory formatting ignore separator" '{format}/' "$lp_path_format"
+
+  PWD="/tmp"
+  _lp_path_format ''
+  assertEquals "tmp directory" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting" '/tmp' "$lp_path_format"
+
+  _lp_path_format '' '' '' '' '^'
+  assertEquals "tmp directory no custom separator" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting custom separator" '/^tmp' "$lp_path_format"
+
+  PWD=$HOME
+  _lp_path_format '{format}'
+  assertEquals "home directory" '~' "$lp_path"
+  assertEquals "home directory formatting" '{format}~' "$lp_path_format"
+
+  PWD="/tmp/_lp/a"
+  _lp_path_format ''
+  assertEquals "short directory" "$PWD" "$lp_path"
+  assertEquals "short directory formatting" "$PWD" "$lp_path_format"
+
+  LP_PATH_LENGTH=1
+
+  PWD="/tmp/_lp/a/very"
+  _lp_path_format ''
+  assertEquals "short directory" ".../very" "$lp_path"
+  assertEquals "short directory formatting" ".../very" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "shortened directory" ".../very" "$lp_path"
+  assertEquals "shortened directory formatting" "{s}.../{l}very" "$lp_path_format"
+
+  LP_PATH_LENGTH=13
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "medium directory" ".../_lp/a/very" "$lp_path"
+  assertEquals "medium directory formatting" "{s}.../{n}_lp/{n}a/{l}very" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "medium directory" "/tmp/.../very" "$lp_path"
+  assertEquals "medium directory formatting" "{n}/{n}tmp/{s}.../{l}very" "$lp_path_format"
+
+  LP_PATH_KEEP=3
+  # Don't shorten if it would make longer
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "medium directory" "/tmp/_lp/a/very" "$lp_path"
+  assertEquals "medium directory formatting" "{n}/{n}tmp/{n}_lp/{n}a/{l}very" "$lp_path_format"
+
+  _lp_find_vcs() {
+    lp_vcs_root="/tmp/_lp/a/very"
+  }
+
+  LP_PATH_KEEP=0
+  PWD="/tmp/_lp/a/very/long/pathname"
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory" ".../very/.../pathname" "$lp_path"
+  assertEquals "full directory formatting" "{s}.../{v}very/{s}.../{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '^' '{^}'
+  assertEquals "full directory with separator" ".../very/.../pathname" "$lp_path"
+  assertEquals "full directory formatting with separator" "{s}...{^}^{v}very{^}^{s}...{^}^{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '///'
+  assertEquals "full directory with multichar separator" ".../very/.../pathname" "$lp_path"
+  assertEquals "full directory formatting with multichar separator" "{s}...///{v}very///{s}...///{l}pathname" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  PWD="/tmp/averylong/superduperlong/obviouslytoolong/dir"
+
+  LP_PATH_LENGTH=30
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}...g/{n}obviouslytoolong/{l}dir" "$lp_path_format"
+
+  LP_PATH_LENGTH=29
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}.../{n}obviouslytoolong/{l}dir" "$lp_path_format"
+
+  LP_PATH_LENGTH=28
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}...obviouslytoolong/{l}dir" "$lp_path_format"
+
+  LP_PATH_LENGTH=27
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}...bviouslytoolong/{l}dir" "$lp_path_format"
+
+  PWD="/tmp/a/bc/last"
+  LP_PATH_LENGTH=$(( ${#PWD} - 1 ))
+  _lp_path_format ''
+  assertEquals "2 short dirs shortening" "/tmp/.../last" "$lp_path_format"
+
+  PWD="/tmp/a/b/last"
+  LP_PATH_LENGTH=$(( ${#PWD} - 1 ))
+  _lp_path_format ''
+  assertEquals "2 short dirs no shortening" "/tmp/a/b/last" "$lp_path_format"
+
+  PWD="/tmp/a/b/c/last"
+  LP_PATH_LENGTH=$(( ${#PWD} - 1 ))
+  _lp_path_format ''
+  assertEquals "3 short dirs shortening" "/tmp/...c/last" "$lp_path_format"
+
+  LP_PATH_LENGTH=${#PWD}
+  _lp_path_format ''
+  assertEquals "3 short dirs no shortening" "/tmp/a/b/c/last" "$lp_path_format"
+
+  _lp_find_vcs() {
+    lp_vcs_root="/tmp/a/b"
+  }
+
+  LP_PATH_LENGTH=$(( ${#PWD} - 1 ))
+  _lp_path_format ''
+  assertEquals "no shortening" "/tmp/a/b/c/last" "$lp_path_format"
+}
+
+function test_path_format_from_dir_right {
+  typeset HOME="/home/user"
+  typeset PWD="/"
+
+  _lp_find_vcs() {
+    return 1
+  }
+
+  LP_ENABLE_SHORTEN_PATH=1
+  typeset COLUMNS=100
+  LP_PATH_LENGTH=100
+  LP_PATH_KEEP=0
+  LP_PATH_VCS_ROOT=1
+  LP_PATH_METHOD=truncate_chars_from_dir_right
+  LP_MARK_SHORTEN_PATH="..."
+  LP_PATH_CHARACTER_KEEP=1
+
+  typeset lp_path lp_path_format
+
+  _lp_path_format '{format}'
+  assertEquals "root directory" '/' "$lp_path"
+  assertEquals "root directory formatting" '{format}/' "$lp_path_format"
+
+  _lp_path_format '{format}' '' '' '' '['
+  assertEquals "root directory ignore separator" '/' "$lp_path"
+  assertEquals "root directory formatting ignore separator" '{format}/' "$lp_path_format"
+
+  PWD="/tmp"
+  _lp_path_format ''
+  assertEquals "tmp directory" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting" '/tmp' "$lp_path_format"
+
+  _lp_path_format '' '' '' '' '^'
+  assertEquals "tmp directory custom separator" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting custom separator" '/^tmp' "$lp_path_format"
+
+  PWD=$HOME
+  _lp_path_format '{format}'
+  assertEquals "home directory" '~' "$lp_path"
+  assertEquals "home directory formatting" '{format}~' "$lp_path_format"
+
+  PWD="/tmp/_lp/a"
+  _lp_path_format ''
+  assertEquals "short directory" "$PWD" "$lp_path"
+  assertEquals "short directory formatting" "$PWD" "$lp_path_format"
+
+  LP_PATH_LENGTH=1
+
+  PWD="/tmp/_lp/a/very"
+  _lp_path_format ''
+  assertEquals "short directory" "$PWD" "$lp_path"
+  assertEquals "short directory formatting" "$PWD" "$lp_path_format"
+
+  PWD="/avery/muchlong/pathname"
+  _lp_path_format ''
+  assertEquals "short directory formatting" "/a.../m.../pathname" "$lp_path_format"
+
+  LP_PATH_LENGTH=$(( ${#PWD} - 1 ))
+  _lp_path_format ''
+  assertEquals "medium directory formatting" "/a.../muchlong/pathname" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  _lp_path_format ''
+  assertEquals "medium directory formatting" "/avery/m.../pathname" "$lp_path_format"
+
+  _lp_find_vcs() {
+    lp_vcs_root="/tmp/_lp/a/very"
+  }
+
+  LP_PATH_KEEP=0
+  LP_MARK_SHORTEN_PATH="."
+  PWD="/tmp/_lp/a/very/long/pathname"
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory" "/t./_./a/very/l./pathname" "$lp_path"
+  assertEquals "full directory formatting" "{n}/{s}t./{s}_./{n}a/{v}very/{s}l./{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '///'
+  assertEquals "full directory with multichar separator" "/t./_./a/very/l./pathname" "$lp_path"
+  assertEquals "full directory formatting with multichar separator" "{n}////{s}t.///{s}_.///{n}a///{v}very///{s}l.///{l}pathname" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  PWD="/tmp/averylong/superduperlong/obviouslytoolong/dir"
+
+  LP_PATH_LENGTH=31
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory length $LP_PATH_LENGTH" "/tmp/a./s./obviouslytoolong/dir" "$lp_path"
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}a./{s}s./{n}obviouslytoolong/{l}dir" "$lp_path_format"
+
+  LP_PATH_LENGTH=30
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory length $LP_PATH_LENGTH" "/tmp/a./s./o./dir" "$lp_path"
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}a./{s}s./{s}o./{l}dir" "$lp_path_format"
+}
+
+function test_path_format_from_dir_middle {
+  typeset HOME="/home/user"
+  typeset PWD="/"
+
+  _lp_find_vcs() {
+    return 1
+  }
+
+  LP_ENABLE_SHORTEN_PATH=1
+  typeset COLUMNS=100
+  LP_PATH_LENGTH=100
+  LP_PATH_KEEP=0
+  LP_PATH_VCS_ROOT=1
+  LP_PATH_METHOD=truncate_chars_from_dir_middle
+  LP_MARK_SHORTEN_PATH="..."
+  LP_PATH_CHARACTER_KEEP=1
+
+  typeset lp_path lp_path_format
+
+  _lp_path_format '{format}'
+  assertEquals "root directory" '/' "$lp_path"
+  assertEquals "root directory formatting" '{format}/' "$lp_path_format"
+
+  _lp_path_format '{format}' '' '' '' '['
+  assertEquals "root directory ignore separator" '/' "$lp_path"
+  assertEquals "root directory formatting ignore separator" '{format}/' "$lp_path_format"
+
+  PWD="/tmp"
+  _lp_path_format ''
+  assertEquals "tmp directory" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting" '/tmp' "$lp_path_format"
+
+  _lp_path_format '' '' '' '' '^'
+  assertEquals "tmp directory custom separator" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting custom separator" '/^tmp' "$lp_path_format"
+
+  PWD=$HOME
+  _lp_path_format '{format}'
+  assertEquals "home directory" '~' "$lp_path"
+  assertEquals "home directory formatting" '{format}~' "$lp_path_format"
+
+  PWD="/tmp/_lp/a"
+  _lp_path_format ''
+  assertEquals "short directory" "$PWD" "$lp_path"
+  assertEquals "short directory formatting" "$PWD" "$lp_path_format"
+
+  LP_PATH_LENGTH=1
+
+  PWD="/tmp/_lp/a/very"
+  _lp_path_format ''
+  assertEquals "short directory" "$PWD" "$lp_path"
+  assertEquals "short directory formatting" "$PWD" "$lp_path_format"
+
+  PWD="/avery/muchlong/pathname"
+  _lp_path_format ''
+  assertEquals "short directory" "/avery/m...g/pathname" "$lp_path"
+  assertEquals "short directory formatting" "/avery/m...g/pathname" "$lp_path_format"
+
+  LP_MARK_SHORTEN_PATH="."
+  PWD="/avery/muchlong/pathname"
+  _lp_path_format ''
+  assertEquals "short directory" "/a.y/m.g/pathname" "$lp_path"
+  assertEquals "short directory formatting" "/a.y/m.g/pathname" "$lp_path_format"
+
+  LP_PATH_LENGTH=$(( ${#PWD} - 1 ))
+  _lp_path_format ''
+  assertEquals "medium directory" "/a.y/muchlong/pathname" "$lp_path"
+  assertEquals "medium directory formatting" "/a.y/muchlong/pathname" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  _lp_path_format ''
+  assertEquals "medium directory" "/avery/m.g/pathname" "$lp_path"
+  assertEquals "medium directory formatting" "/avery/m.g/pathname" "$lp_path_format"
+
+  _lp_find_vcs() {
+    lp_vcs_root="/tmp/_lp/a/very"
+  }
+
+  LP_PATH_KEEP=0
+  PWD="/tmp/_lp/a/very/long/pathname"
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory" "/tmp/_lp/a/very/l.g/pathname" "$lp_path"
+  assertEquals "full directory formatting" "{n}/{n}tmp/{n}_lp/{n}a/{v}very/{s}l.g/{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '///'
+  assertEquals "full directory with multichar separator" "/tmp/_lp/a/very/l.g/pathname" "$lp_path"
+  assertEquals "full directory formatting with multichar separator" "{n}////{n}tmp///{n}_lp///{n}a///{v}very///{s}l.g///{l}pathname" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  PWD="/tmp/averylong/superduperlong/obviouslytoolong/dir"
+
+  LP_PATH_LENGTH=33
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory length $LP_PATH_LENGTH" "/tmp/a.g/s.g/obviouslytoolong/dir" "$lp_path"
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}a.g/{s}s.g/{n}obviouslytoolong/{l}dir" "$lp_path_format"
+
+  LP_PATH_LENGTH=32
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory length $LP_PATH_LENGTH" "/tmp/a.g/s.g/o.g/dir" "$lp_path"
+  assertEquals "full directory formatting length $LP_PATH_LENGTH" "{n}/{n}tmp/{s}a.g/{s}s.g/{s}o.g/{l}dir" "$lp_path_format"
+}
+
+function test_path_format_unique() {
+  pathSetUp
+
+  typeset HOME="/home/user"
+  typeset PWD="/"
+
+  _lp_find_vcs() {
+    return 1
+  }
+
+  LP_ENABLE_SHORTEN_PATH=1
+  typeset COLUMNS=100
+  LP_PATH_LENGTH=100
+  LP_PATH_KEEP=0
+  LP_PATH_VCS_ROOT=1
+  LP_PATH_METHOD=truncate_chars_to_unique_dir
+
+  typeset lp_path lp_path_format
+
+  _lp_path_format '{format}'
+  assertEquals "root directory" '/' "$lp_path"
+  assertEquals "root directory formatting" '{format}/' "$lp_path_format"
+
+  _lp_path_format '{format}' '' '' '' '['
+  assertEquals "root directory ignore separator" '/' "$lp_path"
+  assertEquals "root directory formatting ignore separator" '{format}/' "$lp_path_format"
+
+  PWD="/tmp"
+  _lp_path_format ''
+  assertEquals "tmp directory" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting" '/tmp' "$lp_path_format"
+
+  _lp_path_format '' '' '' '' '^'
+  assertEquals "tmp directory custom separator" '/tmp' "$lp_path"
+  assertEquals "tmp directory no formatting custom separator" '/^tmp' "$lp_path_format"
+
+  PWD=$HOME
+  _lp_path_format '{format}'
+  assertEquals "home directory" '~' "$lp_path"
+  assertEquals "home directory formatting" '{format}~' "$lp_path_format"
+
+  PWD="/tmp/_lp/a"
+  _lp_path_format ''
+  assertEquals "short directory" "$PWD" "$lp_path"
+  assertEquals "short directory formatting" "$PWD" "$lp_path_format"
+
+  LP_PATH_LENGTH=13
+
+  PWD="/tmp/_lp/a/very"
+  _lp_path_format ''
+  assertEquals "short directory" "/t/_lp/a/very" "$lp_path"
+  assertEquals "short directory formatting" "/t/_lp/a/very" "$lp_path_format"
+
+  LP_PATH_LENGTH=1
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "shortened directory" "/t/_/a/very" "$lp_path"
+  assertEquals "shortened directory formatting" "{n}/{s}t/{s}_/{n}a/{l}very" "$lp_path_format"
+
+  LP_PATH_LENGTH=13
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "medium directory" "/t/_lp/a/very" "$lp_path"
+  assertEquals "medium directory formatting" "{n}/{s}t/{n}_lp/{n}a/{l}very" "$lp_path_format"
+
+  LP_PATH_KEEP=2
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "medium directory" "/tmp/_/a/very" "$lp_path"
+  assertEquals "medium directory formatting" "{n}/{n}tmp/{s}_/{n}a/{l}very" "$lp_path_format"
+
+  LP_PATH_KEEP=3
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "medium directory" "/tmp/_lp/a/very" "$lp_path"
+  assertEquals "medium directory formatting" "{n}/{n}tmp/{n}_lp/{n}a/{l}very" "$lp_path_format"
+
+  _lp_find_vcs() {
+    lp_vcs_root="/tmp/_lp/a/very"
+  }
+
+  LP_PATH_KEEP=0
+  PWD="/tmp/_lp/a/very/long/pathname"
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory " "/t/_/a/very/l/pathname" "$lp_path"
+  assertEquals "full directory formatting" "{n}/{s}t/{s}_/{n}a/{v}very/{s}l/{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '^' '{^}'
+  assertEquals "full directory with separator" "/t/_/a/very/l/pathname" "$lp_path"
+  assertEquals "full directory formatting with separator" "{n}/{^}^{s}t{^}^{s}_{^}^{n}a{^}^{v}very{^}^{s}l{^}^{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '///'
+  assertEquals "full directory with multichar separator" "/t/_/a/very/l/pathname" "$lp_path"
+  assertEquals "full directory formatting with multichar separator" "{n}////{s}t///{s}_///{n}a///{v}very///{s}l///{l}pathname" "$lp_path_format"
+
+  pathTearDown
+}
+
+function test_path_format_last_dir() {
+  typeset HOME="/home/user"
+  typeset PWD="/"
+
+  _lp_find_vcs() {
+    return 1
+  }
+
+  LP_ENABLE_SHORTEN_PATH=1
+  LP_PATH_VCS_ROOT=1
+  LP_PATH_METHOD=truncate_to_last_dir
+
+  typeset lp_path lp_path_format
+
+  _lp_path_format '{format}'
+  assertEquals "root directory" '/' "$lp_path"
+  assertEquals "root directory formatting" '{format}/' "$lp_path_format"
+
+  _lp_path_format '{format}' '' '' '' '['
+  assertEquals "root directory ignore separator" '/' "$lp_path"
+  assertEquals "root directory formatting ignore separator" '{format}/' "$lp_path_format"
+
+  PWD="/tmp"
+  _lp_path_format ''
+  assertEquals "tmp directory" 'tmp' "$lp_path"
+  assertEquals "tmp directory no formatting" 'tmp' "$lp_path_format"
+
+  _lp_path_format '' '' '' '' '^'
+  assertEquals "tmp directory no custom separator" 'tmp' "$lp_path"
+  assertEquals "tmp directory no formatting custom separator" 'tmp' "$lp_path_format"
+
+  PWD=$HOME
+  _lp_path_format '{format}'
+  assertEquals "home directory" '~' "$lp_path"
+  assertEquals "home directory formatting" '{format}~' "$lp_path_format"
+
+  PWD="/tmp/_lp/a"
+  _lp_path_format ''
+  assertEquals "short directory" "a" "$lp_path"
+  assertEquals "short directory formatting" "a" "$lp_path_format"
+
+  PWD="/tmp/_lp/a/very"
+  _lp_path_format ''
+  assertEquals "short directory" "very" "$lp_path"
+  assertEquals "short directory formatting" "very" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "shortened directory" "very" "$lp_path"
+  assertEquals "shortened directory formatting" "{l}very" "$lp_path_format"
+
+  _lp_find_vcs() {
+    lp_vcs_root="$PWD"
+  }
+
+  PWD="/tmp/_lp/a/very"
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory vcs" "very" "$lp_path"
+  assertEquals "full directory vcs formatting" "{v}very" "$lp_path_format"
+
+  LP_PATH_VCS_ROOT=0
+  _lp_path_format '{n}' '{l}' '{v}' '{s}'
+  assertEquals "full directory" "very" "$lp_path"
+  assertEquals "full directory formatting" "{l}very" "$lp_path_format"
+
+  PWD="/tmp/_lp/a/very/long/pathname"
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '^' '{^}'
+  assertEquals "full directory with separator" "pathname" "$lp_path"
+  assertEquals "full directory formatting with separator" "{l}pathname" "$lp_path_format"
+
+  _lp_path_format '{n}' '{l}' '{v}' '{s}' '///'
+  assertEquals "full directory with multichar separator" "pathname" "$lp_path"
+  assertEquals "full directory formatting with multichar separator" "{l}pathname" "$lp_path_format"
+}
+
+function test_is_function {
+  function my_function { :; }
+
+  # Ignore errors, we just really need this to not be a function
+  unset -f not_my_function >/dev/null 2>&1 || true
+
+  assertTrue "failed to find valid function" '__lp_is_function my_function'
+  assertFalse "claimed to find non-existent function" '__lp_is_function not_my_function'
+
+  alias not_my_function=my_function
+  assertFalse "claimed alias was a function" '__lp_is_function not_my_function'
+
+  unset -f my_function
+  unalias not_my_function
+}
+
+if [ -n "${ZSH_VERSION-}" ]; then
+  SHUNIT_PARENT="$0"
+  setopt shwordsplit
+fi
+
+. ./shunit2
diff -pruN 1.11-3/test.sh 2.0.3-1/test.sh
--- 1.11-3/test.sh	2016-06-25 08:09:32.000000000 +0000
+++ 2.0.3-1/test.sh	1970-01-01 00:00:00.000000000 +0000
@@ -1,351 +0,0 @@
-#!/bin/sh
-
-
-# Run the testsuite with both bash and zsh
-if [ -z "$BASH_VERSION$ZSH_VERSION" ]; then
-    for sh in bash zsh
-    do
-	if [ -x /bin/$sh ]; then
-	    /bin/$sh "$0"
-	elif [ -x /usr/bin/$sh ]; then
-	    /usr/bin/$sh "$0"
-	fi
-    done
-    exit 0
-fi
-
-
-print_ok()
-{
-    local OK="\\033[1;32m"
-    local RAZ="\\033[0;39m"
-    local cols=$1
-    local name=$2
-    # printf "\e${OK}%-${cols}s %-${cols}s\n${RAZ}" "$name" "OK"
-    printf "${OK}%-${cols}s %-${cols}s\n${RAZ}" "$name" "OK"
-}
-
-print_no()
-{
-    local NOK="\\033[1;31m"
-    local RAZ="\\033[0;39m"
-    local cols=$1
-    local name=$2
-    local sub=$3
-    local line=$4
-    # printf "\e${NOK}%-${cols}s %-${cols}s #%-5s\n${RAZ}" "$name" "$sub" "$line"
-    printf "${NOK}%-${cols}s %-${cols}s #%-5s\n${RAZ}" "$name" "$sub" "$line"
-}
-
-assert()
-{
-    local has=$1
-    local name=$2
-    local sub=$3
-    local line=$4
-
-    if [[ -z "$sub" ]]
-    then
-        return 1
-    fi
-
-    cols=20
-
-    if [[ $has == 1 ]] ; then
-        if [[ "$PS1" == *$sub* ]]
-        then
-            print_ok $cols "has $name"
-        else
-            print_no $cols "has $name" $sub $line
-        fi
-    elif [[ $has == 0 ]] ; then
-        if [[ "$PS1" != *$sub* ]]
-        then
-            print_ok $cols " no $name"
-        else
-            print_no $cols " no $name" $sub $line
-        fi
-    else
-        if [[ "$PS1" == $sub ]]
-        then
-            print_ok $cols " is $name"
-        else
-            print_no $cols " is $name" $sub $line
-        fi
-    fi
-}
-
-assert_has()
-{
-
-    assert 1 "$@"
-}
-
-assert_not()
-{
-    assert 0 "$@"
-}
-
-assert_is()
-{
-    assert 2 "$@"
-}
-
-log_prompt()
-{
-    echo -e "$PS1" 1>&2
-}
-
-#####################
-# REDEFINE COMMANDS #
-#####################
-
-command()
-{
-    echo "fake command $@" 1>&2
-    echo "/bin/fake"
-}
-
-uname()
-{
-    echo "fake uname $@" 1>&2
-    echo Linux
-}
-
-nproc()
-{
-    echo "fake nproc $@" 1>&2
-    echo 2
-}
-
-# battery
-acpi()
-{
-    echo "fake acpi $@" 1>&2
-    if [[ "x$1" == --battery ]]; then
-	echo 'Battery 0: Discharging, 55%, 01:39:34 remaining'
-    elif [[ "x$1" == -t ]]; then
-	echo 'Thermal 0: ok, 36.0 degrees C'
-    else
-	return 1
-    fi
-}
-
-
-git()
-{
-    echo "fake git $@" 1>&2
-    case $1 in
-        "rev-parse" )
-            echo ".git";;
-        "branch" )
-            echo "* fake_test";;
-        "diff" )
-            echo "2       1       fake_file"
-            return 1;;
-        "status" )
-            echo "# Untracked";;
-        "rev-list" )
-            echo 111;;
-    esac
-}
-
-# global variables
-export http_proxy="fake"
-
-
-##########################
-# Call the liquid prompt #
-##########################
-
-# As if we were in an interactive shell
-export PS1="fake prompt \$"
-# load functions
-source ./liquidprompt
-
-# Force liquid prompt function redefinition
-_lp_cpu_load()
-{
-    echo "fake _lp_cpu_load $@" 1>&2
-    echo "0.64"
-}
-
-
-################
-# ADHOC CONFIG #
-################
-
-export LP_BATTERY_THRESHOLD=60
-export LP_LOAD_THRESHOLD=1
-export LP_MARK_PROXY="proxy"
-export LP_MARK_BATTERY="BATT"
-export LP_MARK_LOAD="LOAD"
-export LP_MARK_UNTRACKED="untracked"
-export LP_MARK_GIT="gitmark"
-export LP_USER_ALWAYS=1
-
-
-# Force erroneous command
-fake_error
-
-# Force set prompt
-_lp_set_prompt
-
-
-#########
-# TESTS #
-#########
-
-echo "FULL PROMPT"
-log_prompt
-
-assert_has Battery_Mark     BATT    $LINENO
-assert_has Battery_Level    55%    $LINENO
-assert_has Load_Mark        LOAD    $LINENO
-assert_has Load_Level       32%    $LINENO
-assert_has User             "[\\\u"    $LINENO
-if [[ $LP_HOSTNAME_ALWAYS == 0 ]] ; then
-    assert_not Hostname     "\\\h"    $LINENO
-else
-    assert_has Hostname     "\\\h"    $LINENO
-fi
-assert_has Perms            :    $LINENO
-assert_has Path             $(pwd | sed -e "s|$HOME|~|")    $LINENO
-assert_has Proxy            proxy    $LINENO
-assert_has Error            127    $LINENO
-assert_has GIT_Branch       fake_test    $LINENO
-assert_has GIT_Changes      "+2/-1"    $LINENO
-assert_has GIT_Commits      111    $LINENO
-assert_has GIT_Untrack      untracked    $LINENO
-assert_has GIT_Mark         gitmark    $LINENO
-
-# start hiding features
-echo "DISABLE BATTERY"
-export LP_ENABLE_BATT=0
-_lp_set_prompt
-log_prompt
-assert_not Battery_Mark     BATT    $LINENO
-assert_not Battery_level    55%    $LINENO
-assert_not Error            127    $LINENO
-
-echo "HIDE BATTERY LEVEL"
-export LP_ENABLE_BATT=1
-export LP_BATTERY_THRESHOLD=50
-_lp_set_prompt
-log_prompt
-assert_has Battery_Mark     BATT    $LINENO
-assert_not Battery_level    55%    $LINENO
-assert_not Error            127    $LINENO
-
-alias acpi="echo 'Battery 0: Full, 100%'"
-_lp_set_prompt
-log_prompt
-assert_not Battery_Mark     BATT    $LINENO
-
-echo "DISABLE LOAD"
-export LP_ENABLE_LOAD=0
-_lp_set_prompt
-log_prompt
-assert_not Load_Mark        LOAD    $LINENO
-assert_not Load_Level       32%    $LINENO
-
-echo "HIDE LOAD"
-export LP_ENABLE_LOAD=1
-export LP_LOAD_THRESHOLD=40
-_lp_set_prompt
-log_prompt
-assert_not Load_Mark        LOAD    $LINENO
-assert_not Load_Level       32%    $LINENO
-
-echo "DISABLE PROXY"
-export LP_ENABLE_PROXY=0
-_lp_set_prompt
-log_prompt
-assert_not Proxy_Mark        proxy    $LINENO
-
-echo "NO PROXY"
-export LP_ENABLE_PROXY=1
-export http_proxy=""
-_lp_set_prompt
-log_prompt
-assert_not Proxy_Mark        proxy    $LINENO
-
-echo "DISABLE GIT"
-export LP_ENABLE_GIT=0
-_lp_set_prompt
-log_prompt
-assert_not GIT_Branch       fake_test    $LINENO
-assert_not GIT_Changes      "+2/-1"    $LINENO
-assert_not GIT_Commits      111    $LINENO
-assert_not GIT_Untrack      untracked    $LINENO
-assert_not GIT_Mark         gitmark    $LINENO
-assert_has User_Mark        $    $LINENO
-
-echo "NO GIT"
-export LP_ENABLE_GIT=1
-alias git="echo"
-_lp_set_prompt
-log_prompt
-assert_not GIT_Branch       fake_test    $LINENO
-assert_not GIT_Changes      "+2/-1"    $LINENO
-assert_not GIT_Commits      111    $LINENO
-assert_not GIT_Untrack      untracked    $LINENO
-assert_not GIT_Mark         gitmark    $LINENO
-assert_has User_Mark        $    $LINENO
-
-# create a deep dir tree
-current=$PWD
-for d in $(seq 20) ; do
-    dirname=""
-    for i in $(seq 5); do
-         dirname="$dirname$d"
-    done
-    mkdir -p $dirname
-    cd $dirname
-done
-
-echo "DISABLE SHORTEN PATH"
-export LP_ENABLE_SHORTEN_PATH=0
-_lp_set_prompt
-log_prompt
-assert_has Path       "$(pwd | sed -e "s|$HOME|~|")"    $LINENO
-
-echo "ENABLE SHORTEN PATH"
-export LP_ENABLE_SHORTEN_PATH=1
-export LP_PATH_LENGTH=35
-export LP_PATH_KEEP=1
-_lp_set_prompt
-log_prompt
-assert_has Short_Path       " … "    $LINENO
-
-# get back out of the deep tree
-cd $current
-
-echo "LOCAL HOST NAME"
-_lp_set_prompt
-log_prompt
-# As the hostname is set once at the script start,
-# and not re-interpret at each prompt,
-# we cannot export the option in the test script.
-# We thus rely on the existing config.
-if [[ $LP_HOSTNAME_ALWAYS == 0 ]] ; then
-    assert_not Hostname     "\\\h"    $LINENO
-else
-    assert_has Hostname     "\\\h"    $LINENO
-fi
-
-echo "prompt_OFF"
-prompt_OFF
-log_prompt
-assert_is Prompt            "$ "    $LINENO
-
-echo "prompt_on"
-prompt_on
-export LP_USER_ALWAYS=1
-log_prompt
-assert_has User             "\\\u"    $LINENO
-assert_has Perms            :    $LINENO
-assert_has Path             $(pwd | sed -e "s|$HOME|~|")    $LINENO
-# assert_has Path             "\\\w"    $LINENO
-assert_has Prompt           "$ "    $LINENO
-
diff -pruN 1.11-3/tests.sh 2.0.3-1/tests.sh
--- 1.11-3/tests.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tests.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+shells=(bash zsh)
+
+cd "${0%/*}/tests"
+
+if [ ! -r shunit2 ]; then
+  curl https://raw.githubusercontent.com/kward/shunit2/v2.1.8/shunit2 -O
+fi
+
+typeset -a testing_shells
+
+for shell in "${shells[@]}"; do
+  if command -v "$shell" >/dev/null; then
+    testing_shells+=("$shell")
+  else
+    printf "Cannot find shell '%s', skipping tests\n" "$shell" >&2
+  fi
+done
+
+fail=0
+
+for test_file in ./test_*.sh; do
+  for shell in "${testing_shells[@]}"; do
+    printf "\nRunning shell '%s' with test '%s'\n" "$shell" "$test_file"
+    "$shell" "$test_file" || fail=$?
+  done
+done
+
+exit "$fail"
diff -pruN 1.11-3/themes/alternate_vcs/alternate_vcs.theme 2.0.3-1/themes/alternate_vcs/alternate_vcs.theme
--- 1.11-3/themes/alternate_vcs/alternate_vcs.theme	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/themes/alternate_vcs/alternate_vcs.theme	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,141 @@
+
+_lp_alternate_vcs_theme_activate() {
+    _lp_default_theme_activate
+
+    LP_ALWAYS_ALT_VCS_TAG=${LP_ALWAYS_ALT_VCS_TAG:-0}
+    LP_ENABLE_ALT_VCS_COMMITS=${LP_ENABLE_ALT_VCS_COMMITS:-1}
+    LP_ENABLE_ALT_VCS_DIFF=${LP_ENABLE_ALT_VCS_DIFF:-1}
+    LP_ENABLE_ALT_VCS_STATUS=${LP_ENABLE_ALT_VCS_STATUS:-1}
+    LP_MARK_ALT_VCS_TAG=${LP_MARK_ALT_VCS_TAG:-"🔖"}
+}
+
+_lp_alternate_vcs_theme_directory() {
+    _lp_default_theme_directory
+}
+
+_lp_alternate_vcs_theme_prompt() {
+    _lp_default_theme_prompt_data
+
+    # TODO: This will run both VCS details, which will make this prompt slower
+    if _lp_find_vcs && _lp_alternate_vcs_details; then
+        LP_VCS=" $lp_alternate_vcs_details"
+    else
+        LP_VCS=
+    fi
+
+    _lp_default_theme_prompt_template
+}
+
+_lp_alternate_vcs_details() {
+    local branch
+    if _lp_vcs_branch; then
+        branch="$lp_vcs_branch"
+
+        if _lp_vcs_bookmark; then
+            branch+=": $lp_vcs_bookmark"
+        fi
+        if (( LP_ALWAYS_ALT_VCS_TAG )) && _lp_vcs_tag; then
+            branch+=" ${LP_MARK_ALT_VCS_TAG}${lp_vcs_tag}"
+        fi
+    elif _lp_vcs_bookmark; then
+        branch="$lp_vcs_bookmark"
+    elif _lp_vcs_tag; then
+        branch="${LP_MARK_ALT_VCS_TAG}${lp_vcs_tag}"
+    else
+        _lp_vcs_commit_id
+        branch="${lp_vcs_commit_id:0:7}"
+    fi
+
+    lp_alternate_vcs_details="$LP_COLOR_UP"
+
+    local has_commit=
+    if _lp_vcs_commits_off_remote; then
+        lp_alternate_vcs_details="$LP_COLOR_COMMITS_BEHIND"
+        if [[ "$lp_vcs_commit_ahead" -ne "0" && "$lp_vcs_commit_behind" -ne "0" ]]; then
+            has_commit="${LP_COLOR_COMMITS}+$lp_vcs_commit_ahead${NO_COL}/${LP_COLOR_COMMITS_BEHIND}-$lp_vcs_commit_behind"
+        elif [[ "$lp_vcs_commit_ahead" -ne "0" ]]; then
+            has_commit="${LP_COLOR_COMMITS}$lp_vcs_commit_ahead"
+            lp_alternate_vcs_details="$LP_COLOR_COMMITS"
+        elif [[ "$lp_vcs_commit_behind" -ne "0" ]]; then
+            has_commit="${LP_COLOR_COMMITS_BEHIND}-$lp_vcs_commit_behind"
+        fi
+        (( LP_ENABLE_ALT_VCS_COMMITS )) || has_commit=""
+    fi
+
+    local ret has_files=
+    if _lp_vcs_uncommitted_files; then
+        lp_alternate_vcs_details="$LP_COLOR_CHANGES"
+        if (( LP_ENABLE_ALT_VCS_STATUS )); then
+            _lp_vcs_unstaged_files; ret=$?
+            # Only show unstaged files if the VCS supports staging, otherwise
+            # show only uncommitted files
+            if (( ret == 0 )); then
+                local -i staged_files=$(( lp_vcs_uncommitted_files - lp_vcs_unstaged_files ))
+                if (( staged_files )); then
+                    has_files="${LP_COLOR_COMMITS}S${staged_files} "
+                fi
+                has_files+="${LP_COLOR_CHANGES}U${lp_vcs_unstaged_files}"
+            elif (( ret == 1 )); then
+                has_files="${LP_COLOR_COMMITS}S${lp_vcs_uncommitted_files}"
+            else
+                has_files="${LP_COLOR_CHANGES}U${lp_vcs_uncommitted_files}"
+            fi
+        fi
+    fi
+    if (( LP_ENABLE_ALT_VCS_STATUS )) && _lp_vcs_untracked_files; then
+        [[ -n $has_files ]] && has_files+=" "
+        has_files+="${LP_COLOR_CHANGES}?${lp_vcs_untracked_files}"
+    fi
+
+    local has_lines=
+    if (( LP_ENABLE_ALT_VCS_DIFF )) && _lp_vcs_uncommitted_lines; then
+        _lp_vcs_unstaged_lines; ret=$?
+        # Only show unstaged changes if the VCS supports staging, otherwise
+        # show uncommitted changes.
+        if (( ret == 0 )); then
+            has_lines="+$lp_vcs_unstaged_i_lines/-$lp_vcs_unstaged_d_lines"
+        elif (( ret == 1 )); then
+            # If the status is on, it would be redundant to say there are no unstaged lines.
+            if (( ! LP_ENABLE_ALT_VCS_STATUS )); then
+                has_lines="+0/-0"
+            fi
+        else
+            has_lines="+$lp_vcs_uncommitted_i_lines/-$lp_vcs_uncommitted_d_lines"
+        fi
+    fi
+
+    lp_alternate_vcs_details+="$branch"
+    if [[ -n $has_lines || -n $has_files || -n $has_commit ]]; then
+        lp_alternate_vcs_details+="${NO_COL}("
+        if [[ -n $has_files ]]; then
+            lp_alternate_vcs_details+="$has_files"
+            if [[ -n $has_lines || -n $has_commit ]]; then
+                lp_alternate_vcs_details+="${NO_COL} "
+            fi
+        fi
+        if [[ -n $has_lines ]]; then
+            lp_alternate_vcs_details+="${LP_COLOR_DIFF}${has_lines}"
+            if [[ -n $has_commit ]]; then
+                lp_alternate_vcs_details+="${NO_COL},"
+            fi
+        fi
+        lp_alternate_vcs_details+="${has_commit}${NO_COL})"
+    fi
+
+    if _lp_vcs_stash_count; then
+        lp_alternate_vcs_details+="${LP_COLOR_COMMITS}${LP_MARK_STASH}"
+    fi
+
+    if (( ! LP_ENABLE_ALT_VCS_STATUS )) && _lp_vcs_untracked_files; then
+        lp_alternate_vcs_details+="${LP_COLOR_CHANGES}${LP_MARK_UNTRACKED}"
+    fi
+
+    if _lp_vcs_head_status; then
+        lp_alternate_vcs_details+=" ${LP_COLOR_CHANGES}${lp_vcs_head_status}"
+        if [[ -n "${lp_vcs_head_details-}" ]]; then
+            lp_alternate_vcs_details+="(${lp_vcs_head_details})"
+        fi
+    fi
+
+    lp_alternate_vcs_details+="$NO_COL"
+}
diff -pruN 1.11-3/themes/powerline/powerline.theme 2.0.3-1/themes/powerline/powerline.theme
--- 1.11-3/themes/powerline/powerline.theme	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/themes/powerline/powerline.theme	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,333 @@
+
+_lp_powerline_theme_activate() {
+    # Load default markers if not already defined
+    POWERLINE_HARD_DIVIDER=${POWERLINE_HARD_DIVIDER:-""}    # U+E0B0
+    POWERLINE_SOFT_DIVIDER=${POWERLINE_SOFT_DIVIDER:-""}    # U+E0B1
+    POWERLINE_VCS_MARKER=${POWERLINE_VCS_MARKER:-""}        # U+E0A0
+    POWERLINE_SECURE_MARKER=${POWERLINE_SECURE_MARKER:-""}  # U+E0A2
+    POWERLINE_ROOT_MARKER=${POWERLINE_ROOT_MARKER:-"#"}
+    POWERLINE_STASH_MARKER=${POWERLINE_STASH_MARKER:-"ST"}
+    POWERLINE_PYTHON_ENV_MARKER=${POWERLINE_PYTHON_ENV_MARKER:-"(e) "}
+    POWERLINE_SPACER=${POWERLINE_SPACER:-" "}                # U+00A0  non-breaking space
+
+    # Load default colors if not already defined
+    [[ -z ${POWERLINE_HOST_COLOR[@]+x}           ]] && POWERLINE_HOST_COLOR=(220 166 0 0 3 2)
+    [[ -z ${POWERLINE_USER_COLOR[@]+x}           ]] && POWERLINE_USER_COLOR=(231 31 1 0 7 6)
+    [[ -z ${POWERLINE_PYTHON_ENV_COLOR[@]+x}     ]] && POWERLINE_PYTHON_ENV_COLOR=(231 74 0 0 7 4)
+    [[ -z ${POWERLINE_PATH_COLOR[@]+x}           ]] && POWERLINE_PATH_COLOR=(250 240 0 0 7 0)
+    [[ -z ${POWERLINE_PATH_SEPARATOR_COLOR[@]+x} ]] && POWERLINE_PATH_SEPARATOR_COLOR=(245 240 0 0 7 0)
+    [[ -z ${POWERLINE_PATH_LAST_COLOR[@]+x}      ]] && POWERLINE_PATH_LAST_COLOR=(252 240 1 0 7 0)
+    [[ -z ${POWERLINE_PATH_VCS_COLOR[@]+x}       ]] && POWERLINE_PATH_VCS_COLOR=(147 240 1 0 4 0)
+    [[ -z ${POWERLINE_PATH_SHORTENED_COLOR[@]+x} ]] && POWERLINE_PATH_SHORTENED_COLOR=(245 240 0 0 7 0)
+    [[ -z ${POWERLINE_JOBS_COLOR[@]+x}           ]] && POWERLINE_JOBS_COLOR=(220 166 0 0 3 2)
+    [[ -z ${POWERLINE_VCS_CLEAN_COLOR[@]+x}      ]] && POWERLINE_VCS_CLEAN_COLOR=(250 236 0 0 7 0)
+    [[ -z ${POWERLINE_VCS_DIRTY_COLOR[@]+x}      ]] && POWERLINE_VCS_DIRTY_COLOR=(220 236 0 0 3 0)
+    [[ -z ${POWERLINE_VCS_STASH_COLOR[@]+x}      ]] && POWERLINE_VCS_STASH_COLOR=(220 236 0 0 3 0)
+    [[ -z ${POWERLINE_ERROR_COLOR[@]+x}          ]] && POWERLINE_ERROR_COLOR=(231 52 0 0 7 1)
+
+    __powerline_hostname_generate
+    __powerline_username_generate
+}
+
+__powerline_hostname_generate() {
+    _POWERLINE_HOSTNAME="" _POWERLINE_HOST_ICON=""
+    local lp_hostname lp_connection
+    if _lp_hostname; then
+        _POWERLINE_HOSTNAME=${lp_hostname}
+
+        case "$lp_connection" in
+            ssh) _POWERLINE_HOST_ICON="${POWERLINE_SECURE_MARKER} "  ;;
+            su)  _POWERLINE_HOST_ICON="${POWERLINE_ROOT_MARKER} "  ;;
+        esac
+    fi
+}
+
+__powerline_username_generate() {
+    _POWERLINE_USERNAME=
+    local lp_username
+    if _lp_username; then
+        _POWERLINE_USERNAME=${lp_username}
+    fi
+}
+
+_lp_powerline_theme_directory() {
+    # Not all terminals support Powerline special characters in the title
+    local title=
+    if [[ -n $_POWERLINE_USERNAME ]]; then
+        title+=${_POWERLINE_USERNAME}
+    fi
+    if [[ -n $_POWERLINE_HOSTNAME ]]; then
+        title+="@${_POWERLINE_HOSTNAME}"
+    fi
+
+    local lp_path
+    __powerline_path_generate
+
+    [[ -n $title ]] && title+=":"
+    title+="${lp_path}"
+
+    _lp_raw_title "$title"
+}
+
+_lp_powerline_theme_prompt() {
+    local powerline_sections first_section sub_section_arrow _lp_last_af_color _lp_last_ab_color
+
+    __powerline_section "${_POWERLINE_HOST_ICON}${_POWERLINE_HOSTNAME}" "${POWERLINE_HOST_COLOR[@]}"
+
+    __powerline_section "$_POWERLINE_USERNAME" "${POWERLINE_USER_COLOR[@]}"
+
+    local lp_python_env
+    if _lp_python_env; then
+        __powerline_section "${POWERLINE_PYTHON_ENV_MARKER}${lp_python_env}" "${POWERLINE_PYTHON_ENV_COLOR[@]}"
+    fi
+
+    __powerline_section "$_lp_powerline_path" "${POWERLINE_PATH_COLOR[@]}"
+
+    local lp_running_jobs lp_stopped_jobs
+    if _lp_jobcount; then
+        __powerline_section "$(( lp_running_jobs + lp_stopped_jobs ))" "${POWERLINE_JOBS_COLOR[@]}"
+    fi
+
+    # TODO render on left side
+    local lp_vcs_type lp_vcs_root
+    if _lp_find_vcs; then
+        local lp_vcs_branch lp_vcs_uncommitted_files lp_vcs_untracked_files
+        _lp_vcs_branch
+
+        if _lp_vcs_uncommitted_files || _lp_vcs_untracked_files; then
+            __powerline_section "${POWERLINE_VCS_MARKER} ${lp_vcs_branch}" "${POWERLINE_VCS_DIRTY_COLOR[@]}"
+        else
+            __powerline_section "${POWERLINE_VCS_MARKER} ${lp_vcs_branch}" "${POWERLINE_VCS_CLEAN_COLOR[@]}"
+        fi
+
+        local lp_vcs_stash_count
+        if _lp_vcs_stash_count; then
+            __powerline_sub_section_format -2
+            powerline_sections+="${sub_section_format}${POWERLINE_SOFT_DIVIDER}"
+
+            __powerline_section "${POWERLINE_STASH_MARKER} ${lp_vcs_stash_count}" "${POWERLINE_VCS_STASH_COLOR[@]}"
+        fi
+    fi
+
+    if _lp_error; then
+        __powerline_section "${lp_error}" "${POWERLINE_ERROR_COLOR[@]}"
+    fi
+
+    __powerline_end_terminator
+
+    PS1=${powerline_sections}
+}
+
+_lp_powerline_full_theme_activate() {
+    _lp_powerline_theme_activate
+
+    # Load default markers if not already defined
+    POWERLINE_CHROOT_MARKER=${POWERLINE_CHROOT_MARKER:-"chroot: "}
+    POWERLINE_PROXY_MARKER=${POWERLINE_PROXY_MARKER:-"proxy: "}
+    POWERLINE_SOFTWARE_COLLECTION_MARKER=${POWERLINE_SOFTWARE_COLLECTION_MARKER:-"(sc) "}
+
+    # Load default colors if not already defined
+    [[ -z ${POWERLINE_BATTERY_COLOR[@]+x}              ]] && POWERLINE_BATTERY_COLOR=(-1 238 0 0 -1 0)
+    [[ -z ${POWERLINE_CHROOT_COLOR[@]+x}               ]] && POWERLINE_CHROOT_COLOR=(219 30 0 0 7 4)
+    [[ -z ${POWERLINE_LOAD_COLOR[@]+x}                 ]] && POWERLINE_LOAD_COLOR=(-1 148 0 0 -1 3)
+    [[ -z ${POWERLINE_NEUTRAL_COLOR[@]+x}              ]] && POWERLINE_NEUTRAL_COLOR=(252 234 0 0 7 0)
+    [[ -z ${POWERLINE_PROXY_COLOR[@]+x}                ]] && POWERLINE_PROXY_COLOR=(21 219 1 0 4 7)
+    [[ -z ${POWERLINE_RUNTIME_COLOR[@]+x}              ]] && POWERLINE_RUNTIME_COLOR=(226 17 0 0 3 4)
+    [[ -z ${POWERLINE_SOFTWARE_COLLECTIONS_COLOR[@]+x} ]] && POWERLINE_SOFTWARE_COLLECTIONS_COLOR=(231 62 0 0 7 5)
+    [[ -z ${POWERLINE_TEMPERATURE_COLOR[@]+x}          ]] && POWERLINE_TEMPERATURE_COLOR=(-1 240 0 0 -1 0)
+    [[ -z ${POWERLINE_TIME_COLOR[@]+x}                 ]] && POWERLINE_TIME_COLOR=(33 17 0 0 5 4)
+    [[ -z ${POWERLINE_DIRSTACK_COLOR[@]+x}             ]] && POWERLINE_DIRSTACK_COLOR=("${POWERLINE_NEUTRAL_COLOR[@]}")
+}
+
+_lp_powerline_full_theme_directory() {
+    _lp_powerline_theme_directory
+}
+
+_lp_powerline_full_theme_prompt() {
+    local powerline_sections first_section _lp_last_af_color _lp_last_ab_color
+
+    __powerline_section "$LP_PS1_PREFIX" "${POWERLINE_NEUTRAL_COLOR[@]}"
+
+    local lp_time lp_analog_time
+    if _lp_time; then
+        __powerline_section "$lp_time" "${POWERLINE_TIME_COLOR[@]}"
+    elif _lp_analog_time; then
+        __powerline_section "$lp_analog_time" "${POWERLINE_TIME_COLOR[@]}"
+    fi
+
+    __powerline_battery_section
+
+    local lp_load_color
+    if _lp_load_color; then
+        __powerline_formatted_section "$lp_load_color" "${POWERLINE_LOAD_COLOR[@]}"
+    fi
+
+    local lp_temperature_color
+    if _lp_temperature_color; then
+        __powerline_formatted_section "$lp_temperature_color" "${POWERLINE_TEMPERATURE_COLOR[@]}"
+    fi
+
+    local lp_detached_sessions lp_running_jobs lp_stopped_jobs jobs_string=
+    if _lp_detached_sessions; then
+        jobs_string="${lp_detached_sessions}d"
+    fi
+    if _lp_jobcount; then
+        if (( lp_running_jobs > 0 )); then
+            [[ -n $jobs_string ]] && jobs_string+='/'
+            jobs_string+="${lp_running_jobs}&"
+        fi
+        if (( lp_stopped_jobs > 0 )); then
+            [[ -n $jobs_string ]] && jobs_string+='/'
+            jobs_string+="${lp_stopped_jobs}z"
+        fi
+    fi
+    __powerline_section "$jobs_string" "${POWERLINE_JOBS_COLOR[@]}"
+
+    __powerline_section "$_POWERLINE_USERNAME" "${POWERLINE_USER_COLOR[@]}"
+
+    __powerline_section "${_POWERLINE_HOST_ICON}${_POWERLINE_HOSTNAME}" "${POWERLINE_HOST_COLOR[@]}"
+
+    __powerline_section "$_lp_powerline_path" "${POWERLINE_PATH_COLOR[@]}"
+
+    if _lp_dirstack; then
+        __powerline_section "${LP_MARK_DIRSTACK}${lp_dirstack}" "${POWERLINE_DIRSTACK_COLOR[@]}"
+    fi
+
+    local lp_chroot
+    if _lp_chroot; then
+        __powerline_section "${POWERLINE_CHROOT_MARKER}${lp_chroot}" "${POWERLINE_CHROOT_COLOR[@]}"
+    fi
+
+    local lp_software_collections
+    if _lp_software_collections; then
+        __powerline_section "${POWERLINE_SOFTWARE_COLLECTION_MARKER}${lp_software_collections}" "${POWERLINE_SOFTWARE_COLLECTIONS_COLOR[@]}"
+    fi
+
+    local lp_python_env
+    if _lp_python_env; then
+        __powerline_section "${POWERLINE_PYTHON_ENV_MARKER}${lp_python_env}" "${POWERLINE_PYTHON_ENV_COLOR[@]}"
+    fi
+
+    local lp_http_proxy
+    if _lp_http_proxy; then
+        __powerline_section "${POWERLINE_PROXY_MARKER}${lp_http_proxy}" "${POWERLINE_PROXY_COLOR[@]}"
+    fi
+
+    __powerline_vcs_section
+
+    if _lp_runtime_format; then
+        __powerline_section "${lp_runtime_format}" "${POWERLINE_RUNTIME_COLOR[@]}"
+    fi
+
+    if _lp_error; then
+        __powerline_section "${lp_error}" "${POWERLINE_ERROR_COLOR[@]}"
+    fi
+
+    __powerline_section "$LP_PS1_POSTFIX" "${POWERLINE_NEUTRAL_COLOR[@]}"
+
+    __powerline_end_terminator
+
+    PS1=$powerline_sections
+}
+
+__powerline_section() {  # string, (color array)
+    local section_arrow lp_terminal_format string=${1-}
+    shift
+
+    [[ -z $string ]] && return 1
+
+    __powerline_section_arrow "$@"
+    lp_terminal_format "$@"
+
+    powerline_sections+="${section_arrow}${lp_terminal_format}${POWERLINE_SPACER}${string}${POWERLINE_SPACER}"
+}
+
+# Same as __powerline_section(), but it resets formatting after the input string
+__powerline_formatted_section() {
+    local section_arrow lp_terminal_format string=${1-}
+    shift
+
+    [[ -z $string ]] && return 1
+
+    __powerline_section_arrow "$@"
+    lp_terminal_format "$@"
+
+    powerline_sections+="${section_arrow}${lp_terminal_format}${POWERLINE_SPACER}${string}${lp_terminal_format}${POWERLINE_SPACER}"
+}
+
+# Reset background for end of prompt
+__powerline_end_terminator() {
+    # Always add a end terminator, even if nothing is before it
+    local first_section="true"
+    __powerline_section_arrow -1
+    lp_terminal_format -1
+    powerline_sections+="${section_arrow}${lp_terminal_format}${POWERLINE_SPACER}"
+}
+
+__powerline_section_arrow() {  # _, background_color, _, _, _, fallback_background_color
+    if [[ -n ${first_section+x} ]]; then
+        local lp_terminal_format
+        lp_terminal_format -3 "${2-}" 0 0 -1 "${6-}"
+        section_arrow="${lp_terminal_format}${POWERLINE_HARD_DIVIDER}"
+    else
+        first_section="true"
+        section_arrow=
+    fi
+}
+
+__powerline_sub_section_format() {  # foreground_color, _, _, _, fallback_foreground_color
+    local lp_terminal_format
+    lp_terminal_format "${1-}" -2 0 0 "${5-}"
+    sub_section_format="${lp_terminal_format}"
+}
+
+# We don't want to generate the path every prompt, so create the full formatted
+# path once for each dir.
+__powerline_path_generate() {
+    local lp_terminal_format sub_section_format _lp_last_af_color _lp_last_ab_color
+
+    lp_terminal_format "${POWERLINE_PATH_COLOR[@]}"
+    local path_format=$lp_terminal_format
+
+    __powerline_sub_section_format "${POWERLINE_PATH_SEPARATOR_COLOR[@]}"
+    local separator_format=$sub_section_format
+
+    lp_terminal_format "${POWERLINE_PATH_SHORTENED_COLOR[@]}"
+    local shortened_format=$lp_terminal_format
+
+    lp_terminal_format "${POWERLINE_PATH_VCS_COLOR[@]}"
+    local vcs_format=$lp_terminal_format
+
+    lp_terminal_format "${POWERLINE_PATH_LAST_COLOR[@]}"
+    local last_dir_format=$lp_terminal_format
+
+    local lp_path_format
+    _lp_path_format "$path_format" "$last_dir_format" "$vcs_format" "$shortened_format" \
+        "${POWERLINE_SPACER}${POWERLINE_SOFT_DIVIDER}${POWERLINE_SPACER}" "$separator_format"
+
+    _lp_powerline_path=${lp_path_format}
+}
+
+# Is this a dirty hack? Yes. Am I proud of it? Also yes.
+__powerline_battery_section() {
+    local lp_battery_color NO_COL=''
+    if _lp_battery_color; then
+        __powerline_formatted_section "$lp_battery_color" "${POWERLINE_BATTERY_COLOR[@]}"
+    fi
+}
+
+__powerline_vcs_section() {
+    local lp_vcs_type lp_vcs_root
+    if _lp_find_vcs; then
+        local section_arrow lp_terminal_format
+
+        __powerline_section_arrow "${POWERLINE_VCS_CLEAN_COLOR[@]}"
+        lp_terminal_format "${POWERLINE_VCS_CLEAN_COLOR[@]}"
+
+        local lp_vcs_details_color NO_COL=$lp_terminal_format
+        _lp_vcs_details_color
+
+        powerline_sections+="${section_arrow}${lp_terminal_format}${POWERLINE_SPACER}${lp_vcs_details_color}${POWERLINE_SPACER}"
+    fi
+}
+
diff -pruN 1.11-3/tools/external-tool-tester.sh 2.0.3-1/tools/external-tool-tester.sh
--- 1.11-3/tools/external-tool-tester.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tools/external-tool-tester.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+# Do NOT error on failed commands
+set +e
+
+# Error if the output is a terminal
+if [ -t 1 ]; then
+  printf 'This script must be redirected to a file, or special characters will be lost
+  Ex: %s > output.txt\nOr, to upload directly:
+  %s | curl -F "sprunge=<-" "http://sprunge.us"\n' "$0" "$0"
+  exit 1
+fi
+
+# Export needed variables
+export LC_ALL=C
+
+# Print OS info
+printf -- '---Uname:\n'
+uname -a
+printf -- '---lpb_release:\n'
+lsb_release -a 2>/dev/null || printf '<none>\n'
+printf -- '---/etc/*release:\n'
+cat /etc/*release 2>/dev/null || printf '<none>\n'
+printf -- '---/etc/issue*:\n'
+cat /etc/issue* 2>/dev/null || printf '<none>\n'
+printf -- '---/proc/version:\n'
+cat /proc/version 2>/dev/null || printf '<none>\n'
+
+# Sanity check to verify special characters have not been lost on upload
+printf '\nSpecial character check: \a\b\t\001\r\n'
+
+test_tool() {
+  local stderr
+  printf '\nCommand: "%s"\n--------stdout--------\n' "$*"
+  { stderr="$( { "$@"; } 2>&1 1>&3 3>&- )"; } 3>&1
+  printf '\n--------stderr--------\n%s\n----------------------\nReturn code: "%s"\n' "$stderr" "$?"
+}
+
+test_tool uname
+
+hostname_cksum() {
+  hostname | cksum
+}
+test_tool hostname_cksum
+
+test_tool tput sgr0
+test_tool tput me
+test_tool tput bold
+test_tool tput md
+test_tool tput smul
+test_tool tput us
+test_tool tput colors
+test_tool tput setaf 0
+test_tool tput AF 0
+test_tool tput AF 0 0 0
+test_tool tput setab 0
+test_tool tput AB 0
+test_tool tput AB 0 0 0
+
+test_tool who am i
+test_tool ps -o comm= -p "$PPID"
+test_tool logname
+
+test_tool screen -ls
+test_tool tmux list-sessions
+
+test_tool acpi --battery
+test_tool pmset -g batt
+
+test_tool nproc
+# Not actually a command used, we read directly from the file
+test_tool cat /proc/loadavg
+test_tool sysctl -n hw.ncpu
+test_tool sysctl -n vm.loadavg
+test_tool kstat -m cpu_info
+test_tool uptime
+
+test_tool sensors -u
+test_tool acpi -t
+
+test_tool date '+%I %M'
+test_tool tty
+test_tool basename -- /dev/pts/0
+
+printf 'Tests complete.\nMake sure to upload the file directly, do not `cat` and copy paste!\n' >&2
diff -pruN 1.11-3/tools/theme-preview.sh 2.0.3-1/tools/theme-preview.sh
--- 1.11-3/tools/theme-preview.sh	1970-01-01 00:00:00.000000000 +0000
+++ 2.0.3-1/tools/theme-preview.sh	2021-05-30 15:33:14.000000000 +0000
@@ -0,0 +1,240 @@
+#!/bin/bash
+set -u
+
+. ./liquidprompt --no-activate
+
+# If a theme was given, use the theme and source all other arguments.
+if [[ -z ${1-} || $1 == --help ]]; then
+  printf '
+Usage: %s theme [sourced files...]
+
+Print out example prompts based on a standard set of input conditions. Designed
+to showcase Liquidprompt themes.
+
+Example usage: %s powerline themes/powerline/powerline.theme
+' "$0" "$0"
+  exit 1
+
+else
+  theme=$1
+  shift
+
+  for file in "$@"; do
+    . "$file"
+  done
+fi
+
+# Liquidprompt depends on PS1 being set to detect if it has installed itself.
+PS1="$ "
+
+# Since the shell is not evaluating PS1, we don't need these.
+_LP_OPEN_ESC=""
+_LP_CLOSE_ESC=""
+
+
+## Short
+
+# Configure options
+
+LP_ENABLE_PERM=0
+LP_ENABLE_SHORTEN_PATH=0
+LP_ENABLE_PROXY=0
+LP_ENABLE_TEMP=0
+LP_ENABLE_JOBS=0
+LP_ENABLE_DETACHED_SESSIONS=0
+LP_ENABLE_LOAD=0
+LP_ENABLE_BATT=0
+LP_ENABLE_GIT=0
+LP_ENABLE_SVN=0
+LP_ENABLE_FOSSIL=0
+LP_ENABLE_HG=0
+LP_ENABLE_BZR=0
+LP_ENABLE_TIME=0
+LP_ENABLE_RUNTIME=0
+LP_ENABLE_RUNTIME_BELL=0
+LP_ENABLE_VIRTUALENV=0
+LP_ENABLE_SCLS=0
+LP_ENABLE_VCS_ROOT=1
+LP_DISABLED_VCS_PATHS=()
+LP_ENABLE_TITLE=0
+LP_ENABLE_SUDO=0
+LP_ENABLE_COLOR=1
+LP_ENABLE_ERROR=0
+LP_USER_ALWAYS=1
+LP_HOSTNAME_ALWAYS=-1
+
+LP_MARK_DEFAULT='$'
+
+# Stub data functions
+
+_lp_username() {
+  lp_username=user
+}
+
+# Setup Env
+
+HOME=/home/user
+PWD=$HOME
+
+# Activate and generate
+
+lp_activate --no-config
+# Only needs to be done once
+lp_theme "$theme" || exit "$?"
+__lp_set_prompt
+
+printf 'Short prompt:\n\n  %s  \n\n' "$PS1"
+
+
+## Medium
+
+# Configure options
+
+# lp_activate() is too smart: it will disable features if the tool is not installed.
+# To make sure that doesn't happen, set these config options after activation too.
+_config() {
+  LP_ENABLE_JOBS=1
+  LP_HOSTNAME_ALWAYS=1
+  LP_ENABLE_GIT=1
+}
+_config
+
+# Stub data functions
+
+_lp_jobcount() {
+  lp_running_jobs=1
+  lp_stopped_jobs=0
+}
+_lp_hostname() {
+  _lp_connection
+  lp_hostname=server
+}
+_lp_connection() {
+  lp_connection=ssh
+}
+_lp_connected_display() { return 1; }
+_lp_find_vcs() {
+  lp_vcs_type=git
+  lp_vcs_root=$PWD
+}
+_lp_git_active() { return 0; }
+_lp_git_branch() {
+  lp_vcs_branch=main
+}
+_lp_git_bookmark() { return 2; }
+_lp_git_tag() { return 2; }
+_lp_git_commit_id() { return 2; }
+_lp_git_head_status() { return 2; }
+_lp_git_stash_count() { return 2; }
+_lp_git_commits_off_remote() { return 2; }
+_lp_git_untracked_files() { return 2; }
+_lp_git_uncommitted_files() { return 2; }
+_lp_git_uncommitted_lines() { return 2; }
+_lp_git_unstaged_files() { return 2; }
+_lp_git_unstaged_lines() { return 2; }
+
+# Setup Env
+
+PWD=$HOME/liquidprompt
+
+# Activate and generate
+
+lp_activate --no-config
+_config
+__lp_set_prompt
+
+printf 'Medium prompt:\n\n  %s  \n\n' "$PS1"
+
+
+## Long
+
+# Configure options
+
+_config() {
+  LP_ENABLE_SHORTEN_PATH=1
+  LP_PATH_LENGTH=29
+  COLUMNS=100
+  LP_PATH_KEEP=1
+  LP_PATH_VCS_ROOT=1
+  LP_ENABLE_TIME=1
+  LP_TIME_ANALOG=1
+  LP_ENABLE_BATT=1
+  LP_ENABLE_LOAD=1
+  LP_ENABLE_TEMP=1
+  LP_ENABLE_DETACHED_SESSIONS=1
+  LP_ENABLE_PERM=1
+  LP_ENABLE_VIRTUALENV=1
+  LP_ENABLE_RUNTIME=1
+  LP_ENABLE_ERROR=1
+  LP_ENABLE_DIRSTACK=1
+  LP_PERCENTS_ALWAYS=1
+}
+_config
+
+# Stub data functions
+
+_lp_analog_time() {
+  lp_analog_time="🕤"
+}
+_lp_battery() {
+  lp_battery=24
+}
+_lp_load() {
+  lp_load=1.68
+  lp_load_adjusted=42
+}
+_lp_temperature() {
+  lp_temperature=90
+}
+_lp_detached_sessions() {
+  lp_detached_sessions=3
+}
+_lp_jobcount() {
+  lp_running_jobs=2
+  lp_stopped_jobs=1
+}
+_lp_python_env() {
+  lp_python_env=pyenv
+}
+_lp_find_vcs() {
+  lp_vcs_type=git
+  lp_vcs_root="${HOME}/code/liquidprompt"
+}
+_lp_git_uncommitted_files() {
+  lp_vcs_uncommitted_files=2
+}
+_lp_git_uncommitted_lines() {
+  lp_vcs_uncommitted_i_lines=10
+  lp_vcs_uncommitted_d_lines=5
+}
+_lp_git_commits_off_remote() {
+  lp_vcs_commit_ahead=3
+  lp_vcs_commit_behind=1
+}
+_lp_git_stash_count() {
+  lp_vcs_stash_count=1
+}
+_lp_git_untracked_files() {
+  lp_vcs_untracked_files=1
+}
+_lp_runtime_format() {
+  lp_runtime_format=20s
+}
+_lp_error() {
+  lp_error=125
+}
+_lp_dirstack() {
+  lp_dirstack=3
+}
+
+# Setup Env
+
+PWD="${HOME}/code/liquidprompt/docs/theme"
+
+# Activate and generate
+
+lp_activate --no-config
+_config
+__lp_set_prompt
+
+printf 'Long prompt:\n\n  %s  \n\n' "$PS1"
