Skip to content
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

Follow symlinks #13

Closed
ckotte opened this issue Jul 8, 2020 · 2 comments
Closed

Follow symlinks #13

ckotte opened this issue Jul 8, 2020 · 2 comments

Comments

@ckotte
Copy link

ckotte commented Jul 8, 2020

Could you replace find "${ZSH_CUSTOM}" -type d -name .git | while read d with find -L "${ZSH_CUSTOM}" -type d -name .git | while read d?

I have all my plugins and themes symlinked to a folder that's synced (via Syncthing) to my other computers.

~/.oh-my-zsh/custom/plugins> ll                                                                                                                                                             
total 0
lrwxr-xr-x 1 user user 45 Jul  8 18:11 autoupdate -> ../../../.backup/oh-my-zsh/plugins/autoupdate
drwx------ 3 user user 96 Jul  8 16:49 example
lrwxr-xr-x 1 user user 54 Jul  8 18:11 zsh-autosuggestions -> ../../../.backup/oh-my-zsh/plugins/zsh-autosuggestions
lrwxr-xr-x 1 user user 50 Jul  8 18:11 zsh-completions -> ../../../.backup/oh-my-zsh/plugins/zsh-completions
lrwxr-xr-x 1 user user 58 Jul  8 18:11 zsh-syntax-highlighting -> ../../../.backup/oh-my-zsh/plugins/zsh-syntax-highlighting

Without -L, upgrade_oh_my_zsh_custom cannot find any of the git repositories.

I tested the updated find command with symlinked plugins and plugins in directories in the same plugins directory. It could find all repositories. Therefore, adding -L should be no issue for users without symlinks.

If you want to make it absolutely save, you could introduce a variable which overrides the behavior.

Thanks in advance.

@tamcore
Copy link
Owner

tamcore commented Jul 9, 2020

Sounds like a good idea. Even though I was worrying about different variants of find out there maybe not having the -L switch, it seems to work just find even on my Mac.

Thanks for your suggestion! :)

tamcore added a commit that referenced this issue Jul 9, 2020
@tamcore tamcore closed this as completed Jul 9, 2020
@ckotte
Copy link
Author

ckotte commented Jul 9, 2020

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants