This adds the possibility to forge a different prompt than the default one, by
laying out liquidprompt features in a different order.
Just build a properly escaped LP_PS1 variable.
The combination of running *and* stopped jobs was not displayed.
Refactor the jobcount function: arguments of conditions is now in the same order
as the display.
± for git directories, ☿ for mercurial, ‡ for svn.
Thus, do not display the now useless letter prefix before the branch name.
Refactor the smart mark function.
Prefix branch names with a letter of the VCS (g for git, h for mercurial and s for svn).
Use electric sign ⌁ instead of b for battery.
Use home sign ⌂ instead of l for load.
If you "cd ~/Library/Application Support" or any directory containing a
white space then bash will run in an endless loop.
This is because __shorten_path $PWD $PATH_LENGTH is used instead of
__shorten_path "$PWD" $PATH_LENGTH
Note the use of "" around $PWD in the fixed version.
In case of the bug we have in the __shorten_path function
$1 is set to ~/Library/Application
$2 is set to Support
$3 is set to $PATH_LENGTH
With the fix we now have:
$1 set to ~/Library/Application Support
$2 set to $PATH_LENGTH
Conflicts:
liquidprompt.bash
Do you want to display the hostname, even if not connected through network?
Use LP_HOSTNAME_ALWAYS. It defaults to 0 (do not display hostname when localy
connected). Set it to 1 if you want to always see the hostname.
PROMPT_COMMAND
If set, the value is executed as a command prior to issuing each
primary prompt.
PROMPT_COMMAND cannot contain a script but only ONE command (at least on
bash 3.2.48 from Mac OS X Lion)
The solution is to call the old prompt command at the start of
__set_bash_prompt()
If you "cd ~/Library/Application Support" or any directory containing a
white space then bash will run in an endless loop.
This is because __shorten_path $PWD $PATH_LENGTH is used instead of
__shorten_path "$PWD" $PATH_LENGTH
Note the use of "" around $PWD in the fixed version.
In case of the bug we have in the __shorten_path function
$1 is set to ~/Library/Application
$2 is set to Support
$3 is set to $PATH_LENGTH
With the fix we now have:
$1 set to ~/Library/Application Support
$2 set to $PATH_LENGTH
With 1 file changed in the SVN repo I get:
± svn status | grep -v "?" | wc -l
1
So the prompt is:
[...] trunk( 1) ±
with the white spaces at the left of 1
By converting the number of commits from text to numeric the white
spaces are removed.