Giter Club home page Giter Club logo

liquidprompt's Introduction

Liquid Prompt
A useful adaptive prompt for Bash & Zsh

Liquid Prompt gives you a carefully designed prompt with useful information. 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.

Examples

Below are screenshots of typical states that you would see in everyday use.

Using the default theme:

Screenshot

Using the Powerline theme:

Screenshot

Of course, Liquid Prompt may display much more information, depending on the status of your system.

Why Liquidprompt?

There are many prompts configurations out there, but here is what makes Liquid Prompt stand out:

  • UX Design: The Liquid Prompt was very carefully design from the beginning, to allow for the best user experience. That is, it displays meaningful information with minimal visual clutter and maximum readability. While most of the other prompts are focused on aligning as much colored "segments" as possible on top of each others to look fancy, Liquid Prompt focus on what really matters.
  • Ease of use: The Liquid Prompt is written in (heavily optimized) portable Shell, and its installation is as easy as copying files. It also provides pre-defined themes, enabled by a simple command in your shell configuration. Configuration is as simple as editing text file with key/value pairs. No complex format to learn.
  • Shell features first: The Liquid Prompt helps you being aware of all the powerfull features a modern shell can provide. While most of the other prompts focus on covering a lot of (boring) software version tags, Liquid Prompt shows you the features that are actually useful while you actually use the shell.
  • Configurability: All aspects of Liquid Prompt are configurable, down to the core.

To see what that entails, see the latest features overview (which also presents a comparison with other prompt systems).

You may also take a closer look at this screenshot of a session showing various features, in the default theme:

Screenshot

Documentation

Tests Documentation Status

See the Liquidprompt documentation for details on installing and configuring Liquidprompt.

License

Liquid Prompt is distributed under the GNU Affero General Public License version 3.

Authors

Current Maintainer: Rycieos. Other main authors: nojhan and dolmen.

And many contributors!

liquidprompt's People

Contributors

ahmedtd avatar alexprengere avatar anthonygelibert avatar augmentedfourth avatar aureq avatar cyli avatar dolmen avatar dr4ke avatar frederic-mahe avatar illwieckz avatar ismith avatar jaesivsm avatar jonasbn avatar ldidry avatar milouse avatar nlacourte avatar nojhan avatar olethanh avatar ottok avatar poil avatar rmdir avatar rolfmorel avatar rycieos avatar smcv avatar ste-fan avatar thanatos avatar todorowww avatar yannack avatar zeuh avatar zyzzyxdonta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquidprompt's Issues

checkin for .svn do not work for subversion version 1.7

In subversion 1.6 each directory contains a .svn directory.
With subversion 1.7 only the root of the repository contains a .svn directory. I guess subversion copied on git.

Maybe the solution is to use svn infoto know if we are in a svn repo or not.

Cygwin lack of 'o' option for ps shows error messages on every prompt

Cygwin doesn't support the 'o' option for ps (version: ps (cygwin) 1.7.17), which causes errors to show on every prompt displayed. A simple fix is redirecting stderr to /dev/nullin liquidprompt/liquidprompt (it might actually be a good idea to do the same for other commands, since any kind of undesired output makes the prompt pretty much blow up).

diff --git a/liquidprompt b/liquidprompt
index 1ce6e72..13615aa 100755
--- a/liquidprompt
+++ b/liquidprompt
@@ -361,7 +361,7 @@ _lp_connection()
     else
         # TODO check on *BSD
         local sess_src=$(who am i | sed -n 's/.*(\(.*\))/\1/p')
-        local sess_parent=$(ps -o comm= -p $PPID)
+        local sess_parent=$(ps -o comm= -p $PPID 2> /dev/null)
         if [[ -z "$sess_src" || "$sess_src" = ":"* ]] ; then
             echo lcl  # Local
         elif [[ "$sess_parent" = "su" || "$sess_parent" = "sudo" ]] ; then

A way to disable some features in function of current directory

The problem occurs when L (my local host) mounts some distant directories from D (distant host):
1/ distant subversion/git/etc configuration file can be totally different from those on my local machine and distant host can run different versions of svn/git/etc binaries
2/ D can have a access to its svn server but not L

As a result, implicit svn/git/etc commands fail after a long timeout, causing my prompt to be blocked.
Maybe a way to resolve this would be to be able to construct a blacklist of directories for every option.

sed: -e expression #1, char 23: unknown option to `s'

I don't yet know why but in a SVN repository I see this error:

sed: -e expression #1, char 23: unknown option to `s'
sed: -e expression #1, char 23: unknown option to `s'
[rousseau@debian:~/Sources/ … /Debian/SVN/pcsc-lite] $ 

The error is generated by the line 514:
branch=$(svn info --xml 2>/dev/null | grep "^<url>" | sed "s/.*\/$root\/\([[:alpha:]]*\).*<\/url>$/\1/")
in the function __svn_branch()

In the SVN repository with the issue I have:

$ svn info --xml
<?xml version="1.0"?>
<info>
<entry
   path="."
   revision="16139"
   kind="dir">
<url>svn+ssh://svn.debian.org/svn/collab-maint/deb-maint/pcsc-lite</url>
<repository>
<root>svn+ssh://svn.debian.org/svn/collab-maint</root>
<uuid>19660600-52fe-0310-9875-adc0d7a7b53c</uuid>
</repository>
<wc-info>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
   revision="16132">
<author>rousseau</author>
<date>2010-05-13T12:06:59.049161Z</date>
</commit>
</entry>
</info>

In another repository without any problem I have:

<?xml version="1.0"?>
<info>
<entry
   path="."
   revision="6399"
   kind="dir">
<url>svn+ssh://svn.debian.org/svn/pcsclite/trunk</url>
<repository>
<root>svn+ssh://svn.debian.org/svn/pcsclite</root>
<uuid>0ce88b0d-b2fd-0310-8134-9614164e65ea</uuid>
</repository>
<wc-info>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
   revision="6399">
<author>rousseau</author>
<date>2012-08-02T18:06:38.755308Z</date>
</commit>
</entry>
</info>

The problem is generated by the unescaped '/' in $root. But I have no idea why I do not have the same problem with my other SVN repositories.

Cygwin performance

I am using liquidprompt on Win7/Cygwin/bash, without any modification in theme or config. It works and looks great, but its performance are somewhat sluggish.

My completely unscientific tests are "just press enter and look at my stopwatch for when I the prompt is displayed again". Without any source repository, I have:

  • ~0.8s response time on local hard disk
  • ~1.3s on a network share
  • ~45s on a local hard disk at the root of a medium-sized SVN checkout (find ~/svn/trunk | wc -l ==> 87758)

I'd like to improve it, but I don't know where to start, and how to measure what part(s) of the code take most of the time.

Internet Connection Status in the prompt?

Hi,

I was wondering if it could be interesting to be able to know if the internet connection is up or down?
A first approach could, for example, be to ping google and check the result status of the ping command.
I created a branch in my liquidprompt fork to test this (dloureiro/liquidprompt@da34fd2c04d01480e568089fef90f550907a4d23). Tell me if you want me to propose a PR concerning this feature.

Disabling/enabling features

As pointed out in pull request #42 and #49, the LP_ENABLE_* variables and *.ps1 template files are doing more or less the same job.

At the moment, the advantages of having both systems are:

  • it is simpler for newbies to edit an LP_ENABLE variable than to edit LP_PS1,
  • it permits to keep complex existing template codes while disabling a specific feature (and thus we could have out-of-the-box templates like "laptop" or "server"),
  • it is faster than parsing the LP_PS1 variable for checking what's asked,

Drawback:

  • if you do remove a feature from your LP_PS1, you still have to disable it if you want to save speed.

Any idea on how to achieve an elegant features enabling system?

Wifi Signal Strength

It might be useful to add in the current signal strength of the wifi network. You can get it with this command: awk 'NR==3 {print $3}''' /proc/net/wireless | cut -d "." -f 1

Performance improvement

We could improve liquidprompt responsivness by avoiding invoke VCS command twice.

Currently VCS command are invoked both by _lp_smart_mark and _lp_set_prompt. In lp_set_prompt we should reuse the content of LP_[VCS] variables avoid the extra call in _lp_smart_mark

Default prompt mark

I prefer to have a '>' than '$' in my prompt.
I do a little hack to do that, define a new LP parameter.
Here is the diff (I cannot acces git protocol from where I am):

229a230
>     LP_MARK_END_DEFAULT=${LP_MARK_END_DEFAULT:-"\\\$"}
1254c1255
<     mark="\\\$"

---
>     mark=$LP_MARK_END_DEFAULT

Perhaps related to #46

_lp_shorten_path yields an error in presence of a whitespace in a directory's name (at least using zsh)

Hi,

when I go into a directory with a whitespace in its name, I get an error from _lp_shorten_path:

[raz:~] % cd /tmp/temp\ 1
_lp_shorten_path:local:16: not an identifier: 1
[raz:] %

Alternatively, without a number in the name and when the path is long enough to be truncated, I get the following error:

[raz:~] % cd /tmp/temp\ dir/temp\ directory
_lp_shorten_path:local:16: not valid in this context: dir/temp
[raz:] %

The errors seem to come from this line but I am in no way competent enough to fix it…

    local p=$(echo "$1" | sed -e "s|$HOME|~|")

sed: invalid option -- E

Looks like sed -E is not supported everywhere. On a Centos 5.7 system, every time the prompt is printed I get this error:

sed: invalid option -- E
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
[snip sed help message]

$ cat /etc/redhat-release
CentOS release 5.7 (Final)

$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)

$ sed --version
GNU sed version 4.1.5

On a Fedora 16 system, no problems :)
[skanx:~] $ sed --version
GNU sed version 4.2.1

Memory alerts feature?

Should we have a memory meter (just like the battery and load ones)?

Emmanuel Rouat have suggested (some weeks ago) to also add a swap detector:

# Experimental: detect if machine is swapping
function swap_color()
{
    if [ $(vmstat | awk 'END{ print $7 }') -gt "0" ]; then  # swapin > 0
        echo -en ${ALERT}
    fi
}

Prompt not loading with separate ps1 file

If my bashrc/zshrc is only this (assuming liquidpromptrc-dist is moved to ~/.liquidpromptrc)

source liquid.theme        
source liquidprompt
source liquid.ps1 

The prompt won't work at all (only [] will be displayed, like all variables are empty).
But if I source the liquid.ps1 after, it works, meaning if bashrc/zshrc is

source liquid.theme        
source liquidprompt
#source liquid.ps1 

And after opening a new shell, I perform source liquid.ps1, everything is fine.
I must be missing something very obvious here...

Parse error with zsh

Hi,

I have a parse error with zsh :
liquidprompt:1232: parse error near `]]'

When i use bash, it's OK, but not with zsh.
I use Debian Wheezy and liquidprompt is up-to-date.

Thanks

Ps : Sorry if it's not the good place for this post.

LP_PS1_POSTFIX

The LP_PS1_PREFIX is nice, but what I would really like is a post fix. I like my prompt to start on a newline, so I would like all of the status from this prompt, but to end with "\n>"

Since LP_PS1_PREFIX has been implemented, I imagine POSTFIX should be similar.

Prefix all function with '_lp'

LiquidPrompt injects many functions (33 in ee7514b) in the shell environment. It would be cleaner to prefix all the private functions with __lp_ or _lp_.

"ret=0\n" at the begining of PS1

With the current version of liquidprompt on my Archlinux laptop (gnome-terminal + zsh) i have this extra string ret=0\n at the begining of the prompt.

It append only when battery is discharging.

Example :

ret=0
⌁70% [jpec:~/Code/liquidprompt] master(+1/-1) ± source liquidprompt
ret=0
⌁70% [jpec:~/Code/liquidprompt] master(+1/-1) ± echo $PS1
ret=0\n%{^[[31m%}⌁%{^[(B^[[m%}%{^[[1m^[[32m%}70%%%{^[(B^[[m%} [%n%{^[(B^[[m%}%{^[[32m%}:%{^[(B^[[m%}%{^[[1m^[[37m%}%~%{^[(B^[[m%}] %{^[[31m%}master%{^[(B^[[m%}(%{^[[35m%}+1/-1%{^[(B^[[m%})%{^[(B^[[m%} %{^[[1m^[[37m%}±%{^[(B^[[m%} 
ret=0
⌁69% [jpec:~/Code/liquidprompt] master 127 ±  

Pollution

LiquidPrompt injects many global shell functions and shell variables. Too many.
Here is how to measure the pollution:

# == Count before ==
# Count shell functions
declare -F | wc -l
# Count shell variables (except functions)
set | grep '^[_a-zA-Z]*=' | wc -l
# == Load LiquidPrompt ==
source ./liquidprompt
# == Count after ==
declare -F | wc -l
set | grep '^[_a-zA-Z]*=' | wc -l

Pollution on ee7514b:

  • functions: 33
  • variables: 51

Some functions could be unset : *_FreeBSD on Linux...
Most variables should be declared as local inside functions.

svn management is too slow for "big" svn repo

If I do a cd at the root of my SVN repo I have to wait up to 13 seconds (the first time) to get the prompt back.
And nearly 2 seconds to get a new prompt just after pressing Enter (no command).

I have no real idea how to improve the situation.
Maybe limit the time a prompt refresh can take? Something like a timeout command http://stackoverflow.com/questions/687948/timeout-a-command-in-bash-without-unnecessary-delay

For info, my SVN repo has 62839 files (including .svn ones) for 486M. And I use a recent machine.

Quotes in front of the prompt

Hey,

Just started using liquidprompt.
As usual, cp liquidpromptrc-dist liquidprompt and source liquidprompt make it work, but I have a problem: my prompt has two double quotes at the beginning of every line.

 ""[myuser:~/dev/myproject/trunk] trunk ‡ cd
 ""[myuser:~] $ 

My OS:

[myuser:~] $ cat /etc/redhat-release 
Fedora release 16 (Verne)

(note how the double quotes disapeared for this one (!), I think it's because I used the TAB key to complete /etc/... )

I don't know what's the problem here.

Untracked files information for git

It would be nice, in the git specific part of the prompt, to get some "untracked files information".
It could be done by adding the following lines in the _lp_git_branch_color function.

    local has_untracked
    has_untracked=$(git status 2>/dev/null | grep '\(# Untracked\)')
    if [[ -z "$has_untracked" ]] ; then
        has_untracked=""
    else
        has_untracked="*"
    fi

Then modify the ret variable and adding the has_untracked symbol somewhere, per example after the branch like this (also should be modified all 4 cases where ret is set):

ret="${RED}${branch}${has_untracked}${NO_COL}(${PURPLE}$has_lines${NO_COL},${YELLOW}$has_commit${NO_COL})"    

This is just an example on how to do it, as a git user I find this pretty useful (oh-my-zsh has something similar in the git plugin with "clean" and "dirty" prompts)

Add time limit to display prompt

I have a big svn repository.
When I go inside, liquidprompt take some time (in multiples seconds, perharps minutes) to display something.
I suggest a new functionality that stop svn task (or other) on timeout and display a special mark (like (?) ) instead usual value.

osx errors

That's what I got after including it, I'll try to remove what fails, but would be nice if it worked out of the box :)

grep: /proc/cpuinfo: No such file or directory
awk: can't open file /proc/loadavg
 source line number 1
bash: let: load=0/       0: division by 0 (error token is "0")

LP_SUBVERSION_MARK variable inconsistent with LP_SVN

The liquidprompt API exposes the following variables:

  • in config: LP_SUBVERSION_MARK, LP_MERCURIAL_MARK
  • in LP_PS1: LP_SVN, LP_HG

This is inconsistent. We must use always the long name or always the short (command) name.

I propose to always use the short name and so rename:

  • LP_SUBVERSION_MARK to LP_SVN_MARK
  • LP_MERCURIAL_MARK to LP_HG_MARK

liquidprompt not working correctly on mountain lion

Hello,

after sourcing liquidprompt in my .bashrc file on my mac os x mountain lion system, I get strange message from bash before very prompt :

Last login: Thu Jan 17 10:43:25 on ttys000
-bash: update_terminal_cwd;: command not found
⌂61% [dloureiro:~/devel/liquidprompt] master ±

That "update_terminal_cwd" is not used in liquidprompt, but the interaction of liquidprompt with the PROMPT_COMMAND appears to be the problem.

It seems to come from the fact that in the /etc/bashrc file there is :

PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"

This issue has also been reported by the autojump project and the corresponding issue is currently closed -> wting/autojump#58
So they found a fix for the problem, but I don't understand how to apply this to liquidprompt...
Perhaps you will :)

If you don't have any mountain lion machine around, and want to perform some tests, juste tell me.

Regards.

Bug in root path color

Replace (line 956)
PS1="${PS1}${LP_PATH_ROOT}${LP_PWD}${NO_COL}]${LP_COLOR_PROXY}${LP_PROXY}${NO_COL}"

With
PS1="${PS1}${LP_COLOR_PATH_ROOT}${LP_PWD}${NO_COL}]${LP_COLOR_PROXY}${LP_PROXY}${NO_COL}"

Autocompletion for apt-get

liquidprompt should offer autocompletion for apt-get subcommand (install, show, policy, etc) as well as for package names.

I know it is possible because I had it in my previous shell.

Missing (or extra) quote around virtualenv name

When a Python virtualenv is active liquidprompt displays:

1z [user:~/Dev/project] [ve"]↥ $

ve is the name of my virtualenv and as you can see there is an unbalanced double-quote around it.

LP_OLD_PWD variable displayed in prompt?!

I have a weird bug and it seems quite random. Sometime, the LP_OLD_PWD variable name (not its value) is displayed as part of my prompt, and it seems it appears after some navigation in directories but not always… Really weird.
Prompt looks like this: [:~LP_OLD_PWD/directory] %

I’ve looked at the source but I don’t understand how this variable can be displayed here. Also the bug seems to be not present anymore if line 1296 is commented out. (LP_OLD_PWD="$PWD").

I’m using zsh 5.0.2 on archlinux with current master of liquidprompt.

Add support for black on white terminals

My terminals are black on white. So writing in WHITE color is terribly visible.

I do not know a way to detect if the terminal is black on white or white on black. So the configuration shall be stored somewhere. Maybe by setting a variable before sourcing liquidprompt.bash

In my case I had to change ${WHITE} in ${BLACK} in __smart_mark() and __set_bash_prompt()

zsh/oh-my-zsh

Hi !

I came across an article showing what you've done which is great !

I was just wondering if you knew about oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh/)
Which is providing something close to what you are doing (but only for zsh) and where thinking of joining effort ?
I saw that you just added zsh compatibility, but in the other hand, I guess you are trying to be a everything in one file project.

Maybe the projects have different goals and I didn't quite get it right, or licence incompatibility,
but as I didn't saw any references to oh-my-zsh I though I'll post something.

Thank you.

% default zsh prompt mark

This is not a bug, more a "theme" comment. With Zsh, the "usual" prompt mark is "%" rather than "$".
This could be done by replacing

if [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
    mark="%(!.#.$)"
fi

With

if [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
    mark="%(!.#.%%)"
fi

SVN branch cannot be escaped

If one tries to escape the result of _lp_svn_branch, it is strangely formatted at the root of an SVN repo:

$ cd svnreponame
‡ echo $(_lp_svn_branch)
$'\n\nsvnreponame'

I've committed a temporary fix, but line 836 should be corrected to use the escaping function.

Screen detection fails

Without this patch (sorry i'll be more git pull compliant next time)

  •    if [[ -z "$sess_src" || "$sess_src" = :0.0 || "$sess_src" == :0 ]] ; then
    
  •    if [[ -z "$sess_src" || "$sess_src" = :0.0 || "$sess_src" == :0 || "$sess_src" = :0:S\* ]] ; then
    

my local screen is detected as a telnet connection.

Thanks
Leo

Gnome Terminal title not set by default

When I enable liquidprompt, I don't have a title for my gnome terminal anymore.

Looking in my .bashrc, I saw this line was used to set the title:

PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"

This line seems to not work with liquidprompt.

How do you solve this and/or is there a way to tell liquidprompt to set terminal title ?

Bug when I change IFS

Sometimes, when I script, I like to change the IFS.

IFS='
' 

When I do it, liquid prompt display errors :

[quentin:/tmp] $ ^C bash: let: load=40 405 468 3/980 26273/4 : erreur de syntaxe dans l'expression (le symbole erroné est "405 468 3/980 26273/4") [quentin:/tmp] 130 $

I also see this (after that a task ended)

⌂223% 4& [quentin:/tmp] 130 $ bash: let: load=72 097 : valeur trop grande pour la base (le symbole erroné est "097") bash: [[: 72 097 : valeur trop grande pour la base (le symbole erroné est "097") [1]+ Fini for ligne in $(cat /tmp/file); do commands; done > /tmp/file2 [quentin:/tmp] 130 $

GIT_PS1_SHOWUPSTREAM like in bash_completion

It'll be nice to have the same information as in bash_completion (work also with zsh).

Thanks.

GIT_PS1_SHOWUPSTREAM

# If you would like to see the difference between HEAD and its
#       upstream, set GIT_PS1_SHOWUPSTREAM="auto".  A "<" indicates
#       you are behind, ">" indicates you are ahead, and "<>"
#       indicates you have diverged.  You can further control
#       behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated
#       list of values:
#           verbose       show number of commits ahead/behind (+/-) upstream
#           legacy        don't use the '--count' option available in recent
#                         versions of git-rev-list
#           git           always compare HEAD to @{upstream}
#           svn           always compare HEAD to your SVN upstream
#       By default, __git_ps1 will compare HEAD to your SVN upstream
#       if it can find one, or @{upstream} otherwise.  Once you have
#       set GIT_PS1_SHOWUPSTREAM, you can override it on a
#       per-repository basis by setting the bash.showUpstream config
#       variable.

Should fail early if LC_CTYPE is not UTF-8

The code of LiquidPrompt is written in UTF-8, and will not work as expected if the terminal of the user is not capable of reading UTF-8. We can reasonably expect that the user is in a UTF-8 environment if the LC_CTYPE is set to an UTF-8 charset.

charset=$(locale -k LC_CTYPE | sed -n 's/^charmap="\(.*\)"/\1/p')

If the charset is not UTF-8 liquidprompt should fail with an error message.

Tag the prompt in the current shell

Feature : add a keyword to tag the current shell.
Something like:

export LP_TAG="tocode"

Will dynamically be displayed in the prompt:

tocode [:~/code/liquidprompt] master* ±

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.