Comments (22)
Try changing
antigen theme agkozak/agkozak-zsh-theme
to
antigen bundle agkozak/agkozak-zsh-theme
That works for me.
I'm going to look further into why antigen theme
doesn't work properly with my prompt -- I think I can see what's going on, but I really don't use antigen much myself.
from agkozak-zsh-prompt.
It looks as if something is broken in antigen v2.2.2 but has been fixed in the development version. Try running
curl -L git.io/antigen-nightly > ~/antigen.zsh
and then see if typing
zsh
antigen theme agkozak/agkozak-zsh-theme
leaves you with a working prompt.
If you can confirm that that works, I'll update my documentation to encourage people to use antigen bundle
just until antigen v2.2.3 is released. Thanks so much for your help, @AGitBoy!
from agkozak-zsh-prompt.
It’s interesting to note that the author of the pure prompt appear to have given up making antigen theme
work with his prompt, and advises people to use antigen bundle
instead. But I’ll look deeper.
from agkozak-zsh-prompt.
Nice find, I can confirm that your .zshrc
plus doing antigen reset
manually fixes the problem.
from agkozak-zsh-prompt.
Just wanted to chime in here, that for me, all that was needed was to run zsh
after sourcing.
I use an alias sz="source ~/.zshrc && zsh"
from agkozak-zsh-prompt.
Thanks for reporting this problem. I cannot reproduce it, however. With a simple .zshrc
that does nothing but source antigen and load my prompt, repeated sourcings only produce the expected message: "Seems agkozak/agkozak-zsh-theme is already installed!"
Would you be willing to share your .zshrc
? I'll play with it and try to figure out what's happening. Thanks.
from agkozak-zsh-prompt.
Ok. Here is my .zshrc:
######### Variables ##########
export SHELL=/usr/bin/zsh
# Various editor variables
export EDITOR=nvim
export VISUAL=nvim
# Neovim Pager
export PAGER=nvimpager
######### Aliases ##########
alias sl=ls
alias page=$PAGER
alias edit=$EDITOR
alias c=clear
alias e=exit
alias open=xdg-open
######### Plugins ##########
source ~/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle vi-mode
antigen bundle pip
antigen bundle common-aliases
antigen bundle go
antigen bundle rust
antigen bundle ubuntu
antigen bundle command-not-found
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme agkozak/agkozak-zsh-theme
antigen apply
If it is helpful, I'm on Kubuntu 18.04, with zsh version 5.4.2.
Other than this issue, I'm really loving this theme! It's good to find a theme that nearly perfectly fits my tastes and needs.
from agkozak-zsh-prompt.
I got the antigen nightly build and it works now! Thank you!
from agkozak-zsh-prompt.
Thanks for helping me to improve my documentation!
from agkozak-zsh-prompt.
I had a similar problem and the only combination that worked for me was antigen theme
and adding autoload -Uz promptinit; promptinit
in my .zshrc
. This is what I use now:
source "${funcsourcetrace[1]%/*}/antigen.zsh"
antigen use oh-my-zsh
antigen theme borekb/agkozak-zsh-theme@prompt-customization
antigen apply
autoload -Uz promptinit; promptinit
AGKOZAK_COLORS_BRANCH_STATUS=8
I'm not sure if promptinit should be required or not but without it, new shell sessions start without a customized prompt. Also, the combination of antigen bundle
and promptinit
leads only to the default prompt for me. I'm in MSYS2 on Windows, maybe it matters.
from agkozak-zsh-prompt.
Thanks, @borekb -- I'll be happy to look into this.
Let me just confirm what you have tried so far. Have you tried using simply
antigen bundle agkozak/agkozak-zsh-theme
(not antigen theme
), and if so, does that work?
Also, which version of antigen are you using?
from agkozak-zsh-prompt.
Yes, antigen bundle
, both with and without autoload -Uz promptinit; promptinit
, didn't work for me. I had to use antigen theme
and promptinit.
Oh, I'm still on Antigen 2.2.2, I assumed that they released a newer version since your earlier discussion in this issue but I was wrong. Will try again with the nightly build, sorry!
from agkozak-zsh-prompt.
With Antigen nightly, I couldn't get it working at all. Very strange is that even after switching back to 2.2.2, I couldn't get it working again. My .zshrc
is as per the comment above, I can get the prompt working for the current shell if I manually invoke antigen theme borekb/agkozak-zsh-theme@prompt-customization
again but as soon as I create a new session, I'm back to the default prompt. Which is strange because this was working just a couple of minutes ago.
The only safe way for me seems to be to source the theme directly from my .zshrc
, which is ugly but works:
source "$HOME/.antigen/bundles/borekb/agkozak-zsh-theme-prompt-customization/agkozak-zsh-theme.plugin.zsh"
from agkozak-zsh-prompt.
Thanks, yes, do try nightly and get back to me -- but either way, thanks for the new information about antigen bundle
not always working -- I'll want to update the documentation again, at the very least.
from agkozak-zsh-prompt.
By the way, theoretically, if my .zshrc
looked like this (which I assume should work):
source "${funcsourcetrace[1]%/*}/antigen.zsh"
antigen use oh-my-zsh
antigen bundle agkozak/agkozak-zsh-theme
antigen apply
autoload -Uz promptinit; promptinit
AGKOZAK_COLORS_BRANCH_STATUS=8
at which point should the code in .antigen/bundles/agkozak/agkozak-zsh-theme/agkozak-zsh-theme.plugin.zsh
be executed? Is it at the antigen apply
command? How does this command know it should invoke that specific file? Is that something about the .plugin.zsh
extension? Sorry, beginner questions, I'm just thinking that maybe that .zsh
file is not executed at all.
from agkozak-zsh-prompt.
Help me to confirm that the following works. Try using this .zshrc
:
source "${funcsourcetrace[1]%/*}/antigen.zsh"
antigen use oh-my-zsh
antigen theme borekb/agkozak-zsh-theme@prompt-customization
antigen apply
AGKOZAK_COLORS_BRANCH_STATUS=8
(that is, leave out the line about promptinit
-- I don't think it's necessary). Before restarting the shell, delete your .antigen
directory.
When you start a new shell in MYS2, I think you'll find that the prompt isn't working. Now execute the following two commands
antigen reset
zsh
When the next shell launches, your custom prompt should be there, and it should continue to work until...well, that's where I don't have all the answers yet.
The problem seems to be with how antigen builds its cache. antigen reset
rebuilds the cache -- that's why it should fix your problem, for a while at least. In answer to your earlier question, antigen's finding the agkozak-zsh-theme.plugin.zsh
all right.
I actually don't use antigen myself, so it's very helpful to me that you're catching these problems! I'll try to have a fix for our problem soon.
from agkozak-zsh-prompt.
I can see the cache (usually ~/.antigen/init.zsh
) not being build correctly the first time around. It seems only to happen on MSys2 and Cygwin, though. Sometimes there’s a path with two trailing slashes.
from agkozak-zsh-prompt.
What's happening is that the init.zsh
cache file has lines like
#--- BUNDLES BEGIN
#--- BUNDLES END
in it. When I reset the cache and restart zsh
, they get filled out, thus:
#--- BUNDLES BEGIN
source '/home/agkoz/.antigen/bundles/agkozak/agkozak-zsh-theme/agkozak-zsh-theme.plugin.zsh';
#--- BUNDLES END
So at first, nothing is getting sourced. I'll try to figure out what antigen doesn't like about my theme/bundle.
from agkozak-zsh-prompt.
I think there may be a problem with the way the antigen cache has worked in MSys2 and Cygwin starting in v2.2.0 -- even the common robbyrussell theme requires an antigen reset
to display properly. I will gather my observations and show them to antigen's developer. In the meantime, you can go on using
source /path/to/agkozak-zsh-theme.plugin.zsh
from agkozak-zsh-prompt.
@agkozak
I'm sorry for reporting a comment now. But, a couples of days this issue appears on my environment. I tried install and apply the Spaceship-prompt theme using the recommended approach on the documentation. Using antigen bundle denysdovhan/spaceship-prompt spaceship
. I've omitted the url. So, my prompt disappeared. When I tried follow your advise, to use antigen bundle
instead of antigen theme
, my prompt stopped to disappears... but don't applies nothing about the theme.
So what I did was install this plugin before applying any theme. Works like a charm. Basically it's what recommends the installation of the Pure theme.
I hope this helps.
Thanks
from agkozak-zsh-prompt.
@sinetoami zsh-async
doesn't work on Windows / MSYS2, it's actually one of the key strengths of this prompt that it implements asynchronicity in a way that works cross-platform. But your solution might help on non-Windows platforms, that's true.
from agkozak-zsh-prompt.
@sinetoami I'm glad you found something that works for you!
from agkozak-zsh-prompt.
Related Issues (20)
- Ability to disable directory trim. HOT 6
- Local/remote sessions HOT 3
- How to change the start mark from '%' to another? HOT 26
- Hide user and hostname HOT 5
- How to remove spaces around the git tag? HOT 5
- Is is possible to add Powerline Font character in prompt? HOT 13
- `cat` alias breaks `async` function HOT 7
- AGKOZAK_MULTILINE not simpatico with AGKOZAK_LEFT_PROMPT_ONLY HOT 8
- Show execution time above a given threshold HOT 13
- Add virtualenv indicator HOT 11
- Any way to customize the individual colors of the custom symbols? HOT 3
- Printing error on non-root android termux HOT 9
- Removing exit status does not work HOT 2
- [Question] Can an additional command be executed to be shown on the shell? HOT 2
- FR: zsh `promptinit` API support HOT 6
- Request: display pipestatus when any exit codes are non-zero HOT 5
- Ctrl + Left/Right to jump between words instead of vi/normal mode? HOT 5
- Finished background jobs don't update prompt HOT 5
- Long branch names in git cannot be concatenated HOT 7
- Under some conditions, when typing next cmd during previous cmd execution, prompt formatting gets mangled HOT 8
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 agkozak-zsh-prompt.