The support is still quite limited:
- green if not modified
- red if modified (shelved changes are currently considered as changes)
- Current revno is displayed
TODO:
- Since bzr is slow to start, refactor liquidprompt to not invoke bzr twice (smarttag and bzr_prompt)
- Display not pushed changes
Fixes a warning:
-bash: local: can only be used in a function
A local variable can only be used inside a function.
The function is also unset after use.
LP_USER_ALWAYS=1 will display the user, even if he is the same than the logged one.
Defaults to 1 (always display the user), set to 0 if you want to hide the logged user (it will always display different users).
Add an explicit option to replicate the whole computed liquid prompt in the window's title.
(Works with a vanilla xterm, but not under xterm-256 for me)
Add two color for the X11 support, green (support) and yellow (no support, not
set in red, because it is not a critical warning). The bold cyan of the hostname
was to close to the green of the colon and the @, change it to blue.
If the current connection supports X (if we are in a X session or if we have
enabled X11 forwarding under ssh), the @ displayed in front of the hostname
is colored in blue (use LP_COLOR_X11 to change the color).
Without the patch my prompt is (on 3 lines):
[rousseau:~/Documents/sc/nfc/libnfc]
svn ‡
With the patch my prompt is (on 1 line only):
[rousseau:~/Documents/sc/nfc/libnfc] svn ‡
This is because expr(1) adds a new line at the end of the result.
Debian uses the file /etc/debian_chroot to give a name to a chroot.
The default /etc/bash.bashrc contains:
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
With the previous code I get an error before each prompt:
-bash: $/dev/fd/62: No such file or directory
Maybe the same code can't be used for both Darwnin and FreeBSD.
I reuse the code removed in 2a833475bc