Skip to content

Commit

Permalink
Merge pull request #144 from nboehm99/icon_overrides
Browse files Browse the repository at this point in the history
Add missing icon overrides for git and venv
  • Loading branch information
diogocavilha authored Sep 23, 2023
2 parents 7e83f86 + a77f4b8 commit 1b25105
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

> Any trouble, please visit the [troubleshooting page](https://github.com/diogocavilha/fancy-git/blob/master/TROUBLESHOOTING.md)
## v7.5.5
- Add more icon overrides using the `FANCYGIT_ICON_GIT_REPO` and `FANCYGIT_ICON_VENV` environment variables.

## v7.5.4
- Fix double space after branch name when using human theme and double line mode is disabled.

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ FANCYGIT_ICON_LOCAL_REMOTE_BRANCH=""
Here you can see a list of available environment variables FancyGit will search and replace:

```sh
# Path is a git repository
FANCYGIT_ICON_GIT_REPO

# Only local branch icon.
FANCYGIT_ICON_LOCAL_BRANCH

Expand All @@ -289,6 +292,9 @@ FANCYGIT_ICON_HAS_ADDED_FILES

# Unpushed commits.
FANCYGIT_ICON_HAS_UNPUSHED_COMMITS

# Path is a python virtual environment
FANCYGIT_ICON_VENV
```

# Contributors ✨
Expand Down
4 changes: 2 additions & 2 deletions theme-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ __has_conda_env() {
__fancygit_get_venv_icon() {
local icon_venv

icon_venv=" "
icon_venv=" ${FANCYGIT_ICON_VENV:-}"

if [[ -n $VIRTUAL_ENV ]] || __has_conda_env
then
Expand Down Expand Up @@ -300,4 +300,4 @@ fancygit_theme_set() {
tput setaf 3
printf "\n> Please reload the bash config file or close and open the terminal again.\n\n"
tput sgr0
}
}
2 changes: 1 addition & 1 deletion themes/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fancygit_theme_builder() {
local separator
separator=$(fancygit_config_get "separator" "")

local icon_git_repo=""
local icon_git_repo="${FANCYGIT_ICON_GIT_REPO:-}"
local user="${user_color_font_tag}"
local at="${at_color_font_tag}"
local host="${host_color_font_tag}"
Expand Down
2 changes: 1 addition & 1 deletion version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Author: Diogo Alexsander Cavilha <diogocavilha@gmail.com>
# Date: 11.17.2017

export FANCYGIT_VERSION="7.5.4"
export FANCYGIT_VERSION="7.5.5"

0 comments on commit 1b25105

Please sign in to comment.