-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: broken symbolic link after creinstall .
#453
Conversation
3da5165
to
82cf671
Compare
82cf671
to
625bf56
Compare
Force-pushed to merge the latest changes from the main branch. |
better remove |
The bash style indexing should be changed to Zsh one: $c[1,2] or just to
$c[1].
…On Tue, 10 Jan 2023 at 13:24, akliuxingyuan ***@***.***> wrote:
better remove ./ in c?
[[ "${c:0:1}" != "/" ]] && c="${PWD}/${c:2}"
—
Reply to this email directly, view it on GitHub
<#453 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOE4CC7W3KDDK6TFHQ4UGDWRVPJJANCNFSM6AAAAAATTVY34M>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Best regards,
Sebastian Gniazdowski
|
625bf56
to
255aab2
Compare
My initial thought was to use |
255aab2
to
6afa68d
Compare
You can use More specifically, you'll want |
Do I have to test diff --git a/zinit-install.zsh b/zinit-install.zsh
index 09dd726..db0a1fa 100644
--- a/zinit-install.zsh
+++ b/zinit-install.zsh
@@ -565,7 +565,11 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
# OR - if its a reinstall
for c in "${completions[@]}"; do
# If filepath is relative, prepend the current directory
- [[ "${c[1]}" != "/" ]] && { [[ "${c[1,2]}" == "./" ]] && c="${PWD}/${c[3,-1]}" || c="${PWD}/${c}" }
+ if type readlink 2>/dev/null 1>&2; then
+ c=$(command readlink -f "$c")
+ else
+ [[ "${c[1]}" != "/" ]] && { [[ "${c[1,2]}" == "./" ]] && c="${PWD}/${c[3,-1]}" || c="${PWD}/${c}" }
+ fi
cfile="${c:t}"
bkpfile="${cfile#_}"
if [[ ( -z ${already_symlinked[(r)*/$cfile]} || $reinstall = 1 ) && |
One step ahead of you :^) There is a |
Furthermore, I found a portable way to get an absolute path by using the |
d48800a
to
0b3929c
Compare
0b3929c
to
b0dcb76
Compare
Signed-off-by: Miles Liu <miles@bung.cc>
b0dcb76
to
da0d6b7
Compare
This PR should be ready to be merged. |
Thanks ♥ |
Description
Run
creinstall .
in thezsh-users/zsh-completions
plugin folder manually, then the symbolic links in the completions folder are broken.Motivation and Context
I found this issue when running
zinit update
with the following minimal setup.Related Issue(s)
Usage examples
How Has This Been Tested?
Types of changes
Checklist: