Skip to content

[Bug]: Liquidprompt (LP) theme has fallen out-of-sync with the Liquidprompt project #2390

Description

@DarrenBishop

Expected behavior

No errors; correct prompt when navigating VCS/Git repositories

Current behavior

Missing _lp_escape() function; this occurs when working in Git repositories.

An error is shown every time the prompt is built i.e. every time you enter a command and hit .

It also manifests as only the Git commit hash being featured in the prompt; never the branch or tag name.

Possible solution

My workaround at the moment is to amend the themes/liquidprompt/liquidprompt.theme.bash file:

Context

I first became aware of this issue when my PS1 failed on _lp_escape() whenever I did anything in a Git repository - this was something I could ignore for only so long, and then took me forever to track down.

The themes/liquidprompt/liquidprompt.theme.bash file references an old Liquidprompt Github project URL i.e.

github.com/nojhan/liquidprompt

instead of

github.com/liquidprompt/liquidprompt

Further on in that theme file, there are LP function overrides that nolonger match (by name) what they once targeted; for example:

  • _lp_git_branch() was renamed in LP to _lp_vcs_branch()
    • LP also shifted to an output variable style, rather than printing results to stdout - with the expectation that that would be later captured - e.g. branch="$(_lp_git_branch)" no longer works
  • _lp_escape() was renamed to __lp_escape i.e. made private (that is, it's now an unstable API)
    • Similar return value vs stdout change as per _lp_vcs_branch mentioned above
  • I am not sure what the situation is re: the _lp_time() and _lp_temp_*() function overrides are but. I have neither sensors nor acpi commands installed on my Mac to test with or talk about.

There is a fair amount going on in this theme file, by way of overrides and short-circuiting LP bits and pieces - more than I can comprehend - that I can not tell are still necessary or effective.

Steps to reproduce

Presumably, enable the liquidpormpt theme i.e.

export BASH_IT_THEME=liquidprompt

Diagnostic Information

└▪ bash-it doctor
Bash-it Doctor Summary
======================

## Environment
OS: Darwin 24.6.0
Bash Version: 5.3.8(1)-release
Bash-it Location: /Users/darren/.bash_it
Config File: /Users/darren/.bash_profile

## Bash-it Version
Current Version: v3.2.0 (0f04edce)
Status: 27 commits behind origin/master

Note: Cannot auto-update (uncommitted changes present). Use: bash-it update

## Bash-it Loading
## Profile Configuration
Note: /Users/darren/.bash_profile is a symlink to /Users/darren/bash_sync/bash_profile
Grep detection unclear, testing if .bashrc actually loads...
✗ .bashrc is NOT sourced from /Users/darren/.bash_profile
  Warning: bash-it will not load in login shells (Terminal.app, SSH sessions)
  Fix: Add the following to /Users/darren/.bash_profile:

    if [ -n "$BASH_VERSION" ]; then
        if [ -f "$HOME/.bashrc" ]; then
            . "$HOME/.bashrc"
        fi
    fi


## Enabled Components
Aliases (8): ansible bash-it curl fuck git homebrew-cask homebrew kubectl
Plugins (19): aws base direnv docker-compose docker extract fzf git gitstatus hub java jekyll man osx-timemachine osx projects python ssh sudo
Completions (20): awscli bash-it brew defaults docker-compose docker git_flow_avh helm hub kubectl maven minikube pip pip3 projects sdkman ssh system tmux virtualbox

Tip: To copy this report: bash-it doctor | pbcopy (macOS) or xclip (Linux)

FYI, my .bashrc works just fine

Additional Context (Optional)

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions