romkatv / powerlevel10k

A Zsh theme
MIT License
45.75k stars 2.16k forks source link

Startup performance is noticeably slow #234

Closed maximbaz closed 4 years ago

maximbaz commented 5 years ago

Hey @romkatv,

You have sparkled my interest in https://github.com/denysdovhan/spaceship-prompt/issues/734, so first of all thanks for that ๐Ÿ˜‰

I'm very interested to give this prompt a try, so I installed it using antigen and followed the initial wizard to configure the prompt.

While the experience in general feels smooth, I noticed that the startup time is noticeably slower than what I'm used to with my async version of spaceship. I can't give you any numbers, and to be honest I didn't dig deeply into powerlevel configuration to see what can be optimized (I only tried to disable a bunch of segments to no avail), but I did ask a friend for his perception (who I know also uses my async fork) and he confirms that the startup feels slower.

To clarify, by startup I mean the period of time between when I launch a new terminal instance and when the prompt is rendered so I can start typing my commands.

So maybe to start the discussion with something, have you heard a similar feedback before? Do you have any idea what might be the cause? Have you specifically attempted to optimize the startup time, or it hasn't been your focus so far?

I'm happy to assist with whatever I can, running experiments, performing benchmarks (how?), etc. At this point I dont have a powerlevel configuration I like (so we can start with some default and use it as an example).

I'm on Arch Linux using kitty terminal, zsh 5.7.1.

To me personally it's very important to get startup time to a minimum, I launch new terminal windows all the time and it feels annoying when I can notice the "loading". This is a lot more annoying than watching slow sections load (as long as they are asynchronous and not blocking my typing), so if I had to choose, I'd rather have slower async sections but faster startup.

๐Ÿ™‚

romkatv commented 4 years ago

Could you describe in more detail what happens? What do you do and what do you observe?

Happens a few times when I open tmux panes in any direction and with tiling window terminals. I think that's have relation with prompt resizing...

Could you explain what is happening in that gif? At the beginning there is one big terminal window. Then you press something and the window splits in two. What is the relationship between the original window and the two new windows? Do I understand it correctly that the right window of the two is the original window that has been resized, and the left window is a new shell?

Can you reproduce this problem if you update powerlevel10k?

Are you using a plugin manager?

maximbaz commented 4 years ago

Please update powerlevel10k, remove unsetopt prompt_sp prompt_cr that you've added earlier to zshrc and try again. Let me know if it works.

I was about to report that I still reproduce the issue, but turns out I had to manually rm -rf ~/.cache/p10-* and restart terminal to let p10k regenerate the files. After this everything was perfect.

In general, I think we need some better story around regenerating those files. For example, if I modify POWERLEVEL9K_LEFT_PROMPT_ELEMENTS and then launch a new terminal, I will see that cached instant prompt still uses the old POWERLEVEL9K_LEFT_PROMPT_ELEMENTS definition.

I would expect this:

romkatv commented 4 years ago

Please update powerlevel10k, remove unsetopt prompt_sp prompt_cr that you've added earlier to zshrc and try again. Let me know if it works.

I was about to report that I still reproduce the issue, but turns out I had to manually rm -rf ~/.cache/p10-* and restart terminal to let p10k regenerate the files. After this everything was perfect.

Sorry about that. I forgot to change one more line in my commit. Fixed now.

In general, I think we need some better story around regenerating those files. For example, if I modify POWERLEVEL9K_LEFT_PROMPT_ELEMENTS and then launch a new terminal, I will see that cached instant prompt still uses the old POWERLEVEL9K_LEFT_PROMPT_ELEMENTS definition.

I would expect this:

  • I modify POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
  • Next time I launch a new terminal I see inconsistency, but in the very end p10k regenerates cache
  • Next time I launch a new terminal everything is consistent with my current settings

That's how it works. Do you see something else?

maximbaz commented 4 years ago

Just updated again, that's how it works now with the latest master indeed! ๐Ÿ™‚

At a glance everything is perfect now! I'll report if I see anything weird ๐Ÿ˜‰

romkatv commented 4 years ago

Just updated again, that's how it works now with the latest master indeed!

It should've worked this way even before the last commit. There might be bugs though. The interaction between different caches and zsh instances that run simultaneously but with different settings is quite complex. I did think about all this while writing code and I also tested it a bit, so in theory it's supposed to work reasonably well even in tricky cases.

At a glance everything is perfect now! I'll report if I see anything weird

Thanks!

sinetoami commented 4 years ago

Could you explain what is happening in that gif? At the beginning there is one big terminal window. Then you press something and the window splits in two. What is the relationship between the original window and the two new windows? Do I understand it correctly that the right window of the two is the original window that has been resized, and the left window is a new shell?

I will try. So, I'm i3-gaps user. When I press a shortcut the i3 opens a new terminal. What I wanted to show you with the gif was the % char at the top of two terminals on the right side and a one on the left side. Can you see that? My intention open those terminals like that was trying to confirm mine thought about prompt resizing. But I'm not sure about that, by the way.

Can you reproduce this problem if you update powerlevel10k?

Still.

Are you using a plugin manager?

Yes.

PS.: If you don't understand me, feel free to say. My English is terrible I know that, but I can try to figure it out a better way to explain. :+1:

romkatv commented 4 years ago

@sinetoami Please update powerlevel10k and restart zsh. It'll probably show you an error. Apply the recommended solution. Does it work now?

romkatv commented 4 years ago

FYI: The configuration wizard now enables instant prompt automatically. In addition to adding the stanza at the top of ~/.zshrc (which you already have), it also adds this bit at the bottom:

(( ! ${+functions[p10k-instant-prompt-finalize]} )) || p10k-instant-prompt-finalize

It's not strictly necessary but it allows me to fix some of the issues that people can run into. For example, the issue @sinetoami is having.


One user has reported that they cannot close zsh with Ctrl-D when instant prompt is enabled. It's normal that Ctrl-D does nothing if you press it before everything is fully initialized (instant prompt doesn't change this), but this user says that Ctrl-D stops working altogether. I'm unable to reproduce this but I'll keep trying. Please try it too and let me know if it works for you or not.

maximbaz commented 4 years ago

but this user says that Ctrl-D stops working altogether. I'm unable to reproduce this but I'll keep trying. Please try it too and let me know if it works for you or not.

I'm using Ctrl-D all the time and it works for me flawlessly.

sinetoami commented 4 years ago

@romkatv I won't like to say that, but the update made it even worse than before :confused:. Before there was only a % at the top of the prompt in some opened terminals. Now I have that in every opened terminal and, plus, when I split tmux panes or open new terminals they are totally messed up the prompt (example: duplicate the first line many times, break the first line, don't resize the prompt properly). Even running p10k without plugin manager, any plugin and extra custom configurations had the same result. Maybe I'm doing something wrong because @maximbaz and you don't have any similar issue now... but I can wait for some updates...

maximbaz commented 4 years ago

Could you try to provide a minimal possible .zshrc that reproduces the issue? Ideally start in a terminal without tmux with empty .zshrc, install p10k, run config wizard and see if you reproduce the issue then. If not, try to add your own configs incrementally until you find what settings messes up your prompt.

sinetoami commented 4 years ago

@maximbaz yes, yes. I actually did that. Starting with the .zshrc completely naked, installed p10k manually, used p10k configure to generate the custom configs and so on.

romkatv commented 4 years ago

@sinetoami What's the smallest number of actions that you need to take in order to get any kind of brokenness in your prompt (having a % counts as brokenness)? Is it enough to simply open a terminal? If not, then what do you need to do to have brokenness? You don't need to catalog all kinds of brokenness and display all the crazy action in a gif. Just find the shortest possible chain of actions that always leads to the same broken results and describe it precisely.

Once you find that shortest possible chain of action that shows brokenness, figure out the shortest possible zshrc config that will still demonstrate the issue when you perform those actions. Can you reproduce the issue with this config?

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
source ~/powerlevel10k/powerlevel10k.zsh-theme
(( ! ${+functions[p10k-instant-prompt-finalize]} )) || p10k-instant-prompt-finalize

If not, what do you need to add to the config to get brokenness?

Is this something you could try?

but I can wait for some updates...

No updates are coming until I can reproduce this. You are the only one who can help with it.

sinetoami commented 4 years ago

@romkatv I will try to figure it out this by myself for a while before relate here what you need. I will be back with a better answer.

romkatv commented 4 years ago

@sinetoami I encourage you to post your findings as you go. I might be able to guess the culprit before you find the smallest possible test case.

romkatv commented 4 years ago

@sinetoami I took your public dotfiles and tried to reproduce the issue. Here's my command:

docker run -e LANG=en_US.utf8 -e TERM -it --rm archlinux/base bash -uexc '
  cd
  pacman -Syu --noconfirm
  pacman -Sy --noconfirm zsh git curl gawk nano
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)"
  git clone https://github.com/sinetoami/dotfiles.git
  git clone https://github.com/asdf-vm/asdf.git ~/.asdf
  shopt -s dotglob
  cp -r ~/dotfiles/zsh/* ~/
  ln -s /root /home/snio
  cat >~/instant-zsh.zsh <<END
instant-zsh-pre() {
  if [[ -r "\${XDG_CACHE_HOME:-\$HOME/.cache}/p10k-instant-prompt-\${(%):-%n}.zsh" ]]; then
    source "\${XDG_CACHE_HOME:-\$HOME/.cache}/p10k-instant-prompt-\${(%):-%n}.zsh"
  fi
}
instant-zsh-post() {
  (( ! \${+functions[p10k-instant-prompt-finalize]} )) || p10k-instant-prompt-finalize
}
END
  cat >~/.zshenv <<END
function keychain() false
function ruby() false
END
  exec zsh'

It works fine, so it's not zsh configs that break stuff.

I then went ahead and tried splitting terminal windows in different terminals. I managed to reproduce something that looks quite similar to your issue by opening a tab in Tilix and then clicking "Add terminal rightโ€. It shrinks the current terminal to 50% of its width and creates another terminal to the right of it with the same width. The new terminal has broken prompt.

After debugging this I found out what appears to be a bug somewhere. If I add the following lines to the very top of zshrc:

echo $COLUMNS
/bin/true
echo $COLUMNS

I'll get this output when clicking "Add terminal rightโ€.

80
40

40 is the correct answer, 80 isn't. I don't know if it's a bug in zsh or Tilix and what the proper workaround is. For now I added a call to /bin/true as it seems to help. Please update powerlevel10k and see if it helps.

sinetoami commented 4 years ago

Please update powerlevel10k and see if it helps.

Still the same behavior.

It works fine, so it's not zsh configs that break stuff. ... I don't know if it's a bug in zsh or Tilix...

Interesting that you noticed that. I repeated these steps with gnome-terminal, xfce4-terminal and urxvt-unicode. Both gnome-terminal and xfce4-terminal have the same bugs. But urxvt-unicode didn't. And here the interesting thing: my urxvt-unicode doesn't have NerdFont (or similar) support but even the prompt resizing works perfectly and never breaks or have any instability about powerlevel10k with instante prompt feature active. When I disable the instant prompt feature the powerlevel10k works equal perfectly with all terminal emulators.

But here the actions that show brokenness for me. I'm a xfce4-terminal and tmux user. Inside tmux I have some shortcuts that split up the host terminal in panes with horizontal or vertical directions. Just using xfce4-terminal without tmux I have the same behavior, the difference is without tmux the WM open terminals and dividing them with equally width or height. For example, I have a terminal and I decided to open a new one... after that, if my new terminal is opened on my right hand the left terminal breaks the prompt. And the new one prints a % on top of the prompt. And when I close this last terminal opened, the old one breaks one more time in a random way.

I don't know if what I said is sufficient for your analysis. Let me know if don't.

Update: Using urxvt-unicode more intensively today and I noticed that sometimes was printed % on top of the prompt too. But the prompt resizing doesn't actually break in any those times.

romkatv commented 4 years ago

@sinetoami Thanks for the info. I think I have the complete picture now.

tl;dr: There are two low level bugs that break zsh prompt. One triggers when you resize your terminal window. The other -- when your prompt is printed very quickly after a terminal is created. None of these are specific to powerlevel10k and can be reproduced with plain zsh with very simple prompt.

Let's first deal with the breakage of the left (original) terminal when you split a terminal window. What happens here is that the original terminal gets shrunk. That is, its width gets reduced. There are two ways terminals handle resizing. The first is to simply erase a portion of the terminal window when shrinking, and add empty space when expanding. The second is to reflow all text. Reflowing preserves all content in the terminal window but it will wrap around differently because of the different window width. Here's a demonstration of both.

  1. Type this:
    PROMPT='${(pl.$COLUMNS..-.)}'$'\n> ' zsh -f --prompt-subst
  2. Type reset and press enter a few times. Observe the content of your terminal.
  3. Shrink the terminal window (reduce its width). Observe the content of your terminal.
  4. Expand the terminal window (increase its width). Observe the content of your terminal.

This is what I get with urxvt, which uses the first method of handling terminal resizing.

Initial (after step 2):

urxvt-initial

Shrunk (after step 3):

urxvt-shrunk

Expanded (after step 4):

urxvt-expanded

Note that the last prompt is always correct. This is because urxvt sends SIGWINCH to the shell after the terminal window is resized. Zsh handles SIGWINCH by re-expanding and redrawing prompt. If you try the same experiment with Bash, you'll notice that the last prompt looks the same as the previous prompts after resizing.

And here's how it looks in GNOME Terminal, which reflows text on resizing.

Initial (after step 2):

gnome-terminal-initial

Shrunk (after step 3):

gnome-terminal-shrunk

Expanded (after step 4):

gnome-terminal-expanded

Notice that old prompts maintain their content when the terminal is resized. If you used Bash, the current prompt would also keep its content. In zsh, however, the current prompt gets repainted after the window is resized and the text is reflown. Zsh tries to repaint it on the same location where it was before the window got resized, but it gets it wrong and repaints the new prompt one line below the intended, so a part of the previous prompt remains on the screen. This is why you see more dashes after the terminal window has been shrunk. The extra dashes are the ghosts of the current prompt that haven't been erased after the window got shrunk.

I've attempted to fix this issue in zsh but then dropped it. See https://github.com/romkatv/powerlevel10k/issues/175. So the current state of affairs is that in most terminals zsh prompt breaks when you resize the terminal window. This problem is not specific to powerlevel10k. It's also not specific to instant prompt although it manifests differently. Basically, when using instant prompt, it becomes more apparent. To see what I mean, try the following in GNOME Terminal.

  1. Type this:
    PROMPT='${(pl.$COLUMNS..-.)}'$'\n> ' zsh -f --prompt-subst
  2. Type reset and press enter just once. You should have only one prompt on the screen.
  3. Shrink the terminal window (reduce its width). Observe the content of your terminal.
  4. Scroll up. Observe the content of your terminal.

Shrunk (after step 3):

gnome-terminal-shrunk-2

Scrolled up (after step 4):

gnome-terminal-scrolled-2

So, after shrinking it looked like everything is fine, but in fact there was a mess above the view port. If you resize your terminal back and forth several times, you can generate as much garbage output as you like.

Now let's deal with the breakage of the right (newly created) terminal when you split a terminal window. What happens here is that the TTY (or PTY) for the new terminal originally reports its size as 24 x 80. A few milliseconds later the TTY gets "resized" and the shell receives SIGWINCH as a notification. If the shell prints prints its prompt in the first few milliseconds, it might be broken because the real terminal size isn't 24 x 80 despite what it reports. Here's how you can observe this:

  1. Add this at the very top of your ~/.zshrc.
    typeset COLUMNS LINES
    PROMPT='left> '
    RPROMPT='<right'
    return
  2. Split your terminal window a bunch of times.

Here's what I've got after starting tilix and clicking "Add terminal right":

tilix-split

The left window is the original. Notice that it reports correct dimensions (10 x 90 is what I set as the default size in Tilix preferences). The right window reports incorrect size of 24 x 80, has the dreaded inverted % sign, and a mess of a prompt. In fact, it looks exactly like a broken instant prompt from Powerlevel10k.

So this problem always existed. How come you never noticed this until you enabled instant prompt? The reason is simple. Your prompt wasn't fast enough to be rendered before the first SIGWINCH.

Upstream bug reports:

I'm yet unsure what do to about this in Powerlevel10k.

romkatv commented 4 years ago

I've written a more robust workaround for the bug that causes stty size to incorrectly report 24 80 when starting a new terminal. See details in https://github.com/gnunn1/tilix/issues/1777#issuecomment-544419823. @sinetoami Please update powerlevel10k and check whether the new terminal no longer prints % when you split windows.

I don't plan to do anything about prompts that get broken when the terminal window is resized. Thus, when you split a terminal window, all prompts except the current prompt may be broken in the original terminal.

There is another issue with instant prompt that is much more severe than these. If your zshrc can sometimes ask for console input (e.g., a keyring password, or Update [Y/n]?) while loading, instant prompt will break stuff. How exactly it'll break stuff depends on the tool that wants to interact with the user. I've reverted the change to the configuration wizard so that it no longer enables instant prompt. I've also added the following note to the docs:

IMPORTANT UPDATE: Instant prompt is incompatible with zsh startup configs that may require console input. This includes asking for a keyring password and [Y/N] confirmations. It is currently NOT RECOMMENDED that you enable instant prompt.

If your zshrc never asks for console input, there is nothing for you to worry about. If some part of it can ask for console input, it needs to be done before instant prompt. I'm looking for a better solution but don't have good ideas at the moment..

maximbaz commented 4 years ago

Hmm nice catch... Have you considered introducing some sort of a hook like "prompt_finished_loading" so that users can put commands that request console input in them?

romkatv commented 4 years ago

Hmm nice catch...

I don't get credit for finding this issue. It was reported by users whose zsh broke.

Have you considered introducing some sort of a hook like "prompt_finished_loading" so that users can put commands that request console input in them?

Such commands need to run before instant prompt. They cannot be run between the instant and the real prompts because they'll eat buffered keybard input (things like ls ~/projects that got typed when instant prompt was showing). This isn't important though. What is important is that restructuring zshrc is too difficult for most users to and I cannot automate it. Moving interactive commands into special_hook(), or moving them above instant prompt -- are both too hard.

sinetoami commented 4 years ago

First of all, nice answer :+1:.

I've followed the steps you did and you completely right. With gnome-terminal and xfce4-terminal the behavior are the same as you said here:

The left window is the original. Notice that it reports correct dimensions (10 x 90 is what I set as the default size in Tilix preferences). The right window reports incorrect size of 24 x 80, has the dreaded inverted % sign, and a mess of a prompt.

The urxvt-unicode does not have this behavior.

So this problem always existed. How come you never noticed this until you enabled instant prompt? The reason is simple. Your prompt wasn't fast enough to be rendered before the first SIGWINCH.

Very interesting. But... Why you and @maximbaz don't notice that before I mention? Power of processing or something slow down SIGWINCH rendering?

Please update powerlevel10k and check whether the new terminal no longer prints % when you split windows.

Still prints. Every time on gnome-terminal and xfce4-terminal. urxvt-unicode less times than the others. Theoretically urxvt-unicode is rendering more fastest... And probably this makes sense because I always open a new client/slave of urxvtd, which is a urxvt-unicode deamon started soon as my WM. So this gives me less ms to startup a new terminal. Am I wrong?

romkatv commented 4 years ago

Very interesting. But... Why you and @maximbaz don't notice that before I mention?

When I open a tab in GNOME (whether the first or in addition to existing tabs), terminal dimensions are always reported correctly. When I launch Tilix, terminal dimensions are always reported correctly. They are only incorrect when I create additional tabs in Tilix.

By the way, there is at least 100 people using instant prompt right now, likely many more. The error you are seeing is peculiar to your configuration, which is rare.

Still prints. Every time on gnome-terminal

Let's stick with gnome-terminal for simplicity. Please open it and type the following:

() {
  emulate -L zsh
  typeset -m 'ZSH_VERSION|VTE_VERSION'
  command grep -E 'VTE_VERSION|stty' "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
}

Post the output here.

Describe what you do to trigger the bug with gnome-terminal.

romkatv commented 4 years ago

While at it, please also do the following. Add this code at the top of your ~/.zshrc (before everything):

setopt trapsasync
trap 'echo WINCH ${LINES}x${COLUMNS}' WINCH
echo BEGIN ${LINES}x${COLUMNS}
sleep 1
echo END ${LINES}x${COLUMNS}
return

Then do the same thing that you normally do with GNOME Terminal that would trigger the bug. Post here the output.

romkatv commented 4 years ago

FYI: Another user with a similar setup to @sinetoami has kindly helped with debugging this issue. You can find some details in https://github.com/gnunn1/tilix/issues/1777.

I've implemented (what I believe to be) a robust workaround for VTE bugs, written docs, added warnings and enabled instant prompt in the configuration wizard (there is a new screen that asks about it). You can trigger one warning by adding setopt prompt_cr at the bottom of ~/.zshrc, and another by adding echo test.

If Iโ€™ve messed up things too badly, or overestimated the ability of users to understand this complex feature, I might have to revert some stuff later. Waiting for bug reports to start rolling in.

sinetoami commented 4 years ago
() {
  emulate -L zsh
  typeset -m 'ZSH_VERSION|VTE_VERSION'
  command grep -E 'VTE_VERSION|stty' "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
}

Post the output here.

ZSH_VERSION=5.7.1
VTE_VERSION=5802

Describe what you do to trigger the bug with gnome-terminal.

Enabling the instant prompt feature and just open a new terminal, tmux pane or terminal tab. With and without using plugins manager the same thing happens.

  • Is it enough to close gnome-terminal (all tabs, everything) and then launch it? Will it trigger the bug?

No. Yes.

  • If not, is it enough to click "New Tab" to trigger the bug?

Yes.

I made a fresh install of my zsh settings (from scratch) using my SSD. And the same happens too.

While at it, please also do the following. Add this code at the top of your ~/.zshrc (before everything):

setopt trapsasync
trap 'echo WINCH ${LINES}x${COLUMNS}' WINCH
echo BEGIN ${LINES}x${COLUMNS}
sleep 1
echo END ${LINES}x${COLUMNS}
return

Then do the same thing that you normally do with GNOME Terminal that would trigger the bug. Post here the output.

Always shows:

BEGIN 24x80
END 24x80

In the very left prompt(the most old one) prints this:

WINCH 37x72
WINCH 37x48
WINCH 37x35
WINCH 37x28

In this case, I had 4 terminals opened, if I open one more terminal it will output a new WHICH thing with a new size prompt.

PS.: sorry for the delay. I'm very busy.

romkatv commented 4 years ago

PS.: sorry for the delay. I'm very busy.

No worries. In case you've missed my last comment:

FYI: Another user with a similar setup to @sinetoami has kindly helped with debugging this issue.

Miguel-Bento-Github commented 3 years ago

Hi there,

I'm not sure I find a fix in this thread. Currently it takes a few seconds for my p10k to start. I have a very basic config, you can find the zshrc and p10k config below.

I'm in macOS BigSur 11.4 I use both Kitty or the internal VS Code terminal, both take a long time to start. I've deleted ASL files as per other people issues which changed nothing in my case, removing NVM made it faster although I'll need to add it back in the future, maybe as an alias to avoid slowing down the loading process.

.zshrc

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/Users/<myUsername>/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="agnoster"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
alias c="cd /Volumes/Code/code/"
source ~/powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

Thanks in advance for the help

romkatv commented 3 years ago

@Miguel-Bento-Github Please open a separate issue.