Skip to content

Commit

Permalink
Fix Antigen bug caused by spaces in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstosik committed Feb 7, 2022
1 parent e8fc9dd commit ef2d5e7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
26 changes: 26 additions & 0 deletions modules/020-antigen/fix_spaces.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git i/bin/antigen.zsh w/bin/antigen.zsh
index aeba2a7..f0d83d9 100644
--- i/bin/antigen.zsh
+++ w/bin/antigen.zsh
@@ -1917,7 +1917,7 @@ EOC
fi
# TODO Fix: Fuzzy match shoud be replaced by a sane way to determine it.
if [[ $#funcfiletrace -ge 6 ]]; then
- ANTIGEN_CHECK_FILES+=("${${funcfiletrace[6]%:*}##* }")
+ ANTIGEN_CHECK_FILES+=("${funcfiletrace[6]%:*}")
fi
fi

diff --git i/src/ext/cache.zsh w/src/ext/cache.zsh
index 248638d..85f1d04 100644
--- i/src/ext/cache.zsh
+++ w/src/ext/cache.zsh
@@ -133,7 +133,7 @@ EOC
fi
# TODO Fix: Fuzzy match shoud be replaced by a sane way to determine it.
if [[ $#funcfiletrace -ge 6 ]]; then
- ANTIGEN_CHECK_FILES+=("${${funcfiletrace[6]%:*}##* }")
+ ANTIGEN_CHECK_FILES+=("${funcfiletrace[6]%:*}")
fi
fi

7 changes: 6 additions & 1 deletion modules/020-antigen/install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
##!/usr/bin/env zsh

MYDIR="${0:a:h}"

ANTIGEN_ROOT="${HOME}/.antigen"

# TODO handle existance?
git clone https://github.com/zsh-users/antigen "${ANTIGEN_ROOT}/git"

# Fix Antigen bug caused by spaces in paths
# See https://github.com/zsh-users/antigen/issues/734
git -C "${ANTIGEN_ROOT}/git" apply "${MYDIR}/fix_spaces.patch"

# prepare data file for Z
touch "${ANTIGEN_ROOT}/.z"

MYDIR="${0:a:h}"
source "${MYDIR}/zshrc"

0 comments on commit ef2d5e7

Please sign in to comment.