Comments (5)
I agree with the hardware part, I'm not so sure for the theming part.
It's not useful to have prompt-init
in the init of OMZ, but having themes inside a promptmodule isn't IMHO an acceptable solution.
Indeed, themes can sometime need a prompt-init
, but it doesn't have to always be about the prompt (if they only set LESS variables, etc). What I mean is, themes aren't really a part of any module, they can rely on some of them (git-module, prompt-module, hardware-module) but are more "global" than modules.
I don't claim that I have a nice solution for this problem, but I'm pretty sure that having every themes into prompt
is a not-so-great idea. I think they should be kept in the root of OMZ in the theme folder, because as I said, they're not really related to "a module" but are (as modules are) an important part of OMZ.
Another use case that annoys me a bit is when there is a theme that does not need a promptinit
. Where should that theme go? How should it be loaded? If they're in $OMZ/themes
there is some logic to where it should be put and how it should be loaded.
Maybe a theme should be loaded the same way modules are (sourcing). Themes using prompt would omload
the prompt module (which would load the right theme) whereas other would just take care of themselves.
from prezto.
What I am proposing is not a radical idea. It just looks alien compared to OMZ 1. Zsh themes are installed in /usr/share/zsh/4.3.11/functions/
or /share/zsh/4.3.11/functions/Prompts/
depending on ./configure
flags.
/usr/share/zsh/4.3.11/functions/prompt_adam1_setup
/usr/share/zsh/4.3.11/functions/prompt_adam2_setup
/usr/share/zsh/4.3.11/functions/prompt_bart_setup
...
Themes should just style the prompt. They are not the place to style LESS.
A theme that does not use promptinit
, such as Phil's, should remain where it already is, in zshrc
, until the author decides to convert it to prompt_phil_setup
. themes/
has never been the place to mix promptinit and non-prompinit themes nor intended as such.
from prezto.
Okay, I can agree with that solution if it's not about 'themes' anymore but only and specifically 'prompts'.
OMZ1 (and the current layout) implies with "themes", that it isn't only about the prompt but about theming in general (could include man
, ls
, grep
and basically anything that can be themed).
Until now this question hasn't really been raised, mostly because current themes (even the one I'm making) are only using prompt, but some of the old themes did set LS_COLORS
. So it should be said clearly in the wiki that nothing except prompts should be used, everything else should be in zshrc
.
from prezto.
It was always about prompts in both OMZ1 and my own fork. Some people got carried away and put all sorts of stuff in the themes, and you can as well, nothing stops you, but it's mainly about prompts.
from prezto.
This was done in 66c1448.
from prezto.
Related Issues (20)
- Add zstyle to skip aliases in more modules beyond just git
- Command cache malfunctioning HOT 3
- Searching using command prefix on up array HOT 3
- Spelling error in Prezto tag... HOT 1
- history command only shows the last item
- Completion chooses incorrect prefix among filenames
- error when `ls` is aliased to `lsd`.
- Syntax highlighting doesnt update with custom autosuggest-accept (key binding from auto-suggestion)
- Prompt theme `fire` doesn't show git branch prefix
- `unsetopt CASE_GLOB` breaks performance HOT 5
- Using module `syntax-highlighting` show an error "maximum nested function level reached"
- Add zstyle to configure WORDCHARS
- source lines errors in .zprezto/init.zsh cause errors
- prezto fails with errors at line 172 and 199 in zsh.init HOT 2
- BBEdit.app can't start because of prezto on Mac.
- Missing time stamp in powerline theme.
- Add aliases for `git switch` and `git restore` to Git module
- How to properly configure skins in .zpreztorc
- `brew install virtualenvwrapper` not auto-picked up by Prezto's `python` module on Macbook M1 HOT 2
- utility module's settings not working
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 prezto.