Liquid Prompt is an adaptive prompt for Bash and Zsh. This guide ease its installation on Debian.
This howto is tested on:
- Debian 8.0 Jessie
- Debian 10.0 Buster
This howto is tested with theses versions of the software:
- 1.10
- 1.11
Installation
Detect if sudo is available (“command” is used if not):
cmdProxy='command'
command type -f 'sudo' &>'/dev/null' && cmdProxy='sudo'
Set the installation path:
installPath="/usr/local/share/liquidprompt"
Environment setup
Install the software’s requirements:
${cmdProxy} apt install 'git'
Installation
Install the software:
${cmdProxy} git clone 'https://github.com/nojhan/liquidprompt.git' "${installPath}"
Enable Liquid Prompt for all users:
${cmdProxy} tee -a '/etc/bash.bashrc' <<< "
# Only load Liquid Prompt in interactive shells, not from a script or from scp
[[ \$- = *i* ]] && source '${installPath}/liquidprompt'"
Automatic upgrades
Install an weekly automatic upgrade cron task:
${cmdProxy} tee '/etc/cron.weekly/liquidprompt-update' \
<<< "#"'!'"/bin/bash
# Update Liquid Prompt source code from Git.
test -x '/usr/bin/git' -a -d '${installPath}' && {
pushd '${installPath}' > '/dev/null'
/usr/bin/git pull --quiet > '/dev/null'
popd > '/dev/null'
}"
${cmdProxy} chmod +x '/etc/cron.weekly/liquidprompt-update'
Activation for current user
Install a default configuration:
command mkdir -p "${HOME}/.config"
command cp "${installPath}/liquidpromptrc-dist" "${HOME}/.config/liquidpromptrc"
Load Liquid Prompt in current prompt:
source "${installPath}/liquidprompt"
Thanks
- Thanks to Liquid Prompt (en) developers.
0 Comments