maj du prompt

This commit is contained in:
Jephté Clain 2018-02-01 14:56:00 +04:00
parent 20d083b4f7
commit 7c86854605
1 changed files with 9 additions and 1 deletions

View File

@ -20,7 +20,7 @@ if [ -n "$UTOOLS_BASH_PROMPT" ]; then
DEFAULT_PS1="[CHROOT:$UTOOLS_CHROOT] $DEFAULT_PS1"
fi
GENERATE_PS1='function __genps1() {
local cvs svn git uinst woinst suffix p="$PWD"
local cvs svn git pff uinst woinst suffix p="$PWD"
if [ -n "$UTOOLS_AUTO" ]; then
PS1=
while [ "$p" != "$HOME" -a "$p" != "" ]; do
@ -55,6 +55,14 @@ if [ -n "$UTOOLS_AUTO" ]; then
PS1="${PS1:+$PS1,}$flag"
git=1
fi
if [ -z "$pff" -a -d "$p/pff" -a -f "$p/.pff.conf" ]; then
flag=pff
if [ -L "$p/pff/.Current" ]; then
flag="$flag:$(readlink "$p/pff/.Current")"
fi
PS1="${PS1:+$PS1,}$flag"
pff=1
fi
if [ -z "$uinst" ]; then
if [ -f "$p/.uinst.conf" ]; then
PS1="${PS1:+$PS1,}uinst$suffix"