diff --git a/README.md b/README.md index 98d3edd..ed5d847 100644 --- a/README.md +++ b/README.md @@ -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; diff --git a/liquidprompt b/liquidprompt index 7a49b22..5d2d8ee 100755 --- a/liquidprompt +++ b/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