Comments (37)
The latest prezto
branch should fix the problem above. The prezto options should be written before zplug load
. So for example,
source ~/.zplug/init.zsh
zplug 'modules/utility', from:prezto
zplug 'modules/osx', from:prezto
zplug 'modules/editor', from:prezto
zstyle ':prezto:module:editor' dot-expansion 'yes'
zplug load
I don't think Fixed. Should work now with:modules/prompt
works correctly right now so I need to look into it.
source ~/.zplug/init.zsh
# ...
zplug 'modules/prompt', from:prezto
zstyle ':prezto:module:prompt' theme 'sorin'
# ...
zplug load
Note that Fixed.nice:10
is required for now because of the order in which zplug loads plugins. This may be changed.
from zplug.
Looks like it works \o/ 👍 😄
from zplug.
I wonder what the best way to handle this is:
- Let zplug manage everything (
zplug "modules/git", from:prezto
and no~/.prezto
, no~/.preztorc
) - Make a symlink to
~/.prezto
but havezplug "modules/git", from:prezto
in.zshrc
- Make a symlink and have the all the prezto configs written in
~/.preztorc
.
from zplug.
Np glad I can offer some help 👅
from zplug.
I'll try loading just the modules I use - that makes more sense.
from zplug.
Glad to hear that! Thanks for helping me out on the way! 😄
from zplug.
Hi
I understand. I want to support prezto as zplug feature like from:prezto
, but that implementing of the feature will take time because I don't use prezto and don't know how it works.
Is there anybody who knows prezto mechanism?
from zplug.
Thanks for the reply. That would be great if possible I will continue to search if I can find anything else.
I really wish I could help out.
from zplug.
I tried to load pretzo theme as well, similar output.
I tried to use zplug dependency to load pretzo, but that doesn't seem to work for me (and potentially could be the solution for pretzo)
My config:
zplug "sorin-ionescu/prezto", of:init.zsh | zplug "chauncey-garrett/zsh-prompt-garrett", of:prompt_garrett_setup
zsh output:
pmodload: command not found
Loaded chauncey-garrett/zsh-prompt-garrett/prompt_garrett_setup
Loaded sorin-ionescu/prezto/init.zsh
${prompt_garrett_altchar_enable}${prompt_garrett_color_prompt}${prompt_garrett_upper_left_corner}( ${prompt_garrett_current_dir}${git_info[remote_status]}${git_info[prompt_info]}${git_info[local_status]}${git_info[sha]} ${prompt_garrett_color_prompt})${prompt_garrett_altchar_enter}${(e)prompt_garrett_space}${prompt_garrett_altchar_leave}( ${ruby_info[version]}${prompt_garrett_location}${prompt_garrett_color_prompt} )${prompt_garrett_upper_right_corner}
${prompt_garrett_color_prompt}${prompt_garrett_lower_left_corner}( ${cyan}$SHLVL ${prompt_garrett_color_prompt}) ${editor_info[keymap]}
So, as you can see pretzo is loaded as second even if I declared dependency. I tried to declare it the other way but pretzo is always the second one which is loaded.
In that case theme requires function pmodload which is located in init.zsh.
I'm not sure that does mean dependency feature is broken or I'm doing something wrong?
from zplug.
Hi, thanks for your report.
Did you mean?:
zplug "chauncey-garrett/zsh-prompt-garrett", of:prompt_garrett_setup \
| zplug "sorin-ionescu/prezto", of:init.zsh
This example mean that prompt_garrett_setup
of chauncey-garrett/zsh-prompt-garrett
depends on sorin-ionescu/prezto
.
BTY, I want to support prezto in the future, but I don't know the mechanism. I welcome your PR about prezto always.
from zplug.
@b4b4r07: I didn't mean. I wrote, I tried both solutions as I was confused about this dependency syntax.
I tried both: A | B and B | A and in each case, pretzo was loaded after the plugin.
I have no knowledge about pretzo internals (I'm zsh beginner) but I think the case is just to load it before importing other stuff (just guessing, but seems like some plugins just require few functions from pretzo).
btw, docs are a little confusing, you wrote above that A | B says A depends on B (where A is prompt and B pretzo), but in the docs there is example like:
# Group dependencies, emoji-cli depends on jq in this example
zplug "stedolan/jq", \
as:command, \
file:jq, \
from:gh-r \
| zplug "b4b4r07/emoji-cli"
where A | B says B depends on A. I think this part needs some clarification or maybe I'm not getting something.
Anyway, as I wrote, I tried both and none of them worked to order plugins maybe after fixing that pretzo would work normally :)
from zplug.
@spinus Oops. sorry.
# Group dependencies, emoji-cli depends on jq in this example
zplug "stedolan/jq", \
as:command, \
file:jq, \
from:gh-r \
| zplug "b4b4r07/emoji-cli"
This is correct (A | B
says B
depends on A
).
from zplug.
I have a workaround to using both if you want although it's not the ideal solution where zplug manages prezto but you can use both as long as you source prezto first.
What I did is a installed prezto as par the instructions then only used the config files I want. So I just have .zpreztorc in my home directory.
I also decided to move some this to prezto that my zshrc has less things that before
Here is a copy of my .zshrc
I think the main problem with why prezto is not being loaded is to do with prezto needing it's directory to be called .zprezto as it's referenced by ${ZDOTDIR:-$HOME}/.zprezto in the init.zsh
from zplug.
I finally got it working with zplug managing it.
The below is what allows prezto to work -
zplug "sorin-ionescu/prezto", of:init.zsh, do:"ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto ~/.zprezto && ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto/runcoms/zpreztorc ~/.zpreztorc"
What I have found so far is that other plugins need to be loaded after to work well. e.g enhancd wasn't working without using nice.
My current zshrc
Personally am happy for this to be closed as my issue is fixed and prezto can be loaded correctly.
from zplug.
@Kayant how you manage to load pretzo before other plugins? In my case dependencies didn't work and I see you don't use them at all.
from zplug.
Not sure but I guess you could try a negative nice value like nice:-5
.
from zplug.
Oh @spinus i see what you mean now.
I loaded prezto themes by copying it to the prompt/functions folder like so zplug "eugenk/zsh-prompt-iggy", do:"cp $ZPLUG_HOME/repos/eugenk/zsh-prompt-iggy/prompt_iggy_setup $ZPLUG_HOME/repos/sorin-ionescu/prezto/modules/prompt/functions/prompt_iggy_setup"
then set the theme in the zpreztorc file
So for the theme you're trying to load something like
zplug "sorin-ionescu/prezto", of:init.zsh, do:"ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto ~/.zprezto && ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto/runcoms/zpreztorc ~/.zpreztorc"
zplug "chauncey-garrett/zsh-prompt-garrett", do:"cp $ZPLUG_HOME/repos/chauncey-garrett/zsh-prompt-garrett/prompt_garrett_setup $ZPLUG_HOME/repos/sorin-ionescu/prezto/modules/prompt/functions/prompt_garrett_setup"
Then in zpreztorc
zstyle ':prezto:module:prompt' theme 'garrett'
See my zshrc
Edit -
Tested and works fine - http://i.imgur.com/TxOOZUk.png
from zplug.
One bug I noticed is that when resizing the terminal the layout messing up like - http://i.imgur.com/Qc9ScqZ.png
You could just do a clear
for now as a workaround.
from zplug.
@Kayant Hmm. Thanks for your report.
I understand but I think that that might not lead to finding a solution to the root of the problem. I'd better support prezto officially in zplug.
from zplug.
No problem happy to help. I think the implementation in zgen is probably best option to look at for reference because it supports prezto completely and allows zgen to manage prezto including the module options.
Am not sure how difficult that would be to implement in zplug.
from zplug.
This is a very interesting project. I have some experience with prezto, let me know if I can help with some tests on my part. My zsh-core is just a rebel version of prezto with extra plugins. I am currently considering moving away from prezto completely as it has not seen major updates since summer. Implementing the zgen loading mechanism is definitely a good option since we already tried to have prezto integrated there.
from zplug.
👍 for @Kayant 's solution, works for me as well.
from zplug.
I have migrated from this solution and now use zgen for prezto if you're interested. A bit messy but it works well so far because I have all prezto stuff in two files and just source them in .zshrc which clears of zshrc a bit.
https://github.com/Kayant/dotfiles/blob/master/zsh/.zsh/zgen_prezto
https://github.com/Kayant/dotfiles/blob/master/zsh/.zshrc#L59
from zplug.
I wish, I have read all the comments yesterday :). Understand inner working of prezto, played with different options etc.
I should have also read zplug's documentation better. I didn't realize that I can run custom command in with the do option.
Any way, if any one is interested. I have documented this options.
https://github.com/moonrumble/zplug-prezto
from zplug.
@moonrumble instead of the first instruction line, you can just:
zplug "sorin-ionescu/prezto", of:init.zsh, do:"ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto ~/.zprezto"
@Kayant @moonrumble this is my zplug/zprezto related conf, without using a `.preztorc:
source $HOME/.zplug/zplug
zplug "b4b4r07/zplug" # don't forget to zplug update --self && zplug update
zplug "sorin-ionescu/prezto", of:init.zsh, do:"ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto ~/.zprezto"
zstyle ':prezto:*:*' color 'yes'
zstyle ':prezto:load' pmodule 'environment' 'history' 'terminal' 'utility' 'tmux'
zstyle ':prezto:module:terminal' auto-title 'yes'
zplug "michaeldfallen/git-radar", as:command, of:git-radar
zplug "ndbroadbent/scm_breeze", do:"$ZPLUG_HOME/repos/ndbroadbent/scm_breeze/install.sh"
zplug "djui/alias-tips"
zplug "supercrabtree/k"
zplug "zsh-users/zsh-completions", of:src
zplug "zsh-users/zsh-autosuggestions", nice: 1
zplug "zsh-users/zsh-syntax-highlighting", nice: 2
zplug "zsh-users/zsh-history-substring-search", nice: 3
zplug load
Adding the 'editor'
prezto module, i'm getting delays in pressing enter (return key) until i see the next prompt. removing the module fixes this. Any idea what might be causing this delay?
from zplug.
@oryband can you confirm following is working for you. It doesn't work for me. do tag doesn't work with nice tag.
It works without using nice tag.
zplug "sorin-ionescu/prezto", of:init.zsh,nice:15, do:"ln -s $ZPLUG_HOME/repos/sorin-ionescu/prezto ~/.zprezto"
from zplug.
@moonrumble this looks ok BUT:
- since
nice:15
is very high it means prezto will be loaded after most plugins - notice this is the order you want - the example doesn't create a
.preztorc
file, which is fine if you put your prezto configuration in your zshrc. if not you need toln
it as well
from zplug.
I know it's been quite a while since this issue was opened but I've implemented from:prezto
on the prezto
branch. Any feedback is welcomed! Example:
zplug 'modules/osx', from:prezto
from zplug.
Awesome! Will test it out thanks for your work 👍
from zplug.
@NigoroJr
It's looks like it's not able to load the pmodload function when called within init.zsh with some modules like utility
/home/kayant/.zplug/repos/sorin-ionescu/prezto/modules/autosuggestions/init.zsh:9: command not found: pmodload
If am not understanding this wrong this is how it's handled in zgen hopefully that helps.
Also I was going to ask in terms of prezto options where would those live?
Thanks again for your work 😄
from zplug.
@Kayant Thanks for the feedback! I tried out utility
and confirmed that pmodload
couldn't be found. This is a cache issue. Now, there's another problem where pmodload
can't find the modules it was told to load. This is because prezto assumes itself to be installed in~/.zprezto
, which doesn't exist. A simple solution is to link $ZPLUG_ROOT/repos/sorin-ionescu/prezto
to ~/.zprezto
but I don't think this is the best solution since I want everything to be contained inside $ZPLUG_ROOT
. I think I'll submit a patch to prezto so that this default location can be changed.
from zplug.
Thanks for the update and info. Sadly if it's anything like the purposed it's likely to be rejected 😞
from zplug.
@Kayant Mmmm, thanks for letting me know about that before I send a PR to them! Okay, I guess I need to come up with a different way of handling it. I'll get back to you soon!
from zplug.
I'm using the prezto branch and my prezto config is working 👍
I'm using this:
zplug "sorin-ionescu/prezto", \
as:plugin, \
use:init.zsh, \
hook-build:"ln -s $ZPLUG_ROOT/repos/sorin-ionescu/prezto ${ZDOTDIR:-$HOME}/.zprezto"
Is there a better way for me to load prezto entirely?
from zplug.
If you want to load prezto's init.zsh
, that seems to be the best way to go. I'm hesitant about making ln -s /path/to/prezto/repo ~/.zprezto
the default behavior, because the point of from:prezto
is to be able to use prezto's modules without loading its init.zsh
, which requires prezto to be in ~/.zprezto
. That said I understand that if you currently have a ~/.zpreztorc
you want that to be used also (I assume that's the goal of loading prezto entirely?). Should reading from ~/.zpreztorc
be supported?
/cc @b4b4r07
from zplug.
Awesome! 😆 Thanks for the feedback!
from zplug.
So far it's working well for me as well I haven't noticed any issues.
Many thanks again for the implementation 👍
from zplug.
Related Issues (20)
- Dont prefix $PATH with zplug paths, append $PATH instead
- Unkown error: /usr/bin/env `bash/`: No such file or directory HOT 1
- Help Wanted what is the difference between static and dynamic
- Update zsh-async to 1.8.5 broke slimline on all my accounts HOT 2
- status of project HOT 3
- Error in `source ~/.zplug/init.zsh` HOT 2
- Fresh macos install using brew shows errors HOT 5
- Current status and next approach of zplug HOT 4
- Errors on startup after updating HOT 2
- Weird Error? HOT 1
- ZPlug unable to use the same repo twice (FZF) HOT 5
- Loading unixorn/fzf-zsh-plugin shows error message.
- verbosity: Is zshrc configuration correct HOT 1
- .zplug/bin/install conflict with system /usr/bin/install
- allow zcompdump file location to be customized
- zplug load --verbose prints command not found: perl, grep, printf
- Autocompletion for some plugins fails: `(eval):1: _kubectl: function definition file not found` HOT 2
- custom env ZPLUG_HOME do not affect ZPLUG_REPOS after install by curl HOT 1
- zsh-autosuggestions not working with zplug HOT 1
- Zplug not loading plugins from ~/.oh-my-zsh/custom/plugins
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 zplug.