Comments (2)
This for
loop here breaks on white spaces and ends up calling zcompile space/.antigenrc
(whereas the complete path was /antigen space/.antigenrc
).
Lines 1866 to 1867 in 64de2dc
(Update: actually the loop works because $ANTIGEN_CHECK_FILES
is an array? 🤔 )
Here's another thing that shows the problem:
# cat /root/.antigen/.resources
/root/.zshrc
space/.antigenrc
The /antigen
part in /antigen space/.antigenrc
's path got mangled.
from antigen.
Here's the part to blame (interestingly includes a TODO 😅 ):
Lines 1918 to 1921 in 64de2dc
> trace="/antigen space/.antigenrc:2"
> echo ${${trace%:*}##* }
space/.antigenrc
(Honestly no idea what to do with this. 😅 )
Alright, I had to read some doc, but here I am. (It's super hard to find the right piece of doc by the way!)
-
${trace%:*}
looks like the${name%pattern}
expansion syntax:If the pattern matches the end of the value of name, then substitute the value of name with the matched portion deleted; otherwise, just substitute the value of name. In the first form, the smallest matching pattern is preferred; in the second form, the largest matching pattern is preferred.
This is meant to delete the
:2
portion of the trace line. -
${path##* }
looks like the${name##pattern}
expansion syntax:If the pattern matches the beginning of the value of name, then substitute the value of name with the matched portion deleted; otherwise, just substitute the value of name. In the first form, the smallest matching pattern is preferred; in the second form, the largest matching pattern is preferred.
This seems to delete "everything until the last space at the beginning of the string".
It's hard to understand whether the expansion that deletes until the last space is required or not, or why it's there. It was original introduced in this commit, and both the commit and associated PR lack details that could explain why it's necessary... 🤔
For what it's worth, this diff seemed to fix it for my very simplistic setup (I can't imagine it won't break anything though 😰):
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
from antigen.
Related Issues (20)
- Lots of ^Ms HOT 1
- Is this project dead? HOT 22
- ADOTDIR where is it used? HOT 1
- Doc in Quick start about antigen bundle is wrong
- Where does the Debian package put antigen.zsh? HOT 2
- Can you add this website? HOT 1
- can't write zwc file HOT 1
- use antigen to install plugins in an env that has no internet
- there is a typo error in wiki page HOT 2
- Any plugin or script using bashcompinit & complete to define completion won't work after sourcing antigen HOT 4
- [feature request] New command which automatically purges / disables not explicit listed plugins
- $ADOTDIR not working
- no such keymap menuselect HOT 2
- no such file or directory HOT 3
- oh-my-zsh tmux plugin does not work when using antigen
- ZSH theme not working in VSCode Dev container Integrated Terminal HOT 1
- Dead Links in 'In the wild' section of the wiki
- Cannot change directories without `cd`
- Issue with sourcing zshrc after antigen install : bad substitution HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antigen.