-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Oh-my-Zsh functions leaking #56
Comments
Thank you for your report and suggestion! I have an idea! I'll give it a try. |
Thanks a lot b4b4r07! I just want to add that naturally, sometimes OMZ's functions need to be defined, as is the case for themes which rely on I'm sure you know this but just wanted to make it extra clear ;) |
I was just about to create an issue for a similar problem I had :) My problem is that oh-my-zsh sets |
Hi, Thank you @NigoroJr your suggestion.
Actually, I was just thinking about it. The problem with this issue is that zplug cannot know whether the OMZ plugins are dependent on the library ( Although it seems to solve by introducing |
I'm sure that your @NigoroJr suggestion is a constructive and effective opinion, but I think |
This is useful when the user intentionally wants to delay loading the plugin to after compinit is called. For example, zplug 'robbyrussell/oh-my-zsh', \ of:plugins/golang/*.zsh', \ nice:10 can be used to load (source) `plugins/golang/*.zsh' after compinit is called. See zplug#56.
@b4b4r07 Hmmm that's a good point. I found a workaround by setting it up like: zplug 'robbyrussell/oh-my-zsh', \
of:'plugins/golang/*.zsh', \
nice:10 The only issue is that even though I try to have |
Hmm... #57 solves the issue when the file can be sourced, but for @asymmetric's case, you can't source the file because it's |
I think your PR #57 doesn't become a solution to the root of the problem on @NigoroJr's case because I feel this writing style is forcibly and is not beautiful: zplug 'robbyrussell/oh-my-zsh', \
of:plugins/golang/*.zsh', \
nice:10 (I'll merge your PR #57 soon because it's an essential change) How about this?: zplug "plugins/golang", as:plugin, of:"*.zsh", ignore:oh-my-zsh.sh I'll introduce Then, @asymmetric's case is... If there are no zsh files ( Any thoughts? @asymmetric, @NigoroJr |
@b4b4r07 Sounds like a good idea that will allow more flexible customization 👍 I'm guessing if you want to ignore, for example, |
Yes. That's exactly right.
# of:"*.zsh" is default
zplug "fooA/bar", of:"*.zsh", ignore:some_file.zsh
zplug "fooB/bar", ignore:"some_*.zsh" # file-glob ok I plan to accept In addition, the relative path in
|
@b4b4r07 Awesome! Looking forward to that change 😃 Also, thank you for the awesome plugin manager: I immediately fell in love with it! |
@NigoroJr You're welcome, I'm glad. |
… files - Case of #56 - For example, robbyrussell/oh-my-zsh/tree/master/plugins/mix - This repo consists of only completion file
This change 331535a is for @asymmetric's case. What do you think? In case that consists of only completion files (beginning with an underscore) such as |
This change 93cd1f0 is for @NigoroJr's case. What do you think? Please check it out and try it. zplug "plugins/golang", from:oh-my-zsh, ignore:oh-my-zsh.sh In the case of # INVALID
zplug "plugins/history-substring-search", \
from:oh-my-zsh, \
ignore:update-from-upstream.zsh
# VALID
zplug "plugins/history-substring-search", \
from:oh-my-zsh, \
ignore:plugins/history-substring-search/update-from-upstream.zsh
So how do you like it? |
@b4b4r07 what should I do in this case:
Should I do zplug "lib/git.zsh", from:oh-my-zsh, ignore:oh-my-zsh.sh | \
zplug "asymmetric/56ccdf015e1a3b4c4fbd", from:gist # theme which depends on OMZ Also, what happens if below this I want another plugin from OMZ? Do I always have to remember to zplug "plugins/mix", from:oh-my-zsh Will this again load all OMZ, or will it remember my ignore? What if this is above? |
@b4b4r07 Looks like it's working fine for me, thanks! |
@asymmetric zplug "lib/git.zsh", from:oh-my-zsh, ignore:oh-my-zsh.sh | \
zplug "asymmetric/56ccdf015e1a3b4c4fbd", from:gist # theme which depends on OMZ However, this case zplug "plugins/mix", from:oh-my-zsh will NOT be loaded because there are no If there are
One solution: zplug "plugins/golang", from:oh-my-zsh, ignore:oh-my-zsh.sh
# or
zplug "plugins/golang", from:oh-my-zsh, do:"unfunction upgrade_oh_my_zsh" |
Makes sense. Thank you very much! 👍 |
Thanks! If there aren't any problems, I'll merge two branches to master. |
Merged. Please run |
Hi,
I have
zplug "plugins/mix", from:oh-my-zsh
in my~/.zshrc
, which to me basically means that I only want themix
plugin from OMZ, not everything that comes with it.But I noticed that in my shell the function
upgrade_oh_my_zsh
, taken fromlib/functions
is defined. I definitely don't want to let OMZ update itself, since I'm using the much lovelier zplug :)Is there a way not to let OMZ define this particular function, or any function at all?
The text was updated successfully, but these errors were encountered: