### Install Liquid Prompt with Nix Source: https://liquidprompt.readthedocs.io/en/stable/install/packages.html Install Liquid Prompt using the Nix package manager. ```bash nix-env -i liquidprompt ``` -------------------------------- ### Install via Zinit Source: https://liquidprompt.readthedocs.io/en/stable/install.html Add these lines to your .zshrc file after activating Zinit to install Liquid Prompt. Configure Zinit with the provided options for stable and lucid installation. ```zsh zinit ice ver"stable" lucid nocd zinit light liquidprompt/liquidprompt ``` -------------------------------- ### Install Liquid Prompt on Debian Source: https://liquidprompt.readthedocs.io/en/stable/install/packages.html Use this command to install Liquid Prompt on Debian and its derivatives. This command installs the package and may include an activation script. ```bash apt-get install liquidprompt ``` -------------------------------- ### Install via Antigen Source: https://liquidprompt.readthedocs.io/en/stable/install.html Add this line to your .zshrc file after activating Antigen to install Liquid Prompt. Ensure Antigen is sourced before this line. ```zsh antigen bundle liquidprompt/liquidprompt ``` -------------------------------- ### Install Liquid Prompt with Homebrew Source: https://liquidprompt.readthedocs.io/en/stable/install/packages.html Install Liquid Prompt using the Homebrew package manager on macOS and Linux. ```bash brew install liquidprompt ``` -------------------------------- ### _lp_dirstack() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the directory stack. ```APIDOC ## _lp_dirstack() ### Description Gets the directory stack. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_env_vars() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets environment variables. ```APIDOC ## _lp_env_vars() ### Description Gets environment variables. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_cmake() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets information about the CMake build system. ```APIDOC ## _lp_cmake() ### Description Gets information about the CMake build system. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_default_theme_directory() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the directory of the default theme. ```APIDOC ## _lp_default_theme_directory() ### Description Gets the directory of the default theme. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_cpu_load() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current CPU load. ```APIDOC ## _lp_cpu_load() ### Description Gets the current CPU load. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_default_theme_prompt() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the prompt string for the default theme. ```APIDOC ## _lp_default_theme_prompt() ### Description Gets the prompt string for the default theme. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_connected_display() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets information about connected displays. ```APIDOC ## _lp_connected_display() ### Description Gets information about connected displays. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_connection() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets network connection information. ```APIDOC ## _lp_connection() ### Description Gets network connection information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_default_theme_prompt_template() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the prompt template for the default theme. ```APIDOC ## _lp_default_theme_prompt_template() ### Description Gets the prompt template for the default theme. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_dev_env_color() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Assembles data related to the development environment and returns a single string. The string starts with `LP_MARK_DEV_OPEN` and ends with `LP_MARK_DEV_CLOSE`, with sections separated by `LP_MARK_DEV_MID`. Data is collected from various sources including `LP_SCLS`, `LP_AWS_PROFILE`, `LP_CONTAINER`, etc. New in version 2.2. ```APIDOC ## _lp_dev_env_color() ### Description Aggregates and formats development environment information into a single string, using specific markers for opening, closing, and separating sections. It pulls data from multiple sources like `LP_SCLS`, `LP_AWS_PROFILE`, `LP_CONTAINER`, and others. ### Method N/A (Function Call) ### Endpoint N/A (Function Call) ### Parameters None ### Request Example ``` _lp_dev_env_color() ``` ### Response #### Success Response - **var:lp_dev_env_color** (string) - A formatted string containing development environment details. ### Response Example ``` "[DEV_OPEN][Section1][DEV_MID][Section2][DEV_CLOSE]" ``` ``` -------------------------------- ### Conditional Theme Logic Based on Liquid Prompt Version Source: https://liquidprompt.readthedocs.io/en/stable/theme/custom.html Implement theme features that depend on specific Liquid Prompt versions. This example shows how to conditionally include disk status if the Liquid Prompt version is sufficient and the `_lp_disk` function is available. ```bash if _lp_version_greatereq 2 2 0 ; then if _lp_disk ; then PS1+="my disk status: $lp_disk" fi fi ``` -------------------------------- ### Add Liquid Prompt to Shell Startup Source: https://liquidprompt.readthedocs.io/en/stable/install.html Add this line to your .bashrc or .zshrc to automatically load Liquid Prompt every time you start an interactive shell. Ensure the path is correct. ```bash # Only load Liquid Prompt in interactive shells, not from a script or from scp [[ $- = *i* ]] && source ~/liquidprompt/liquidprompt ``` -------------------------------- ### _lp_default_theme_activate() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Sets up the default configurations and static elements for the default theme. It utilizes specific colors and marks defined within Liquid Prompt. ```APIDOC ## _lp_default_theme_activate() ### Description Setup the defaults and static pieces of the default theme. ### Uses Colors - `LP_COLOR_IN_MULTIPLEXER` - `LP_COLOR_MARK` - `LP_COLOR_MARK_ROOT` - `LP_COLOR_PATH_ROOT` - `LP_COLOR_USER_ALT` - `LP_COLOR_USER_LOGGED` - `LP_COLOR_USER_ROOT` ### Uses Marks - `LP_MARK_BRACKET_OPEN` - `LP_MARK_BRACKET_CLOSE` - `LP_MARK_DEFAULT` ### Version New in version 2.0. ``` -------------------------------- ### Source and Switch Theme - Shell Script Source: https://liquidprompt.readthedocs.io/en/stable/theme.html To use a theme, source the liquidprompt script, then source the desired theme file, and finally call `lp_theme` with the theme name. This is typically done in your shell configuration file. ```shell source /liquidprompt source /themes/unfold/unfold.theme lp_theme unfold ``` -------------------------------- ### __lp_theme_bash_complete Source: https://liquidprompt.readthedocs.io/en/stable/functions/internal.html Provides Bash autocompletion functionality for the `lp_theme()` command by utilizing `__lp_theme_list()` to get the list of available themes. ```APIDOC ## __lp_theme_bash_complete() ### Description Uses `__lp_theme_list()` to provide Bash autocompletion for `lp_theme()`. ### Returns - **COMPREPLY** (var) - Bash completion results. ``` -------------------------------- ### lp_activate() Source: https://liquidprompt.readthedocs.io/en/stable/functions/public.html Reloads the user configuration and rescans the environment for necessary programs. It then enables the prompt by calling `prompt_on()`. ```APIDOC ## lp_activate() ### Description Reloads the user config and rescans the environment for programs needed for specific features. Finally, it calls `prompt_on()` to enable the prompt. ### New in version 2.0 ``` -------------------------------- ### _lp_analog_time() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the analog time. ```APIDOC ## _lp_analog_time() ### Description Gets the analog time. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_default_theme_activate() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Activates the default theme. ```APIDOC ## _lp_default_theme_activate() ### Description Activates the default theme. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_fossil_head_status() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the status of the Fossil HEAD. ```APIDOC ## _lp_fossil_head_status() ### Description Gets the status of the Fossil HEAD. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_theme_list() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Lists available themes. ```APIDOC ## __lp_theme_list() ### Description Lists available themes. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_error_meaning_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for the error meaning. ```APIDOC ## _lp_error_meaning_color() ### Description Gets the color for the error meaning. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Configure Hostname Display Method Source: https://liquidprompt.readthedocs.io/en/stable/config.html Determine how the hostname is displayed. Options include 'short' (before the first dot), 'full' (entire hostname), 'fqdn' (fully qualified domain name), or 'pretty' (machine display name). ```shell LP_HOSTNAME_METHOD_: string_ _ = "short" ``` -------------------------------- ### _lp_error_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for error status. ```APIDOC ## _lp_error_color() ### Description Gets the color for error status. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_detached_sessions() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of detached sessions. ```APIDOC ## _lp_detached_sessions() ### Description Gets the number of detached sessions. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_source_config() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Sources a configuration file. ```APIDOC ## __lp_source_config() ### Description Sources a configuration file. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_default_theme_prompt_template() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Constructs the `PS1` variable. It first checks for `LP_PS1_FILE` to source, then uses `LP_PS1` if set, otherwise it uses the default theme layout. This allows for custom prompt templates while using the default theme's engine. ```APIDOC ## _lp_default_theme_prompt_template() ### Description If `LP_PS1_FILE` is set, sources it. Then, if `LP_PS1` is set, uses it as `PS1`. Otherwise, uses the default theme layout to construct `PS1`. Can be used to set different template sections than the default theme, but still use the same template engine. ### Version New in version 2.0. ``` -------------------------------- ### Reload User Configuration - lp_activate() Source: https://liquidprompt.readthedocs.io/en/stable/functions/public.html Reloads the user configuration and rescans the environment for necessary programs. It then calls prompt_on() to enable the prompt. This function is called automatically unless --no-activate is used. ```shell lp_activate() ``` -------------------------------- ### Switch to a Specific Theme - Shell Script Source: https://liquidprompt.readthedocs.io/en/stable/theme.html To switch to a loaded theme, call `lp_theme` with the theme's name as the argument. The prompt will update immediately. Use `default` to switch back to the default theme. ```shell $ lp_theme alternate_vcs ``` -------------------------------- ### _lp_container_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for container information. ```APIDOC ## _lp_container_color() ### Description Gets the color for container information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_sb() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Short for _lp_substitute_background(). ```APIDOC ## _lp_sb() ### Description Short for _lp_substitute_background(). ### Method Built-in function ### Endpoint N/A ### Parameters None specified in source. ### Request Example N/A ### Response Details not provided in source. ``` -------------------------------- ### Generate Default Liquid Prompt Configuration Source: https://liquidprompt.readthedocs.io/en/stable/config.html Use this script to create a default configuration file for customization. Edit the generated file to suit your needs. ```bash ./tools/config-from-doc.sh > my_liquidpromptrc ``` -------------------------------- ### _lp_cmake_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for CMake information. ```APIDOC ## _lp_cmake_color() ### Description Gets the color for CMake information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### List Available Themes - Shell Script Source: https://liquidprompt.readthedocs.io/en/stable/theme.html Run `lp_theme --list` to see all currently loaded themes. This includes the default theme and any others that have been sourced. ```shell $ lp_theme --list ``` -------------------------------- ### _lp_battery_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for battery status. ```APIDOC ## _lp_battery_color() ### Description Gets the color for battery status. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_theme_zsh_complete() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Provides zsh completion for themes. ```APIDOC ## __lp_theme_zsh_complete() ### Description Provides zsh completion for themes. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### List Loaded Themes - lp_theme() Source: https://liquidprompt.readthedocs.io/en/stable/functions/public.html Loads and activates a specified theme. Use the --list flag to see all loaded themes. The LP_THEME variable is updated to reflect the current theme. ```shell lp_theme --list ``` -------------------------------- ### _lp_aws_profile_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for the AWS profile. ```APIDOC ## _lp_aws_profile_color() ### Description Gets the color for the AWS profile. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_set_prompt() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Sets the prompt string. ```APIDOC ## __lp_set_prompt() ### Description Sets the prompt string. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_aws_profile() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current AWS profile. ```APIDOC ## _lp_aws_profile() ### Description Gets the current AWS profile. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Enable Prompt - prompt_on() Source: https://liquidprompt.readthedocs.io/en/stable/functions/public.html Enables prompt generation and setting. This is typically called automatically when sourcing Liquidprompt, unless the --no-activate flag is used. ```shell prompt_on() ``` -------------------------------- ### _lp_analog_time_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for analog time. ```APIDOC ## _lp_analog_time_color() ### Description Gets the color for analog time. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_get_unique_directory() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets a unique directory name. ```APIDOC ## __lp_get_unique_directory() ### Description Gets a unique directory name. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_git_commits_off_remote() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of commits ahead of the remote. ```APIDOC ## _lp_git_commits_off_remote() ### Description Gets the number of commits ahead of the remote. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Replace LP_ENABLE_FQDN with LP_HOSTNAME_METHOD Source: https://liquidprompt.readthedocs.io/en/stable/upgrading/v2.1.html Replace the deprecated $LP_ENABLE_FQDN variable with the new LP_HOSTNAME_METHOD. Use 'full' for the new method. ```shell LP_ENABLE_FQDN=1 ``` ```shell LP_HOSTNAME_METHOD=full ``` -------------------------------- ### _lp_git_branch() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current Git branch name. ```APIDOC ## _lp_git_branch() ### Description Gets the current Git branch name. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### prompt_on() Source: https://liquidprompt.readthedocs.io/en/stable/functions/public.html Enables prompt generation and setting. This is typically called during the initialization of Liquidprompt. ```APIDOC ## prompt_on() ### Description Enable the prompt generation and setting. ### Behavior This function is called when sourcing `liquidprompt`, unless the flag `--no-activate` is passed. ``` -------------------------------- ### _lp_fossil_untracked_files() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the count of untracked files in Fossil. ```APIDOC ## _lp_fossil_untracked_files() ### Description Gets the count of untracked files in Fossil. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_runtime_before Source: https://liquidprompt.readthedocs.io/en/stable/functions/internal.html Hooks into the shell to record the current time immediately after the user hits return on a command, before the command itself executes. ```APIDOC ## __lp_runtime_before() ### Description Hooks into the shell to run directly after the user hits return on a command, to record the current time before the command runs. ### Notes - Changed in version 2.0: Renamed from `_lp_runtime_before`. ``` -------------------------------- ### _lp_fossil_uncommitted_lines() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the count of uncommitted lines in Fossil. ```APIDOC ## _lp_fossil_uncommitted_lines() ### Description Gets the count of uncommitted lines in Fossil. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_fossil_uncommitted_files() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the count of uncommitted files in Fossil. ```APIDOC ## _lp_fossil_uncommitted_files() ### Description Gets the count of uncommitted files in Fossil. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Set Prompt Prefix String Source: https://liquidprompt.readthedocs.io/en/stable/config.html Defines a string that is displayed at the very beginning of the prompt. ```shell LP_PS1_PREFIX="" ``` -------------------------------- ### _lp_fossil_stash_count() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of stashed changes in Fossil. ```APIDOC ## _lp_fossil_stash_count() ### Description Gets the number of stashed changes in Fossil. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_version_string Source: https://liquidprompt.readthedocs.io/en/stable/functions/util.html Formats a version number into a standard version string. If no version is provided, it formats the current Liquid Prompt version. ```APIDOC ## _lp_version_string([_major_[, _minor_[, _patch_[, _string_[, _number_]]]]]) → var:lp_version ### Description Formats the given version number in a version string of the form: “${major}.${minor}.${patch}-${string}.${number}” If no version is given, formats the current version number of Liquid Prompt. If a version number is given, _major_ and _minor_ are both mandatory. ### Parameters #### Path Parameters - **_major_** (string, optional) - The major version number. - **_minor_** (string, optional) - The minor version number. - **_patch_** (string, optional) - The patch version number. - **_string_** (string, optional) - The string component of the version (e.g., "alpha", "beta"). - **_number_** (string, optional) - The number component of the version string. ### See Also - `_lp_version_greatereq()` ``` -------------------------------- ### _lp_fossil_commit_id() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current Fossil commit ID. ```APIDOC ## _lp_fossil_commit_id() ### Description Gets the current Fossil commit ID. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Set Prompt Postfix String Source: https://liquidprompt.readthedocs.io/en/stable/config.html Defines a string that is displayed at the very end of the prompt, after the prompt mark. ```shell LP_PS1_POSTFIX="" ``` -------------------------------- ### _lp_kubernetes_context_color() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Returns data from _lp_kubernetes_context(), colored with LP_COLOR_KUBECONTEXT and using mark LP_MARK_KUBECONTEXT. Superseded by LP_MARK_DEV_OPEN, LP_MARK_DEV_MID and LP_MARK_DEV_CLOSE in version 2.2. ```APIDOC ## _lp_kubernetes_context_color() ### Description Returns data from `_lp_kubernetes_context()`, colored with `LP_COLOR_KUBECONTEXT` and using mark `LP_MARK_KUBECONTEXT`. ### Method N/A (Function Call) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **lp_kubernetes_context_color** (string) - Colored Kubernetes context string. #### Response Example N/A ``` -------------------------------- ### _lp_fossil_branch() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current Fossil branch name. ```APIDOC ## _lp_fossil_branch() ### Description Gets the current Fossil branch name. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_env_vars_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for environment variable information. ```APIDOC ## _lp_env_vars_color() ### Description Gets the color for environment variable information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Load a Theme - Shell Script Source: https://liquidprompt.readthedocs.io/en/stable/theme.html To load a theme without activating it immediately, source the theme's `.theme` file. This makes the theme available for switching. ```shell $ source themes/alternate_vcs/alternate_vcs.theme ``` -------------------------------- ### _lp_disk_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for disk usage information. ```APIDOC ## _lp_disk_color() ### Description Gets the color for disk usage information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Activate Liquid Prompt on Debian Source: https://liquidprompt.readthedocs.io/en/stable/install/packages.html Run this script to automatically configure your shell environment for Liquid Prompt. It modifies shell startup files and creates a configuration file if one doesn't exist. Be cautious of multiple invocations. ```bash liquidprompt_activate source ~/.bashrc # or ~/.zshrc ``` -------------------------------- ### _lp_dirstack_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for directory stack information. ```APIDOC ## _lp_dirstack_color() ### Description Gets the color for directory stack information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Test Liquid Prompt Immediately Source: https://liquidprompt.readthedocs.io/en/stable/install.html Source this file in your current shell session to test Liquid Prompt without modifying your shell configuration files. Adjust the path if you cloned Liquid Prompt to a different location. ```bash source ~/liquidprompt/liquidprompt ``` -------------------------------- ### _lp_dev_env_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the color for development environment information. ```APIDOC ## _lp_dev_env_color() ### Description Gets the color for development environment information. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_theme_bash_complete() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Provides bash completion for themes. ```APIDOC ## __lp_theme_bash_complete() ### Description Provides bash completion for themes. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_default_theme_prompt() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Executes the data gathering function `_lp_default_theme_prompt_data()` followed by the template rendering function `_lp_default_theme_prompt_template()` to construct the prompt. ```APIDOC ## _lp_default_theme_prompt() ### Description Runs `_lp_default_theme_prompt_data()` then `_lp_default_theme_prompt_template()`. ### Version New in version 2.0. ``` -------------------------------- ### __lp_pwd_tilde Source: https://liquidprompt.readthedocs.io/en/stable/functions/internal.html Replaces the user's home directory with a tilde ('~') in a given path. If no path is provided, it uses the current `PWD`. This function was previously named `_lp_get_home_tilde_collapsed` and now accepts an optional path parameter. ```APIDOC ## __lp_pwd_tilde([_path_]) ### Description Returns `_path_`, or `PWD` if `_path_` is not set, with the user’s home directory replaced with a tilde (“~”). ### Parameters #### Path Parameters - **_path_** (var) - Optional - The path to process. Defaults to `PWD` if not provided. ### Returns - **lp_pwd_tilde** (var) - The path with the home directory replaced by a tilde. ``` -------------------------------- ### _lp_bzr_untracked_files() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the count of untracked files in Bazaar. ```APIDOC ## _lp_bzr_untracked_files() ### Description Gets the count of untracked files in Bazaar. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_hostname_color() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Returns `_lp_hostname()`, with added data from `_lp_chroot()`. Color is applied based on connection type (`LP_COLOR_HOST`, `LP_COLOR_SSH`, etc.) and X11 connection status (`LP_COLOR_X11_ON`/`LP_COLOR_X11_OFF`). Both `_lp_hostname()` and `_lp_chroot()` must return data for this function to return data. New in version 2.0. ```APIDOC ## _lp_hostname_color() ### Description Retrieves the hostname and chroot information, applying colors based on the connection type (SSH, Telnet, etc.) and X11 connection status. Both hostname and chroot data must be present for output. ### Method N/A (Function Call) ### Endpoint N/A (Function Call) ### Parameters None ### Request Example ``` _lp_hostname_color() ``` ### Response #### Success Response - **var:lp_hostname_color** (string) - The colored hostname and chroot information string. ### Response Example ``` "[Colored Hostname Info]" ``` ``` -------------------------------- ### _lp_bzr_uncommitted_lines() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the count of uncommitted lines in Bazaar. ```APIDOC ## _lp_bzr_uncommitted_lines() ### Description Gets the count of uncommitted lines in Bazaar. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_bzr_uncommitted_files() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the count of uncommitted files in Bazaar. ```APIDOC ## _lp_bzr_uncommitted_files() ### Description Gets the count of uncommitted files in Bazaar. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_load() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Retrieves the system load average. ```APIDOC ## _lp_load() ### Description Retrieves the system load average. ### Method Built-in function ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **load** (float) - The system load average (1-minute average). ``` -------------------------------- ### _lp_bzr_tag() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current Bazaar tag name. ```APIDOC ## _lp_bzr_tag() ### Description Gets the current Bazaar tag name. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Configure OS Name Replacements Source: https://liquidprompt.readthedocs.io/en/stable/config.html Define pairs of strings for matching and replacing OS names. This allows for shortening or customizing how OS names are displayed. Presets colors can be used in the replacement string. ```shell LP_MARK_OS=( # Arch "x86_64" "${BLUE}x64${NO_COL}" "i386" "i3" "i686" "i6" "aarch64" "${GREEN}a64${NO_COL}" # Families "BSD" "${RED}BSD${NO_COL}" "Windows" "🪟" "Unix" "U" "GNU" "🐮" # Kernels "FreeBSD" "👹" "DragonFly" "🦋" "OpenBSD" "🐡" "Darwin" "🍎" "SunOS" "${BOLD_YELLOW}☀${NO_COL}" "Cygwin" "🦢" "MSYS" "M" "MinGW" "GW" "Linux" "🐧" ) ``` -------------------------------- ### _lp_bzr_stash_count() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of stashed changes in Bazaar. ```APIDOC ## _lp_bzr_stash_count() ### Description Gets the number of stashed changes in Bazaar. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_bzr_commit_id() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current Bazaar commit ID. ```APIDOC ## _lp_bzr_commit_id() ### Description Gets the current Bazaar commit ID. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_temperature() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Retrieves the system temperature. ```APIDOC ## _lp_temperature() ### Description Retrieves the system temperature. ### Method Built-in function ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **temperature** (float) - The system temperature (e.g., in Celsius). ``` -------------------------------- ### __lp_pwd_tilde() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Replaces the home directory path with a tilde (~). ```APIDOC ## __lp_pwd_tilde() ### Description Replaces the home directory path with a tilde (~). ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_bzr_branch() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the current Bazaar branch name. ```APIDOC ## _lp_bzr_branch() ### Description Gets the current Bazaar branch name. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_wifi_signal_strength_raw() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the raw Wi-Fi signal strength. ```APIDOC ## __lp_wifi_signal_strength_raw() ### Description Gets the raw Wi-Fi signal strength. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_kubernetes_context_color() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Applies a color to the Kubernetes context name. ```APIDOC ## _lp_kubernetes_context_color() ### Description Applies a color to the Kubernetes context name. ### Method Built-in function ### Endpoint N/A ### Parameters None specified in source. ### Request Example N/A ### Response Details not provided in source. ``` -------------------------------- ### Augment Liquid Prompt Configuration Source: https://liquidprompt.readthedocs.io/en/stable/config.html Include local modifications by sourcing an additional configuration file. This is useful for synchronizing configurations across multiple machines or making user-specific deviations. ```bash LOCAL_RCFILE=$HOME/.liquidpromptrc.local [ -f "$LOCAL_RCFILE" ] && source "$LOCAL_RCFILE" ``` -------------------------------- ### _lp_error() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the last command's exit status. ```APIDOC ## _lp_error() ### Description Gets the last command's exit status. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### __lp_git_diff_shortstat_unstaged() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of unstaged changes in a Git diff. ```APIDOC ## __lp_git_diff_shortstat_unstaged() ### Description Gets the number of unstaged changes in a Git diff. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_http_proxy() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Retrieves the HTTP proxy configuration. ```APIDOC ## _lp_http_proxy() ### Description Retrieves the HTTP proxy configuration. ### Method Built-in function ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **proxy** (string) - The HTTP proxy setting. ``` -------------------------------- ### __lp_git_diff_shortstat_uncommitted() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of uncommitted changes in a Git diff. ```APIDOC ## __lp_git_diff_shortstat_uncommitted() ### Description Gets the number of uncommitted changes in a Git diff. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_cpu_load Source: https://liquidprompt.readthedocs.io/en/stable/functions/data.html Returns the system load average for the smallest increment, typically 1 minute. ```APIDOC ## _lp_cpu_load ### Description Returns a string of the system load average smallest increment, usually 1 minute. The return code is not defined. ### Returns - `var:lp_cpu_load` (string) - The system load average for the smallest increment. ``` -------------------------------- ### __lp_git_diff_shortstat_staged() Source: https://liquidprompt.readthedocs.io/en/stable/genindex.html Gets the number of staged changes in a Git diff. ```APIDOC ## __lp_git_diff_shortstat_staged() ### Description Gets the number of staged changes in a Git diff. ### Method Built-in function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### _lp_load_color() Source: https://liquidprompt.readthedocs.io/en/stable/functions/theme.html Returns the system load with color from LP_COLORMAP and mark from LP_MARK_LOAD. Adds load value if LP_PERCENTS_ALWAYS is 1. ```APIDOC ## _lp_load_color() ### Description Returns `_lp_load()` with color from `LP_COLORMAP` and mark from `LP_MARK_LOAD`. Adds load value if `LP_PERCENTS_ALWAYS` is `1`. ### Method N/A (Function Call) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **lp_load_color** (string) - Colored system load string. #### Response Example N/A ```