Skip to content

Commit a77f4b8

Browse files
committed
Add missing icon overrides for git and venv
1 parent 7e83f86 commit a77f4b8

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
> Any trouble, please visit the [troubleshooting page](https://github.com/diogocavilha/fancy-git/blob/master/TROUBLESHOOTING.md)
44
5+
## v7.5.5
6+
- Add more icon overrides using the `FANCYGIT_ICON_GIT_REPO` and `FANCYGIT_ICON_VENV` environment variables.
7+
58
## v7.5.4
69
- Fix double space after branch name when using human theme and double line mode is disabled.
710

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ FANCYGIT_ICON_LOCAL_REMOTE_BRANCH=""
266266
Here you can see a list of available environment variables FancyGit will search and replace:
267267

268268
```sh
269+
# Path is a git repository
270+
FANCYGIT_ICON_GIT_REPO
271+
269272
# Only local branch icon.
270273
FANCYGIT_ICON_LOCAL_BRANCH
271274

@@ -289,6 +292,9 @@ FANCYGIT_ICON_HAS_ADDED_FILES
289292

290293
# Unpushed commits.
291294
FANCYGIT_ICON_HAS_UNPUSHED_COMMITS
295+
296+
# Path is a python virtual environment
297+
FANCYGIT_ICON_VENV
292298
```
293299

294300
# Contributors ✨

theme-functions.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ __has_conda_env() {
162162
__fancygit_get_venv_icon() {
163163
local icon_venv
164164

165-
icon_venv=" "
165+
icon_venv=" ${FANCYGIT_ICON_VENV:-}"
166166

167167
if [[ -n $VIRTUAL_ENV ]] || __has_conda_env
168168
then
@@ -300,4 +300,4 @@ fancygit_theme_set() {
300300
tput setaf 3
301301
printf "\n> Please reload the bash config file or close and open the terminal again.\n\n"
302302
tput sgr0
303-
}
303+
}

themes/default.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fancygit_theme_builder() {
6363
local separator
6464
separator=$(fancygit_config_get "separator" "")
6565

66-
local icon_git_repo=""
66+
local icon_git_repo="${FANCYGIT_ICON_GIT_REPO:-}"
6767
local user="${user_color_font_tag}"
6868
local at="${at_color_font_tag}"
6969
local host="${host_color_font_tag}"

version.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Author: Diogo Alexsander Cavilha <[email protected]>
44
# Date: 11.17.2017
55

6-
export FANCYGIT_VERSION="7.5.4"
6+
export FANCYGIT_VERSION="7.5.5"

0 commit comments

Comments
 (0)