Invert if order to speed up a bit the prompt display when parsing a fossil repository
This commit is contained in:
parent
2e8718f1d0
commit
7df52a3d53
@ -56,8 +56,9 @@ preserving the first two directories;
|
||||
* the current Python virtual environment, if any;
|
||||
* an up arrow if an HTTP proxy is in use;
|
||||
* the name of the current branch if you are in a version control repository
|
||||
(git, mercurial or subversion), in green if everything is up to date, in red if
|
||||
there is changes, in yellow if there is pending commits to push;
|
||||
(git, mercurial, subversion or fossil), in green if everything is up
|
||||
to date, in red if there is changes, in yellow if there is pending
|
||||
commits to push;
|
||||
* the number of added/deleted lines (git) or files (fossil), if
|
||||
changes have been made and the number of pending commits, if any;
|
||||
* a star if there is some untracked files in the repository;
|
||||
|
13
liquidprompt
13
liquidprompt
@ -741,13 +741,12 @@ _lp_fossil_branch()
|
||||
{
|
||||
[[ "$LP_ENABLE_FOSSIL" != 1 ]] && return
|
||||
|
||||
# first, are we in an open fossil repository?
|
||||
if fossil info &>/dev/null ; then
|
||||
local branch
|
||||
branch=$(fossil status 2>/dev/null | grep tags: | cut -c17-)
|
||||
if [[ -n "$branch" ]] ; then
|
||||
echo "$branch"
|
||||
else
|
||||
local branch
|
||||
branch=$(fossil status 2>/dev/null | grep tags: | cut -c17-)
|
||||
if [[ -n "$branch" ]] ; then
|
||||
echo "$branch"
|
||||
else
|
||||
if fossil info &>/dev/null ; then
|
||||
echo "no-tag"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user