A full-featured & carefully designed adaptive prompt for Bash & Zsh
lp_terminal_format()
(#657, 954bace)liquidprompt
and theme-preview.sh
on Bash-3.2 (#656, e121179)liquidprompt
in Zsh when no terminal attached (dc11eb4)liquidprompt
on Windows (461f0ee)LP_COLOR_PATH
changed to $NO_COL
, to follow terminal default foreground (58693b0)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)LP_COLOR_PATH_LAST_DIR
and LP_COLOR_PATH_VCS_ROOT
changed from bold white to $BOLD
, to follow terminal default foreground (58693b0)See the v2.0.0 release notes for an overview of the improvements and features in this major version.
Note: these breaking changes are the only reason that this version is so much faster. They are also on private functions and variables, which end users were not supposed to use. If you were using them, see the upgrade notes for help.
$_LP_SHELL_bash
and $_LP_SHELL_zsh
contain 1
or 0
instead of true
or false
(f681cdf)_lp_color_map()
return changed from stdout to $ret
(e843ccf)_lp_escape()
renamed to __lp_escape()
and return changed from stdout to $ret
(f3404f9)_lp_set_prompt()
renamed to __lp_set_prompt()
(decaece)_lp_source_config()
renamed to __lp_source_config()
(decaece)_lp_battery()
return changed from stdout to $lp_battery
(3f57231)_lp_battery_color()
return changed from stdout to $lp_battery_color
(3f57231)$lp_err
renamed to $lp_error
(63b9f73)_lp_connection()
return changed from stdout to $lp_connection
(edc490f)_lp_git_head_status()
return changed from stdout to $lp_vcs_head_status
(7c21470)_lp_jobcount_color()
return changed from stdout to $lp_jobcount_color
(73f2057)_lp_load_color()
return changed from stdout to $lp_load_color
(8a987f4)_lp_get_home_tilde_collapsed()
renamed to __lp_pwd_tilde()
and return changed from stdout to $lp_pwd_tilde
(28c13f2)_lp_set_dirtrim()
renamed to __lp_set_dirtrim()
(decaece)_lp_shorten_path()
replaced by _lp_path_format()
(decaece, a35032f, ae769dc)_lp_runtime()
renamed to _lp_runtime_color()
and return changed from stdout to $lp_runtime_color
(0f0fd37)_lp_runtime_after()
renamed to __lp_runtime_after()
(decaece)_lp_runtime_before()
renamed to __lp_runtime_before()
(decaece)_lp_temp_acpi()
renamed to __lp_temp_acpi()
and return changed from $temperature
to $lp_temperature
(69c75a3)_lp_temp_detect()
renamed to __lp_temp_detect()
(69c75a3)_lp_temp_sensors()
renamed to __lp_temp_sensors()
and return changed from $temperature
to $lp_temperature
(69c75a3)_lp_temperature()
changed to data function, replaced by _lp_temperature_color()
and return changed from stdout to $lp_temperature_color
(69c75a3)_lp_time()
split into _lp_time()
, _lp_time_color()
, _lp_analog_time()
, and _lp_analog_time_color()
(8cb609d)_lp_<vcs>_branch()
return changed from stdout to $lp_vcs_branch
(f3404f9)_lp_<vcs>_branch_color()
functions removed, replaced by _lp_vcs_details_color()
(cafb8b2, bf2b9c6, 1a9fcd0, 4fff496, b523025)_lp_smart_mark()
return changed from stdout to $lp_smart_mark
(9c6d073)_lp_upwards_find()
removed, replaced by _lp_find_vcs()
(f434b6d)See the full Changelog for details.
Thanks to
set -u
issues.LP_ENABLE_ERROR
config option.LP_MARK_PREFIX
documentation.LP_MARK_PREFIX
documentation.This is marked as a release candidate as there will be no features or changes added before the full release. This should be mostly stable, as we have squashed quite a few bugs already.
Changes since v2.0.0-beta.2:
_lp_shorten_path()
replaced by _lp_path_format()
(decaece, a35032f, ae769dc)LP_PATH_DEFAULT
is replaced by LP_PATH_METHOD
(ae769dc)_lp_git_staged_files()
data function (#644, 9038ec8)_lp_git_staged_lines()
data function (#644, 9038ec8)files()
+ lines()
) (8bf1772)__lp_hostname_hash()
internal function (8f730c8)LP_LOAD_CAP
config option (#650, #530, e058b61)LP_COLOR_PATH_LAST_DIR
config option (ae769dc)LP_COLOR_PATH_SEPARATOR
config option (ae769dc)LP_COLOR_PATH_SHORTENED
config option (ae769dc)LP_COLOR_PATH_VCS_ROOT
config option (ae769dc)LP_PATH_CHARACTER_KEEP
config option (ae769dc)LP_PATH_METHOD
config option (ae769dc)LP_PATH_VCS_ROOT
config option (ae769dc)_lp_path_format()
data function (#648, #349, #149, ae769dc)__lp_end_path_left_shortening()
internal function (ae769dc)__lp_get_unique_directory()
internal function (ae769dc)_lp_terminal_device()
data function (5076dbe)_lp_battery()
/acpi
(cef9cb1)_lp_battery()
/pmset
(c0e74b8, 9e205f5, 37db052)_lp_connection()
/who
+ps
(23eb3f2, 37db052, cef9cb1)__lp_cpu_count()
/ncpu
(37db052)_lp_cpu_load()
/sysctl
(37db052)_lp_detached_sessions()
/screen
+tmux
(23eb3f2, 37db052, cef9cb1)__lp_hostname_hash()
internal function (8f730c8, 37db052)__lp_temp_sensors()
/sensors
(23eb3f2, cef9cb1)_lp_terminal_device()
data function (5076dbe, 37db052, cef9cb1)_lp_default_theme_prompt()
theme function (40c4331, 45f8091, acb5430)_lp_default_theme_prompt_data()
theme function (acb5430)_lp_default_theme_prompt_template()
theme function (acb5430)alternate_vcs
, the default theme with modified VCS display (#635, #524, 2d659f0)external-tool-tester.sh
script to generate test data (b699dea, 9a00ead, 4b7fd88)LP_LOAD_THRESHOLD
accepts floats of actual load average instead of integer centiload (#650, #530, e058b61)LP_COLOR_PATH
default changed from $BOLD
to lp_terminal_format 255 0 0 0 7
(no longer bold) (ae769dc)local
/typeset
errors on Zsh-5.0.X (#642, 7c4958b, 0f98dbb, 0ac2ad4)test.sh
file, unit tests integrated into acpi
tests above (f445eff)This is a beta version because there are still features and fixes planned for v2.0.0. This version should be as stable as v1.12.
There are mostly bug fixes of bugs in v2.0.0-beta.1. There is one new data source.
__lp_cpu_count()
to count CPU cores (e5047c0)_lp_battery()
/pmset
(c0e74b8, 9e205f5)_lp_connection()
/who
+ps
(23eb3f2)_lp_detached_sessions()
/screen
+tmux
(23eb3f2)__lp_temp_sensors()
/sensors
(23eb3f2)set -u
(1fe1559)$IFS
set command (#638, 4ebc26e)/dev/null
(#445, 4a52696)$POWERLINE_PYTHON_ENV_MARKER
(#636, e908ec8)pmset-simulator
file, now integrated into pmset
tests above (c0e74b8)This is a beta version because there are still features and fixes planned for v2.0.0. This version should be as stable as v1.12.
The biggest features are general increased speed, the theme engine, and the new documentation. See the Release Notes for the most important changes.
If you are referencing $lp_err
, setting $LP_DISABLED_VCS_PATH
, or calling _lp_title()
, see the upgrade notes for help with upgrading.
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 for help.
$_LP_SHELL_bash
and $_LP_SHELL_zsh
contain 1
or 0
instead of true
or false
(f681cdf)_lp_color_map()
return changed from stdout to $ret
(e843ccf)_lp_escape()
renamed to __lp_escape()
and return changed from stdout to
$ret
(f3404f9)_lp_set_prompt()
renamed to __lp_set_prompt()
(decaece)_lp_source_config()
renamed to __lp_source_config()
(decaece)_lp_battery()
return changed from stdout to $lp_battery
(3f57231)_lp_battery_color()
return changed from stdout to $lp_battery_color
(3f57231)$lp_err
renamed to $lp_error
(63b9f73)_lp_connection()
return changed from stdout to $lp_connection
(edc490f)_lp_git_head_status()
return changed from stdout to $lp_vcs_head_status
(7c21470)_lp_jobcount_color()
return changed from stdout to $lp_jobcount_color
(73f2057)_lp_load_color()
return changed from stdout to $lp_load_color
(8a987f4)_lp_get_home_tilde_collapsed()
renamed to __lp_pwd_tilde()
and return changed from
stdout to $lp_pwd_tilde
(28c13f2)_lp_set_dirtrim()
renamed to __lp_set_dirtrim()
(decaece)_lp_shorten_path()
renamed to __lp_shorten_path()
and return changed from stdout to
$lp_shorten_path
without formatting (decaece, a35032f)_lp_runtime()
renamed to _lp_runtime_color()
and return changed from stdout to
$lp_runtime_color
(0f0fd37)_lp_runtime_after()
renamed to __lp_runtime_after()
(decaece)_lp_runtime_before()
renamed to __lp_runtime_before()
(decaece)_lp_temp_acpi()
renamed to __lp_temp_acpi()
and return chagned from
$temperature
to $lp_temperature
(69c75a3)_lp_temp_detect()
renamed to __lp_temp_detect()
(69c75a3)_lp_temp_sensors()
renamed to __lp_temp_sensors()
and return chagned from
$temperature
to $lp_temperature
(69c75a3)_lp_temperature()
changed to data function, replaced by
_lp_temperature_color()
and return changed from stdout to $lp_temperature_color
(69c75a3)_lp_time()
split into _lp_time()
, _lp_time_color()
, _lp_analog_time()
, and
_lp_analog_time_color()
(8cb609d)_lp_<vcs>_branch()
return changed from stdout to $lp_vcs_branch
(f3404f9)_lp_<vcs>_branch_color()
functions removed, replaced by
_lp_vcs_details_color()
(cafb8b2, bf2b9c6, 1a9fcd0, 4fff496, b523025)_lp_smart_mark()
return changed from stdout to $lp_smart_mark
(9c6d073)_lp_upwards_find()
removed, replaced by _lp_find_vcs()
(f434b6d)_lp_title()
is replaced by _lp_formatted_title()
(46df995, 9604203, #581)_lp_bool()
is replaced by manually storing return codes (82ee823)._lp_sb()
is replaced by data functions indicating if they
returned data or not (82ee823)._lp_sl()
is replaced by data functions indicating if they
returned data or not (82ee823)._lp_sr()
is replaced by data functions indicating if they
returned data or not (82ee823).$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)--no-activate
to skip auto shell activation when sourcing
liquidprompt (e122d21)lp_activate()
function to reload config without needing to re-source
liquidprompt (e1f8bd5, 22dd760)theme-preview.sh
script to generate standard prompt previews (0b94b74)_lp_bzr_active()
data function (b523025)_lp_bzr_commit_id()
data function (b523025)_lp_bzr_stash_count()
data function (b523025)_lp_bzr_tag()
data function (b523025)_lp_bzr_uncommitted_files()
data function (b523025)_lp_bzr_uncommitted_lines()
data function (b523025)_lp_bzr_untracked_files()
data function (b523025)lp_terminal_format()
util function (#486, 09cfced)$LP_ENABLE_ERROR
config option (#543, 63b9f73)_lp_chroot()
data function (c946155)_lp_connected_display()
data function (c946155)_lp_error()
data function (63b9f73)_lp_hostname()
data function (8de1a72, 6ea54e9)_lp_hostname_color()
theme function (c946155, 8de1a72, b1a3145)_lp_http_proxy()
data function (78dee3c)_lp_http_proxy_color()
theme function (78dee3c)_lp_multiplexer()
data function (0200b99, 230c9d7)_lp_python_env()
data function (03434d3)_lp_python_env_color()
theme function (03434d3)_lp_software_collections()
data function (f4afc5d)_lp_software_collections_color()
theme function (f4afc5d)_lp_sudo_active()
data function (9ba5d28)_lp_sudo_active_color()
theme function (9ba5d28)_lp_user()
data function (9ba5d28)_lp_username()
data function (debb794)_lp_username_color()
theme function (afe3195)_lp_fossil_active()
data function (bf2b9c6)_lp_fossil_commit_id()
data function (bf2b9c6)_lp_fossil_head_status()
data function (bf2b9c6)_lp_fossil_stash_count()
data function (bf2b9c6)_lp_fossil_uncommitted_files()
data function (bf2b9c6)_lp_fossil_uncommitted_lines()
data function (bf2b9c6)_lp_fossil_untracked_files()
data function (bf2b9c6)_lp_git_active()
data function (70b4ef6)_lp_git_commit_id()
data function (70b4ef6)_lp_git_commits_off_remote()
data function (309b443)_lp_git_stash_count()
data function (fe9919f, bb19836)_lp_git_tag()
data function (70b4ef6, #506)_lp_git_uncommitted_files()
data function (67dc0a9)_lp_git_uncommitted_lines()
data function (70b4ef6)_lp_git_unstaged_files()
data function (67dc0a9)_lp_git_unstaged_lines()
data function (70b4ef6)_lp_git_untracked_files()
data function (fe9919f)_lp_hg_active()
data function (1a9fcd0)_lp_hg_bookmark()
data function (f4636e6)_lp_hg_commit_id()
data function (1a9fcd0)_lp_hg_head_status()
data function (1a9fcd0)_lp_hg_stash_count()
data function (1a9fcd0)_lp_hg_tag()
data function (1a9fcd0)_lp_hg_uncommitted_files()
data function (1a9fcd0)_lp_hg_uncommitted_lines()
data function (1a9fcd0)_lp_hg_untracked_files()
data function (1a9fcd0)$LP_ENABLE_DETACHED_SESSIONS
config option, separate from jobs (f9038e0, 862dcfb, #552)_lp_detached_sessions()
data function (73f2057, 862dcfb)_lp_jobcount()
data function (73f2057)_lp_load()
data function (8a987f4)$lp_path
data variable (a35032f)__lp_path()
internal function (a35032f)_lp_runtime_format()
data function (0f0fd37)_lp_svn_active()
data function (4fff496)_lp_svn_commit_id()
data function (4fff496)_lp_svn_uncommitted_files()
data function (4fff496)_lp_svn_uncommitted_lines()
data function (4fff496)_lp_svn_untracked_files()
data function (4fff496)_lp_temperature()
as data function (69c75a3)__lp_theme_bash_complete()
to complete themes in Bash for lp_theme()
(884c069)__lp_theme_list()
to list themes loaded in function memory (884c069)__lp_theme_zsh_complete()
to complete themes in Zsh for lp_theme()
(884c069)_lp_default_theme_activate()
theme function (40c4331, 45f8091)_lp_default_theme_directory()
theme function (40c4331, 45f8091)_lp_default_theme_prompt()
theme function (40c4331, 45f8091)lp_theme()
to switch themes without resourcing any
files (45f8091, 884c069, #592)powerline_full
, the default theme order in Powerline style (bcefaf3)powerline
, a clone of the Powerline prompt (af8382b, 8de1a72, 5ef795d, #520)_lp_analog_time()
data function (8cb609d, bc120d5)_lp_analog_time_color()
theme function (8cb609d, bc120d5)_lp_time()
data function (bc120d5)_lp_time_color()
theme function (bc120d5)lp_formatted_title()
sets persistent title stripping terminal formatting
sequences (46df995, 9604203)_lp_raw_title()
sets persistent title without stripping terminal formatting
sequences (46df995)lp_title()
sets a manual title that overrides the theme set title (46df995, #609)__lp_is_function()
util function (9b40ca1)__lp_line_count()
util function (a314677)_lp_find_vcs()
to quickly find nearest VCS repo (f434b6d, #524)_lp_vcs_active()
data function (cafb8b2, #524)_lp_vcs_bookmark()
data function (f4636e6, #524)_lp_vcs_branch()
data function (cafb8b2, #524)_lp_vcs_commit_id()
data function (cafb8b2, #524)_lp_vcs_commits_off_remote()
data function (cafb8b2, #524)_lp_vcs_details_color()
to format VCS details regardless of VCS
type (cafb8b2, f4636e6, 5c56e65, #524)_lp_vcs_head_status()
data function (cafb8b2, #524)_lp_vcs_stash_count()
data function (cafb8b2, #524)_lp_vcs_tag()
data function (cafb8b2, #506, #524)_lp_vcs_uncommitted_files()
data function (cafb8b2, #524)_lp_vcs_uncommitted_lines()
data function (cafb8b2, #524)_lp_vcs_unstaged_files()
data function (cafb8b2, #524)_lp_vcs_unstaged_lines()
data function (cafb8b2, #524)_lp_vcs_untracked_files()
data function (cafb8b2, #524)$IFS
(e48856b)set -u
compatable (#354, a8aa8c9, cb9d71b)$LP_COLORMAP
array (f3f20ec)$LP_ENABLE_RUNTIME_BELL
was disabled (cb9d71b)$LP_TIME_ANALOG
(f8c1c47)tput
is not found (09cfced)sed
call in _lp_fossil_branch()
(6d94db6)_lp_git_branch()
only returns a matching branch, not a fallback commit ID. Use
_lp_git_commit_id()
instead (70b4ef6)_lp_git_head_status()
add more matches from official git prompt, as well as details
for partial rebases (#527, 5c56e65)__lp_line_count()
instead of wc -l
for data function (fb123f4)_lp_svn_branch()
prefixes tag with "tag/", no longer returns current directory if no
match found (4fff496)$LP_ENABLE_VCSH
config option, which did nothing (f86a097)Version 1.12.1
A small fix for fossil users. This is annoying enough that it needs a fix now instead of in the rework.
Fixed
Thanks to:
After more than 4 years, it's finally here. While the project needs much more work, there were enough pending changes and needed small fixes that a minor version release was needed. This release also sees the project moving to true Semantic Versioning, which is why this is a *.*.0 release. Bug fix releases between now and v2.0 will be of the form 1.12.1 and following.
In general, this release contains mostly fixes, but there are a few added features. Liquidprompt still has a lot of work to do with issues, but this release should have a lot less of them than the previous release.
As we move towards breaking changes for 2.0, I would recommend users stay targeting this tag, unless they want to help debug issues as we work on 2.0, in which case you can follow master.
$MAGENTA
, $BOLD_PURPLE
, and $BOLD_MAGENTA
(3fadce9)tput
is not available (#615)$LP_MARK_PERM
(#430)$LP_RUNTIME_BELL
and $LP_RUNTIME_BELL_THRESHOLD
to ring bell
for slow commands (#571)LC_ALL=C
everywhere parsable output is needed (#548, #549)IFS
everywhere it is used (#613)$PROMPT_COMMAND
, we now
unexport it on startup (#450, #463, #474)$_LP_RUNTIME_LAST_SECONDS
when set -u
is set (#605)$BASH_VERSINFO
for when there is a non-numeric
suffix (#522, 0234a58)$LP_COLORMAP
would break if customized with a different sized
array (a70e80f)_lp_color_map()
would return nothing if the passed in value was
outside the scale range (a70e80f, #455, #499, #604)-E
from grep check for portablility (#508)$LP_ENABLE_FQDN
implementation (#472)$LP_COLOR_HOST_HASH
erroring (#461, #462, 9c1c8a3)$LP_MARK_DEFAULT
being ignored if root (#501, 5ee3c53)$_
would evaluate as
_lp_runtime_before
(#451);
),
runtime would never show. Now shows runtime of whole pipeline (#614)$TERM
set (#563)tput
color gen (d62bf31)git stash
check (#503, 93df016)_lp_color_map()
_lp_color_map()
$_
issuetput
not installed.1.12 is coming. There are only a few bugs left that I would say are in scope for 1.12. They are #500, #511, #547, and #584. All related to Unicode and inconsistant character sizes I think, but I can't reproduce them.
I won't commit to any timeline on the actual release, but unless I get some bug reports or help with the above issues in the next week or so, I'll probably release it.
Changes since v1.12-beta.1:
LC_ALL=C
everywhere parsable output is needed (#548, #549)$LP_COLORMAP
would break if customized with a different sized array (a70e80f)_lp_color_map()
would return nothing if the passed in value was outside the scale range (a70e80f, #455, #499, #604)$_
would evaluate as _lp_runtime_before
(#451);
), runtime would never show. Now shows runtime of whole pipeline (#614)$TERM
set (#563)_lp_color_map()
_lp_color_map()
$_
issueIt has been over four years, but 1.12 is coming. There are only a handful of changes here, but stretched out over four years, it is for sure time for a release.
I couldn't make this a release candidate since there is at least one important fix I am planning on including. I hopefully will get to it soon, but I have been sitting on these changes long enough, and it's time to get them out there.
$MAGENTA
, $BOLD_PURPLE
, and $BOLD_MAGENTA
(3fadce9)$LP_MARK_PERM
(#430)$LP_RUNTIME_BELL
and $LP_RUNTIME_BELL_THRESHOLD
to ring bell
for slow commands (#571)LC_ALL=C
everywhere parsable output is needed (#548, #549)$PROMPT_COMMAND
, we now
unexport it on startup (#450, #463, #474)$_LP_RUNTIME_LAST_SECONDS
when set -u
is set (#605)$BASH_VERSINFO
for when there is a non-numeric
suffix (#522, 0234a58)-E
from grep check for portablility (#508)$LP_ENABLE_FQDN
implementation (#472)$LP_COLOR_HOST_HASH
erroring (#461, #462, 9c1c8a3)$LP_MARK_DEFAULT
being ignored if root (#501, 5ee3c53)tput
color gen (d62bf31)git stash
check (#503, 93df016)