[
  {
    "path": ".gitattributes",
    "content": "* text=auto\n*.zsh text eol=lf\n*.zsh-theme text eol=lf\n/prompt_powerlevel9k_setup text eol=lf\n/prompt_powerlevel10k_setup text eol=lf\n"
  },
  {
    "path": ".gitignore",
    "content": "*.zwc\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2009-2014 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors)\nCopyright (c) 2014-2017 Ben Hilburn <bhilburn@gmail.com>\nCopyright (c) 2019 Roman Perepelitsa <roman.perepelitsa@gmail.com> and contributors (see https://github.com/romkatv/powerlevel10k/contributors)\n\nMIT LICENSE\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": "ZSH := $(shell command -v zsh 2> /dev/null)\n\nall:\n\nzwc:\n\t$(MAKE) -C gitstatus zwc\n\t$(or $(ZSH),:) -fc 'for f in *.zsh-theme internal/*.zsh; do zcompile -R -- $$f.zwc $$f || exit; done'\n\nminify:\n\t$(MAKE) -C gitstatus minify\n\trm -rf -- .git .gitattributes .gitignore LICENSE Makefile README.md font.md powerlevel10k.png\n\npkg: zwc\n\t$(MAKE) -C gitstatus pkg\n"
  },
  {
    "path": "README.md",
    "content": "# Powerlevel10k\n[![Gitter](https://badges.gitter.im/powerlevel10k/community.svg)](\n  https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\n- **THE PROJECT HAS VERY LIMITED SUPPORT**\n- **NO NEW FEATURES ARE IN THE WORKS**\n- **MOST BUGS WILL GO UNFIXED**\n- **HELP REQUESTS WILL BE IGNORED**\n\nPowerlevel10k is a theme for Zsh. It emphasizes [speed](#uncompromising-performance),\n[flexibility](#extremely-customizable) and [out-of-the-box experience](#configuration-wizard).\n\n![Powerlevel10k](\nhttps://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-styles-high-contrast.png)\n\n- [Getting started](#getting-started)\n- [Features](#features)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Fonts](#fonts)\n- [Try it in Docker](#try-it-in-docker)\n- [License](#license)\n- [FAQ](#faq)\n- [Troubleshooting](#troubleshooting)\n\n## Getting started\n\n1. [Install the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). *Optional but highly\n   recommended.*\n1. [Install Powerlevel10k](#installation) itself.\n1. Restart Zsh with `exec zsh`.\n1. Type `p10k configure` if the configuration wizard doesn't start automatically.\n\n## Features\n\n- [Configuration wizard](#configuration-wizard)\n- [Uncompromising performance](#uncompromising-performance)\n- [Powerlevel9k compatibility](#powerlevel9k-compatibility)\n- [Pure compatibility](#pure-compatibility)\n- [Instant prompt](#instant-prompt)\n- [Show on command](#show-on-command)\n- [Transient prompt](#transient-prompt)\n- [Current directory that just works](#current-directory-that-just-works)\n- [Extremely customizable](#extremely-customizable)\n- [Batteries included](#batteries-included)\n- [Extensible](#extensible)\n\n### Configuration wizard\n\nType `p10k configure` to access the builtin configuration wizard right from your terminal.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Configuration Wizard](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/configuration-wizard.gif)\n</details>\n\nAll styles except [Pure](#pure-compatibility) are functionally equivalent. They display the same\ninformation and differ only in presentation.\n\nConfiguration wizard creates `~/.p10k.zsh` based on your preferences. Additional prompt\ncustomization can be done by editing this file. It has plenty of comments to help you navigate\nthrough configuration options.\n\n*Tip*: Install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k) before\nrunning `p10k configure` to unlock all prompt styles.\n\n*FAQ:*\n\n- [What is the best prompt style in the configuration wizard?](\n    #what-is-the-best-prompt-style-in-the-configuration-wizard)\n- [What do different symbols in Git status mean?](\n    #what-do-different-symbols-in-git-status-mean)\n- [How do I change prompt colors?](#how-do-i-change-prompt-colors)\n\n*Troubleshooting*:\n\n- [Some prompt styles are missing from the configuration wizard](\n    #some-prompt-styles-are-missing-from-the-configuration-wizard).\n- [Question mark in prompt](#question-mark-in-prompt).\n- [Icons, glyphs or powerline symbols don't render](#icons-glyphs-or-powerline-symbols-dont-render).\n- [Sub-pixel imperfections around powerline symbols](\n    #sub-pixel-imperfections-around-powerline-symbols).\n- [Directory is difficult to see in prompt when using Rainbow style](\n    #directory-is-difficult-to-see-in-prompt-when-using-rainbow-style).\n\n### Uncompromising performance\n\nWhen you hit *ENTER*, the next prompt appears instantly. With Powerlevel10k there is no prompt lag.\nIf you install Cygwin on Raspberry Pi, `cd` into a Linux Git repository and activate enough prompt\nsegments to fill four prompt lines on both sides of the screen... wait, that's just crazy and no\none ever does that. Probably impossible, too. The point is, Powerlevel10k prompt is always fast, no\nmatter what you do!\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Performance](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/performance.gif)\n</details>\n\nNote how the effect of every command is instantly reflected by the very next prompt.\n\n| Command                       | Prompt Indicator | Meaning                                                               |\n|-------------------------------|:----------------:|----------------------------------------------------------------------:|\n| `timew start hack linux`      | `⌚ hack linux`  | time tracking enabled in [timewarrior](https://timewarrior.net/)      |\n| `touch x y`                   | `?2`             | 2 untracked files in the Git repo                                     |\n| `rm COPYING`                  | `!1`             | 1 unstaged change in the Git repo                                     |\n| `echo 3.7.3 >.python-version` | `🐍 3.7.3`       | the current python version in [pyenv](https://github.com/pyenv/pyenv) |\n\nOther Zsh themes capable of displaying the same information either produce prompt lag or print\nprompt that doesn't reflect the current state of the system and then refresh it later. With\nPowerlevel10k you get fast prompt *and* up-to-date information.\n\n*FAQ*: [Is it really fast?](#is-it-really-fast)\n\n### Powerlevel9k compatibility\n\nPowerlevel10k understands all [Powerlevel9k](https://github.com/Powerlevel9k/powerlevel9k)\nconfiguration parameters.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Compatibility with 9k](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/9k-compatibility.gif)\n</details>\n\n[Migration](#installation) from Powerlevel9k to Powerlevel10k is a straightforward process. All\nyour `POWERLEVEL9K` configuration parameters will still work. Prompt will look the same as before\n([almost](\n  #does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config))\nbut it will be [much faster](#uncompromising-performance) ([certainly](#is-it-really-fast)).\n\n*FAQ*:\n\n- [I'm using Powerlevel9k with Oh My Zsh. How do I migrate?](\n    #im-using-powerlevel9k-with-oh-my-zsh-how-do-i-migrate)\n- [Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?](\n    #does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config)\n- [What is the relationship between Powerlevel9k and Powerlevel10k?](\n    #What-is-the-relationship-between-powerlevel9k-and-powerlevel10k)\n\n### Pure compatibility\n\nPowerlevel10k can produce the same prompt as [Pure](https://github.com/sindresorhus/pure). Type\n`p10k configure` and select *Pure* style.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Pure Style](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/pure-style.gif)\n</details>\n\nYou can still use Powerlevel10k features such as [transient prompt](#transient-prompt) or\n[instant prompt](#instant-prompt) when sporting Pure style.\n\nTo customize prompt, edit `~/.p10k.zsh`. Powerlevel10k doesn't recognize Pure configuration\nparameters, so you'll need to use `POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3` instead of\n`PURE_CMD_MAX_EXEC_TIME=3`, etc. All relevant parameters are in `~/.p10k.zsh`. This file has\nplenty of comments to help you navigate through it.\n\n*FAQ:* [What is the best prompt style in the configuration wizard?](\n  #what-is-the-best-prompt-style-in-the-configuration-wizard)\n\n### <a name='what-is-instant-prompt'></a>Instant prompt\n\nIf your `~/.zshrc` loads many plugins, or perhaps just a few slow ones\n(for example, [pyenv](https://github.com/pyenv/pyenv) or [nvm](https://github.com/nvm-sh/nvm)), you\nmay have noticed that it takes some time for Zsh to start.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k No Instant Prompt](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/no-instant-prompt.gif)\n</details>\n\nPowerlevel10k can remove Zsh startup lag **even if it's not caused by a theme**.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Instant Prompt](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/instant-prompt.gif)\n</details>\n\nThis feature is called *Instant Prompt*. You need to explicitly enable it through `p10k configure`\nor [manually](#how-do-i-configure-instant-prompt). It does what it says on the tin -- prints prompt\ninstantly upon Zsh startup allowing you to start typing while plugins are still loading.\n\nOther themes *increase* Zsh startup lag -- some by a lot, others by a just a little. Powerlevel10k\n*removes* it outright.\n\nIf you are curious about how *Instant Prompt* works, see\n[this section in zsh-bench](https://github.com/romkatv/zsh-bench#instant-prompt).\n\n*FAQ:* [How do I configure instant prompt?](#how-do-i-configure-instant-prompt)\n\n### Show on command\n\nThe behavior of some commands depends on global environment. For example, `kubectl run ...` runs an\nimage on the cluster defined by the current kubernetes context. If you frequently change context\nbetween \"prod\" and \"testing\", you might want to display the current context in Zsh prompt. If you do\nlikewise for AWS, Azure and Google Cloud credentials, prompt will get pretty crowded.\n\nEnter *Show On Command*. This feature makes prompt segments appear only when they are relevant to\nthe command you are currently typing.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Show On Command](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/show-on-command.gif)\n</details>\n\nConfigs created by `p10k configure` enable show on command for several prompt segments by default.\nHere's the relevant parameter for kubernetes context:\n\n```zsh\n# Show prompt segment \"kubecontext\" only when the command you are typing invokes one of these tools.\ntypeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'\n```\n\nTo customize when different prompt segments are shown, open `~/.p10k.zsh`, search for\n`SHOW_ON_COMMAND` and either remove these parameters to display affected segments unconditionally,\nor change their values.\n\n### Transient prompt\n\nWhen *Transient Prompt* is enabled through `p10k configure`, Powerlevel10k will trim down every\nprompt when accepting a command line.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Transient Prompt](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/transient-prompt.gif)\n</details>\n\nTransient prompt makes it much easier to copy-paste series of commands from the terminal scrollback.\n\n*Tip*: If you enable transient prompt, take advantage of two-line prompt. You'll get the benefit of\nextra space for typing commands without the usual drawback of reduced scrollback density. Sparse\nprompt (with an empty line before prompt) also works great in combination with transient prompt.\n\n### Current directory that just works\n\nThe current working directory is perhaps the most important prompt segment. Powerlevel10k goes to\ngreat length to highlight its important parts and to truncate it with the least loss of information\nwhen horizontal space gets scarce.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Directory Truncation](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/directory-truncation.gif)\n</details>\n\nWhen the full directory doesn't fit, the leftmost segment gets truncated to its shortest unique\nprefix. In the screencast, `~/work` becomes `~/wo`. It couldn't be truncated to `~/w` because it\nwould be ambiguous (there was `~/wireguard` when the session was recorded). The next segment --\n`projects` -- turns into `p` as there was nothing else that started with `p` in `~/work/`.\n\nDirectory segments are shown in one of three colors:\n\n- Truncated segments are bleak.\n- Important segments are bright and never truncated. These include the first and the last segment,\n  roots of Git repositories, etc.\n- Regular segments (not truncated but can be) use in-between color.\n\n*Tip*: If you copy-paste a truncated directory and hit *TAB*, it'll complete to the original.\n\n*Troubleshooting*: [Directory is difficult to see in prompt when using Rainbow style.](\n  #directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)\n\n### Extremely customizable\n\nPowerlevel10k can be configured to look like any other Zsh theme out there.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Other Theme Emulation](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/other-theme-emulation.gif)\n</details>\n\n[Pure](#pure-compatibility), [Powerlevel9k](#powerlevel9k-compatibility) and [robbyrussell](\n  #how-to-make-powerlevel10k-look-like-robbyrussell-oh-my-zsh-theme) emulations are built-in.\nTo emulate the appearance of other themes, you'll need to write a suitable configuration file. The\nbest way to go about it is to run `p10k configure`, select the style that is the closest to your\ngoal and then edit `~/.p10k.zsh`.\n\nThe full range of Powerlevel10k appearance spans from spartan:\n\n![Powerlevel10k Spartan Style](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/spartan-style.png)\n\nTo ~~ridiculous~~ extravagant:\n\n![Powerlevel10k Extravagant Style](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/extravagant-style.png)\n\n### Batteries included\n\nPowerlevel10k comes with dozens of built-in high quality prompt segments that can display\ninformation from a variety of sources. When you run `p10k configure` and choose any style\nexcept [Pure](#pure-compatibility), many of these segments get enabled by\ndefault while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them.\nYou can enable as many segments as you like. It won't slow down your prompt or Zsh startup.\n\n| Segment | Meaning |\n|--------:|---------|\n| `anaconda` | virtual environment from [conda](https://conda.io/) |\n| `asdf` | tool versions from [asdf](https://github.com/asdf-vm/asdf) |\n| `aws` | [aws profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) |\n| `aws_eb_env` | [aws elastic beanstalk](https://aws.amazon.com/elasticbeanstalk/) environment |\n| `azure` | [azure](https://docs.microsoft.com/en-us/cli/azure) account name |\n| `background_jobs` | presence of background jobs |\n| `battery` | internal battery state and charge level (yep, batteries *literally* included) |\n| `command_execution_time` | duration (wall time) of the last command |\n| `context` | user@hostname |\n| `cpu_arch` | CPU architecture |\n| `dir` | current working directory |\n| `direnv` | [direnv](https://direnv.net/) status |\n| `disk_usage` | disk usage |\n| `dotnet_version` | [dotnet](https://dotnet.microsoft.com) version |\n| `fvm` | flutter environment from [fvm](https://github.com/leoafarias/fvm) |\n| `gcloud` | [google cloud](https://cloud.google.com/) cli account and project |\n| `goenv` | go environment from [goenv](https://github.com/syndbg/goenv) |\n| `google_app_cred` | [google application credentials](https://cloud.google.com/docs/authentication/production) |\n| `go_version` | [go](https://golang.org) version |\n| `haskell_stack` | haskell version from [stack](https://haskellstack.org/) |\n| `ip` | IP address and bandwidth usage for a specified network interface |\n| `java_version` | [java](https://www.java.com/) version |\n| `jenv` | java environment from [jenv](https://github.com/jenv/jenv) |\n| `kubecontext` | current [kubernetes](https://kubernetes.io/) context |\n| `laravel_version` | [laravel php framework](https://laravel.com/) version |\n| `load` | CPU load |\n| `luaenv` | lua environment from [luaenv](https://github.com/cehoffman/luaenv) |\n| `midnight_commander` | [midnight commander](https://midnight-commander.org/) shell |\n| `nix_shell` | [nix shell](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) indicator |\n| `nnn` | [nnn](https://github.com/jarun/nnn) shell |\n| `lf` | [lf](https://github.com/gokcehan/lf) shell |\n| `chezmoi_shell` | [chezmoi](https://www.chezmoi.io/) shell |\n| `nodeenv` | node.js environment from [nodeenv](https://github.com/ekalinin/nodeenv) |\n| `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) |\n| `node_version` | [node.js](https://nodejs.org/) version |\n| `nordvpn` | [nordvpn](https://nordvpn.com/) connection status |\n| `nvm` | node.js environment from [nvm](https://github.com/nvm-sh/nvm) |\n| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) |\n| `package` | `name@version` from [package.json](https://docs.npmjs.com/files/package.json) |\n| `per_directory_history` | Oh My Zsh [per-directory-history](https://github.com/jimhester/per-directory-history) local/global indicator |\n| `perlbrew` | perl version from [perlbrew](https://github.com/gugod/App-perlbrew) |\n| `phpenv` | php environment from [phpenv](https://github.com/phpenv/phpenv) |\n| `php_version` | [php](https://www.php.net/) version |\n| `plenv` | perl environment from [plenv](https://github.com/tokuhirom/plenv) |\n| `prompt_char` | multi-functional prompt symbol; changes depending on vi mode: `❯`, `❮`, `V`, `▶` for insert, command, visual and replace mode respectively; turns red on error |\n| `proxy` | system-wide http/https/ftp proxy |\n| `public_ip` | public IP address |\n| `pyenv` | python environment from [pyenv](https://github.com/pyenv/pyenv) |\n| `ram` | free RAM |\n| `ranger` | [ranger](https://github.com/ranger/ranger) shell |\n| `yazi` | [yazi](https://github.com/sxyazi/yazi) shell |\n| `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) |\n| `rust_version` | [rustc](https://www.rust-lang.org) version |\n| `rvm` | ruby environment from [rvm](https://rvm.io) |\n| `scalaenv` | scala version from [scalaenv](https://github.com/scalaenv/scalaenv) |\n| `status` | exit code of the last command |\n| `swap` | used swap |\n| `taskwarrior` | [taskwarrior](https://taskwarrior.org/) task count |\n| `terraform` | [terraform](https://www.terraform.io) workspace |\n| `terraform_version` | [terraform](https://www.terraform.io) version |\n| `time` | current time |\n| `timewarrior` | [timewarrior](https://timewarrior.net/) tracking status |\n| `todo` | [todo](https://github.com/todotxt/todo.txt-cli) items |\n| `toolbox` | [toolbox](https://github.com/containers/toolbox) name |\n| `vcs` | Git repository status |\n| `vim_shell` | [vim](https://www.vim.org/) shell (`:sh`) |\n| `virtualenv` | python environment from [venv](https://docs.python.org/3/library/venv.html) |\n| `vi_mode` | vi mode (you don't need this if you've enabled prompt_char) |\n| `vpn_ip` | virtual private network indicator |\n| `wifi` | WiFi speed |\n| `xplr` | [xplr](https://github.com/sayanarijit/xplr) shell |\n\n### Extensible\n\nIf there is no prompt segment that does what you need, implement your own. Powerlevel10k provides\npublic API for defining segments that are as fast and as flexible as built-in ones.\n\n<details>\n  <summary>Screen recording</summary>\n\n  ![Powerlevel10k Custom Segment](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/custom-segment.gif)\n</details>\n\nOn Linux you can fetch current CPU temperature by reading `/sys/class/thermal/thermal_zone0/temp`.\nThe screencast shows how to define a prompt segment to display this value. Once the segment is\ndefined, you can use it like any other segment. All standard customization parameters will work for\nit out of the box.\n\nType `p10k help segment` for reference.\n\n*Note*: If you modify `POWERLEVEL9K_*` parameters in an already initialized interactive shell (as\nopposed to editing `~/.p10k.zsh`), the changes might not be immediately effective. To apply the\nmodifications, invoke `p10k reload`. Setting `POWERLEVEL9K_DISABLE_HOT_RELOAD=false` eliminates the\nnecessity for `p10k reload` but results in a marginally slower prompt.\n\n*Tip*: Prefix names of your own segments with `my_` to avoid clashes with future versions of\nPowerlevel10k.\n\n## Installation\n\n- [Manual](#manual) 👈 **choose this if confused or uncertain**\n- [Oh My Zsh](#oh-my-zsh)\n- [Prezto](#prezto)\n- [Zim](#zim)\n- [Antibody](#antibody)\n- [Antidote](#antidote)\n- [Antigen](#antigen)\n- [Zplug](#zplug)\n- [Zgen](#zgen)\n- [Zplugin](#zplugin)\n- [Zinit](#zinit)\n- [Zi](#zi)\n- [Zap](#zap)\n- [Homebrew](#homebrew)\n- [Arch Linux](#arch-linux)\n- [Alpine Linux](#alpine-linux)\n- [Fig](#fig)\n\n### Manual\n\n```zsh\ngit clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k\necho 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n```\n\nUsers in China can use the official mirror on gitee.com for faster download.<br>\n中国用户可以使用 gitee.com 上的官方镜像加速下载.\n\n```zsh\ngit clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ~/powerlevel10k\necho 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n```\n\nThis is the simplest kind of installation and it works even if you are using a plugin manager. Just\nmake sure to disable the current theme in your plugin manager. See\n[troubleshooting](#cannot-make-powerlevel10k-work-with-my-plugin-manager) for help.\n\n### Oh My Zsh\n\n1. Clone the repository:\n    ```zsh\n    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\"\n    ```\n    Users in China can use the official mirror on gitee.com for faster download.<br>\n    中国用户可以使用 gitee.com 上的官方镜像加速下载.\n\n    ```zsh\n    git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git \"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\"\n    ```\n2. Open `~/.zshrc`, find the line that sets `ZSH_THEME`, and change its value to `\"powerlevel10k/powerlevel10k\"`.\n\n### Prezto\n\nAdd `zstyle :prezto:module:prompt theme powerlevel10k` to `~/.zpreztorc`.\n\n### Zim\n\nAdd `zmodule romkatv/powerlevel10k --use degit` to `~/.zimrc` and run `zimfw install`.\n\n### Antibody\n\nAdd `antibody bundle romkatv/powerlevel10k` to `~/.zshrc`.\n\n### Antidote\n\nAdd `romkatv/powerlevel10k` to `~/.zsh_plugins.txt`.\n\n### Antigen\n\nAdd `antigen theme romkatv/powerlevel10k` to `~/.zshrc`. Make sure you have `antigen apply`\nsomewhere after it.\n\n### Zplug\n\nAdd `zplug romkatv/powerlevel10k, as:theme, depth:1` to `~/.zshrc`.\n\n### Zgen\n\nAdd `zgen load romkatv/powerlevel10k powerlevel10k` to `~/.zshrc`.\n\n### Zplugin\n\nAdd `zplugin ice depth=1; zplugin light romkatv/powerlevel10k` to `~/.zshrc`.\n\nThe use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially\nsupported by Powerlevel10k.\n\n### Zinit\n\nAdd `zinit ice depth=1; zinit light romkatv/powerlevel10k` to `~/.zshrc`.\n\nThe use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially\nsupported by Powerlevel10k.\n\n### Zi\n\nAdd `zi ice depth=1; zi light romkatv/powerlevel10k` to `~/.zshrc`.\n\nThe use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially\nsupported by Powerlevel10k.\n\n### Zap\n\nAdd `plug \"romkatv/powerlevel10k\"` to `~/.zshrc`.\n\n### Homebrew\n\n```zsh\nbrew install powerlevel10k\necho \"source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme\" >>~/.zshrc\n```\n\n### Arch Linux\n\n```zsh\nyay -S --noconfirm zsh-theme-powerlevel10k-git\necho 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n```\n\n[zsh-theme-powerlevel10k-git](https://aur.archlinux.org/packages/zsh-theme-powerlevel10k-git/)\nreferenced above is the official Powerlevel10k package.\n\n### Alpine Linux\n\n```zsh\napk add zsh zsh-theme-powerlevel10k\nmkdir -p ~/.local/share/zsh/plugins\nln -s /usr/share/zsh/plugins/powerlevel10k ~/.local/share/zsh/plugins/\n```\n\n### Fig\n\nFollow the instructions on\n[this page](https://fig.io/plugins/other/powerlevel10k).\n\n## Configuration\n\n- [For new users](#for-new-users)\n- [For Powerlevel9k users](#for-powerlevel9k-users)\n\n### For new users\n\nOn the first run, Powerlevel10k [configuration wizard](#configuration-wizard) will ask you a few\nquestions and configure your prompt. If it doesn't trigger automatically, type `p10k configure`.\nConfiguration wizard creates `~/.p10k.zsh` based on your preferences. Additional prompt\ncustomization can be done by editing this file. It has plenty of comments to help you navigate\nthrough configuration options.\n\n*FAQ*:\n\n- [What is the best prompt style in the configuration wizard?](\n    #what-is-the-best-prompt-style-in-the-configuration-wizard)\n- [What do different symbols in Git status mean?](\n    #what-do-different-symbols-in-git-status-mean)\n- [How do I change the format of Git status?](#how-do-i-change-the-format-of-git-status)\n- [How do I add username and/or hostname to prompt?](\n    #how-do-i-add-username-andor-hostname-to-prompt)\n- [How do I change prompt colors?](#how-do-i-change-prompt-colors)\n- [Why some prompt segments appear and disappear as I'm typing?](\n    #why-some-prompt-segments-appear-and-disappear-as-im-typing)\n\n*Troubleshooting*:\n\n- [Question mark in prompt](#question-mark-in-prompt).\n- [Icons, glyphs or powerline symbols don't render](#icons-glyphs-or-powerline-symbols-dont-render).\n- [Sub-pixel imperfections around powerline symbols](\n    #sub-pixel-imperfections-around-powerline-symbols).\n- [Directory is difficult to see in prompt when using Rainbow style](\n    #directory-is-difficult-to-see-in-prompt-when-using-rainbow-style).\n\n### For Powerlevel9k users\n\nIf you've been using Powerlevel9k before, **do not remove the configuration options**. Powerlevel10k\nwill pick them up and provide you with the same prompt UI you are used to. See\n[Powerlevel9k compatibility](#powerlevel9k-compatibility).\n\n*FAQ*:\n\n- [I'm using Powerlevel9k with Oh My Zsh. How do I migrate?](\n    #im-using-powerlevel9k-with-oh-my-zsh-how-do-i-migrate)\n- [What is the relationship between Powerlevel9k and Powerlevel10k?](\n    #what-is-the-relationship-between-powerlevel9k-and-powerlevel10k)\n- [Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?](\n    #does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config)\n\n*Troubleshooting*: [Extra or missing spaces in prompt compared to Powerlevel9k](\n  #extra-or-missing-spaces-in-prompt-compared-to-powerlevel9k).\n\n## Fonts\n\nPowerlevel10k doesn't require custom fonts but can take advantage of them if they are available.\nIt works well with [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts),\n[Source Code Pro](https://github.com/adobe-fonts/source-code-pro),\n[Font Awesome](https://fontawesome.com/), [Powerline](https://github.com/powerline/fonts), and even\nthe default system fonts. The full choice of style options is available only when using\n[Nerd Fonts](https://github.com/ryanoasis/nerd-fonts).\n\n👇 **Recommended font**: Meslo Nerd Font patched for Powerlevel10k. 👇\n\n### <a name='recommended-meslo-nerd-font-patched-for-powerlevel10k'></a><a name='font'></a>Meslo Nerd Font patched for Powerlevel10k\n\nGorgeous monospace font designed by Jim Lyles for Bitstream, customized by the same for Apple,\nfurther customized by André Berg, and finally patched by yours truly with customized scripts\noriginally developed by Ryan L McIntyre of Nerd Fonts. Contains all glyphs and symbols that\nPowerlevel10k may need. Battle-tested in dozens of different terminals on all major operating\nsystems.\n\n*FAQ*: [How was the recommended font created?](#how-was-the-recommended-font-created)\n\n#### Automatic font installation\n\nIf you are using iTerm2 or Termux, `p10k configure` can install the recommended font for you.\nSimply answer `Yes` when asked whether to install *Meslo Nerd Font*.\n\nIf you are using a different terminal, proceed with manual font installation. 👇\n\n#### Manual font installation\n\n1. Download these four ttf files:\n   - [MesloLGS NF Regular.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)\n   - [MesloLGS NF Bold.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)\n   - [MesloLGS NF Italic.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)\n   - [MesloLGS NF Bold Italic.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)\n1. Double-click on each file and click \"Install\". This will make `MesloLGS NF` font available to all\n   applications on your system.\n1. Configure your terminal to use this font:\n   - **iTerm2**: Type `p10k configure` and answer `Yes` when asked whether to install\n     *Meslo Nerd Font*. Alternatively, open *iTerm2 → Preferences → Profiles → Text* and set *Font* to\n     `MesloLGS NF`.\n   - **Apple Terminal**: Open *Terminal → Preferences → Profiles → Text*, click *Change* under *Font*\n     and select `MesloLGS NF` family.\n   - **Hyper**: Open *Hyper → Edit → Preferences* and change the value of `fontFamily` under\n     `module.exports.config` to `MesloLGS NF`.\n   - **Visual Studio Code**: Open *File → Preferences → Settings* (PC) or\n     *Code → Preferences → Settings* (Mac), enter `terminal.integrated.fontFamily` in the search box at\n     the top of *Settings* tab and set the value below to `MesloLGS NF`.\n     Consult [this screenshot](\n       https://raw.githubusercontent.com/romkatv/powerlevel10k-media/389133fb8c9a2347929a23702ce3039aacc46c3d/visual-studio-code-font-settings.jpg)\n     to see how it should look like or see [this issue](\n       https://github.com/romkatv/powerlevel10k/issues/671) for extra information.\n\n     Note that software installed via [Snap](https://en.wikipedia.org/wiki/Snap_\\(software\\)) is\n     unable to use system fonts. If you've install Visual Studio Code via Snap, remove it by running\n     `sudo snap remove code` and install the official `.deb` build from the\n     [Visual Studio Code website](https://code.visualstudio.com/Download).\n   - **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the\n     selected profile under *Profiles*. Check *Custom font* under *Text Appearance* and select\n     `MesloLGS NF Regular`.\n   - **Konsole**: Open *Settings → Edit Current Profile → Appearance*, click *Select Font* and select\n     `MesloLGS NF Regular`.\n   - **Tilix**: Open *Tilix → Preferences* and click on the selected profile under *Profiles*. Check\n     *Custom font* under *Text Appearance* and select `MesloLGS NF Regular`.\n   - **Windows Console Host** (the old thing): Click the icon in the top left corner, then\n     *Properties → Font* and set *Font* to `MesloLGS NF`.\n   - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click\n     either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set\n     *Font face* to `MesloLGS NF`.\n   - **Conemu**: Open *Setup → General → Fonts* and set *Main console font* to `MesloLGS NF`.\n   - **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →\n     Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font\n     name to `MesloLGS NF`.\n   - **Termux**: Type `p10k configure` and answer `Yes` when asked whether to install\n     *Meslo Nerd Font*.\n   - **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select\n     *MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.\n   - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.\n   - **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*\n     tab (should be selected already), uncheck *Use the system fixed width font* (if not already)\n     and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.\n   - **Guake**: Right Click on an open terminal and open *Preferences*. Under *Appearance*\n     tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.\n     Exit the Preferences dialog by clicking *Close*.\n   - **MobaXterm**: Open *Settings* → *Configuration* → *Terminal* → (under *Terminal look and feel*)\n     and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each\n     of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal\n     Settings* → *Font settings*.\n   - **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable\n     *Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.\n     To change the font for the remote host connections, go to *Preferences → Terminal Options →\n     Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.\n   - **Warp**: Open Warp and Navigate to *Settings* then *Appearance*.  Scroll down to *Text* Section\n     and under *\"Terminal Font\"*, select the `MesloLGS NF` font.\n   - **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under\n     *Font*, click *\"Select...\"* and set Font to `MesloLGS NF Regular`.\n   - **Yakuake**: Click *≡* → *Manage Profiles* → *New* → *Appearance*. Click *Choose* next to the\n     *Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the\n     new profile and click *Set as Default*.\n   - **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following\n     section to it:\n     ```toml\n     [font.normal]\n     family = \"MesloLGS NF\"\n     ```\n   - **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:\n     ```ini\n     font=MesloLGS NF:size=12\n     ```\n   - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:\n      ```text\n      font_family MesloLGS NF\n      ```\n      Restart kitty by closing all sessions and opening a new session.\n   - **puTTY**: Set *Window* → *Appearance* → *Font* to `MesloLGS NF`. Requires puTTY\n     version >= 0.75.\n   - **WezTerm**: Create or open `$HOME/.config/wezterm/wezterm.lua` and add the following:\n     ```lua\n     local wezterm = require 'wezterm';\n     return {\n         font = wezterm.font(\"MesloLGS NF\"),\n     }\n     ```\n     If the file already exists, only add the line with the font to the existing return.\n     Also add the first line if it is not already present.\n   - **urxvt**: Create or open `~/.Xresources` and add the following line to it:\n     ```text\n     URxvt.font: xft:MesloLGS NF:size=11\n     ```\n     You can adjust the font size to your preference. After changing the config run\n     `xrdb ~/.Xresources` to reload it. The new config is applied to all new terminals.\n   - **xterm**: Create or open `~/.Xresources` and add the following line to it:\n     ```text\n     xterm*faceName: MesloLGS NF\n     ```\n     After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to\n     all new terminals.\n   - **Zed**: Open `~/.config/zed/settings.json` and set `terminal.font_family` to `\"MesloLGS NF\"`.\n     ```jsonc\n     {\n       \"terminal\": {\n         \"font_family\": \"MesloLGS NF\"\n       },\n       // Other settings.\n     }\n     ```\n   - Crostini (Linux on Chrome OS): Open\n     chrome-untrusted://terminal/html/nassh_preferences_editor.html, set *Text font family* to\n      `'MesloLGS NF'` (including the quotes) and *Custom CSS (inline text)* to the following:\n     ```css\n     @font-face {\n      font-family: \"MesloLGS NF\";\n      src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf\");\n      font-weight: normal;\n      font-style: normal;\n     }\n     @font-face {\n         font-family: \"MesloLGS NF\";\n         src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf\");\n         font-weight: bold;\n         font-style: normal;\n     }\n     @font-face {\n         font-family: \"MesloLGS NF\";\n         src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf\");\n         font-weight: normal;\n         font-style: italic;\n     }\n     @font-face {\n         font-family: \"MesloLGS NF\";\n         src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf\");\n         font-weight: bold;\n         font-style: italic;\n     }\n     ```\n     **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.\n   - **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section\n     to it:\n     ```ini\n     [basic.interface.font]\n     value = \"MesloLGS NF\"\n     ```\n   - **Ghostty**: Open *Menu → Open Configuration* (Linux) or *Ghostty → Settings...* (Mac) and add\n     the following line:\n     ```text\n     font-family = \"MesloLGS NF\"\n     ```\n1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work\n   incorrectly with the new font.\n\n_Using a different terminal and know how to set the font for it? Share your knowledge by sending a\nPR to expand the list!_\n\n## Try it in Docker\n\nTry Powerlevel10k in Docker. You can safely make any changes to the file system while trying out\nthe theme. Once you exit Zsh, the container is deleted.\n\n```zsh\ndocker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -it --rm alpine sh -uec '\n  apk add git zsh nano vim\n  git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k\n  echo \"source ~/powerlevel10k/powerlevel10k.zsh-theme\" >>~/.zshrc\n  cd ~/powerlevel10k\n  exec zsh'\n```\n\n*Tip*: Install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k) before\nrunning the Docker command to get access to all prompt styles.\n\n*Tip*: Run `p10k configure` while in Docker to try a different prompt style.\n\n## License\n\nPowerlevel10k is released under the\n[MIT license](https://github.com/romkatv/powerlevel10k/blob/master/LICENSE).\n\n## FAQ\n\n- [How do I update Powerlevel10k?](#how-do-i-update-powerlevel10k)\n- [How do I uninstall Powerlevel10k?](#how-do-i-uninstall-powerlevel10k)\n- [How do I install Powerlevel10k on a machine without Internet access?](#how-do-i-install-powerlevel10k-on-a-machine-without-internet-access)\n- [Where can I ask for help and report bugs?](#where-can-i-ask-for-help-and-report-bugs)\n- [Which aspects of shell and terminal does Powerlevel10k affect?](#which-aspects-of-shell-and-terminal-does-powerlevel10k-affect)\n- [I'm using Powerlevel9k with Oh My Zsh. How do I migrate?](#im-using-powerlevel9k-with-oh-my-zsh-how-do-i-migrate)\n- [Is it really fast?](#is-it-really-fast)\n- [How do I configure instant prompt?](#how-do-i-configure-instant-prompt)\n- [How do I initialize direnv when using instant prompt?](#how-do-i-initialize-direnv-when-using-instant-prompt)\n- [How do I export GPG_TTY when using instant prompt?](#how-do-i-export-gpg_tty-when-using-instant-prompt)\n- [What do different symbols in Git status mean?](#what-do-different-symbols-in-git-status-mean)\n- [How do I change the format of Git status?](#how-do-i-change-the-format-of-git-status)\n- [Why is Git status from `$HOME/.git` not displayed in prompt?](#why-is-git-status-from-homegit-not-displayed-in-prompt)\n- [Why does Git status sometimes appear grey and then gets colored after a short period of time?](#why-does-git-status-sometimes-appear-grey-and-then-gets-colored-after-a-short-period-of-time)\n- [How do I add username and/or hostname to prompt?](#how-do-i-add-username-andor-hostname-to-prompt)\n- [Why some prompt segments appear and disappear as I'm typing?](#why-some-prompt-segments-appear-and-disappear-as-im-typing)\n- [How do I change prompt colors?](#how-do-i-change-prompt-colors)\n- [Why does Powerlevel10k spawn extra processes?](#why-does-powerlevel10k-spawn-extra-processes)\n- [Are there configuration options that make Powerlevel10k slow?](#are-there-configuration-options-that-make-powerlevel10k-slow)\n- [Is Powerlevel10k fast to load?](#is-powerlevel10k-fast-to-load)\n- [What is the relationship between Powerlevel9k and Powerlevel10k?](#what-is-the-relationship-between-powerlevel9k-and-powerlevel10k)\n- [Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?](#does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config)\n- [What is the best prompt style in the configuration wizard?](#what-is-the-best-prompt-style-in-the-configuration-wizard)\n- [How to make Powerlevel10k look like robbyrussell Oh My Zsh theme?](#how-to-make-powerlevel10k-look-like-robbyrussell-oh-my-zsh-theme)\n- [Can prompts for completed commands display error status for *those* commands instead of the commands preceding them?](#can-prompts-for-completed-commands-display-error-status-for-those-commands-instead-of-the-commands-preceding-them)\n- [What is the minimum supported Zsh version?](#what-is-the-minimum-supported-zsh-version)\n- [How were these screenshots and animated gifs created?](#how-were-these-screenshots-and-animated-gifs-created)\n- [How was the recommended font created?](#how-was-the-recommended-font-created)\n- [How to package Powerlevel10k for distribution?](#how-to-package-powerlevel10k-for-distribution)\n\n### How do I update Powerlevel10k?\n\nThe command to update Powerlevel10k depends on how it was installed.\n\n| Installation                  | Update command                                              |\n|-------------------------------|-------------------------------------------------------------|\n| [Manual](#manual)             | `git -C ~/powerlevel10k pull`                               |\n| [Oh My Zsh](#oh-my-zsh)       | `git -C \"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\" pull` |\n| [Prezto](#prezto)             | `zprezto-update`                                            |\n| [Zim](#zim)                   | `zimfw update`                                              |\n| [Antigen](#antigen)           | `antigen update`                                            |\n| [Antidote](#antidote)         | `antidote update`                                           |\n| [Zplug](#zplug)               | `zplug update`                                              |\n| [Zgen](#zgen)                 | `zgen update`                                               |\n| [Zplugin](#zplugin)           | `zplugin update`                                            |\n| [Zinit](#zinit)               | `zinit update`                                              |\n| [Zi](#zi)                     | `zi update`                                                 |\n| [Zap](#zap)                   | `zap update`                                              |\n| [Homebrew](#homebrew)         | `brew update && brew upgrade`                               |\n| [Arch Linux](#arch-linux)     | `yay -S --noconfirm zsh-theme-powerlevel10k-git`            |\n| [Alpine Linux](#alpine-linux) | `apk update && apk upgrade`                                 |\n\n**IMPORTANT**: Restart Zsh after updating Powerlevel10k. [Do not use `source ~/.zshrc`](\n  #weird-things-happen-after-typing-source-zshrc).\n\n### How do I uninstall Powerlevel10k?\n\n1. Remove all references to \"p10k\" from `~/.zshrc`. You might have this snippet at the top:\n   ```zsh\n   if [[ -r \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\" ]]; then\n     source \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\"\n   fi\n   ```\n   And this at the bottom:\n   ```zsh\n   [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh\n   ```\n   These are added by the [configuration wizard](#configuration-wizard). Remove them.\n2. Remove all references to \"powerlevel10k\" from `~/.zshrc`, `~/.zpreztorc` and `~/.zimrc` (some\n   of these files may be missing -- this is normal). These references have been added manually by\n   yourself when installing Powerlevel10k. Refer to the [installation instructions](#installation)\n   if you need a reminder.\n3. Verify that all references to \"p10k\" and \"powerlevel10k\" are gone from `~/.zshrc`, `~/.zpreztorc`\n   and `~/.zimrc`.\n   ```zsh\n   grep -E 'p10k|powerlevel10k' ~/.zshrc ~/.zpreztorc ~/.zimrc 2>/dev/null\n   ```\n   If this command produces output, there are still references to \"p10k\" or \"powerlevel10k\". You\n   need to remove them.\n4. Delete Powerlevel10k configuration file. This file is created by the\n   [configuration wizard](#configuration-wizard) and may contain manual edits by yourself.\n   ```zsh\n   rm -f ~/.p10k.zsh\n   ```\n5. Delete Powerlevel10k source files. These files have been downloaded when you've installed\n   Powerlevel10k. The command to delete them depends on which installation method you'd chosen.\n   Refer to the [installation instructions](#installation) if you need a reminder.\n\n   | Installation                  | Uninstall command                                                |\n   |-------------------------------|------------------------------------------------------------------|\n   | [Manual](#manual)             | `rm -rf ~/powerlevel10k`                                         |\n   | [Oh My Zsh](#oh-my-zsh)       | `rm -rf -- \"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\"` |\n   | [Prezto](#prezto)             | n/a                                                              |\n   | [Zim](#zim)                   | `zimfw uninstall`                                                |\n   | [Antigen](#antigen)           | `antigen purge romkatv/powerlevel10k`                            |\n   | [Antidote](#antidote)         | `antidote purge romkatv/powerlevel10k`                           |\n   | [Zplug](#zplug)               | `zplug clean`                                                    |\n   | [Zgen](#zgen)                 | `zgen reset`                                                     |\n   | [Zplugin](#zplugin)           | `zplugin delete romkatv/powerlevel10k`                           |\n   | [Zinit](#zinit)               | `zinit delete romkatv/powerlevel10k`                             |\n   | [Zi](#zi)                     | `zi delete romkatv/powerlevel10k`                                |\n   | [Zap](#zap)                   | `zsh -ic 'zap clean'`                                            |\n   | [Homebrew](#homebrew)         | `brew uninstall powerlevel10k`                                   |\n   | [Arch Linux](#arch-linux)     | `yay -R --noconfirm zsh-theme-powerlevel10k-git`                 |\n   | [Alpine Linux](#alpine-linux) | `apk del zsh-theme-powerlevel10k`                                |\n6. Restart Zsh. [Do not use `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc).\n7. Delete Powerlevel10k cache files.\n   ```zsh\n   rm -rf -- \"${XDG_CACHE_HOME:-$HOME/.cache}\"/p10k-*(N) \"${XDG_CACHE_HOME:-$HOME/.cache}\"/gitstatus\n   ```\n\n### How do I install Powerlevel10k on a machine without Internet access?\n\n1. Run this command on the machine without Internet access:\n   ```sh\n   uname -sm | tr '[A-Z]' '[a-z]'\n   ```\n2. Run these commands on a machine connected to the Internet after replacing the value of\n   `target_uname` with the output of the previous command:\n   ```sh\n   target_uname=\"replace this with the output of the previous command\"\n   git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k\n   GITSTATUS_CACHE_DIR=\"$HOME\"/powerlevel10k/gitstatus/usrbin ~/powerlevel10k/gitstatus/install -f -s \"${target_uname% *}\" -m \"${target_uname#* }\"\n   ```\n3. Copy `~/powerlevel10k` from the machine connected to the Internet to the one without Internet\n   access.\n4. Add `source ~/powerlevel10k/powerlevel10k.zsh-theme` to `~/.zshrc` on the machine without\n   Internet access:\n   ```zsh\n   echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n   ```\n5. If `~/.zshrc` on the machine without Internet access sets `ZSH_THEME`, remove that line.\n   ```zsh\n   sed -i.bak '/^ZSH_THEME=/d' ~/.zshrc\n   ```\n\nTo update, remove `~/powerlevel10k` on both machines and repeat steps 1-3.\n\n### Where can I ask for help and report bugs?\n\nThe best way to ask for help and to report bugs is to [open an issue](\n  https://github.com/romkatv/powerlevel10k/issues).\n\n[Gitter](\n  https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\nis another option.\n\nIf all else fails, email roman.perepelitsa@gmail.com.\n\nIf necessary, encrypt your communication with [this PGP key](\n  https://api.github.com/users/romkatv/gpg_keys).\n\n### Which aspects of shell and terminal does Powerlevel10k affect?\n\nPowerlevel10k defines prompt and nothing else. It sets [prompt-related options](\n  http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting), and parameters `PS1` and `RPS1`.\n\n![Prompt Highlight](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-highlight.png)\n\nEverything within the highlighted areas on the screenshot is produced by Powerlevel10k.\nPowerlevel10k has no control over the terminal content or colors outside these areas.\n\nPowerlevel10k does not affect:\n\n- Terminal window/tab title.\n- Colors used by `ls`.\n- The behavior of `git` command.\n- The content and style of <kbd>Tab</kbd> completions.\n- Command line colors (syntax highlighting, autosuggestions, etc.).\n- Key bindings.\n- Aliases.\n- Prompt parameters other than `PS1` and `RPS1`.\n- Zsh options other than those [related to prompt](\n    http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting).\n- The set of available commands. Powerlevel10k does not install any new commands\n  with the only exception of `p10k`.\n\n### I'm using Powerlevel9k with Oh My Zsh. How do I migrate?\n\n1. Run this command:\n```zsh\n# Add powerlevel10k to the list of Oh My Zsh themes.\ngit clone --depth=1 https://github.com/romkatv/powerlevel10k.git \"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\"\n# Replace ZSH_THEME=\"powerlevel9k/powerlevel9k\" with ZSH_THEME=\"powerlevel10k/powerlevel10k\".\nsed -i.bak 's/powerlevel9k/powerlevel10k/g' ~/.zshrc\n# Restart Zsh.\nexec zsh\n```\n2. *Optional but highly recommended:*\n   1. Install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k).\n   1. Type `p10k configure` and choose your favorite prompt style.\n\n*Related:*\n  - [Powerlevel9k compatibility.](#powerlevel9k-compatibility)\n  - [Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?](\n      #does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config)\n  - [Extra or missing spaces in prompt compared to Powerlevel9k.](\n      #extra-or-missing-spaces-in-prompt-compared-to-powerlevel9k)\n  - [Configuration wizard.](#configuration-wizard)\n\n### Is it really fast?\n\nYes. See [zsh-bench](https://github.com/romkatv/zsh-bench) or a direct comparison with\n[Powerlevel9k](https://asciinema.org/a/NHRjK3BMePw66jtRVY2livHwZ) and\n[Spaceship](https://asciinema.org/a/253094).\n\n### <a name='how-do-i-enable-instant-prompt'></a>How do I configure instant prompt?\n\nSee [instant prompt](#instant-prompt) to learn about instant prompt. This section explains how you\ncan enable and configure it and lists caveats that you should be aware of.\n\nInstant prompt can be enabled either through `p10k configure` or by manually adding the following\ncode snippet at the top of `~/.zshrc`:\n\n```zsh\n# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.\n# Initialization code that may require console input (password prompts, [y/n]\n# confirmations, etc.) must go above this block; everything else may go below.\nif [[ -r \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\" ]]; then\n  source \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\"\nfi\n```\n\nIt's important that you copy the lines verbatim. Don't replace `source` with something else, don't\ncall `zcompile`, don't redirect output, etc.\n\nWhen instant prompt is enabled, for the duration of Zsh initialization standard input is redirected\nto `/dev/null` and standard output with standard error are redirected to a temporary file. Once Zsh\nis fully initialized, standard file descriptors are restored and the content of the temporary file\nis printed out.\n\nWhen using instant prompt, you should carefully check any output that appears on Zsh startup as it\nmay indicate that initialization has been altered, or perhaps even broken, by instant prompt.\nInitialization code that may require console input, such as asking for a keyring password or for a\n*[y/n]* confirmation, must be moved above the instant prompt preamble in `~/.zshrc`. Initialization\ncode that merely prints to console but never reads from it will work correctly with instant prompt,\nalthough output that normally has colors may appear uncolored. You can either leave it be, suppress\nthe output, or move it above the instant prompt preamble.\n\nHere's an example of `~/.zshrc` that breaks when instant prompt is enabled:\n\n```zsh\nif [[ -r \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\" ]]; then\n  source \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\"\nfi\n\nkeychain id_rsa --agents ssh  # asks for password\nchatty-script                 # spams to stdout even when everything is fine\n# ...\n```\n\nFixed version:\n\n```zsh\nkeychain id_rsa --agents ssh  # moved before instant prompt\n\n# OK to perform console I/O before this point.\nif [[ -r \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\" ]]; then\n  source \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\"\nfi\n# From this point on, until zsh is fully initialized, console input won't work and\n# console output may appear uncolored.\n\nchatty-script >/dev/null      # spam output suppressed\n# ...\n```\n\nIf `POWERLEVEL9K_INSTANT_PROMPT` is unset or set to `verbose`, Powerlevel10k will print a warning\nwhen it detects console output during initialization to bring attention to potential issues. You can\nsilence this warning (without suppressing console output) with `POWERLEVEL9K_INSTANT_PROMPT=quiet`.\nThis is recommended if some initialization code in `~/.zshrc` prints to console and it's infeasible\nto move it above the instant prompt preamble or to suppress its output. You can completely disable\ninstant prompt with `POWERLEVEL9K_INSTANT_PROMPT=off`. Do this if instant prompt breaks Zsh\ninitialization and you don't know how to fix it.\n\nThe value of `POWERLEVEL9K_INSTANT_PROMPT` can be changed by running `p10k configure` and selecting\nthe appropriate option on the *Instant Prompt* screen. Alternatively, you can search for\n`POWERLEVEL9K_INSTANT_PROMPT` in the existing `~/.p10k.zsh` and change its value there.\n\n*Note*: Instant prompt requires Zsh >= 5.4. It's OK to enable it even when using an older version of\nZsh but it won't do anything.\n\n*FAQ*:\n\n- [How do I initialize direnv when using instant prompt?](\n    #how-do-i-initialize-direnv-when-using-instant-prompt)\n- [How do I export GPG_TTY when using instant prompt?](\n    #how-do-i-export-gpg_tty-when-using-instant-prompt)\n\n### How do I initialize direnv when using instant prompt?\n\nIf you've enabled [instant prompt](#instant-prompt), you should have these lines at the top of\n`~/.zshrc`:\n\n```zsh\nif [[ -r \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\" ]]; then\n  source \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\"\nfi\n```\n\nTo initialize direnv you need to add one line above that block and one line below it.\n\n```zsh\n(( ${+commands[direnv]} )) && emulate zsh -c \"$(direnv export zsh)\"\n\nif [[ -r \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\" ]]; then\n  source \"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh\"\nfi\n\n(( ${+commands[direnv]} )) && emulate zsh -c \"$(direnv hook zsh)\"\n```\n\n*Related*: [How do I export GPG_TTY when using instant prompt?](\n  #how-do-i-export-gpg_tty-when-using-instant-prompt)\n\n### How do I export GPG_TTY when using instant prompt?\n\nYou can export `GPG_TTY` like this anywhere in `~/.zshrc`:\n\n```zsh\nexport GPG_TTY=$TTY\n```\n\nThis works whether you are using [instant prompt](#instant-prompt) or not. It works even if you\naren't using powerlevel10k. As an extra bonus, it's much faster than the commonly used\n`export GPG_TTY=$(tty)`.\n\n*Related*: [How do I initialize direnv when using instant prompt?](\n  #how-do-i-initialize-direnv-when-using-instant-prompt)\n\n### What do different symbols in Git status mean?\n\nWhen using Lean, Classic or Rainbow style, Git status may look like this:\n\n```text\nfeature:master wip ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42\n```\n\n| Symbol    | Meaning                                                              | Source                                                 |\n| --------- | -------------------------------------------------------------------- | ------------------------------------------------------ |\n| `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty`                 |\n| `master`  | remote tracking branch; only shown if different from local branch    | `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` |\n| `wip`     | the latest commit's summary contains \"wip\" or \"WIP\"                  | `git show --pretty=%s --no-patch HEAD`                 |\n| `=`       | up to date with the remote (neither ahead nor behind)                | `git rev-list --count HEAD...@{upstream}`              |\n| `⇣42`     | this many commits behind the remote                                  | `git rev-list --right-only --count HEAD...@{upstream}` |\n| `⇡42`     | this many commits ahead of the remote                                | `git rev-list --left-only --count HEAD...@{upstream}`  |\n| `⇠42`     | this many commits behind the push remote                             | `git rev-list --right-only --count HEAD...@{push}`     |\n| `⇢42`     | this many commits ahead of the push remote                           | `git rev-list --left-only --count HEAD...@{push}`      |\n| `*42`     | this many stashes                                                    | `git stash list`                                       |\n| `merge`   | repository state                                                     | `git status --ignore-submodules=dirty`                 |\n| `~42`     | this many merge conflicts                                            | `git status --ignore-submodules=dirty`                 |\n| `+42`     | this many staged changes                                             | `git status --ignore-submodules=dirty`                 |\n| `!42`     | this many unstaged changes                                           | `git status --ignore-submodules=dirty`                 |\n| `?42`     | this many untracked files                                            | `git status --ignore-submodules=dirty`                 |\n| `─`       | the number of staged, unstaged or untracked files is unknown         | `echo $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY` or `git config --get bash.showDirtyState` |\n\n*Related*: [How do I change the format of Git status?](#how-do-i-change-the-format-of-git-status)\n\n### How do I change the format of Git status?\n\nTo change the format of Git status, open `~/.p10k.zsh`, search for `my_git_formatter` and edit its\nsource code.\n\n*Related*: [What do different symbols in Git status mean?](\n  #what-do-different-symbols-in-git-status-mean)\n\n### Why is Git status from `$HOME/.git` not displayed in prompt?\n\nWhen using Lean, Classic or Rainbow style, `~/.p10k.zsh` contains the following parameter:\n\n```zsh\n# Don't show Git status in prompt for repositories whose workdir matches this pattern.\n# For example, if set to '~', the Git repository at $HOME/.git will be ignored.\n# Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.\ntypeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'\n```\n\nTo see Git status for `$HOME/.git` in prompt, open `~/.p10k.zsh` and remove\n`POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN`.\n\n### Why does Git status sometimes appear grey and then gets colored after a short period of time?\n\ntl;dr: When Git status in prompt is greyed out, it means Powerlevel10k is currently computing\nup-to-date Git status in the background. Prompt will get automatically refreshed when this\ncomputation completes.\n\nWhen your current directory is within a Git repository, Powerlevel10k computes up-to-date Git\nstatus after every command. If the repository is large, or the machine is slow, this computation\ncan take quite a bit of time. If it takes longer than 10 milliseconds (configurable via\n`POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS`), Powerlevel10k displays the last known Git status in\ngrey and continues to compute up-to-date Git status in the background. When the computation\ncompletes, Powerlevel10k refreshes prompt with new information, this time with colored Git status.\n\nWhen using *Rainbow* style, Git status is displayed as black on grey while it's still being\ncomputed. Depending on the terminal color palette, this may be difficult to read. In this case you\nmight want to change the background color to something lighter for more contrast. To do that, open\n`~/.p10k.zsh`, search for `POWERLEVEL9K_VCS_LOADING_BACKGROUND`, uncomment it if it's commented out,\nand change the value.\n\n```zsh\ntypeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=244\n```\n\nType `source ~/.p10k.zsh` to apply your changes to the current Zsh session.\n\n*Related*: [How do I change prompt colors?](#how-do-i-change-prompt-colors)\n\n### How do I add username and/or hostname to prompt?\n\nWhen using Lean, Classic or Rainbow style, prompt shows `username@hostname` when you are logged in\nas root or via SSH. There is little value in showing `username` or `hostname` when you are logged in\nto your local machine as a normal user. So the absence of `username@hostname` in your prompt is an\nindication that you are working locally and that you aren't root. You can change it, however.\n\nOpen `~/.p10k.zsh`. Close to the top you can see the most important parameters that define which\nsegments are shown in your prompt. All generally useful prompt segments are listed in there. Some of\nthem are enabled, others are commented out. One of them is of interest to you.\n\n```zsh\ntypeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n  ...\n  context  # user@hostname\n  ...\n)\n```\n\nSearch for `context` to find the section in the config that lists parameters specific to this prompt\nsegment. You should see the following lines:\n\n```zsh\n# Don't show context unless running with privileges or in SSH.\n# Tip: Remove the next line to always show context.\ntypeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=\n```\n\nIf you follow the tip and remove (or comment out) the last line, you'll always see\n`username@hostname` in prompt. You can change the format to just `username`, or change the color, by\nadjusting the values of parameters nearby. There are plenty of comments to help you navigate.\n\nYou can also move `context` to a different position in `POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS` or even\nto `POWERLEVEL9K_LEFT_PROMPT_ELEMENTS`.\n\n### Why some prompt segments appear and disappear as I'm typing?\n\nPrompt segments can be configured to be shown only when the current command you are typing invokes\na relevant tool.\n\n```zsh\n# Show prompt segment \"kubecontext\" only when the command you are typing invokes\n# invokes kubectl, helm, or kubens.\ntypeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'\n```\n\nConfigs created by `p10k configure` may contain parameters of this kind. To customize when different\nprompt segments are shown, open `~/.p10k.zsh`, search for `SHOW_ON_COMMAND` and either remove these\nparameters or change their values.\n\nYou can also define a function in `~/.zshrc` to toggle the display of a prompt segment between\n*always* and *on command*. This is similar to `kubeon`/`kubeoff` from\n[kube-ps1](https://github.com/jonmosco/kube-ps1).\n\n```zsh\nfunction kube-toggle() {\n  if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then\n    unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND\n  else\n    POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'\n  fi\n  p10k reload\n  if zle; then\n    zle push-input\n    zle accept-line\n  fi\n}\n```\n\nInvoke this function by typing `kube-toggle`. You can also bind it to a key by adding two more lines\nto `~/.zshrc`:\n\n```zsh\nzle -N kube-toggle\nbindkey '^]' kube-toggle  # ctrl-] to toggle kubecontext in powerlevel10k prompt\n```\n\n### How do I change prompt colors?\n\nYou can either [change the color palette used by your terminal](\n  #change-the-color-palette-used-by-your-terminal) or\n[set colors through Powerlevel10k configuration parameters](\n  #set-colors-through-Powerlevel10k-configuration-parameters).\n\n#### Change the color palette used by your terminal\n\nHow exactly you change the terminal color palette (a.k.a. color scheme, or theme) depends on the\nkind of terminal you are using. Look around in terminal's settings/preferences or consult\ndocumentation.\n\nWhen you change the terminal color palette, it usually affects only the first 16 colors, numbered\nfrom 0 to 15. In order to see any effect on Powerlevel10k prompt, you need to use prompt style that\nutilizes these low-numbered colors. Type `p10k configure` and select *Rainbow*, *Lean* → *8 colors*\nor *Pure* → *Original*. Other styles use higher-numbered colors, so they look the same in any\nterminal color palette.\n\n#### Set colors through Powerlevel10k configuration parameters\n\nOpen `~/.p10k.zsh`, search for \"color\", \"foreground\" and \"background\" and change values of\nappropriate parameters. For example, here's how you can set the foreground of `time` prompt segment\nto bright red:\n\n```zsh\ntypeset -g POWERLEVEL9K_TIME_FOREGROUND=160\n```\n\nColors are specified using numbers from 0 to 255. Colors from 0 to 15 look differently in different\nterminals. Many terminals also support customization of these colors through color palettes\n(a.k.a. color schemes, or themes). Colors from 16 to 255 always look the same.\n\nType `source ~/.p10k.zsh` to apply your changes to the current Zsh session.\n\nTo see how different numbered colors look in your terminal, run the following command:\n\n```zsh\nfor i in {0..255}; do print -Pn \"%K{$i}  %k%F{$i}${(l:3::0:)i}%f \" ${${(M)$((i%6)):#3}:+$'\\n'}; done\n```\n\nIf your terminal supports truecolor, you can use 24-bit colors in the `#RRGGBB` format in addition\nto the numbered colors.\n\n```zsh\ntypeset -g POWERLEVEL9K_TIME_FOREGROUND='#FF0000'\n```\n\n*Related:*\n  - [Directory is difficult to see in prompt when using Rainbow style.](\n      #directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)\n  - [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)\n\nBy default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a\ndifferent color. This behavior can be\n[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in\nVSCode settings.\n\n### Why does Powerlevel10k spawn extra processes?\n\nPowerlevel10k uses [gitstatus](https://github.com/romkatv/gitstatus) as the backend behind `vcs`\nprompt; gitstatus spawns `gitstatusd` and `zsh`. See\n[gitstatus](https://github.com/romkatv/gitstatus) for details. Powerlevel10k may also spawn `zsh`\nto perform computation without blocking prompt. To avoid security hazard, these background processes\naren't shared by different interactive shells. They terminate automatically when the parent `zsh`\nprocess terminates or runs `exec(3)`.\n\n### Are there configuration options that make Powerlevel10k slow?\n\nNo, Powerlevel10k is always fast, with any configuration you throw at it. If you have noticeable\nprompt latency when using Powerlevel10k, please\n[open an issue](https://github.com/romkatv/powerlevel10k/issues).\n\n### Is Powerlevel10k fast to load?\n\nYes. See [zsh-bench](https://github.com/romkatv/zsh-bench).\n\n### What is the relationship between Powerlevel9k and Powerlevel10k?\n\nPowerlevel10k was forked from Powerlevel9k in March 2019 after a week-long discussion in\n[powerlevel9k#1170](https://github.com/Powerlevel9k/powerlevel9k/issues/1170). Powerlevel9k was\nalready a mature project with a large user base and a release cycle measured in months. Powerlevel10k\nwas spun off to iterate on performance improvements and new features at much higher pace.\n\nPowerlevel9k and Powerlevel10k are independent projects. When using one, you shouldn't install the\nother. Issues should be filed against the project that you actually use. There are no individuals\nthat have commit rights in both repositories. All bug fixes and new features committed to\nPowerlevel9k repository get ported to Powerlevel10k.\n\nOver time, virtually all code in Powerlevel10k has been rewritten. There is currently no meaningful\noverlap between the implementations of Powerlevel9k and Powerlevel10k.\n\nPowerlevel10k is committed to maintaining backward compatibility with all configs indefinitely. This\ncommitment covers all configuration parameters recognized by Powerlevel9k (see\n[Powerlevel9k compatibility](#powerlevel9k-compatibility)) and additional parameters that only\nPowerlevel10k understands. Names of all parameters in Powerlevel10k start with `POWERLEVEL9K_` for\nconsistency.\n\n### Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?\n\nAlmost. There are a few differences.\n\n- By default only `git` vcs backend is enabled in Powerlevel10k. If you need `svn` and `hg`, add\n  them to `POWERLEVEL9K_VCS_BACKENDS`. These backends aren't yet optimized in Powerlevel10k, so\n  enabling them will make prompt *very slow*.\n- Powerlevel10k doesn't support `POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY=true`.\n- Powerlevel10k strives to be bug-compatible with Powerlevel9k but not when it comes to egregious\n  bugs. If you accidentally rely on these bugs, your prompt will differ between Powerlevel9k and\n  Powerlevel10k. Some examples:\n  - Powerlevel9k ignores some options that are set after the theme is sourced while Powerlevel10k\n    respects all options. If you see different icons in Powerlevel9k and Powerlevel10k, you've\n    probably defined `POWERLEVEL9K_MODE` before sourcing the theme. This parameter gets ignored\n    by Powerlevel9k but honored by Powerlevel10k. If you want your prompt to look in Powerlevel10k\n    the same as in Powerlevel9k, remove `POWERLEVEL9K_MODE`.\n  - Powerlevel9k doesn't respect `ZLE_RPROMPT_INDENT`. As a result, right prompt in Powerlevel10k\n    can have an extra space at the end compared to Powerlevel9k. Set `ZLE_RPROMPT_INDENT=0` if you\n    don't want that space. More details in\n    [troubleshooting](#extra-space-without-background-on-the-right-side-of-right-prompt).\n  - Powerlevel9k has inconsistent spacing around icons. This was fixed in Powerlevel10k. Set\n    `POWERLEVEL9K_LEGACY_ICON_SPACING=true` to get the same spacing as in Powerlevel9k.  More\n    details in [troubleshooting](#extra-or-missing-spaces-around-icons).\n  - There are dozens more bugs in Powerlevel9k that don't exist in Powerlevel10k.\n\nIf you notice any other changes in prompt appearance when switching from Powerlevel9k to\nPowerlevel10k, please [open an issue](https://github.com/romkatv/powerlevel10k/issues).\n\n### What is the best prompt style in the configuration wizard?\n\nThere are as many opinions on what constitutes the best prompt as there are people. It mostly comes\ndown to personal preference. There are, however, a few hidden implications of different choices.\n\nPure style is an exact replication of [Pure Zsh theme](https://github.com/sindresorhus/pure). It\nexists to ease the migration for users of this theme. Unless you are one of them, choose Lean\nstyle over Pure.\n\nIf you want to confine prompt colors to the selected terminal color palette (say, *Solarized Dark*),\nuse *Rainbow*, *Lean* → *8 colors* or *Pure* → *Original*. Other styles use fixed colors and thus\nlook the same in any terminal color palette.\n\nAll styles except Pure have an option to use *ASCII* charset. Prompt will look less pretty but will\nrender correctly with all fonts and in all locales.\n\nIf you enable transient prompt, take advantage of two-line prompt. You'll get the benefit of\nextra space for typing commands without the usual drawback of reduced scrollback density. Having\nall commands start from the same offset is also nice.\n\nSimilarly, if you enable transient prompt, sparse prompt (with an empty line before prompt) is a\ngreat choice.\n\nIf you are using vi keymap, choose prompt with `prompt_char` in it (shown as green `❯` in the\nwizard). This symbol changes depending on vi mode: `❯`, `❮`, `V`, `▶` for insert, command, visual\nand replace mode respectively. When a command fails, the symbol turns red. *Lean* style always has\n`prompt_char` in it. *Rainbow* and *Classic* styles have it only in the two-line configuration\nwithout left frame.\n\nIf you value horizontal space or prefer minimalist aesthetics:\n\n- Use a monospace font, such as [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k).\n  Non-monospace fonts require extra space after icons that are larger than a single column.\n- Use Lean style. Compared to Classic and Rainbow, it saves two characters per prompt segment.\n- Disable *current time* and *frame*.\n- Use *few icons*. The extra icons enabled by the *many icons* option primarily serve decorative\n  function. Informative icons, such as background job indicator, will be shown either way.\n\n*Note*: You can run configuration wizard as many times as you like. Type `p10k configure` to try new\nprompt style.\n\n### How to make Powerlevel10k look like robbyrussell Oh My Zsh theme?\n\nUse [this config](\n  https://github.com/romkatv/powerlevel10k/blob/master/config/p10k-robbyrussell.zsh).\n\nYou can either download it, save as `~/.p10k.zsh` and `source ~/.p10k.zsh` from `~/.zshrc`, or\nsource `p10k-robbyrussell.zsh` directly from your cloned `powerlevel10k` repository.\n\n### Can prompts for completed commands display error status for *those* commands instead of the commands preceding them?\n\nNo. When you hit *ENTER* and the command you've typed starts running, its error status isn't yet\nknown, so it cannot be shown in prompt. When the command completes, the error status gets known but\nit's no longer possible to update prompt for *that* command. This is why the error status for every\ncommand is reflected in the *next* prompt.\n\nFor details, see [this post on /r/zsh](\nhttps://www.reddit.com/r/zsh/comments/eg49ff/powerlevel10k_prompt_history_exit_code_colors/fc5huku).\n\n### What is the minimum supported Zsh version?\n\nZsh 5.3 or newer should work. Fast startup requires Zsh >= 5.4.\n\n### How were these screenshots and animated gifs created?\n\nAll screenshots and animated gifs were recorded in GNOME Terminal with\n[the recommended font](#meslo-nerd-font-patched-for-powerlevel10k) and Tango Dark color palette with\ncustom background color (`#171A1B` instead of `#2E3436` -- twice as dark).\n\n![GNOME Terminal Color Settings](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/gnome-terminal-colors.png)\n\nSyntax highlighting, where present, was provided by [zsh-syntax-highlighting](\n  https://github.com/zsh-users/zsh-syntax-highlighting).\n\n### How was the recommended font created?\n\n[The recommended font](#meslo-nerd-font-patched-for-powerlevel10k) is the product of many\nindividuals. Its origin is *Bitstream Vera Sans Mono*, which has given birth to *Menlo*, which in\nturn has spawned *Meslo*. Finally, extra glyphs have been added to *Meslo* with scripts forked\nfrom Nerd Fonts. The final font is released under the terms of\n[Apache License](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20License.txt).\n\nMesloLGS NF font can be recreated with the following command (requires `git` and `docker`):\n\n```zsh\ngit clone --depth=1 https://github.com/romkatv/nerd-fonts.git\ncd nerd-fonts\n./build 'Meslo/S/*'\n```\n\nIf everything goes well, four `ttf` files will appear in `./out`.\n\n### How to package Powerlevel10k for distribution?\n\nIt's currently neither easy nor recommended to package and distribute Powerlevel10k. There are no\ninstructions you can follow that would allow you to easily update your package when new versions of\nPowerlevel10k are released. This may change in the future but not soon.\n\n## Troubleshooting\n\n- [`[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`](#oh-my-zsh-theme-powerlevel10kpowerlevel10k-not-found)\n- [Question mark in prompt](#question-mark-in-prompt)\n- [Icons, glyphs or powerline symbols don't render](#icons-glyphs-or-powerline-symbols-dont-render)\n- [Sub-pixel imperfections around powerline symbols](#sub-pixel-imperfections-around-powerline-symbols)\n- [Error: character not in range](#error-character-not-in-range)\n- [Cursor is in the wrong place](#cursor-is-in-the-wrong-place)\n- [Prompt wrapping around in a weird way](#prompt-wrapping-around-in-a-weird-way)\n- [Right prompt is in the wrong place](#right-prompt-is-in-the-wrong-place)\n- [Configuration wizard runs automatically every time Zsh is started](#configuration-wizard-runs-automatically-every-time-zsh-is-started)\n- [Some prompt styles are missing from the configuration wizard](#some-prompt-styles-are-missing-from-the-configuration-wizard)\n- [Cannot install the recommended font](#cannot-install-the-recommended-font)\n- [Extra or missing spaces in prompt compared to Powerlevel9k](#extra-or-missing-spaces-in-prompt-compared-to-powerlevel9k)\n  - [Extra space without background on the right side of right prompt](#extra-space-without-background-on-the-right-side-of-right-prompt)\n  - [Extra or missing spaces around icons](#extra-or-missing-spaces-around-icons)\n- [Weird things happen after typing `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc)\n- [Transient prompt stops working after some time](#transient-prompt-stops-working-after-some-time)\n- [Cannot make Powerlevel10k work with my plugin manager](#cannot-make-powerlevel10k-work-with-my-plugin-manager)\n- [Directory is difficult to see in prompt when using Rainbow style](#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)\n- [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)\n- [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window)\n- [Icons cut off in Konsole](#icons-cut-off-in-konsole)\n- [Arch Linux logo has a dot in the bottom right corner](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner)\n- [Incorrect git status in prompt](#incorrect-git-status-in-prompt)\n\n### `[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found`\n\nWhen opening a terminal, or starting zsh manually, you may encounter this error message:\n\n```text\n[oh-my-zsh] theme 'powerlevel10k/powerlevel10k' not found\n```\n\n1. First, run `typeset -p P9K_VERSION` to check whether Powerlevel10k has been loaded.\n   - If `typeset -p P9K_VERSION` succeeds and prints something like `typeset P9K_VERSION=1.19.14`\n     (the version could be different), remove the following line from `~/.zshrc`:\n     ```zsh\n     ZSH_THEME=\"powerlevel10k/powerlevel10k\"\n     ```\n   - If `typeset -p P9K_VERSION` fails with the error `typeset: no such variable: P9K_VERSION`, run\n     the following command:\n     ```zsh\n     git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \"${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\"\n     ```\n2. Restart Zsh with `exec zsh`.\n\n### Question mark in prompt\n\nIf it looks like a regular `?`, that's normal. It means you have untracked files in the current Git\nrepository. Type `git status` to see these files. You can change this symbol or disable the display\nof untracked files altogether. Search for `untracked files` in `~/.p10k.zsh`.\n\n*FAQ*: [What do different symbols in Git status mean?](\n  #what-do-different-symbols-in-git-status-mean)\n\nYou can also get a weird-looking question mark in your prompt if your terminal's font is missing\nsome glyphs. See [icons, glyphs or powerline symbols don't render](\n  #icons-glyphs-or-powerline-symbols-dont-render).\n\n### Icons, glyphs or powerline symbols don't render\n\nRestart your terminal, [install the recommended font](#meslo-nerd-font-patched-for-powerlevel10k)\nand run `p10k configure`.\n\n### Sub-pixel imperfections around powerline symbols\n\n![Powerline Prompt Imperfections](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/powerline-imperfections.png)\n\nThere are three imperfections on the screenshot. From left to right:\n\n1. A thin blue line (a sub-pixel gap) between the content of a prompt segment and the following\npowerline connection.\n1. Incorrect alignment of a powerline connection and the following prompt segment. The connection\nappears shifted to the right.\n1. A thin red line below a powerline connection. The connection appears shifted up.\n\nZsh themes don't have down-to-pixel control over the terminal content. Everything you see on the\nscreen is made of monospace characters. A white powerline prompt segment is made of text on white\nbackground followed by U+E0B0 (a right-pointing triangle).\n\n![Powerline Prompt Imperfections](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/powerline-anatomy.png)\n\nIf Powerlevel10k prompt has imperfections around powerline symbols, you'll see exactly the same\nimperfections with all powerline themes (Agnoster, Powerlevel9k, Powerline, etc.)\n\nThere are several things you can try to deal with these imperfections:\n\n- Try [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). If you are already using\n  it, switching to another font may help but is unlikely.\n- Change terminal font size one point up or down. For example, in iTerm2 powerline prompt looks\n  perfect at font sizes 11 and 13 but breaks down at 12.\n- Enable builtin powerline glyphs in terminal settings if your terminal supports it (iTerm2 does).\n- Change font hinting and/or anti-aliasing mode in the terminal settings.\n- Shift all text one pixel up/down/left/right if your terminal has an option to do so.\n- Try a different terminal.\n\nA more radical solution is to switch to prompt style without background. Type `p10k configure` and\nselect *Lean*. This style has a modern lightweight look. As a bonus, it doesn't suffer from\nrendering imperfections that afflict powerline-style prompt.\n\n### Error: character not in range\n\nType `echo '\\u276F'`. If you get an error saying \"zsh: character not in range\", your locale\ndoesn't support UTF-8. You need to fix it. If you are running Zsh over SSH, see\n[this](https://github.com/romkatv/powerlevel10k/issues/153#issuecomment-518347833). If you are\nrunning Zsh locally, Google \"set UTF-8 locale in *your OS*\".\n\n### Cursor is in the wrong place\n\nType `echo '\\u276F'`. If you get an error saying \"zsh: character not in range\", see the\n[previous section](#zsh-character-not-in-range).\n\nIf the `echo` command prints `❯` but the cursor is still in the wrong place, install\n[the recommended font](#meslo-nerd-font-patched-for-powerlevel10k) and run\n`p10k configure`.\n\nIf this doesn't help, add `unset ZLE_RPROMPT_INDENT` at the bottom of `~/.zshrc`.\n\nStill having issues? Run the following command to diagnose the problem:\n\n```zsh\n() {\n  emulate -L zsh\n  setopt err_return no_unset\n  local text\n  print -rl -- 'Select a part of your prompt from the terminal window and paste it below.' ''\n  read -r '?Prompt: ' text\n  local -i len=${(m)#text}\n  local frame=\"+-${(pl.$len..-.):-}-+\"\n  print -lr -- $frame \"| $text |\" $frame\n}\n```\n\n#### If the prompt line aligns with the frame\n\n```text\n+------------------------------+\n| romka@adam ✓ ~/powerlevel10k |\n+------------------------------+\n```\n\nIf the output of the command is aligned for every part of your prompt (left and right), this\nindicates a bug in the theme or your config. Use this command to diagnose it:\n\n```zsh\nprint -rl -- ${(eq+)PROMPT} ${(eq+)RPROMPT}\n```\n\nLook for `%{...%}` and backslash escapes in the output. If there are any, they are the likely\nculprits. Open an issue if you get stuck.\n\n#### If the prompt line is longer than the frame\n\n```text\n+-----------------------------+\n| romka@adam ✓ ~/powerlevel10k |\n+-----------------------------+\n```\n\nThis is usually caused by a terminal bug or misconfiguration that makes it print ambiguous-width\ncharacters as double-width instead of single width. For example,\n[this issue](https://github.com/romkatv/powerlevel10k/issues/165).\n\n#### If the prompt line is shorter than the frame and is mangled\n\n```text\n+------------------------------+\n| romka@adam ✓~/powerlevel10k |\n+------------------------------+\n```\n\nNote that this prompt is different from the original as it's missing a space after the check mark.\n\nThis can be caused by a low-level bug in macOS. See\n[this issue](https://github.com/romkatv/powerlevel10k/issues/241).\n\nThis can also happen if prompt contains glyphs designated as \"wide\" in the Unicode standard and your\nterminal incorrectly displays them as non-wide. Terminals suffering from this limitation include\nKonsole, Hyper and the integrated VSCode Terminal. The solution is to use a different terminal or\nremove all wide glyphs from prompt.\n\n#### If the prompt line is shorter than the frame and is not mangled\n\n```text\n+--------------------------------+\n| romka@adam ✓ ~/powerlevel10k |\n+--------------------------------+\n```\n\nThis can be caused by misconfigured locale. See\n[this issue](https://github.com/romkatv/powerlevel10k/issues/251).\n\n### Prompt wrapping around in a weird way\n\nSee [cursor is in the wrong place](#cursor-is-in-the-wrong-place).\n\n### Right prompt is in the wrong place\n\nSee [cursor is in the wrong place](#cursor-is-in-the-wrong-place).\n\n### Configuration wizard runs automatically every time Zsh is started\n\nWhen Powerlevel10k starts, it automatically runs `p10k configure` if no `POWERLEVEL9K_*`\nparameters are defined. Based on your prompt style choices, the configuration wizard creates\n`~/.p10k.zsh` with a bunch of `POWERLEVEL9K_*` parameters in it and adds a line to `~/.zshrc` to\nsource this file. The next time you start Zsh, the configuration wizard shouldn't run automatically.\nIf it does, this means the evaluation of `~/.zshrc` terminates prematurely before it reaches the\nline that sources `~/.p10k.zsh`. This most often happens due to syntax errors in `~/.zshrc`. These\nerrors get hidden by the configuration wizard screen, so you don't notice them. When you exit\nconfiguration wizard, look for error messages. You can also use\n`POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true zsh` to start Zsh without automatically running the\nconfiguration wizard. Once you can see the errors, fix `~/.zshrc` to get rid of them.\n\n### Some prompt styles are missing from the configuration wizard\n\nIf Zsh version is below 5.7.1 or `COLORTERM` environment variable is neither `24bit` nor\n`truecolor`, configuration wizard won't offer Pure style with Snazzy color scheme. *Fix*: Install\nZsh >= 5.7.1 and use a terminal with truecolor support. Verify with `print -P '%F{#ff0000}red%f'`.\n\nIf the terminal can display fewer than 256 colors, configuration wizard preselects Lean style with\n8 colors. All other styles require at least 256 colors. *Fix*: Use a terminal with 256 color support\nand make sure that `TERM` environment variable is set correctly. Verify with\n`print $terminfo[colors]`.\n\nIf there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use\nUnicode characters. *Fix*: Install a UTF-8 locale. Verify with `locale -a`.\n\nAnother case in which configuration wizard may not offer Unicode prompt styles is when the\n`MULTIBYTE` shell option is disabled. *Fix*: Enable the `MULTIBYTE` option, or rather don't disable\nit (this option is enabled in Zsh by default). Verify with `print -r -- ${options[MULTIBYTE]}`.\n\nWhen `MULTIBYTE` is enabled and a UTF-8 locale is available, the first few questions asked by the\nconfiguration wizard assess capabilities of the terminal font. If your answers indicate that some\nglyphs don't render correctly, configuration wizard won't offer prompt styles that use them. *Fix*:\nRestart your terminal and install\n[the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running\n`p10k configure` and checking that all glyphs render correctly.\n\n### Cannot install the recommended font\n\nOnce you download [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k),\nyou can install it just like any other font. Google \"how to install fonts on *your OS*\".\n\n### Extra or missing spaces in prompt compared to Powerlevel9k\n\ntl;dr: Add `ZLE_RPROMPT_INDENT=0` and `POWERLEVEL9K_LEGACY_ICON_SPACING=true` to `~/.zshrc` to get\nthe same prompt spacing as in Powerlevel9k.\n\nWhen using Powerlevel10k with a Powerlevel9k config, you might get additional spaces in prompt here\nand there. These come in two flavors.\n\n#### Extra space without background on the right side of right prompt\n\ntl;dr: Add `ZLE_RPROMPT_INDENT=0` to `~/.zshrc` to get rid of that space.\n\nFrom [Zsh documentation](\n  http://zsh.sourceforge.net/Doc/Release/Parameters.html#index-ZLE_005fRPROMPT_005fINDENT):\n\n> `ZLE_RPROMPT_INDENT <S>`\n>\n> If set, used to give the indentation between the right hand side of the right prompt in the line\n> editor as given by `RPS1` or `RPROMPT` and the right hand side of the screen. If not set, the\n> value `1` is used.\n>\n> Typically this will be used to set the value to `0` so that the prompt appears flush with the\n> right hand side of the screen.\n\nPowerlevel10k respects this parameter. If you set `ZLE_RPROMPT_INDENT=1` (or leave it unset, which\nis the same thing as setting it to `1`), you'll get an empty space to the right of right prompt. If\nyou set `ZLE_RPROMPT_INDENT=0`, your prompt will go to the edge of the terminal. This is how it\nworks in every theme except Powerlevel9k.\n\n![ZLE_RPROMPT_INDENT: Powerlevel10k vs Powerlevel9k](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/p9k-vs-p10k-zle-rprompt-indent.png)\n\nPowerlevel9k issue: [powerlevel9k#1292](https://github.com/Powerlevel9k/powerlevel9k/issues/1292).\nIt's been fixed in the development branch of Powerlevel9k but the fix hasn't yet made it to\n`master`.\n\nAdd `ZLE_RPROMPT_INDENT=0` to `~/.zshrc` to get the same spacing on the right edge of prompt as in\nPowerlevel9k.\n\n*Note:* Several versions of Zsh have bugs that get triggered when you set `ZLE_RPROMPT_INDENT=0`.\nPowerlevel10k can work around these bugs when using powerline prompt style. If you notice visual\nartifacts in prompt, or wrong cursor position, try removing `ZLE_RPROMPT_INDENT` from `~/.zshrc`.\n\n#### Extra or missing spaces around icons\n\ntl;dr: Add `POWERLEVEL9K_LEGACY_ICON_SPACING=true` to `~/.zshrc` to get the same spacing around\nicons as in Powerlevel9k.\n\nSpacing around icons in Powerlevel9k is inconsistent.\n\n![ZLE_RPROMPT_INDENT: Powerlevel10k vs Powerlevel9k](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/p9k-vs-p10k-icon-spacing.png)\n\nThis inconsistency is a constant source of annoyance, so it was fixed in Powerlevel10k. You can add\n`POWERLEVEL9K_LEGACY_ICON_SPACING=true` to `~/.zshrc` to get the same spacing around icons as in\nPowerlevel9k.\n\n*Note:* It's not a good idea to define `POWERLEVEL9K_LEGACY_ICON_SPACING` when using\n`p10k configure`.\n\n### Weird things happen after typing `source ~/.zshrc`\n\nIt's almost always a bad idea to run `source ~/.zshrc`, whether you are using Powerlevel10k or not.\nThis command may result in random errors, misbehaving code and progressive slowdown of Zsh.\n\nIf you've made changes to `~/.zshrc` or to files sourced by it, restart Zsh to apply them. The most\nreliable way to do this is to type `exit` and then start a new Zsh session. You can also use\n`exec zsh`. While not exactly equivalent to complete Zsh restart, this command is much more reliable\nthan `source ~/.zshrc`.\n\n### Transient prompt stops working after some time\n\nSee [weird things happen after typing `source ~/.zshrc`](\n  #weird-things-happen-after-typing-source-zshrc).\n\n### Cannot make Powerlevel10k work with my plugin manager\n\nIf the [installation instructions](#installation) didn't work for you, try disabling your current\ntheme (so that you end up with no theme) and then installing Powerlevel10k manually.\n\n1. Disable the current theme in your framework / plugin manager.\n\n- **oh-my-zsh:** Open `~/.zshrc` and remove the line that sets `ZSH_THEME`. It might look like this:\n  `ZSH_THEME=\"powerlevel9k/powerlevel9k\"`.\n- **zplug:** Open `~/.zshrc` and remove the `zplug` command that refers to your current theme. For\n  example, if you are currently using Powerlevel9k, look for\n  `zplug bhilburn/powerlevel9k, use:powerlevel9k.zsh-theme`.\n- **prezto:** Open `~/.zpreztorc` and put `zstyle :prezto:module:prompt theme off` in it. Remove\n  any other command that sets `theme` such as `zstyle :prezto:module:prompt theme powerlevel9k`.\n- **antigen:** Open `~/.zshrc` and remove the line that sets `antigen theme`. It might look like\n  this: `antigen theme powerlevel9k/powerlevel9k`.\n\n2. Install Powerlevel10k manually.\n\n```zsh\ngit clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k\necho 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n```\n\nThis method of installation won't make anything slower or otherwise sub-par.\n\n### Directory is difficult to see in prompt when using Rainbow style\n\nIn Rainbow style the current working directory is shown with bright white text on blue background.\nThe white is fixed and always looks the same but the appearance of \"blue\" is defined by your\nterminal color palette. If it's very light, it may be difficult to see white text on it.\n\nThere are several ways to fix this.\n\n- Type `p10k configure` and choose a more readable prompt style.\n- [Change terminal color palette](#change-the-color-palette-used-by-your-terminal). Try Tango Dark\n  or Solarized Dark, or change just the \"blue\" color.\n- [Change directory background and/or foreground color](#set-colors-through-Powerlevel10k-configuration-parameters).\n  The parameters you are looking for are called `POWERLEVEL9K_DIR_BACKGROUND`,\n  `POWERLEVEL9K_DIR_FOREGROUND`, `POWERLEVEL9K_DIR_SHORTENED_FOREGROUND`,\n  `POWERLEVEL9K_DIR_ANCHOR_FOREGROUND` and `POWERLEVEL9K_DIR_ANCHOR_BOLD`. You can find them in\n  `~/.p10k.zsh`.\n\n*Related*: [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)\n\n### Incorrect foreground color in VSCode Terminal\n\nBy default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a\ndifferent color. This behavior can be\n[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in\nVSCode settings.\n\n### Horrific mess when resizing terminal window\n\nWhen you resize a terminal window horizontally back and forth a few times, you might see this ugly\npicture.\n\n![Powerlevel10k Resizing Mess](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resizing-mess.png)\n\ntl;dr: This issue arises when a terminal reflows Zsh prompt upon resizing. It isn't specific to\nPowerlevel10k. See [mitigation](#mitigation).\n\n*Note: This section [used to say](\n  https://github.com/romkatv/powerlevel10k/blob/dce00cdb5daaa8a519df234a7012ba3257b644d4/README.md#horrific-mess-when-resizing-terminal-window)\nthat the problem is caused by a bug in Zsh. While it's true that it's possible to avoid the problem\nin many circumstances by modifying Zsh, it cannot be completely resolved this way. Thus it's unfair\nto pin the blame on Zsh.*\n\n#### The anatomy of the problem\n\nThe issue is manifested when the vertical distance between the start of the current prompt and the\ncursor (henceforth `VD`) changes when the terminal window is resized.\n\nWhen a terminal window gets shrunk horizontally, there are two ways for a terminal to handle long\nlines that no longer fit: *reflow* or *truncate*.\n\nTerminal content before shrinking:\n\n![Terminal Content Before Shrinking](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-original.png)\n\nTerminal reflows text when shrinking:\n\n![Terminal Reflows Text When Shrinking](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-reflow.png)\n\nTerminal truncates text when shrinking:\n\n![Terminal Truncates Text When Shrinking](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-truncate.png)\n\nReflowing strategy can change the height of terminal content. If such content happens to be between\nthe start of the current prompt and the cursor, Zsh will print prompt on the wrong line. Truncation\nstrategy never changes the height of terminal content, so it doesn't trigger this issue.\n\nLet's see how the issue plays out in slow motion. We'll start by launching `zsh -f` and pasting\nthe following code:\n\n```zsh\nfunction pause() { read -s }\nfunctions -M pause 0\n\nreset\nprint -l {1..3}\nsetopt prompt_subst\nPROMPT=$'${$((pause()))+}left>${(pl.$((COLUMNS-12))..-.)}<right\\n> '\n```\n\nWhen `PROMPT` gets expanded, it calls `pause` to let us observe the state of the terminal. Here's\nthe initial state:\n\n![Terminal Resizing Bug 1](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-bug-1.png)\n\nZsh keeps track of the cursor position relative to the start of the current prompt. In this case it\nknows that the cursor is one line below. When we shrink the terminal window, it looks like this:\n\n![Terminal Resizing Bug 2](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-bug-2.png)\n\nAt this point the terminal sends `SIGWINCH` to Zsh to notify it about changes in the terminal\ndimensions. Note that this signal is sent *after* the content of the terminal has been reflown.\n\nWhen Zsh receives `SIGWINCH`, it attempts to erase the current prompt and print it anew. It goes to\nthe position where it *thinks* the current prompt is -- one line above the cursor (!) -- erases all\nterminal content that follows and prints reexpanded prompt there. However, after resizing prompt is\nno longer one line above the cursor. It's two lines above! Zsh ends up printing new prompt one line\ntoo low.\n\n![Terminal Resizing Bug 3](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-bug-3.png)\n\nIn this case we ended up with unwanted junk content because `VD` has *increased*. When you make\nterminal window wider, `VD` can also *decrease*, which would result in the new prompt being printed\nhigher than intended, potentially erasing useful content in the process.\n\nHere are a few more examples where shrinking terminal window increased `VD`.\n\n- Simple one-line left prompt with right prompt. No `prompt_subst`. Note that the cursor is below\n  the prompt line (hit *ESC-ENTER* to get it there).\n  ![Zsh Prompt That Breaks on Terminal Shrinking 1](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-breakable-1.png)\n- Simple one-line left prompt. No `prompt_subst`, no right prompt. Here `VD` is bound to increase\n  upon terminal shrinking due to the command line wrapping around.\n  ![Zsh Prompt That Breaks on Terminal Shrinking 2](\n    https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/resize-breakable-2.png)\n\n#### Zsh patch\n\n[This Zsh patch](https://github.com/romkatv/zsh/tree/fix-winchanged) fixes the issue on some\nterminals. The idea behind the patch is to use `sc` (save cursor) terminal capability before\nprinting prompt and `rc` (restore cursor) to move cursor back to the original position when prompt\nneeds to be refreshed.\n\nThe patch works only on terminals that reflow saved cursor position together with text when the\nterminal window is resized. The patch has no observable effect on terminals that don't reflow text\non resize (both patched and unpatched Zsh behave correctly) and on terminals that reflow text but\nnot the saved cursor position (both patched and unpatched Zsh redraw prompt at the same incorrect\nposition). In other words, the patch fixes the resizing issue on some terminals while keeping the\nbehavior unchanged on others.\n\nThere are two alternative approaches to patching Zsh that may seem to work at first glance but in\nfact don't:\n\n- Instead of `sc`, use `u7` terminal capability to query the current cursor position and then `cup`\n  to go back to it. This doesn't work because the absolute position of the start of the current\n  prompt changes when text gets reflown.\n- Recompute `VD` based on new terminal dimensions before attempting to refresh prompt. This doesn't\n  work because Zsh doesn't know whether terminal reflows text or truncates it. If Zsh could somehow\n  know that the terminal reflows text, this approach still wouldn't work on terminals that\n  continuously reflow text and rapid-fire `SIGWINCH` when the window is being resized. In such\n  environment real terminal dimensions go out of sync with what Zsh thinks the dimensions are.\n\nThere is no ETA for the patch making its way into upstream Zsh. See [discussion](\n  https://www.zsh.org/mla/workers//2019/msg00561.html).\n\n#### Mitigation\n\nThere are a few mitigation options for this issue.\n\n- Use [kitty](https://sw.kovidgoyal.net/kitty/) terminal version >= 0.24.0 and enable terminal-shell\n  integration in Powerlevel10k by defining `POWERLEVEL9K_TERM_SHELL_INTEGRATION=true` in\n  `~/.p10k.zsh`.\n- Apply [the patch](#zsh-patch) and [rebuild Zsh from source](\n    https://github.com/zsh-users/zsh/blob/master/INSTALL). It won't help if you are using Alacritty,\n  kitty or some other terminal that reflows text on resize but doesn't reflow saved cursor position.\n  On such terminals the patch will have no visible effect.\n- Disable text reflowing on window resize in terminal settings. If your terminal doesn't have this\n  setting, try a different terminal.\n- Avoid long lines between the start of prompt and cursor.\n  1. Disable ruler with `POWERLEVEL9K_SHOW_RULER=false`.\n  2. Disable prompt connection with `POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '`.\n  3. Disable right frame with `POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=''`,\n     `POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=''` and\n     `POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=''`.\n  4. Set `POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()`. Right prompt on the last prompt line will cause\n     resizing issues only when the cursor is below it. This isn't very common, so you might want to\n     keep some elements in `POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS` provided that none of them are\n     succeeded by `newline`.\n\n### Icons cut off in Konsole\n\nWhen using Konsole with a non-monospace font, icons may be cut off on the right side. Here\n\"non-monospace\" refers to any font with glyphs wider than a single column, or wider than two columns\nfor glyphs designated as \"wide\" in the Unicode standard.\n\n![Icons cut off in Konsole](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/konsole-non-monospace-font.png)\n\nThe last line on the screenshot shows a cut off Arch Linux logo.\n\nThere are several mitigation options for this issue.\n\n1. Use a different terminal. Konsole is the only terminal that exhibits this behavior.\n2. Use a monospace font.\n3. Manually add an extra space after the icon that gets cut off. For example, if the content of\n   `os_icon` prompt segment gets cut off, open `~/.p10k.zsh`, search for\n   `POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION` and change it as follows:\n```zsh\ntypeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT} '  # extra space at the end\n```\n4. Use a different icon that is monospace. For example, if Arch Linux logo gets cut off, add\n   the following parameter to `~/.p10k.zsh`:\n```zsh\ntypeset -g POWERLEVEL9K_LINUX_ARCH_ICON='Arch'  # plain \"Arch\" in place of a logo\n```\n5. Disable the display of the icon that gets cut off. For example, if the content of\n   `os_icon` prompt segment gets cut off, open `~/.p10k.zsh` and remove `os_icon` from\n   `POWERLEVEL9K_LEFT_PROMPT_ELEMENTS` and `POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS`.\n\n*Note*: [Non-monospace fonts are not officially supported by Konsole](\n  https://bugs.kde.org/show_bug.cgi?id=418553#c5).\n\n### Arch Linux logo has a dot in the bottom right corner\n\n![Arch Linux Logo with a dot](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/arch-linux-logo-dot.png)\n\nSome fonts have this incorrect dotted icon in bold typeface. There are two ways to fix this issue.\n\n1. Use a font with a correct Arch Linux logo in bold typeface. For example,\n  [the recommended Powerlevel10k font](#meslo-nerd-font-patched-for-powerlevel10k).\n2. Display the icon in regular (non-bold) typeface. To do this, open `~/.p10k.zsh`, search for\n   `POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION` and remove `%B` from its value.\n```zsh\ntypeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}'  # not bold\n```\n\n### Incorrect git status in prompt\n\nPowerlevel10k uses [gitstatusd](https://github.com/romkatv/gitstatus) to inspect the state of git\nrepositories. The project relies on the [libgit2](https://github.com/libgit2/libgit2) library, which\nhas some gaps in its implementation. Under some conditions, this may result in discrepancies between\nthe real state of a git repository (reflected by `git status`) and what gets shown in the\nPowerlevel10k prompt.\n\nMost notably, [libgit2 does not support `skipHash`](https://github.com/libgit2/libgit2/issues/6531).\nIf you see incorrect git status in prompt, run `git config -l` and check whether `skipHash` is\nenabled. If it is, consider disabling it. Keep in mind that `skipHash` may be implicitly enabled\nwhen activating certain git features, such as `manyFiles`.\n"
  },
  {
    "path": "config/p10k-classic.zsh",
    "content": "# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate\n# your own config based on it.\n#\n# Tip: Looking for a nice color? Here's a one-liner to print colormap.\n#\n#   for i in {0..255}; do print -Pn \"%K{$i}  %k%F{$i}${(l:3::0:)i}%f \" ${${(M)$((i%6)):#3}:+$'\\n'}; done\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n  emulate -L zsh -o extended_glob\n\n  # Unset all configuration options. This allows you to apply configuration changes without\n  # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.\n  unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'\n\n  # Zsh >= 5.1 is required.\n  [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return\n\n  # The list of segments shown on the left. Fill it with the most important segments.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    # os_icon               # os identifier\n    dir                     # current directory\n    vcs                     # git status\n    # =========================[ Line #2 ]=========================\n    newline                 # \\n\n    # prompt_char           # prompt symbol\n  )\n\n  # The list of segments shown on the right. Fill it with less important segments.\n  # Right prompt on the last prompt line (where you are typing your commands) gets\n  # automatically hidden when the input line reaches it. Right prompt above the\n  # last prompt line gets hidden if it would overlap with left prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    status                  # exit code of the last command\n    command_execution_time  # duration of the last command\n    background_jobs         # presence of background jobs\n    direnv                  # direnv status (https://direnv.net/)\n    asdf                    # asdf version manager (https://github.com/asdf-vm/asdf)\n    virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)\n    anaconda                # conda environment (https://conda.io/)\n    pyenv                   # python environment (https://github.com/pyenv/pyenv)\n    goenv                   # go environment (https://github.com/syndbg/goenv)\n    nodenv                  # node.js version from nodenv (https://github.com/nodenv/nodenv)\n    nvm                     # node.js version from nvm (https://github.com/nvm-sh/nvm)\n    nodeenv                 # node.js environment (https://github.com/ekalinin/nodeenv)\n    # node_version          # node.js version\n    # go_version            # go version (https://golang.org)\n    # rust_version          # rustc version (https://www.rust-lang.org)\n    # dotnet_version        # .NET version (https://dotnet.microsoft.com)\n    # php_version           # php version (https://www.php.net/)\n    # laravel_version       # laravel php framework version (https://laravel.com/)\n    # java_version          # java version (https://www.java.com/)\n    # package               # name@version from package.json (https://docs.npmjs.com/files/package.json)\n    rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)\n    rvm                     # ruby version from rvm (https://rvm.io)\n    fvm                     # flutter version management (https://github.com/leoafarias/fvm)\n    luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)\n    jenv                    # java version from jenv (https://github.com/jenv/jenv)\n    plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)\n    perlbrew                # perl version from perlbrew (https://github.com/gugod/App-perlbrew)\n    phpenv                  # php version from phpenv (https://github.com/phpenv/phpenv)\n    scalaenv                # scala version from scalaenv (https://github.com/scalaenv/scalaenv)\n    haskell_stack           # haskell version from stack (https://haskellstack.org/)\n    kubecontext             # current kubernetes context (https://kubernetes.io/)\n    terraform               # terraform workspace (https://www.terraform.io)\n    # terraform_version     # terraform version (https://www.terraform.io)\n    aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)\n    aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)\n    azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)\n    gcloud                  # google cloud cli account and project (https://cloud.google.com/)\n    google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)\n    toolbox                 # toolbox name (https://github.com/containers/toolbox)\n    context                 # user@hostname\n    nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)\n    ranger                  # ranger shell (https://github.com/ranger/ranger)\n    yazi                    # yazi shell (https://github.com/sxyazi/yazi)\n    nnn                     # nnn shell (https://github.com/jarun/nnn)\n    lf                      # lf shell (https://github.com/gokcehan/lf)\n    xplr                    # xplr shell (https://github.com/sayanarijit/xplr)\n    vim_shell               # vim shell indicator (:sh)\n    midnight_commander      # midnight commander shell (https://midnight-commander.org/)\n    nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)\n    chezmoi_shell           # chezmoi shell (https://www.chezmoi.io/)\n    # vi_mode               # vi mode (you don't need this if you've enabled prompt_char)\n    # vpn_ip                # virtual private network indicator\n    # load                  # CPU load\n    # disk_usage            # disk usage\n    # ram                   # free RAM\n    # swap                  # used swap\n    todo                    # todo items (https://github.com/todotxt/todo.txt-cli)\n    timewarrior             # timewarrior tracking status (https://timewarrior.net/)\n    taskwarrior             # taskwarrior task count (https://taskwarrior.org/)\n    per_directory_history   # Oh My Zsh per-directory-history local/global indicator\n    # cpu_arch              # CPU architecture\n    # time                  # current time\n    # =========================[ Line #2 ]=========================\n    newline                 # \\n\n    # ip                    # ip address and bandwidth usage for a specified network interface\n    # public_ip             # public IP address\n    # proxy                 # system-wide http/https/ftp proxy\n    # battery               # internal battery\n    # wifi                  # wifi speed\n    # example               # example user-defined segment (see prompt_example function below)\n  )\n\n  # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.\n  typeset -g POWERLEVEL9K_MODE=nerdfont-complete\n  # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid\n  # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.\n  typeset -g POWERLEVEL9K_ICON_PADDING=none\n\n  # When set to true, icons appear before content on both sides of the prompt. When set\n  # to false, icons go after content. If empty or not set, icons go before content in the left\n  # prompt and after content in the right prompt.\n  #\n  # You can also override it for a specific segment:\n  #\n  #   POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false\n  #\n  # Or for a specific segment in specific state:\n  #\n  #   POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false\n  typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=\n\n  # Add an empty line before each prompt.\n  typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true\n\n  # Connect left prompt lines with these symbols. You'll probably want to use the same color\n  # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─'\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─'\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─'\n  # Connect right prompt lines with these symbols.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮'\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤'\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯'\n\n  # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or\n  # '─'. The last two make it easier to see the alignment between left and right prompt and to\n  # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false\n  # for more compact prompt if using this option.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=\n  if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then\n    # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE\n    # ornaments defined above.\n    typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242\n    # Start filler from the edge of the screen if there are no left segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'\n    # End filler on the edge of the screen if there are no right segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'\n  fi\n\n  # Default background color.\n  typeset -g POWERLEVEL9K_BACKGROUND=238\n\n  # Separator between same-color segments on the left.\n  typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%246F\\uE0B1'\n  # Separator between same-color segments on the right.\n  typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%246F\\uE0B3'\n  # Separator between different-color segments on the left.\n  typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\\uE0B0'\n  # Separator between different-color segments on the right.\n  typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\\uE0B2'\n  # To remove a separator between two segments, add \"_joined\" to the second segment name.\n  # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)\n\n  # The right end of left prompt.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\\uE0B0'\n  # The left end of right prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\\uE0B2'\n  # The left end of left prompt.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n  # The right end of right prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n  # Left prompt terminator for lines without any segments.\n  typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n\n  #################################[ os_icon: os identifier ]##################################\n  # OS identifier color.\n  typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'\n\n  ################################[ prompt_char: prompt symbol ]################################\n  # Transparent background.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=\n  # Green prompt symbol if the last command succeeded.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76\n  # Red prompt symbol if the last command failed.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196\n  # Default prompt symbol.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'\n  # Prompt symbol in command vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'\n  # Prompt symbol in visual vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'\n  # Prompt symbol in overwrite vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true\n  # No line terminator if prompt_char is the last segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n  # No line introducer if prompt_char is the first segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n  # No surrounding whitespace.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE=\n\n  ##################################[ dir: current directory ]##################################\n  # Default current directory color.\n  typeset -g POWERLEVEL9K_DIR_FOREGROUND=31\n  # If directory is too long, shorten some of its segments to the shortest possible unique\n  # prefix. The shortened directory can be tab-completed to the original.\n  typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique\n  # Replace removed segment suffixes with this symbol.\n  typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=\n  # Color of the shortened directory segments.\n  typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103\n  # Color of the anchor directory segments. Anchor segments are never shortened. The first\n  # segment is always an anchor.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39\n  # Display anchor directory segments in bold.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true\n  # Don't shorten directories that contain any of these files. They are anchors.\n  local anchor_files=(\n    .bzr\n    .citc\n    .git\n    .hg\n    .node-version\n    .python-version\n    .go-version\n    .ruby-version\n    .lua-version\n    .java-version\n    .perl-version\n    .php-version\n    .tool-versions\n    .mise.toml\n    .shorten_folder_marker\n    .svn\n    .terraform\n    CVS\n    Cargo.toml\n    composer.json\n    go.mod\n    package.json\n    stack.yaml\n  )\n  typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER=\"(${(j:|:)anchor_files})\"\n  # If set to \"first\" (\"last\"), remove everything before the first (last) subdirectory that contains\n  # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is\n  # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)\n  # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers\n  # and other directories don't.\n  #\n  # Optionally, \"first\" and \"last\" can be followed by \":<offset>\" where <offset> is an integer.\n  # This moves the truncation point to the right (positive offset) or to the left (negative offset)\n  # relative to the marker. Plain \"first\" and \"last\" are equivalent to \"first:0\" and \"last:0\"\n  # respectively.\n  typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false\n  # Don't shorten this many last directory segments. They are anchors.\n  typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1\n  # Shorten directory if it's longer than this even if there is space for it. The value can\n  # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,\n  # directory will be shortened only when prompt doesn't fit or when other parameters demand it\n  # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).\n  # If set to `0`, directory will always be shortened to its minimum length.\n  typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this\n  # many columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least\n  # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50\n  # If set to true, embed a hyperlink into the directory. Useful for quickly\n  # opening a directory in the file manager simply by clicking the link.\n  # Can also be handy when the directory is shortened, as it allows you to see\n  # the full directory that was used in previous commands.\n  typeset -g POWERLEVEL9K_DIR_HYPERLINK=false\n\n  # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON\n  # and POWERLEVEL9K_DIR_CLASSES below.\n  typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3\n\n  # The default icon shown next to non-writable and non-existent directories when\n  # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.\n  # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'\n\n  # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different\n  # directories. It must be an array with 3 * N elements. Each triplet consists of:\n  #\n  #   1. A pattern against which the current directory ($PWD) is matched. Matching is done with\n  #      extended_glob option enabled.\n  #   2. Directory class for the purpose of styling.\n  #   3. An empty string.\n  #\n  # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.\n  #\n  # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories\n  # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_DIR_CLASSES=(\n  #     '~/work(|/*)'  WORK     ''\n  #     '~(|/*)'       HOME     ''\n  #     '*'            DEFAULT  '')\n  #\n  # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one\n  # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or\n  # WORK_NON_EXISTENT.\n  #\n  # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an\n  # option to define custom colors and icons for different directory classes.\n  #\n  #   # Styling for WORK.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31\n  #   typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103\n  #   typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39\n  #\n  #   # Styling for WORK_NOT_WRITABLE.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39\n  #\n  #   # Styling for WORK_NON_EXISTENT.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39\n  #\n  # If a styling parameter isn't explicitly defined for some class, it falls back to the classless\n  # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls\n  # back to POWERLEVEL9K_DIR_FOREGROUND.\n  #\n  # typeset -g POWERLEVEL9K_DIR_CLASSES=()\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_DIR_PREFIX='%248Fin '\n\n  #####################################[ vcs: git status ]######################################\n  # Branch icon. Set this parameter to '\\UE0A0 ' for the popular Powerline branch icon.\n  typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=\n\n  # Untracked files icon. It's really a question mark, your font isn't broken.\n  # Change the value of this parameter to show a different icon.\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'\n\n  # Formatter for Git status.\n  #\n  # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.\n  #\n  # You can edit the function to customize how Git status looks.\n  #\n  # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:\n  # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.\n  function my_git_formatter() {\n    emulate -L zsh\n\n    if [[ -n $P9K_CONTENT ]]; then\n      # If P9K_CONTENT is not empty, use it. It's either \"loading\" or from vcs_info (not from\n      # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.\n      typeset -g my_git_format=$P9K_CONTENT\n      return\n    fi\n\n    if (( $1 )); then\n      # Styling for up-to-date Git status.\n      local       meta='%248F'  # grey foreground\n      local      clean='%76F'   # green foreground\n      local   modified='%178F'  # yellow foreground\n      local  untracked='%39F'   # blue foreground\n      local conflicted='%196F'  # red foreground\n    else\n      # Styling for incomplete and stale Git status.\n      local       meta='%244F'  # grey foreground\n      local      clean='%244F'  # grey foreground\n      local   modified='%244F'  # grey foreground\n      local  untracked='%244F'  # grey foreground\n      local conflicted='%244F'  # grey foreground\n    fi\n\n    local res\n\n    if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n      local branch=${(V)VCS_STATUS_LOCAL_BRANCH}\n      # If local branch name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show local branch name in full without truncation, delete the next line.\n      (( $#branch > 32 )) && branch[13,-13]=\"…\"  # <-- this line\n      res+=\"${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\\%/%%}\"\n    fi\n\n    if [[ -n $VCS_STATUS_TAG\n          # Show tag only if not on a branch.\n          # Tip: To always show tag, delete the next line.\n          && -z $VCS_STATUS_LOCAL_BRANCH  # <-- this line\n        ]]; then\n      local tag=${(V)VCS_STATUS_TAG}\n      # If tag name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show tag name in full without truncation, delete the next line.\n      (( $#tag > 32 )) && tag[13,-13]=\"…\"  # <-- this line\n      res+=\"${meta}#${clean}${tag//\\%/%%}\"\n    fi\n\n    # Display the current Git commit if there is no branch and no tag.\n    # Tip: To always display the current Git commit, delete the next line.\n    [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] &&  # <-- this line\n      res+=\"${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}\"\n\n    # Show tracking branch name if it differs from local branch.\n    if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then\n      res+=\"${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\\%/%%}\"\n    fi\n\n    # Display \"wip\" if the latest commit's summary contains \"wip\" or \"WIP\".\n    if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then\n      res+=\" ${modified}wip\"\n    fi\n\n    if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then\n      # ⇣42 if behind the remote.\n      (( VCS_STATUS_COMMITS_BEHIND )) && res+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n      # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n      (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=\" \"\n      (( VCS_STATUS_COMMITS_AHEAD  )) && res+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n    elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then\n      # Tip: Uncomment the next line to display '=' if up to date with the remote.\n      # res+=\" ${clean}=\"\n    fi\n\n    # ⇠42 if behind the push remote.\n    (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}\"\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" \"\n    # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD  )) && res+=\"${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}\"\n    # *42 if have stashes.\n    (( VCS_STATUS_STASHES        )) && res+=\" ${clean}*${VCS_STATUS_STASHES}\"\n    # 'merge' if the repo is in an unusual state.\n    [[ -n $VCS_STATUS_ACTION     ]] && res+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n    # ~42 if have merge conflicts.\n    (( VCS_STATUS_NUM_CONFLICTED )) && res+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n    # +42 if have staged changes.\n    (( VCS_STATUS_NUM_STAGED     )) && res+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n    # !42 if have unstaged changes.\n    (( VCS_STATUS_NUM_UNSTAGED   )) && res+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n    # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n    # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.\n    # Remove the next line if you don't want to see untracked files at all.\n    (( VCS_STATUS_NUM_UNTRACKED  )) && res+=\" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}\"\n    # \"─\" if the number of unstaged files is unknown. This can happen due to\n    # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower\n    # than the number of files in the Git index, or due to bash.showDirtyState being set to false\n    # in the repository config. The number of staged and untracked files may also be unknown\n    # in this case.\n    (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=\" ${modified}─\"\n\n    typeset -g my_git_format=$res\n  }\n  functions -M my_git_formatter 2>/dev/null\n\n  # Don't count the number of unstaged, untracked and conflicted files in Git repositories with\n  # more than this many files in the index. Negative value means infinity.\n  #\n  # If you are working in Git repositories with tens of millions of files and seeing performance\n  # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output\n  # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's\n  # config: `git config bash.showDirtyState false`.\n  typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1\n\n  # Don't show Git status in prompt for repositories whose workdir matches this pattern.\n  # For example, if set to '~', the Git repository at $HOME/.git will be ignored.\n  # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.\n  typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'\n\n  # Disable the default Git status formatting.\n  typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true\n  # Install our own Git status formatter.\n  typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'\n  typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'\n  # Enable counters for staged, unstaged, etc.\n  typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1\n\n  # Icon color.\n  typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76\n  typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_VCS_PREFIX='%248Fon '\n\n  # Show status of repositories of these types. You can add svn and/or hg if you are\n  # using them. If you do, your prompt may become slow even when your current directory\n  # isn't in an svn or hg reposotiry.\n  typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)\n\n  # These settings are used for repositories other than Git or when gitstatusd fails and\n  # Powerlevel10k has to fall back to using vcs_info.\n  typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76\n  typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178\n\n  ##########################[ status: exit code of the last command ]###########################\n  # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and\n  # style them independently from the regular OK and ERROR state.\n  typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true\n\n  # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as\n  # it will signify success by turning green.\n  typeset -g POWERLEVEL9K_STATUS_OK=true\n  typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70\n  typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n  # Status when some part of a pipe command fails but the overall exit status is zero. It may look\n  # like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n  # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as\n  # it will signify error by turning red.\n  typeset -g POWERLEVEL9K_STATUS_ERROR=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160\n  typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  # Status when the last command was terminated by a signal.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160\n  # Use terse signal names: \"INT\" instead of \"SIGINT(2)\".\n  typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  # Status when some part of a pipe command fails and the overall exit status is also non-zero.\n  # It may look like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  ###################[ command_execution_time: duration of the last command ]###################\n  # Show duration of the last command if takes at least this many seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3\n  # Show this many fractional digits. Zero means round to seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0\n  # Execution time color.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248\n  # Duration format: 1d 2h 3m 4s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%248Ftook '\n\n  #######################[ background_jobs: presence of background jobs ]#######################\n  # Don't show the number of background jobs.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false\n  # Background jobs color.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ direnv: direnv status (https://direnv.net/) ]########################\n  # Direnv color.\n  typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############\n  # Default asdf color. Only used to display tools for which there is no color override (see below).\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.\n  typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66\n\n  # There are four parameters that can be used to hide asdf tools. Each parameter describes\n  # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at\n  # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to\n  # hide a tool, it gets shown.\n  #\n  # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and\n  # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:\n  #\n  #   asdf local  python 3.8.1\n  #   asdf global python 3.8.1\n  #\n  # After running both commands the current python version is 3.8.1 and its source is \"local\" as\n  # it takes precedence over \"global\". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,\n  # it'll hide python version in this case because 3.8.1 is the same as the global version.\n  # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't\n  # contain \"local\".\n\n  # Hide tool versions that don't come from one of these sources.\n  #\n  # Available sources:\n  #\n  # - shell   `asdf current` says \"set by ASDF_${TOOL}_VERSION environment variable\"\n  # - local   `asdf current` says \"set by /some/not/home/directory/file\"\n  # - global  `asdf current` says \"set by /home/username/file\"\n  #\n  # Note: If this parameter is set to (shell local global), it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.\n  typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)\n\n  # If set to false, hide tool versions that are the same as global.\n  #\n  # Note: The name of this parameter doesn't reflect its meaning at all.\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.\n  typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false\n\n  # If set to false, hide tool versions that are equal to \"system\".\n  #\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.\n  typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true\n\n  # If set to non-empty value, hide tools unless there is a file matching the specified file pattern\n  # in the current directory, or its parent directory, or its grandparent directory, and so on.\n  #\n  # Note: If this parameter is set to empty value, it won't hide tools.\n  # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.\n  #\n  # Example: Hide nodejs version when there is no package.json and no *.js files in the current\n  # directory, in `..`, in `../..` and so on.\n  #\n  #   typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'\n  typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=\n\n  # Ruby version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Python version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Go version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Node.js version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Rust version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37\n  # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # .NET Core version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Flutter version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Lua version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32\n  # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Java version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Perl version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67\n  # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Erlang version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Elixir version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Postgres version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # PHP version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99\n  # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Haskell version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Julia version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########\n  # NordVPN connection indicator color.\n  typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39\n  # Hide NordVPN connection indicator when not connected.\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################\n  # Ranger shell color.\n  typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  \n  ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################\n  # Yazi shell color.\n  typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################\n  # Nnn shell color.\n  typeset -g POWERLEVEL9K_NNN_FOREGROUND=72\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################\n  # lf shell color.\n  typeset -g POWERLEVEL9K_LF_FOREGROUND=72\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################\n  # xplr shell color.\n  typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########################[ vim_shell: vim shell indicator (:sh) ]###########################\n  # Vim shell indicator color.\n  typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######\n  # Midnight Commander shell color.\n  typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##\n  # Nix shell color.\n  typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74\n\n  # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false\n\n  # Tip: If you want to see just the icon without \"pure\" and \"impure\", uncomment the next line.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################\n  # chezmoi shell color.\n  typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ disk_usage: disk usage ]##################################\n  # Colors for different levels of disk usage.\n  typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160\n  # Thresholds for different levels of disk usage (percentage points).\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95\n  # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.\n  typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########\n  # Text and color for normal (a.k.a. command) vi mode.\n  typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL\n  typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106\n  # Text and color for visual vi mode.\n  typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL\n  typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68\n  # Text and color for overtype (a.k.a. overwrite and replace) vi mode.\n  typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE\n  typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172\n  # Text and color for insert vi mode.\n  typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=\n  typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ ram: free RAM ]#######################################\n  # RAM color.\n  typeset -g POWERLEVEL9K_RAM_FOREGROUND=66\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################################[ swap: used swap ]######################################\n  # Swap color.\n  typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ load: CPU load ]######################################\n  # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.\n  typeset -g POWERLEVEL9K_LOAD_WHICH=5\n  # Load color when load is under 50%.\n  typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66\n  # Load color when load is between 50% and 70%.\n  typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178\n  # Load color when load is over 70%.\n  typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################\n  # Todo color.\n  typeset -g POWERLEVEL9K_TODO_FOREGROUND=110\n  # Hide todo when the total number of tasks is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true\n  # Hide todo when the number of tasks after filtering is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false\n\n  # Todo format. The following parameters are available within the expansion.\n  #\n  # - P9K_TODO_TOTAL_TASK_COUNT     The total number of tasks.\n  # - P9K_TODO_FILTERED_TASK_COUNT  The number of tasks after filtering.\n  #\n  # These variables correspond to the last line of the output of `todo.sh -p ls`:\n  #\n  #   TODO: 24 of 42 tasks shown\n  #\n  # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.\n  #\n  # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############\n  # Timewarrior color.\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110\n  # If the tracked task is longer than 24 characters, truncate and append \"…\".\n  # Tip: To always display tasks without truncation, delete the following parameter.\n  # Tip: To hide task names and display just the icon when time tracking is enabled, set the\n  # value of the following parameter to \"\".\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############\n  # Taskwarrior color.\n  typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74\n\n  # Taskwarrior segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_TASKWARRIOR_PENDING_COUNT   The number of pending tasks: `task +PENDING count`.\n  # - P9K_TASKWARRIOR_OVERDUE_COUNT   The number of overdue tasks: `task +OVERDUE count`.\n  #\n  # Zero values are represented as empty parameters.\n  #\n  # The default format:\n  #\n  #   '${P9K_TASKWARRIOR_OVERDUE_COUNT:+\"!$P9K_TASKWARRIOR_OVERDUE_COUNT/\"}$P9K_TASKWARRIOR_PENDING_COUNT'\n  #\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######\n  # Color when using local/global history.\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130\n\n  # Tip: Uncomment the next two lines to hide \"local\"/\"global\" text and leave just the icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ cpu_arch: CPU architecture ]################################\n  # CPU architecture color.\n  typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172\n\n  # Hide the segment when on a specific CPU architecture.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ context: user@hostname ]##################################\n  # Context color when running with privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178\n  # Context color in SSH without privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180\n  # Default context color (no privileges, no SSH).\n  typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180\n\n  # Context format when running with privileges: bold user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'\n  # Context format when in SSH without privileges: user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'\n  # Default context format (no privileges, no SSH): user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'\n\n  # Don't show context unless running with privileges or in SSH.\n  # Tip: Remove the next line to always show context.\n  typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%248Fwith '\n\n  ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###\n  # Python virtual environment color.\n  typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37\n  # Don't show Python version next to the virtual environment name.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false\n  # If set to \"false\", won't show virtualenv if pyenv is already shown.\n  # If set to \"if-different\", won't show virtualenv if it's the same as pyenv.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false\n  # Separate environment name from Python version only with a space.\n  typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ anaconda: conda environment (https://conda.io/) ]######################\n  # Anaconda environment color.\n  typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37\n\n  # Anaconda segment format. The following parameters are available within the expansion.\n  #\n  # - CONDA_PREFIX                 Absolute path to the active Anaconda/Miniconda environment.\n  # - CONDA_DEFAULT_ENV            Name of the active Anaconda/Miniconda environment.\n  # - CONDA_PROMPT_MODIFIER        Configurable prompt modifier (see below).\n  # - P9K_ANACONDA_PYTHON_VERSION  Current python version (python --version).\n  #\n  # CONDA_PROMPT_MODIFIER can be configured with the following command:\n  #\n  #   conda config --set env_prompt '({default_env}) '\n  #\n  # The last argument is a Python format string that can use the following variables:\n  #\n  # - prefix       The same as CONDA_PREFIX.\n  # - default_env  The same as CONDA_DEFAULT_ENV.\n  # - name         The last segment of CONDA_PREFIX.\n  # - stacked_env  Comma-separated list of names in the environment stack. The first element is\n  #                always the same as default_env.\n  #\n  # Note: '({default_env}) ' is the default value of env_prompt.\n  #\n  # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER\n  # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former\n  # is empty.\n  typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\\(}% }%\\)}:-${CONDA_PREFIX:t}}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################\n  # Pyenv color.\n  typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37\n  # Hide python version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)\n  # If set to false, hide python version if it's the same as global:\n  # $(pyenv version-name) == $(pyenv global).\n  typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide python version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true\n\n  # Pyenv segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_CONTENT                Current pyenv environment (pyenv version-name).\n  # - P9K_PYENV_PYTHON_VERSION   Current python version (python --version).\n  #\n  # The default format has the following logic:\n  #\n  # 1. Display just \"$P9K_CONTENT\" if it's equal to \"$P9K_PYENV_PYTHON_VERSION\" or\n  #    starts with \"$P9K_PYENV_PYTHON_VERSION/\".\n  # 2. Otherwise display \"$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION\".\n  typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################\n  # Goenv color.\n  typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37\n  # Hide go version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)\n  # If set to false, hide go version if it's the same as global:\n  # $(goenv version-name) == $(goenv global).\n  typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide go version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########\n  # Nodenv color.\n  typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70\n  # Hide node version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)\n  # If set to false, hide node version if it's the same as global:\n  # $(nodenv version-name) == $(nodenv global).\n  typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############\n  # Nvm color.\n  typeset -g POWERLEVEL9K_NVM_FOREGROUND=70\n  # If set to false, hide node version if it's the same as default:\n  # $(nvm version current) == $(nvm version default).\n  typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############\n  # Nodeenv color.\n  typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70\n  # Don't show Node version next to the environment name.\n  typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false\n  # Separate environment name from Node version only with a space.\n  typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############################[ node_version: node.js version ]###############################\n  # Node version color.\n  typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70\n  # Show node version only when in a directory tree containing package.json.\n  typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ go_version: go version (https://golang.org) ]########################\n  # Go version color.\n  typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37\n  # Show go version only when in a go project subdirectory.\n  typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################\n  # Rust version color.\n  typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37\n  # Show rust version only when in a rust project subdirectory.\n  typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################\n  # .NET version color.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134\n  # Show .NET version only when in a .NET project subdirectory.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ php_version: php version (https://www.php.net/) ]######################\n  # PHP version color.\n  typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99\n  # Show PHP version only when in a PHP project subdirectory.\n  typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########\n  # Laravel version color.\n  typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ####################[ java_version: java version (https://www.java.com/) ]####################\n  # Java version color.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32\n  # Show java version only when in a java project subdirectory.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true\n  # Show brief version.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####\n  # Package color.\n  typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117\n  # Package format. The following parameters are available within the expansion.\n  #\n  # - P9K_PACKAGE_NAME     The value of `name` field in package.json.\n  # - P9K_PACKAGE_VERSION  The value of `version` field in package.json.\n  #\n  # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\\%/%%}@${P9K_PACKAGE_VERSION//\\%/%%}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############\n  # Rbenv color.\n  typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168\n  # Hide ruby version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)\n  # If set to false, hide ruby version if it's the same as global:\n  # $(rbenv version-name) == $(rbenv global).\n  typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide ruby version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################\n  # Rvm color.\n  typeset -g POWERLEVEL9K_RVM_FOREGROUND=168\n  # Don't show @gemset at the end.\n  typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false\n  # Don't show ruby- at the front.\n  typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############\n  # Fvm color.\n  typeset -g POWERLEVEL9K_FVM_FOREGROUND=38\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########\n  # Lua color.\n  typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32\n  # Hide lua version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)\n  # If set to false, hide lua version if it's the same as global:\n  # $(luaenv version-name) == $(luaenv global).\n  typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide lua version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################\n  # Java color.\n  typeset -g POWERLEVEL9K_JENV_FOREGROUND=32\n  # Hide java version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)\n  # If set to false, hide java version if it's the same as global:\n  # $(jenv version-name) == $(jenv global).\n  typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide java version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############\n  # Perl color.\n  typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67\n  # Hide perl version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)\n  # If set to false, hide perl version if it's the same as global:\n  # $(plenv version-name) == $(plenv global).\n  typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide perl version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############\n  # Perlbrew color.\n  typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67\n  # Show perlbrew version only when in a perl project subdirectory.\n  typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true\n  # Don't show \"perl-\" at the front.\n  typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############\n  # PHP color.\n  typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99\n  # Hide php version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)\n  # If set to false, hide php version if it's the same as global:\n  # $(phpenv version-name) == $(phpenv global).\n  typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide php version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######\n  # Scala color.\n  typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160\n  # Hide scala version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)\n  # If set to false, hide scala version if it's the same as global:\n  # $(scalaenv version-name) == $(scalaenv global).\n  typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide scala version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########\n  # Haskell color.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172\n  # Hide haskell version if it doesn't come from one of these sources.\n  #\n  #   shell:  version is set by STACK_YAML\n  #   local:  version is set by stack.yaml up the directory tree\n  #   global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)\n  typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)\n  # If set to false, hide haskell version if it's the same as in the implicit global project.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ terraform: terraform workspace (https://www.terraform.io) ]#################\n  # Don't show terraform workspace if it's literally \"default\".\n  typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false\n  # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current terraform workspace gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current terraform workspace is \"project_test\", its class is TEST because \"project_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n  typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38\n  # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ terraform_version: terraform version (https://www.terraform.io) ]##############\n  # Terraform version color.\n  typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############\n  # Show kubecontext only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show kubecontext.\n  typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'\n\n  # Kubernetes context classes for the purpose of using different colors, icons and expansions with\n  # different contexts.\n  #\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current kubernetes context gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current kubernetes context is \"deathray-testing/default\", its class is TEST\n  # because \"deathray-testing/default\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext\n  # segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # Within the expansion the following parameters are always available:\n  #\n  # - P9K_CONTENT                The content that would've been displayed if there was no content\n  #                              expansion defined.\n  # - P9K_KUBECONTEXT_NAME       The current context's name. Corresponds to column NAME in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_CLUSTER    The current context's cluster. Corresponds to column CLUSTER in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_NAMESPACE  The current context's namespace. Corresponds to column NAMESPACE\n  #                              in the output of `kubectl config get-contexts`. If there is no\n  #                              namespace, the parameter is set to \"default\".\n  # - P9K_KUBECONTEXT_USER       The current context's user. Corresponds to column AUTHINFO in the\n  #                              output of `kubectl config get-contexts`.\n  #\n  # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),\n  # the following extra parameters are available:\n  #\n  # - P9K_KUBECONTEXT_CLOUD_NAME     Either \"gke\" or \"eks\".\n  # - P9K_KUBECONTEXT_CLOUD_ACCOUNT  Account/project ID.\n  # - P9K_KUBECONTEXT_CLOUD_ZONE     Availability zone.\n  # - P9K_KUBECONTEXT_CLOUD_CLUSTER  Cluster.\n  #\n  # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,\n  # if P9K_KUBECONTEXT_CLUSTER is \"gke_my-account_us-east1-a_my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=gke\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  #\n  # If P9K_KUBECONTEXT_CLUSTER is \"arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=eks\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=\n  # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'\n  # Append the current context's namespace if it's not \"default\".\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%248Fat '\n\n  #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#\n  # Show aws only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show aws.\n  typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current AWS profile gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current AWS profile is \"company_test\", its class is TEST\n  # because \"company_test\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AWS_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208\n  # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # AWS segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_AWS_PROFILE  The name of the current AWS profile.\n  # - P9K_AWS_REGION   The region associated with the current AWS profile.\n  typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\\%/%%}}'\n\n  #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#\n  # AWS Elastic Beanstalk environment color.\n  typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########\n  # Show azure only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show azure.\n  typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current azure account name gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current azure account is \"company_test\", its class is TEST because \"company_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n\n  # Azure account name color.\n  typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########\n  # Show gcloud only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show gcloud.\n  typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'\n   # Google cloud color.\n  typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32\n\n  # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or\n  # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative\n  # enough. You can use the following parameters in the expansions. Each of them corresponds to the\n  # output of `gcloud` tool.\n  #\n  #   Parameter                | Source\n  #   -------------------------|--------------------------------------------------------------------\n  #   P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'\n  #   P9K_GCLOUD_ACCOUNT       | gcloud config get-value account\n  #   P9K_GCLOUD_PROJECT_ID    | gcloud config get-value project\n  #   P9K_GCLOUD_PROJECT_NAME  | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.\n  #\n  # Obtaining project name requires sending a request to Google servers. This can take a long time\n  # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud\n  # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets\n  # set and gcloud prompt segment transitions to state COMPLETE.\n  #\n  # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL\n  # and COMPLETE. You can also hide gcloud in state PARTIAL by setting\n  # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and\n  # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.\n  typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\\%/%%}'\n  typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\\%/%%}'\n\n  # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name\n  # this often. Negative value disables periodic polling. In this mode project name is retrieved\n  # only when the current configuration, account or project id changes.\n  typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#\n  # Show google_app_cred only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show google_app_cred.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt'\n\n  # Google application credentials classes for the purpose of using different colors, icons and\n  # expansions with different credentials.\n  #\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first\n  # element in each pair defines a pattern against which the current kubernetes context gets\n  # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion\n  # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION\n  # parameters, you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.\n  # The first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n  #     '*:*prod*:*'  PROD\n  #     '*:*test*:*'  TEST\n  #     '*'           DEFAULT)\n  #\n  # If your current Google application credentials is \"service_account deathray-testing x@y.com\",\n  # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n      # '*:*prod*:*'  PROD    # These values are examples that are unlikely\n      # '*:*test*:*'  TEST    # to match your needs. Customize them as needed.\n      '*'             DEFAULT)\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32\n  # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by\n  # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # You can use the following parameters in the expansion. Each of them corresponds to one of the\n  # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.\n  #\n  #   Parameter                        | JSON key file field\n  #   ---------------------------------+---------------\n  #   P9K_GOOGLE_APP_CRED_TYPE         | type\n  #   P9K_GOOGLE_APP_CRED_PROJECT_ID   | project_id\n  #   P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\\%/%%}'\n\n  ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############\n  # Toolbox color.\n  typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178\n  # Don't display the name of the toolbox if it matches fedora-toolbox-*.\n  typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%248Fin '\n\n  ###############################[ public_ip: public IP address ]###############################\n  # Public IP color.\n  typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ########################[ vpn_ip: virtual private network indicator ]#########################\n  # VPN IP color.\n  typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81\n  # When on VPN, show just an icon without the IP address.\n  # Tip: To display the private IP address when on VPN, remove the next line.\n  typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=\n  # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN\n  # to see the name of the interface.\n  typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'\n  # If set to true, show one segment per matching network interface. If set to false, show only\n  # one segment corresponding to the first matching network interface.\n  # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.\n  typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########\n  # IP color.\n  typeset -g POWERLEVEL9K_IP_FOREGROUND=38\n  # The following parameters are accessible within the expansion:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+-------------------------------------------\n  #   P9K_IP_IP             | IP address\n  #   P9K_IP_INTERFACE      | network interface\n  #   P9K_IP_RX_BYTES       | total number of bytes received\n  #   P9K_IP_TX_BYTES       | total number of bytes sent\n  #   P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt\n  #   P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt\n  #   P9K_IP_RX_RATE        | receive rate (since last prompt)\n  #   P9K_IP_TX_RATE        | send rate (since last prompt)\n  typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP'\n  # Show information for the first network interface whose name matches this regular expression.\n  # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.\n  typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #########################[ proxy: system-wide http/https/ftp proxy ]##########################\n  # Proxy color.\n  typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ battery: internal battery ]#################################\n  # Show battery in red when it's below this level and not connected to power supply.\n  typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20\n  typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160\n  # Show battery in green when it's charging or fully charged.\n  typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70\n  # Show battery in yellow when it's discharging.\n  typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178\n  # Battery pictograms going from low to high level of charge.\n  typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')\n  # Don't show the remaining time to charge/discharge.\n  typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false\n\n  #####################################[ wifi: wifi speed ]#####################################\n  # WiFi color.\n  typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).\n  #\n  #   # Wifi colors and icons for different signal strength levels (low to high).\n  #   typeset -g my_wifi_fg=(68 68 68 68 68)                           # <-- change these values\n  #   typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi')     # <-- change these values\n  #\n  #   typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'\n  #   typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'\n  #\n  # The following parameters are accessible within the expansions:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+---------------\n  #   P9K_WIFI_SSID         | service set identifier, a.k.a. network name\n  #   P9K_WIFI_LINK_AUTH    | authentication protocol such as \"wpa2-psk\" or \"none\"; empty if unknown\n  #   P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second\n  #   P9K_WIFI_RSSI         | signal strength in dBm, from -120 to 0\n  #   P9K_WIFI_NOISE        | noise in dBm, from -120 to 0\n  #   P9K_WIFI_BARS         | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)\n\n  ####################################[ time: current time ]####################################\n  # Current time color.\n  typeset -g POWERLEVEL9K_TIME_FOREGROUND=66\n  # Format for the current time: 09:51:02. See `man 3 strftime`.\n  typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'\n  # If set to true, time will update when you hit enter. This way prompts for the past\n  # commands will contain the start times of their commands as opposed to the default\n  # behavior where they contain the end times of their preceding commands.\n  typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TIME_PREFIX='%248Fat '\n\n  # Example of a user-defined prompt segment. Function prompt_example will be called on every\n  # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or\n  # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.\n  #\n  # Type `p10k help segment` for documentation and a more sophisticated example.\n  function prompt_example() {\n    p10k segment -f 208 -i '⭐' -t 'hello, %n'\n  }\n\n  # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job\n  # is to generate the prompt segment for display in instant prompt. See\n  # https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #\n  # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function\n  # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k\n  # will replay these calls without actually calling instant_prompt_*. It is imperative that\n  # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this\n  # rule is not observed, the content of instant prompt will be incorrect.\n  #\n  # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If\n  # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.\n  function instant_prompt_example() {\n    # Since prompt_example always makes the same `p10k segment` calls, we can call it from\n    # instant_prompt_example. This will give us the same `example` prompt segment in the instant\n    # and regular prompts.\n    prompt_example\n  }\n\n  # User-defined prompt segments can be customized the same way as built-in segments.\n  # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208\n  # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt\n  # when accepting a command line. Supported values:\n  #\n  #   - off:      Don't change prompt when accepting a command line.\n  #   - always:   Trim down prompt when accepting a command line.\n  #   - same-dir: Trim down prompt when accepting a command line unless this is the first command\n  #               typed after changing current working directory.\n  typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n  # Instant prompt mode.\n  #\n  #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found\n  #              it incompatible with your zsh configuration files.\n  #   - quiet:   Enable instant prompt and don't print warnings when detecting console output\n  #              during zsh initialization. Choose this if you've read and understood\n  #              https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #   - verbose: Enable instant prompt and print a warning when detecting console output during\n  #              zsh initialization. Choose this if you've never tried instant prompt, haven't\n  #              seen the warning, or if you are unsure what this all means.\n  typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n  # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n  # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n  # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n  # really need it.\n  typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n  # If p10k is already loaded, reload configuration.\n  # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n  (( ! $+functions[p10k] )) || p10k reload\n}\n\n# Tell `p10k configure` which file it should overwrite.\ntypeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'\n"
  },
  {
    "path": "config/p10k-lean-8colors.zsh",
    "content": "# Config for Powerlevel10k with 8-color lean prompt style. Type `p10k configure` to generate\n# your own config based on it.\n#\n# Tip: Looking for a nice color? Here's a one-liner to print colormap.\n#\n#   for i in {0..255}; do print -Pn \"%K{$i}  %k%F{$i}${(l:3::0:)i}%f \" ${${(M)$((i%6)):#3}:+$'\\n'}; done\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n  emulate -L zsh -o extended_glob\n\n  # Unset all configuration options. This allows you to apply configuration changes without\n  # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.\n  unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'\n\n  # Zsh >= 5.1 is required.\n  [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return\n\n  # The list of segments shown on the left. Fill it with the most important segments.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    # os_icon               # os identifier\n    dir                     # current directory\n    vcs                     # git status\n    # =========================[ Line #2 ]=========================\n    newline                 # \\n\n    prompt_char             # prompt symbol\n  )\n\n  # The list of segments shown on the right. Fill it with less important segments.\n  # Right prompt on the last prompt line (where you are typing your commands) gets\n  # automatically hidden when the input line reaches it. Right prompt above the\n  # last prompt line gets hidden if it would overlap with left prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    status                  # exit code of the last command\n    command_execution_time  # duration of the last command\n    background_jobs         # presence of background jobs\n    direnv                  # direnv status (https://direnv.net/)\n    asdf                    # asdf version manager (https://github.com/asdf-vm/asdf)\n    virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)\n    anaconda                # conda environment (https://conda.io/)\n    pyenv                   # python environment (https://github.com/pyenv/pyenv)\n    goenv                   # go environment (https://github.com/syndbg/goenv)\n    nodenv                  # node.js version from nodenv (https://github.com/nodenv/nodenv)\n    nvm                     # node.js version from nvm (https://github.com/nvm-sh/nvm)\n    nodeenv                 # node.js environment (https://github.com/ekalinin/nodeenv)\n    # node_version          # node.js version\n    # go_version            # go version (https://golang.org)\n    # rust_version          # rustc version (https://www.rust-lang.org)\n    # dotnet_version        # .NET version (https://dotnet.microsoft.com)\n    # php_version           # php version (https://www.php.net/)\n    # laravel_version       # laravel php framework version (https://laravel.com/)\n    # java_version          # java version (https://www.java.com/)\n    # package               # name@version from package.json (https://docs.npmjs.com/files/package.json)\n    rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)\n    rvm                     # ruby version from rvm (https://rvm.io)\n    fvm                     # flutter version management (https://github.com/leoafarias/fvm)\n    luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)\n    jenv                    # java version from jenv (https://github.com/jenv/jenv)\n    plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)\n    perlbrew                # perl version from perlbrew (https://github.com/gugod/App-perlbrew)\n    phpenv                  # php version from phpenv (https://github.com/phpenv/phpenv)\n    scalaenv                # scala version from scalaenv (https://github.com/scalaenv/scalaenv)\n    haskell_stack           # haskell version from stack (https://haskellstack.org/)\n    kubecontext             # current kubernetes context (https://kubernetes.io/)\n    terraform               # terraform workspace (https://www.terraform.io)\n    # terraform_version     # terraform version (https://www.terraform.io)\n    aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)\n    aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)\n    azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)\n    gcloud                  # google cloud cli account and project (https://cloud.google.com/)\n    google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)\n    toolbox                 # toolbox name (https://github.com/containers/toolbox)\n    context                 # user@hostname\n    nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)\n    ranger                  # ranger shell (https://github.com/ranger/ranger)\n    yazi                    # yazi shell (https://github.com/sxyazi/yazi)\n    nnn                     # nnn shell (https://github.com/jarun/nnn)\n    lf                      # lf shell (https://github.com/gokcehan/lf)\n    xplr                    # xplr shell (https://github.com/sayanarijit/xplr)\n    vim_shell               # vim shell indicator (:sh)\n    midnight_commander      # midnight commander shell (https://midnight-commander.org/)\n    nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)\n    chezmoi_shell           # chezmoi shell (https://www.chezmoi.io/)\n    # vpn_ip                # virtual private network indicator\n    # load                  # CPU load\n    # disk_usage            # disk usage\n    # ram                   # free RAM\n    # swap                  # used swap\n    todo                    # todo items (https://github.com/todotxt/todo.txt-cli)\n    timewarrior             # timewarrior tracking status (https://timewarrior.net/)\n    taskwarrior             # taskwarrior task count (https://taskwarrior.org/)\n    per_directory_history   # Oh My Zsh per-directory-history local/global indicator\n    # cpu_arch              # CPU architecture\n    # time                  # current time\n    # =========================[ Line #2 ]=========================\n    newline                 # \\n\n    # ip                    # ip address and bandwidth usage for a specified network interface\n    # public_ip             # public IP address\n    # proxy                 # system-wide http/https/ftp proxy\n    # battery               # internal battery\n    # wifi                  # wifi speed\n    # example               # example user-defined segment (see prompt_example function below)\n  )\n\n  # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.\n  typeset -g POWERLEVEL9K_MODE=nerdfont-complete\n  # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid\n  # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.\n  typeset -g POWERLEVEL9K_ICON_PADDING=none\n\n  # Basic style options that define the overall look of your prompt. You probably don't want to\n  # change them.\n  typeset -g POWERLEVEL9K_BACKGROUND=                            # transparent background\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE=  # no surrounding whitespace\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' '  # separate segments with a space\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR=        # no end-of-line symbol\n\n  # When set to true, icons appear before content on both sides of the prompt. When set\n  # to false, icons go after content. If empty or not set, icons go before content in the left\n  # prompt and after content in the right prompt.\n  #\n  # You can also override it for a specific segment:\n  #\n  #   POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false\n  #\n  # Or for a specific segment in specific state:\n  #\n  #   POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false\n  typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true\n\n  # Add an empty line before each prompt.\n  typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true\n\n  # Connect left prompt lines with these symbols.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=\n  # Connect right prompt lines with these symbols.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=\n\n  # The left end of left prompt.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n  # The right end of right prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n\n  # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll\n  # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and\n  # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.\n  typeset -g POWERLEVEL9K_SHOW_RULER=false\n  typeset -g POWERLEVEL9K_RULER_CHAR='─'        # reasonable alternative: '·'\n  typeset -g POWERLEVEL9K_RULER_FOREGROUND=7\n\n  # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'\n  # to make it easier to see the alignment between left and right prompt and to separate prompt\n  # from command output. It serves the same purpose as ruler (see above) without increasing\n  # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false\n  # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact\n  # prompt.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '\n  if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then\n    # The color of the filler.\n    typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=7\n    # Add a space between the end of left prompt and the filler.\n    typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' '\n    # Add a space between the filler and the start of right prompt.\n    typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' '\n    # Start filler from the edge of the screen if there are no left segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'\n    # End filler on the edge of the screen if there are no right segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'\n  fi\n\n  #################################[ os_icon: os identifier ]##################################\n  # OS identifier color.\n  typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'\n\n  ################################[ prompt_char: prompt symbol ]################################\n  # Green prompt symbol if the last command succeeded.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=2\n  # Red prompt symbol if the last command failed.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=1\n  # Default prompt symbol.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'\n  # Prompt symbol in command vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'\n  # Prompt symbol in visual vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'\n  # Prompt symbol in overwrite vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true\n  # No line terminator if prompt_char is the last segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''\n  # No line introducer if prompt_char is the first segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n\n  ##################################[ dir: current directory ]##################################\n  # Default current directory color.\n  typeset -g POWERLEVEL9K_DIR_FOREGROUND=4\n  # If directory is too long, shorten some of its segments to the shortest possible unique\n  # prefix. The shortened directory can be tab-completed to the original.\n  typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique\n  # Replace removed segment suffixes with this symbol.\n  typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=\n  # Color of the shortened directory segments.\n  typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=4\n  # Color of the anchor directory segments. Anchor segments are never shortened. The first\n  # segment is always an anchor.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=4\n  # Set to true to display anchor directory segments in bold.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false\n  # Don't shorten directories that contain any of these files. They are anchors.\n  local anchor_files=(\n    .bzr\n    .citc\n    .git\n    .hg\n    .node-version\n    .python-version\n    .go-version\n    .ruby-version\n    .lua-version\n    .java-version\n    .perl-version\n    .php-version\n    .tool-versions\n    .mise.toml\n    .shorten_folder_marker\n    .svn\n    .terraform\n    CVS\n    Cargo.toml\n    composer.json\n    go.mod\n    package.json\n    stack.yaml\n  )\n  typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER=\"(${(j:|:)anchor_files})\"\n  # If set to \"first\" (\"last\"), remove everything before the first (last) subdirectory that contains\n  # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is\n  # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)\n  # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers\n  # and other directories don't.\n  #\n  # Optionally, \"first\" and \"last\" can be followed by \":<offset>\" where <offset> is an integer.\n  # This moves the truncation point to the right (positive offset) or to the left (negative offset)\n  # relative to the marker. Plain \"first\" and \"last\" are equivalent to \"first:0\" and \"last:0\"\n  # respectively.\n  typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false\n  # Don't shorten this many last directory segments. They are anchors.\n  typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1\n  # Shorten directory if it's longer than this even if there is space for it. The value can\n  # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,\n  # directory will be shortened only when prompt doesn't fit or when other parameters demand it\n  # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).\n  # If set to `0`, directory will always be shortened to its minimum length.\n  typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this\n  # many columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least\n  # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50\n  # If set to true, embed a hyperlink into the directory. Useful for quickly\n  # opening a directory in the file manager simply by clicking the link.\n  # Can also be handy when the directory is shortened, as it allows you to see\n  # the full directory that was used in previous commands.\n  typeset -g POWERLEVEL9K_DIR_HYPERLINK=false\n\n  # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON\n  # and POWERLEVEL9K_DIR_CLASSES below.\n  typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3\n\n  # The default icon shown next to non-writable and non-existent directories when\n  # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.\n  # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'\n\n  # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different\n  # directories. It must be an array with 3 * N elements. Each triplet consists of:\n  #\n  #   1. A pattern against which the current directory ($PWD) is matched. Matching is done with\n  #      extended_glob option enabled.\n  #   2. Directory class for the purpose of styling.\n  #   3. An empty string.\n  #\n  # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.\n  #\n  # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories\n  # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_DIR_CLASSES=(\n  #     '~/work(|/*)'  WORK     ''\n  #     '~(|/*)'       HOME     ''\n  #     '*'            DEFAULT  '')\n  #\n  # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one\n  # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or\n  # WORK_NON_EXISTENT.\n  #\n  # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an\n  # option to define custom colors and icons for different directory classes.\n  #\n  #   # Styling for WORK.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=4\n  #\n  #   # Styling for WORK_NOT_WRITABLE.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=4#\n  #\n  #   Styling for WORK_NON_EXISTENT.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=4\n  #\n  # If a styling parameter isn't explicitly defined for some class, it falls back to the classless\n  # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls\n  # back to POWERLEVEL9K_DIR_FOREGROUND.\n  #\n  # typeset -g POWERLEVEL9K_DIR_CLASSES=()\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '\n\n  #####################################[ vcs: git status ]######################################\n  # Branch icon. Set this parameter to '\\UE0A0 ' for the popular Powerline branch icon.\n  typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=\n\n  # Untracked files icon. It's really a question mark, your font isn't broken.\n  # Change the value of this parameter to show a different icon.\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'\n\n  # Formatter for Git status.\n  #\n  # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.\n  #\n  # You can edit the function to customize how Git status looks.\n  #\n  # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:\n  # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.\n  function my_git_formatter() {\n    emulate -L zsh\n\n    if [[ -n $P9K_CONTENT ]]; then\n      # If P9K_CONTENT is not empty, use it. It's either \"loading\" or from vcs_info (not from\n      # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.\n      typeset -g my_git_format=$P9K_CONTENT\n      return\n    fi\n\n    if (( $1 )); then\n      # Styling for up-to-date Git status.\n      local       meta='%f'   # default foreground\n      local      clean='%2F'  # green foreground\n      local   modified='%3F'  # yellow foreground\n      local  untracked='%4F'  # blue foreground\n      local conflicted='%1F'  # red foreground\n    else\n      # Styling for incomplete and stale Git status.\n      local       meta='%f'  # default foreground\n      local      clean='%f'  # default foreground\n      local   modified='%f'  # default foreground\n      local  untracked='%f'  # default foreground\n      local conflicted='%f'  # default foreground\n    fi\n\n    local res\n\n    if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n      local branch=${(V)VCS_STATUS_LOCAL_BRANCH}\n      # If local branch name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show local branch name in full without truncation, delete the next line.\n      (( $#branch > 32 )) && branch[13,-13]=\"…\"  # <-- this line\n      res+=\"${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\\%/%%}\"\n    fi\n\n    if [[ -n $VCS_STATUS_TAG\n          # Show tag only if not on a branch.\n          # Tip: To always show tag, delete the next line.\n          && -z $VCS_STATUS_LOCAL_BRANCH  # <-- this line\n        ]]; then\n      local tag=${(V)VCS_STATUS_TAG}\n      # If tag name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show tag name in full without truncation, delete the next line.\n      (( $#tag > 32 )) && tag[13,-13]=\"…\"  # <-- this line\n      res+=\"${meta}#${clean}${tag//\\%/%%}\"\n    fi\n\n    # Display the current Git commit if there is no branch and no tag.\n    # Tip: To always display the current Git commit, delete the next line.\n    [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] &&  # <-- this line\n      res+=\"${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}\"\n\n    # Show tracking branch name if it differs from local branch.\n    if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then\n      res+=\"${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\\%/%%}\"\n    fi\n\n    # Display \"wip\" if the latest commit's summary contains \"wip\" or \"WIP\".\n    if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then\n      res+=\" ${modified}wip\"\n    fi\n\n    if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then\n      # ⇣42 if behind the remote.\n      (( VCS_STATUS_COMMITS_BEHIND )) && res+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n      # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n      (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=\" \"\n      (( VCS_STATUS_COMMITS_AHEAD  )) && res+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n    elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then\n      # Tip: Uncomment the next line to display '=' if up to date with the remote.\n      # res+=\" ${clean}=\"\n    fi\n\n    # ⇠42 if behind the push remote.\n    (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}\"\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" \"\n    # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD  )) && res+=\"${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}\"\n    # *42 if have stashes.\n    (( VCS_STATUS_STASHES        )) && res+=\" ${clean}*${VCS_STATUS_STASHES}\"\n    # 'merge' if the repo is in an unusual state.\n    [[ -n $VCS_STATUS_ACTION     ]] && res+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n    # ~42 if have merge conflicts.\n    (( VCS_STATUS_NUM_CONFLICTED )) && res+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n    # +42 if have staged changes.\n    (( VCS_STATUS_NUM_STAGED     )) && res+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n    # !42 if have unstaged changes.\n    (( VCS_STATUS_NUM_UNSTAGED   )) && res+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n    # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n    # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.\n    # Remove the next line if you don't want to see untracked files at all.\n    (( VCS_STATUS_NUM_UNTRACKED  )) && res+=\" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}\"\n    # \"─\" if the number of unstaged files is unknown. This can happen due to\n    # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower\n    # than the number of files in the Git index, or due to bash.showDirtyState being set to false\n    # in the repository config. The number of staged and untracked files may also be unknown\n    # in this case.\n    (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=\" ${modified}─\"\n\n    typeset -g my_git_format=$res\n  }\n  functions -M my_git_formatter 2>/dev/null\n\n  # Don't count the number of unstaged, untracked and conflicted files in Git repositories with\n  # more than this many files in the index. Negative value means infinity.\n  #\n  # If you are working in Git repositories with tens of millions of files and seeing performance\n  # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output\n  # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's\n  # config: `git config bash.showDirtyState false`.\n  typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1\n\n  # Don't show Git status in prompt for repositories whose workdir matches this pattern.\n  # For example, if set to '~', the Git repository at $HOME/.git will be ignored.\n  # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.\n  typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'\n\n  # Disable the default Git status formatting.\n  typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true\n  # Install our own Git status formatter.\n  typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'\n  typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'\n  # Enable counters for staged, unstaged, etc.\n  typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1\n\n  # Icon color.\n  typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=2\n  typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '\n\n  # Show status of repositories of these types. You can add svn and/or hg if you are\n  # using them. If you do, your prompt may become slow even when your current directory\n  # isn't in an svn or hg repository.\n  typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)\n\n  # These settings are used for repositories other than Git or when gitstatusd fails and\n  # Powerlevel10k has to fall back to using vcs_info.\n  typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=2\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=2\n  typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=3\n\n  ##########################[ status: exit code of the last command ]###########################\n  # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and\n  # style them independently from the regular OK and ERROR state.\n  typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true\n\n  # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as\n  # it will signify success by turning green.\n  typeset -g POWERLEVEL9K_STATUS_OK=false\n  typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2\n  typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n  # Status when some part of a pipe command fails but the overall exit status is zero. It may look\n  # like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n  # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as\n  # it will signify error by turning red.\n  typeset -g POWERLEVEL9K_STATUS_ERROR=false\n  typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=1\n  typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  # Status when the last command was terminated by a signal.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=1\n  # Use terse signal names: \"INT\" instead of \"SIGINT(2)\".\n  typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  # Status when some part of a pipe command fails and the overall exit status is also non-zero.\n  # It may look like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=1\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  ###################[ command_execution_time: duration of the last command ]###################\n  # Show duration of the last command if takes at least this many seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3\n  # Show this many fractional digits. Zero means round to seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0\n  # Execution time color.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=3\n  # Duration format: 1d 2h 3m 4s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '\n\n  #######################[ background_jobs: presence of background jobs ]#######################\n  # Don't show the number of background jobs.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false\n  # Background jobs color.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=1\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ direnv: direnv status (https://direnv.net/) ]########################\n  # Direnv color.\n  typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############\n  # Default asdf color. Only used to display tools for which there is no color override (see below).\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.\n  typeset -g POWERLEVEL9K_ASDF_FOREGROUND=6\n\n  # There are four parameters that can be used to hide asdf tools. Each parameter describes\n  # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at\n  # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to\n  # hide a tool, it gets shown.\n  #\n  # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and\n  # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:\n  #\n  #   asdf local  python 3.8.1\n  #   asdf global python 3.8.1\n  #\n  # After running both commands the current python version is 3.8.1 and its source is \"local\" as\n  # it takes precedence over \"global\". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,\n  # it'll hide python version in this case because 3.8.1 is the same as the global version.\n  # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't\n  # contain \"local\".\n\n  # Hide tool versions that don't come from one of these sources.\n  #\n  # Available sources:\n  #\n  # - shell   `asdf current` says \"set by ASDF_${TOOL}_VERSION environment variable\"\n  # - local   `asdf current` says \"set by /some/not/home/directory/file\"\n  # - global  `asdf current` says \"set by /home/username/file\"\n  #\n  # Note: If this parameter is set to (shell local global), it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.\n  typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)\n\n  # If set to false, hide tool versions that are the same as global.\n  #\n  # Note: The name of this parameter doesn't reflect its meaning at all.\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.\n  typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false\n\n  # If set to false, hide tool versions that are equal to \"system\".\n  #\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.\n  typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true\n\n  # If set to non-empty value, hide tools unless there is a file matching the specified file pattern\n  # in the current directory, or its parent directory, or its grandparent directory, and so on.\n  #\n  # Note: If this parameter is set to empty value, it won't hide tools.\n  # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.\n  #\n  # Example: Hide nodejs version when there is no package.json and no *.js files in the current\n  # directory, in `..`, in `../..` and so on.\n  #\n  #   typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'\n  typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=\n\n  # Ruby version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=1\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Python version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=6\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Go version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=6\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Node.js version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=2\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Rust version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # .NET Core version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=5\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Flutter version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Lua version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Java version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Perl version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=6\n  # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Erlang version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=1\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Elixir version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=5\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Postgres version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=6\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # PHP version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=5\n  # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Haskell version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=3\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Julia version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=2\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########\n  # NordVPN connection indicator color.\n  typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=6\n  # Hide NordVPN connection indicator when not connected.\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################\n  # Ranger shell color.\n  typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  \n  ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################\n  # Yazi shell color.\n  typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################\n  # Nnn shell color.\n  typeset -g POWERLEVEL9K_NNN_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################\n  # lf shell color.\n  typeset -g POWERLEVEL9K_LF_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################\n  # xplr shell color.\n  typeset -g POWERLEVEL9K_XPLR_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########################[ vim_shell: vim shell indicator (:sh) ]###########################\n  # Vim shell indicator color.\n  typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######\n  # Midnight Commander shell color.\n  typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##\n  # Nix shell color.\n  typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=4\n\n  # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false\n\n  # Tip: If you want to see just the icon without \"pure\" and \"impure\", uncomment the next line.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################\n  # chezmoi shell color.\n  typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ disk_usage: disk usage ]##################################\n  # Colors for different levels of disk usage.\n  typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=2\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=3\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=1\n  # Thresholds for different levels of disk usage (percentage points).\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95\n  # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.\n  typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ ram: free RAM ]#######################################\n  # RAM color.\n  typeset -g POWERLEVEL9K_RAM_FOREGROUND=2\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################################[ swap: used swap ]######################################\n  # Swap color.\n  typeset -g POWERLEVEL9K_SWAP_FOREGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ load: CPU load ]######################################\n  # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.\n  typeset -g POWERLEVEL9K_LOAD_WHICH=5\n  # Load color when load is under 50%.\n  typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=2\n  # Load color when load is between 50% and 70%.\n  typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=3\n  # Load color when load is over 70%.\n  typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=1\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################\n  # Todo color.\n  typeset -g POWERLEVEL9K_TODO_FOREGROUND=4\n  # Hide todo when the total number of tasks is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true\n  # Hide todo when the number of tasks after filtering is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false\n\n  # Todo format. The following parameters are available within the expansion.\n  #\n  # - P9K_TODO_TOTAL_TASK_COUNT     The total number of tasks.\n  # - P9K_TODO_FILTERED_TASK_COUNT  The number of tasks after filtering.\n  #\n  # These variables correspond to the last line of the output of `todo.sh -p ls`:\n  #\n  #   TODO: 24 of 42 tasks shown\n  #\n  # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.\n  #\n  # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############\n  # Timewarrior color.\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=4\n  # If the tracked task is longer than 24 characters, truncate and append \"…\".\n  # Tip: To always display tasks without truncation, delete the following parameter.\n  # Tip: To hide task names and display just the icon when time tracking is enabled, set the\n  # value of the following parameter to \"\".\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############\n  # Taskwarrior color.\n  typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=6\n\n  # Taskwarrior segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_TASKWARRIOR_PENDING_COUNT   The number of pending tasks: `task +PENDING count`.\n  # - P9K_TASKWARRIOR_OVERDUE_COUNT   The number of overdue tasks: `task +OVERDUE count`.\n  #\n  # Zero values are represented as empty parameters.\n  #\n  # The default format:\n  #\n  #   '${P9K_TASKWARRIOR_OVERDUE_COUNT:+\"!$P9K_TASKWARRIOR_OVERDUE_COUNT/\"}$P9K_TASKWARRIOR_PENDING_COUNT'\n  #\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######\n  # Color when using local/global history.\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=5\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=3\n\n  # Tip: Uncomment the next two lines to hide \"local\"/\"global\" text and leave just the icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ cpu_arch: CPU architecture ]################################\n  # CPU architecture color.\n  typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=3\n\n  # Hide the segment when on a specific CPU architecture.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ context: user@hostname ]##################################\n  # Context color when running with privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1\n  # Context color in SSH without privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=7\n  # Default context color (no privileges, no SSH).\n  typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=7\n\n  # Context format when running with privileges: bold user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'\n  # Context format when in SSH without privileges: user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'\n  # Default context format (no privileges, no SSH): user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'\n\n  # Don't show context unless running with privileges or in SSH.\n  # Tip: Remove the next line to always show context.\n  typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '\n\n  ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###\n  # Python virtual environment color.\n  typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=6\n  # Don't show Python version next to the virtual environment name.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false\n  # If set to \"false\", won't show virtualenv if pyenv is already shown.\n  # If set to \"if-different\", won't show virtualenv if it's the same as pyenv.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false\n  # Separate environment name from Python version only with a space.\n  typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ anaconda: conda environment (https://conda.io/) ]######################\n  # Anaconda environment color.\n  typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=6\n\n  # Anaconda segment format. The following parameters are available within the expansion.\n  #\n  # - CONDA_PREFIX                 Absolute path to the active Anaconda/Miniconda environment.\n  # - CONDA_DEFAULT_ENV            Name of the active Anaconda/Miniconda environment.\n  # - CONDA_PROMPT_MODIFIER        Configurable prompt modifier (see below).\n  # - P9K_ANACONDA_PYTHON_VERSION  Current python version (python --version).\n  #\n  # CONDA_PROMPT_MODIFIER can be configured with the following command:\n  #\n  #   conda config --set env_prompt '({default_env}) '\n  #\n  # The last argument is a Python format string that can use the following variables:\n  #\n  # - prefix       The same as CONDA_PREFIX.\n  # - default_env  The same as CONDA_DEFAULT_ENV.\n  # - name         The last segment of CONDA_PREFIX.\n  # - stacked_env  Comma-separated list of names in the environment stack. The first element is\n  #                always the same as default_env.\n  #\n  # Note: '({default_env}) ' is the default value of env_prompt.\n  #\n  # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER\n  # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former\n  # is empty.\n  typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\\(}% }%\\)}:-${CONDA_PREFIX:t}}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################\n  # Pyenv color.\n  typeset -g POWERLEVEL9K_PYENV_FOREGROUND=6\n  # Hide python version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)\n  # If set to false, hide python version if it's the same as global:\n  # $(pyenv version-name) == $(pyenv global).\n  typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide python version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true\n\n  # Pyenv segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_CONTENT                Current pyenv environment (pyenv version-name).\n  # - P9K_PYENV_PYTHON_VERSION   Current python version (python --version).\n  #\n  # The default format has the following logic:\n  #\n  # 1. Display just \"$P9K_CONTENT\" if it's equal to \"$P9K_PYENV_PYTHON_VERSION\" or\n  #    starts with \"$P9K_PYENV_PYTHON_VERSION/\".\n  # 2. Otherwise display \"$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION\".\n  typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################\n  # Goenv color.\n  typeset -g POWERLEVEL9K_GOENV_FOREGROUND=6\n  # Hide go version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)\n  # If set to false, hide go version if it's the same as global:\n  # $(goenv version-name) == $(goenv global).\n  typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide go version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########\n  # Nodenv color.\n  typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2\n  # Hide node version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)\n  # If set to false, hide node version if it's the same as global:\n  # $(nodenv version-name) == $(nodenv global).\n  typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############\n  # Nvm color.\n  typeset -g POWERLEVEL9K_NVM_FOREGROUND=2\n  # If set to false, hide node version if it's the same as default:\n  # $(nvm version current) == $(nvm version default).\n  typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############\n  # Nodeenv color.\n  typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2\n  # Don't show Node version next to the environment name.\n  typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false\n  # Separate environment name from Node version only with a space.\n  typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############################[ node_version: node.js version ]###############################\n  # Node version color.\n  typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=2\n  # Show node version only when in a directory tree containing package.json.\n  typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ go_version: go version (https://golang.org) ]########################\n  # Go version color.\n  typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=6\n  # Show go version only when in a go project subdirectory.\n  typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################\n  # Rust version color.\n  typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=4\n  # Show rust version only when in a rust project subdirectory.\n  typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################\n  # .NET version color.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=5\n  # Show .NET version only when in a .NET project subdirectory.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ php_version: php version (https://www.php.net/) ]######################\n  # PHP version color.\n  typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=5\n  # Show PHP version only when in a PHP project subdirectory.\n  typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########\n  # Laravel version color.\n  typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ####################[ java_version: java version (https://www.java.com/) ]####################\n  # Java version color.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=4\n  # Show java version only when in a java project subdirectory.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true\n  # Show brief version.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####\n  # Package color.\n  typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=6\n  # Package format. The following parameters are available within the expansion.\n  #\n  # - P9K_PACKAGE_NAME     The value of `name` field in package.json.\n  # - P9K_PACKAGE_VERSION  The value of `version` field in package.json.\n  #\n  # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\\%/%%}@${P9K_PACKAGE_VERSION//\\%/%%}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############\n  # Rbenv color.\n  typeset -g POWERLEVEL9K_RBENV_FOREGROUND=1\n  # Hide ruby version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)\n  # If set to false, hide ruby version if it's the same as global:\n  # $(rbenv version-name) == $(rbenv global).\n  typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide ruby version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################\n  # Rvm color.\n  typeset -g POWERLEVEL9K_RVM_FOREGROUND=1\n  # Don't show @gemset at the end.\n  typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false\n  # Don't show ruby- at the front.\n  typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############\n  # Fvm color.\n  typeset -g POWERLEVEL9K_FVM_FOREGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########\n  # Lua color.\n  typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=4\n  # Hide lua version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)\n  # If set to false, hide lua version if it's the same as global:\n  # $(luaenv version-name) == $(luaenv global).\n  typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide lua version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################\n  # Java color.\n  typeset -g POWERLEVEL9K_JENV_FOREGROUND=4\n  # Hide java version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)\n  # If set to false, hide java version if it's the same as global:\n  # $(jenv version-name) == $(jenv global).\n  typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide java version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############\n  # Perl color.\n  typeset -g POWERLEVEL9K_PLENV_FOREGROUND=6\n  # Hide perl version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)\n  # If set to false, hide perl version if it's the same as global:\n  # $(plenv version-name) == $(plenv global).\n  typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide perl version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############\n  # Perlbrew color.\n  typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67\n  # Show perlbrew version only when in a perl project subdirectory.\n  typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true\n  # Don't show \"perl-\" at the front.\n  typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############\n  # PHP color.\n  typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=5\n  # Hide php version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)\n  # If set to false, hide php version if it's the same as global:\n  # $(phpenv version-name) == $(phpenv global).\n  typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide php version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######\n  # Scala color.\n  typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=1\n  # Hide scala version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)\n  # If set to false, hide scala version if it's the same as global:\n  # $(scalaenv version-name) == $(scalaenv global).\n  typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide scala version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########\n  # Haskell color.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=3\n  # Hide haskell version if it doesn't come from one of these sources.\n  #\n  #   shell:  version is set by STACK_YAML\n  #   local:  version is set by stack.yaml up the directory tree\n  #   global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)\n  typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)\n  # If set to false, hide haskell version if it's the same as in the implicit global project.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############\n  # Show kubecontext only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show kubecontext.\n  typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'\n\n  # Kubernetes context classes for the purpose of using different colors, icons and expansions with\n  # different contexts.\n  #\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current kubernetes context gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current kubernetes context is \"deathray-testing/default\", its class is TEST\n  # because \"deathray-testing/default\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=3\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=5\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext\n  # segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # Within the expansion the following parameters are always available:\n  #\n  # - P9K_CONTENT                The content that would've been displayed if there was no content\n  #                              expansion defined.\n  # - P9K_KUBECONTEXT_NAME       The current context's name. Corresponds to column NAME in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_CLUSTER    The current context's cluster. Corresponds to column CLUSTER in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_NAMESPACE  The current context's namespace. Corresponds to column NAMESPACE\n  #                              in the output of `kubectl config get-contexts`. If there is no\n  #                              namespace, the parameter is set to \"default\".\n  # - P9K_KUBECONTEXT_USER       The current context's user. Corresponds to column AUTHINFO in the\n  #                              output of `kubectl config get-contexts`.\n  #\n  # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),\n  # the following extra parameters are available:\n  #\n  # - P9K_KUBECONTEXT_CLOUD_NAME     Either \"gke\" or \"eks\".\n  # - P9K_KUBECONTEXT_CLOUD_ACCOUNT  Account/project ID.\n  # - P9K_KUBECONTEXT_CLOUD_ZONE     Availability zone.\n  # - P9K_KUBECONTEXT_CLOUD_CLUSTER  Cluster.\n  #\n  # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,\n  # if P9K_KUBECONTEXT_CLUSTER is \"gke_my-account_us-east1-a_my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=gke\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  #\n  # If P9K_KUBECONTEXT_CLUSTER is \"arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=eks\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=\n  # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'\n  # Append the current context's namespace if it's not \"default\".\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '\n\n  ################[ terraform: terraform workspace (https://www.terraform.io) ]#################\n  # Don't show terraform workspace if it's literally \"default\".\n  typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false\n  # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current terraform workspace gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current terraform workspace is \"project_test\", its class is TEST because \"project_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n  typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4\n  # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ terraform_version: terraform version (https://www.terraform.io) ]##############\n  # Terraform version color.\n  typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#\n  # Show aws only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show aws.\n  typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current AWS profile gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current AWS profile is \"company_test\", its class is TEST\n  # because \"company_test\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=2\n  #   typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AWS_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=3\n  # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # AWS segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_AWS_PROFILE  The name of the current AWS profile.\n  # - P9K_AWS_REGION   The region associated with the current AWS profile.\n  typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\\%/%%}}'\n\n  #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#\n  # AWS Elastic Beanstalk environment color.\n  typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########\n  # Show azure only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show azure.\n  typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current azure account name gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current azure account is \"company_test\", its class is TEST because \"company_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n\n  # Azure account name color.\n  typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########\n  # Show gcloud only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show gcloud.\n  typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'\n  # Google cloud color.\n  typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=4\n\n  # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or\n  # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative\n  # enough. You can use the following parameters in the expansions. Each of them corresponds to the\n  # output of `gcloud` tool.\n  #\n  #   Parameter                | Source\n  #   -------------------------|--------------------------------------------------------------------\n  #   P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'\n  #   P9K_GCLOUD_ACCOUNT       | gcloud config get-value account\n  #   P9K_GCLOUD_PROJECT_ID    | gcloud config get-value project\n  #   P9K_GCLOUD_PROJECT_NAME  | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.\n  #\n  # Obtaining project name requires sending a request to Google servers. This can take a long time\n  # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud\n  # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets\n  # set and gcloud prompt segment transitions to state COMPLETE.\n  #\n  # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL\n  # and COMPLETE. You can also hide gcloud in state PARTIAL by setting\n  # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and\n  # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.\n  typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\\%/%%}'\n  typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\\%/%%}'\n\n  # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name\n  # this often. Negative value disables periodic polling. In this mode project name is retrieved\n  # only when the current configuration, account or project id changes.\n  typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#\n  # Show google_app_cred only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show google_app_cred.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt'\n\n  # Google application credentials classes for the purpose of using different colors, icons and\n  # expansions with different credentials.\n  #\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first\n  # element in each pair defines a pattern against which the current kubernetes context gets\n  # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion\n  # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION\n  # parameters, you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.\n  # The first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n  #     '*:*prod*:*'  PROD\n  #     '*:*test*:*'  TEST\n  #     '*'           DEFAULT)\n  #\n  # If your current Google application credentials is \"service_account deathray-testing x@y.com\",\n  # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=3\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n      # '*:*prod*:*'  PROD    # These values are examples that are unlikely\n      # '*:*test*:*'  TEST    # to match your needs. Customize them as needed.\n      '*'             DEFAULT)\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=5\n  # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by\n  # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # You can use the following parameters in the expansion. Each of them corresponds to one of the\n  # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.\n  #\n  #   Parameter                        | JSON key file field\n  #   ---------------------------------+---------------\n  #   P9K_GOOGLE_APP_CRED_TYPE         | type\n  #   P9K_GOOGLE_APP_CRED_PROJECT_ID   | project_id\n  #   P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\\%/%%}'\n\n  ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############\n  # Toolbox color.\n  typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=3\n  # Don't display the name of the toolbox if it matches fedora-toolbox-*.\n  typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '\n\n  ###############################[ public_ip: public IP address ]###############################\n  # Public IP color.\n  typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=6\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ########################[ vpn_ip: virtual private network indicator ]#########################\n  # VPN IP color.\n  typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=3\n  # When on VPN, show just an icon without the IP address.\n  # Tip: To display the private IP address when on VPN, remove the next line.\n  typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=\n  # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN\n  # to see the name of the interface.\n  typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'\n  # If set to true, show one segment per matching network interface. If set to false, show only\n  # one segment corresponding to the first matching network interface.\n  # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.\n  typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########\n  # IP color.\n  typeset -g POWERLEVEL9K_IP_FOREGROUND=4\n  # The following parameters are accessible within the expansion:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+-------------------------------------------\n  #   P9K_IP_IP             | IP address\n  #   P9K_IP_INTERFACE      | network interface\n  #   P9K_IP_RX_BYTES       | total number of bytes received\n  #   P9K_IP_TX_BYTES       | total number of bytes sent\n  #   P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt\n  #   P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt\n  #   P9K_IP_RX_RATE        | receive rate (since last prompt)\n  #   P9K_IP_TX_RATE        | send rate (since last prompt)\n  typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %2F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %3F⇡$P9K_IP_TX_RATE}'\n  # Show information for the first network interface whose name matches this regular expression.\n  # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.\n  typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #########################[ proxy: system-wide http/https/ftp proxy ]##########################\n  # Proxy color.\n  typeset -g POWERLEVEL9K_PROXY_FOREGROUND=2\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ battery: internal battery ]#################################\n  # Show battery in red when it's below this level and not connected to power supply.\n  typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20\n  typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1\n  # Show battery in green when it's charging or fully charged.\n  typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2\n  # Show battery in yellow when it's discharging.\n  typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3\n  # Battery pictograms going from low to high level of charge.\n  typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{0}▁' '%K{0}▂' '%K{0}▃' '%K{0}▄' '%K{0}▅' '%K{0}▆' '%K{0}▇' '%K{0}█')\n  # Don't show the remaining time to charge/discharge.\n  typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false\n\n  #####################################[ wifi: wifi speed ]#####################################\n  # WiFi color.\n  typeset -g POWERLEVEL9K_WIFI_FOREGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).\n  #\n  #   # Wifi colors and icons for different signal strength levels (low to high).\n  #   typeset -g my_wifi_fg=(4 4 4 4 4)                                # <-- change these values\n  #   typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi')     # <-- change these values\n  #\n  #   typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'\n  #   typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'\n  #\n  # The following parameters are accessible within the expansions:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+---------------\n  #   P9K_WIFI_SSID         | service set identifier, a.k.a. network name\n  #   P9K_WIFI_LINK_AUTH    | authentication protocol such as \"wpa2-psk\" or \"none\"; empty if unknown\n  #   P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second\n  #   P9K_WIFI_RSSI         | signal strength in dBm, from -120 to 0\n  #   P9K_WIFI_NOISE        | noise in dBm, from -120 to 0\n  #   P9K_WIFI_BARS         | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)\n\n  ####################################[ time: current time ]####################################\n  # Current time color.\n  typeset -g POWERLEVEL9K_TIME_FOREGROUND=6\n  # Format for the current time: 09:51:02. See `man 3 strftime`.\n  typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'\n  # If set to true, time will update when you hit enter. This way prompts for the past\n  # commands will contain the start times of their commands as opposed to the default\n  # behavior where they contain the end times of their preceding commands.\n  typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '\n\n  # Example of a user-defined prompt segment. Function prompt_example will be called on every\n  # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or\n  # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and green text greeting the user.\n  #\n  # Type `p10k help segment` for documentation and a more sophisticated example.\n  function prompt_example() {\n    p10k segment -f 2 -i '⭐' -t 'hello, %n'\n  }\n\n  # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job\n  # is to generate the prompt segment for display in instant prompt. See\n  # https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #\n  # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function\n  # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k\n  # will replay these calls without actually calling instant_prompt_*. It is imperative that\n  # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this\n  # rule is not observed, the content of instant prompt will be incorrect.\n  #\n  # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If\n  # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.\n  function instant_prompt_example() {\n    # Since prompt_example always makes the same `p10k segment` calls, we can call it from\n    # instant_prompt_example. This will give us the same `example` prompt segment in the instant\n    # and regular prompts.\n    prompt_example\n  }\n\n  # User-defined prompt segments can be customized the same way as built-in segments.\n  # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208\n  # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt\n  # when accepting a command line. Supported values:\n  #\n  #   - off:      Don't change prompt when accepting a command line.\n  #   - always:   Trim down prompt when accepting a command line.\n  #   - same-dir: Trim down prompt when accepting a command line unless this is the first command\n  #               typed after changing current working directory.\n  typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n  # Instant prompt mode.\n  #\n  #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found\n  #              it incompatible with your zsh configuration files.\n  #   - quiet:   Enable instant prompt and don't print warnings when detecting console output\n  #              during zsh initialization. Choose this if you've read and understood\n  #              https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #   - verbose: Enable instant prompt and print a warning when detecting console output during\n  #              zsh initialization. Choose this if you've never tried instant prompt, haven't\n  #              seen the warning, or if you are unsure what this all means.\n  typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n  # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n  # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n  # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n  # really need it.\n  typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n  # If p10k is already loaded, reload configuration.\n  # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n  (( ! $+functions[p10k] )) || p10k reload\n}\n\n# Tell `p10k configure` which file it should overwrite.\ntypeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'\n"
  },
  {
    "path": "config/p10k-lean.zsh",
    "content": "# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate\n# your own config based on it.\n#\n# Tip: Looking for a nice color? Here's a one-liner to print colormap.\n#\n#   for i in {0..255}; do print -Pn \"%K{$i}  %k%F{$i}${(l:3::0:)i}%f \" ${${(M)$((i%6)):#3}:+$'\\n'}; done\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n  emulate -L zsh -o extended_glob\n\n  # Unset all configuration options. This allows you to apply configuration changes without\n  # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.\n  unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'\n\n  # Zsh >= 5.1 is required.\n  [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return\n\n  # The list of segments shown on the left. Fill it with the most important segments.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    # os_icon               # os identifier\n    dir                     # current directory\n    vcs                     # git status\n    # =========================[ Line #2 ]=========================\n    newline                 # \\n\n    prompt_char             # prompt symbol\n  )\n\n  # The list of segments shown on the right. Fill it with less important segments.\n  # Right prompt on the last prompt line (where you are typing your commands) gets\n  # automatically hidden when the input line reaches it. Right prompt above the\n  # last prompt line gets hidden if it would overlap with left prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    status                  # exit code of the last command\n    command_execution_time  # duration of the last command\n    background_jobs         # presence of background jobs\n    direnv                  # direnv status (https://direnv.net/)\n    asdf                    # asdf version manager (https://github.com/asdf-vm/asdf)\n    virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)\n    anaconda                # conda environment (https://conda.io/)\n    pyenv                   # python environment (https://github.com/pyenv/pyenv)\n    goenv                   # go environment (https://github.com/syndbg/goenv)\n    nodenv                  # node.js version from nodenv (https://github.com/nodenv/nodenv)\n    nvm                     # node.js version from nvm (https://github.com/nvm-sh/nvm)\n    nodeenv                 # node.js environment (https://github.com/ekalinin/nodeenv)\n    # node_version          # node.js version\n    # go_version            # go version (https://golang.org)\n    # rust_version          # rustc version (https://www.rust-lang.org)\n    # dotnet_version        # .NET version (https://dotnet.microsoft.com)\n    # php_version           # php version (https://www.php.net/)\n    # laravel_version       # laravel php framework version (https://laravel.com/)\n    # java_version          # java version (https://www.java.com/)\n    # package               # name@version from package.json (https://docs.npmjs.com/files/package.json)\n    rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)\n    rvm                     # ruby version from rvm (https://rvm.io)\n    fvm                     # flutter version management (https://github.com/leoafarias/fvm)\n    luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)\n    jenv                    # java version from jenv (https://github.com/jenv/jenv)\n    plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)\n    perlbrew                # perl version from perlbrew (https://github.com/gugod/App-perlbrew)\n    phpenv                  # php version from phpenv (https://github.com/phpenv/phpenv)\n    scalaenv                # scala version from scalaenv (https://github.com/scalaenv/scalaenv)\n    haskell_stack           # haskell version from stack (https://haskellstack.org/)\n    kubecontext             # current kubernetes context (https://kubernetes.io/)\n    terraform               # terraform workspace (https://www.terraform.io)\n    # terraform_version     # terraform version (https://www.terraform.io)\n    aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)\n    aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)\n    azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)\n    gcloud                  # google cloud cli account and project (https://cloud.google.com/)\n    google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)\n    toolbox                 # toolbox name (https://github.com/containers/toolbox)\n    context                 # user@hostname\n    nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)\n    ranger                  # ranger shell (https://github.com/ranger/ranger)\n    yazi                    # yazi shell (https://github.com/sxyazi/yazi)\n    nnn                     # nnn shell (https://github.com/jarun/nnn)\n    lf                      # lf shell (https://github.com/gokcehan/lf)\n    xplr                    # xplr shell (https://github.com/sayanarijit/xplr)\n    vim_shell               # vim shell indicator (:sh)\n    midnight_commander      # midnight commander shell (https://midnight-commander.org/)\n    nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)\n    chezmoi_shell           # chezmoi shell (https://www.chezmoi.io/)\n    # vpn_ip                # virtual private network indicator\n    # load                  # CPU load\n    # disk_usage            # disk usage\n    # ram                   # free RAM\n    # swap                  # used swap\n    todo                    # todo items (https://github.com/todotxt/todo.txt-cli)\n    timewarrior             # timewarrior tracking status (https://timewarrior.net/)\n    taskwarrior             # taskwarrior task count (https://taskwarrior.org/)\n    per_directory_history   # Oh My Zsh per-directory-history local/global indicator\n    # cpu_arch              # CPU architecture\n    # time                  # current time\n    # =========================[ Line #2 ]=========================\n    newline\n    # ip                    # ip address and bandwidth usage for a specified network interface\n    # public_ip             # public IP address\n    # proxy                 # system-wide http/https/ftp proxy\n    # battery               # internal battery\n    # wifi                  # wifi speed\n    # example               # example user-defined segment (see prompt_example function below)\n  )\n\n  # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.\n  typeset -g POWERLEVEL9K_MODE=nerdfont-complete\n  # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid\n  # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.\n  typeset -g POWERLEVEL9K_ICON_PADDING=none\n\n  # Basic style options that define the overall look of your prompt. You probably don't want to\n  # change them.\n  typeset -g POWERLEVEL9K_BACKGROUND=                            # transparent background\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE=  # no surrounding whitespace\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' '  # separate segments with a space\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR=        # no end-of-line symbol\n\n  # When set to true, icons appear before content on both sides of the prompt. When set\n  # to false, icons go after content. If empty or not set, icons go before content in the left\n  # prompt and after content in the right prompt.\n  #\n  # You can also override it for a specific segment:\n  #\n  #   POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false\n  #\n  # Or for a specific segment in specific state:\n  #\n  #   POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false\n  typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true\n\n  # Add an empty line before each prompt.\n  typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true\n\n  # Connect left prompt lines with these symbols.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=\n  # Connect right prompt lines with these symbols.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=\n\n  # The left end of left prompt.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n  # The right end of right prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n\n  # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll\n  # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and\n  # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.\n  typeset -g POWERLEVEL9K_SHOW_RULER=false\n  typeset -g POWERLEVEL9K_RULER_CHAR='─'        # reasonable alternative: '·'\n  typeset -g POWERLEVEL9K_RULER_FOREGROUND=240\n\n  # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'\n  # to make it easier to see the alignment between left and right prompt and to separate prompt\n  # from command output. It serves the same purpose as ruler (see above) without increasing\n  # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false\n  # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact\n  # prompt.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '\n  if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then\n    # The color of the filler.\n    typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=240\n    # Add a space between the end of left prompt and the filler.\n    typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' '\n    # Add a space between the filler and the start of right prompt.\n    typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' '\n    # Start filler from the edge of the screen if there are no left segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'\n    # End filler on the edge of the screen if there are no right segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'\n  fi\n\n  #################################[ os_icon: os identifier ]##################################\n  # OS identifier color.\n  typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'\n\n  ################################[ prompt_char: prompt symbol ]################################\n  # Green prompt symbol if the last command succeeded.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76\n  # Red prompt symbol if the last command failed.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196\n  # Default prompt symbol.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'\n  # Prompt symbol in command vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'\n  # Prompt symbol in visual vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'\n  # Prompt symbol in overwrite vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true\n  # No line terminator if prompt_char is the last segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''\n  # No line introducer if prompt_char is the first segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n\n  ##################################[ dir: current directory ]##################################\n  # Default current directory color.\n  typeset -g POWERLEVEL9K_DIR_FOREGROUND=31\n  # If directory is too long, shorten some of its segments to the shortest possible unique\n  # prefix. The shortened directory can be tab-completed to the original.\n  typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique\n  # Replace removed segment suffixes with this symbol.\n  typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=\n  # Color of the shortened directory segments.\n  typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103\n  # Color of the anchor directory segments. Anchor segments are never shortened. The first\n  # segment is always an anchor.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39\n  # Display anchor directory segments in bold.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true\n  # Don't shorten directories that contain any of these files. They are anchors.\n  local anchor_files=(\n    .bzr\n    .citc\n    .git\n    .hg\n    .node-version\n    .python-version\n    .go-version\n    .ruby-version\n    .lua-version\n    .java-version\n    .perl-version\n    .php-version\n    .tool-versions\n    .mise.toml\n    .shorten_folder_marker\n    .svn\n    .terraform\n    CVS\n    Cargo.toml\n    composer.json\n    go.mod\n    package.json\n    stack.yaml\n  )\n  typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER=\"(${(j:|:)anchor_files})\"\n  # If set to \"first\" (\"last\"), remove everything before the first (last) subdirectory that contains\n  # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is\n  # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)\n  # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers\n  # and other directories don't.\n  #\n  # Optionally, \"first\" and \"last\" can be followed by \":<offset>\" where <offset> is an integer.\n  # This moves the truncation point to the right (positive offset) or to the left (negative offset)\n  # relative to the marker. Plain \"first\" and \"last\" are equivalent to \"first:0\" and \"last:0\"\n  # respectively.\n  typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false\n  # Don't shorten this many last directory segments. They are anchors.\n  typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1\n  # Shorten directory if it's longer than this even if there is space for it. The value can\n  # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,\n  # directory will be shortened only when prompt doesn't fit or when other parameters demand it\n  # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).\n  # If set to `0`, directory will always be shortened to its minimum length.\n  typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this\n  # many columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least\n  # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50\n  # If set to true, embed a hyperlink into the directory. Useful for quickly\n  # opening a directory in the file manager simply by clicking the link.\n  # Can also be handy when the directory is shortened, as it allows you to see\n  # the full directory that was used in previous commands.\n  typeset -g POWERLEVEL9K_DIR_HYPERLINK=false\n\n  # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON\n  # and POWERLEVEL9K_DIR_CLASSES below.\n  typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3\n\n  # The default icon shown next to non-writable and non-existent directories when\n  # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.\n  # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'\n\n  # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different\n  # directories. It must be an array with 3 * N elements. Each triplet consists of:\n  #\n  #   1. A pattern against which the current directory ($PWD) is matched. Matching is done with\n  #      extended_glob option enabled.\n  #   2. Directory class for the purpose of styling.\n  #   3. An empty string.\n  #\n  # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.\n  #\n  # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories\n  # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_DIR_CLASSES=(\n  #     '~/work(|/*)'  WORK     ''\n  #     '~(|/*)'       HOME     ''\n  #     '*'            DEFAULT  '')\n  #\n  # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one\n  # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or\n  # WORK_NON_EXISTENT.\n  #\n  # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an\n  # option to define custom colors and icons for different directory classes.\n  #\n  #   # Styling for WORK.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31\n  #   typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103\n  #   typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39\n  #\n  #   # Styling for WORK_NOT_WRITABLE.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39\n  #\n  #   # Styling for WORK_NON_EXISTENT.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39\n  #\n  # If a styling parameter isn't explicitly defined for some class, it falls back to the classless\n  # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls\n  # back to POWERLEVEL9K_DIR_FOREGROUND.\n  #\n  # typeset -g POWERLEVEL9K_DIR_CLASSES=()\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '\n\n  #####################################[ vcs: git status ]######################################\n  # Branch icon. Set this parameter to '\\UE0A0 ' for the popular Powerline branch icon.\n  typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=\n\n  # Untracked files icon. It's really a question mark, your font isn't broken.\n  # Change the value of this parameter to show a different icon.\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'\n\n  # Formatter for Git status.\n  #\n  # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.\n  #\n  # You can edit the function to customize how Git status looks.\n  #\n  # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:\n  # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.\n  function my_git_formatter() {\n    emulate -L zsh\n\n    if [[ -n $P9K_CONTENT ]]; then\n      # If P9K_CONTENT is not empty, use it. It's either \"loading\" or from vcs_info (not from\n      # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.\n      typeset -g my_git_format=$P9K_CONTENT\n      return\n    fi\n\n    if (( $1 )); then\n      # Styling for up-to-date Git status.\n      local       meta='%f'     # default foreground\n      local      clean='%76F'   # green foreground\n      local   modified='%178F'  # yellow foreground\n      local  untracked='%39F'   # blue foreground\n      local conflicted='%196F'  # red foreground\n    else\n      # Styling for incomplete and stale Git status.\n      local       meta='%244F'  # grey foreground\n      local      clean='%244F'  # grey foreground\n      local   modified='%244F'  # grey foreground\n      local  untracked='%244F'  # grey foreground\n      local conflicted='%244F'  # grey foreground\n    fi\n\n    local res\n\n    if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n      local branch=${(V)VCS_STATUS_LOCAL_BRANCH}\n      # If local branch name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show local branch name in full without truncation, delete the next line.\n      (( $#branch > 32 )) && branch[13,-13]=\"…\"  # <-- this line\n      res+=\"${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\\%/%%}\"\n    fi\n\n    if [[ -n $VCS_STATUS_TAG\n          # Show tag only if not on a branch.\n          # Tip: To always show tag, delete the next line.\n          && -z $VCS_STATUS_LOCAL_BRANCH  # <-- this line\n        ]]; then\n      local tag=${(V)VCS_STATUS_TAG}\n      # If tag name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show tag name in full without truncation, delete the next line.\n      (( $#tag > 32 )) && tag[13,-13]=\"…\"  # <-- this line\n      res+=\"${meta}#${clean}${tag//\\%/%%}\"\n    fi\n\n    # Display the current Git commit if there is no branch and no tag.\n    # Tip: To always display the current Git commit, delete the next line.\n    [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] &&  # <-- this line\n      res+=\"${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}\"\n\n    # Show tracking branch name if it differs from local branch.\n    if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then\n      res+=\"${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\\%/%%}\"\n    fi\n\n    # Display \"wip\" if the latest commit's summary contains \"wip\" or \"WIP\".\n    if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then\n      res+=\" ${modified}wip\"\n    fi\n\n    if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then\n      # ⇣42 if behind the remote.\n      (( VCS_STATUS_COMMITS_BEHIND )) && res+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n      # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n      (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=\" \"\n      (( VCS_STATUS_COMMITS_AHEAD  )) && res+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n    elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then\n      # Tip: Uncomment the next line to display '=' if up to date with the remote.\n      # res+=\" ${clean}=\"\n    fi\n\n    # ⇠42 if behind the push remote.\n    (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}\"\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" \"\n    # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD  )) && res+=\"${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}\"\n    # *42 if have stashes.\n    (( VCS_STATUS_STASHES        )) && res+=\" ${clean}*${VCS_STATUS_STASHES}\"\n    # 'merge' if the repo is in an unusual state.\n    [[ -n $VCS_STATUS_ACTION     ]] && res+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n    # ~42 if have merge conflicts.\n    (( VCS_STATUS_NUM_CONFLICTED )) && res+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n    # +42 if have staged changes.\n    (( VCS_STATUS_NUM_STAGED     )) && res+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n    # !42 if have unstaged changes.\n    (( VCS_STATUS_NUM_UNSTAGED   )) && res+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n    # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n    # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.\n    # Remove the next line if you don't want to see untracked files at all.\n    (( VCS_STATUS_NUM_UNTRACKED  )) && res+=\" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}\"\n    # \"─\" if the number of unstaged files is unknown. This can happen due to\n    # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower\n    # than the number of files in the Git index, or due to bash.showDirtyState being set to false\n    # in the repository config. The number of staged and untracked files may also be unknown\n    # in this case.\n    (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=\" ${modified}─\"\n\n    typeset -g my_git_format=$res\n  }\n  functions -M my_git_formatter 2>/dev/null\n\n  # Don't count the number of unstaged, untracked and conflicted files in Git repositories with\n  # more than this many files in the index. Negative value means infinity.\n  #\n  # If you are working in Git repositories with tens of millions of files and seeing performance\n  # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output\n  # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's\n  # config: `git config bash.showDirtyState false`.\n  typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1\n\n  # Don't show Git status in prompt for repositories whose workdir matches this pattern.\n  # For example, if set to '~', the Git repository at $HOME/.git will be ignored.\n  # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.\n  typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'\n\n  # Disable the default Git status formatting.\n  typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true\n  # Install our own Git status formatter.\n  typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'\n  typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'\n  # Enable counters for staged, unstaged, etc.\n  typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1\n\n  # Icon color.\n  typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76\n  typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '\n\n  # Show status of repositories of these types. You can add svn and/or hg if you are\n  # using them. If you do, your prompt may become slow even when your current directory\n  # isn't in an svn or hg repository.\n  typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)\n\n  # These settings are used for repositories other than Git or when gitstatusd fails and\n  # Powerlevel10k has to fall back to using vcs_info.\n  typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76\n  typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178\n\n  ##########################[ status: exit code of the last command ]###########################\n  # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and\n  # style them independently from the regular OK and ERROR state.\n  typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true\n\n  # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as\n  # it will signify success by turning green.\n  typeset -g POWERLEVEL9K_STATUS_OK=false\n  typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70\n  typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n  # Status when some part of a pipe command fails but the overall exit status is zero. It may look\n  # like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n  # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as\n  # it will signify error by turning red.\n  typeset -g POWERLEVEL9K_STATUS_ERROR=false\n  typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160\n  typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  # Status when the last command was terminated by a signal.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160\n  # Use terse signal names: \"INT\" instead of \"SIGINT(2)\".\n  typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  # Status when some part of a pipe command fails and the overall exit status is also non-zero.\n  # It may look like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n  ###################[ command_execution_time: duration of the last command ]###################\n  # Show duration of the last command if takes at least this many seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3\n  # Show this many fractional digits. Zero means round to seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0\n  # Execution time color.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101\n  # Duration format: 1d 2h 3m 4s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '\n\n  #######################[ background_jobs: presence of background jobs ]#######################\n  # Don't show the number of background jobs.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false\n  # Background jobs color.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ direnv: direnv status (https://direnv.net/) ]########################\n  # Direnv color.\n  typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############\n  # Default asdf color. Only used to display tools for which there is no color override (see below).\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.\n  typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66\n\n  # There are four parameters that can be used to hide asdf tools. Each parameter describes\n  # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at\n  # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to\n  # hide a tool, it gets shown.\n  #\n  # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and\n  # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:\n  #\n  #   asdf local  python 3.8.1\n  #   asdf global python 3.8.1\n  #\n  # After running both commands the current python version is 3.8.1 and its source is \"local\" as\n  # it takes precedence over \"global\". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,\n  # it'll hide python version in this case because 3.8.1 is the same as the global version.\n  # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't\n  # contain \"local\".\n\n  # Hide tool versions that don't come from one of these sources.\n  #\n  # Available sources:\n  #\n  # - shell   `asdf current` says \"set by ASDF_${TOOL}_VERSION environment variable\"\n  # - local   `asdf current` says \"set by /some/not/home/directory/file\"\n  # - global  `asdf current` says \"set by /home/username/file\"\n  #\n  # Note: If this parameter is set to (shell local global), it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.\n  typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)\n\n  # If set to false, hide tool versions that are the same as global.\n  #\n  # Note: The name of this parameter doesn't reflect its meaning at all.\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.\n  typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false\n\n  # If set to false, hide tool versions that are equal to \"system\".\n  #\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.\n  typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true\n\n  # If set to non-empty value, hide tools unless there is a file matching the specified file pattern\n  # in the current directory, or its parent directory, or its grandparent directory, and so on.\n  #\n  # Note: If this parameter is set to empty value, it won't hide tools.\n  # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.\n  #\n  # Example: Hide nodejs version when there is no package.json and no *.js files in the current\n  # directory, in `..`, in `../..` and so on.\n  #\n  #   typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'\n  typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=\n\n  # Ruby version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Python version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Go version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Node.js version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Rust version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37\n  # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # .NET Core version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Flutter version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Lua version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32\n  # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Java version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Perl version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67\n  # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Erlang version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Elixir version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Postgres version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # PHP version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99\n  # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Haskell version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Julia version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########\n  # NordVPN connection indicator color.\n  typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39\n  # Hide NordVPN connection indicator when not connected.\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################\n  # Ranger shell color.\n  typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  \n  ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################\n  # Yazi shell color.\n  typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################\n  # Nnn shell color.\n  typeset -g POWERLEVEL9K_NNN_FOREGROUND=72\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################\n  # lf shell color.\n  typeset -g POWERLEVEL9K_LF_FOREGROUND=72\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################\n  # xplr shell color.\n  typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########################[ vim_shell: vim shell indicator (:sh) ]###########################\n  # Vim shell indicator color.\n  typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######\n  # Midnight Commander shell color.\n  typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##\n  # Nix shell color.\n  typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74\n\n  # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false\n\n  # Tip: If you want to see just the icon without \"pure\" and \"impure\", uncomment the next line.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################\n  # chezmoi shell color.\n  typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ disk_usage: disk usage ]##################################\n  # Colors for different levels of disk usage.\n  typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160\n  # Thresholds for different levels of disk usage (percentage points).\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95\n  # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.\n  typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ ram: free RAM ]#######################################\n  # RAM color.\n  typeset -g POWERLEVEL9K_RAM_FOREGROUND=66\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################################[ swap: used swap ]######################################\n  # Swap color.\n  typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ load: CPU load ]######################################\n  # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.\n  typeset -g POWERLEVEL9K_LOAD_WHICH=5\n  # Load color when load is under 50%.\n  typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66\n  # Load color when load is between 50% and 70%.\n  typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178\n  # Load color when load is over 70%.\n  typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################\n  # Todo color.\n  typeset -g POWERLEVEL9K_TODO_FOREGROUND=110\n  # Hide todo when the total number of tasks is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true\n  # Hide todo when the number of tasks after filtering is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false\n\n  # Todo format. The following parameters are available within the expansion.\n  #\n  # - P9K_TODO_TOTAL_TASK_COUNT     The total number of tasks.\n  # - P9K_TODO_FILTERED_TASK_COUNT  The number of tasks after filtering.\n  #\n  # These variables correspond to the last line of the output of `todo.sh -p ls`:\n  #\n  #   TODO: 24 of 42 tasks shown\n  #\n  # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.\n  #\n  # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############\n  # Timewarrior color.\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110\n  # If the tracked task is longer than 24 characters, truncate and append \"…\".\n  # Tip: To always display tasks without truncation, delete the following parameter.\n  # Tip: To hide task names and display just the icon when time tracking is enabled, set the\n  # value of the following parameter to \"\".\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############\n  # Taskwarrior color.\n  typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74\n\n  # Taskwarrior segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_TASKWARRIOR_PENDING_COUNT   The number of pending tasks: `task +PENDING count`.\n  # - P9K_TASKWARRIOR_OVERDUE_COUNT   The number of overdue tasks: `task +OVERDUE count`.\n  #\n  # Zero values are represented as empty parameters.\n  #\n  # The default format:\n  #\n  #   '${P9K_TASKWARRIOR_OVERDUE_COUNT:+\"!$P9K_TASKWARRIOR_OVERDUE_COUNT/\"}$P9K_TASKWARRIOR_PENDING_COUNT'\n  #\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######\n  # Color when using local/global history.\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130\n\n  # Tip: Uncomment the next two lines to hide \"local\"/\"global\" text and leave just the icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ cpu_arch: CPU architecture ]################################\n  # CPU architecture color.\n  typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172\n\n  # Hide the segment when on a specific CPU architecture.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ context: user@hostname ]##################################\n  # Context color when running with privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178\n  # Context color in SSH without privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180\n  # Default context color (no privileges, no SSH).\n  typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180\n\n  # Context format when running with privileges: bold user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'\n  # Context format when in SSH without privileges: user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'\n  # Default context format (no privileges, no SSH): user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'\n\n  # Don't show context unless running with privileges or in SSH.\n  # Tip: Remove the next line to always show context.\n  typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '\n\n  ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###\n  # Python virtual environment color.\n  typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37\n  # Don't show Python version next to the virtual environment name.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false\n  # If set to \"false\", won't show virtualenv if pyenv is already shown.\n  # If set to \"if-different\", won't show virtualenv if it's the same as pyenv.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false\n  # Separate environment name from Python version only with a space.\n  typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ anaconda: conda environment (https://conda.io/) ]######################\n  # Anaconda environment color.\n  typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37\n\n  # Anaconda segment format. The following parameters are available within the expansion.\n  #\n  # - CONDA_PREFIX                 Absolute path to the active Anaconda/Miniconda environment.\n  # - CONDA_DEFAULT_ENV            Name of the active Anaconda/Miniconda environment.\n  # - CONDA_PROMPT_MODIFIER        Configurable prompt modifier (see below).\n  # - P9K_ANACONDA_PYTHON_VERSION  Current python version (python --version).\n  #\n  # CONDA_PROMPT_MODIFIER can be configured with the following command:\n  #\n  #   conda config --set env_prompt '({default_env}) '\n  #\n  # The last argument is a Python format string that can use the following variables:\n  #\n  # - prefix       The same as CONDA_PREFIX.\n  # - default_env  The same as CONDA_DEFAULT_ENV.\n  # - name         The last segment of CONDA_PREFIX.\n  # - stacked_env  Comma-separated list of names in the environment stack. The first element is\n  #                always the same as default_env.\n  #\n  # Note: '({default_env}) ' is the default value of env_prompt.\n  #\n  # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER\n  # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former\n  # is empty.\n  typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\\(}% }%\\)}:-${CONDA_PREFIX:t}}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################\n  # Pyenv color.\n  typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37\n  # Hide python version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)\n  # If set to false, hide python version if it's the same as global:\n  # $(pyenv version-name) == $(pyenv global).\n  typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide python version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true\n\n  # Pyenv segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_CONTENT                Current pyenv environment (pyenv version-name).\n  # - P9K_PYENV_PYTHON_VERSION   Current python version (python --version).\n  #\n  # The default format has the following logic:\n  #\n  # 1. Display just \"$P9K_CONTENT\" if it's equal to \"$P9K_PYENV_PYTHON_VERSION\" or\n  #    starts with \"$P9K_PYENV_PYTHON_VERSION/\".\n  # 2. Otherwise display \"$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION\".\n  typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################\n  # Goenv color.\n  typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37\n  # Hide go version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)\n  # If set to false, hide go version if it's the same as global:\n  # $(goenv version-name) == $(goenv global).\n  typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide go version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########\n  # Nodenv color.\n  typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70\n  # Hide node version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)\n  # If set to false, hide node version if it's the same as global:\n  # $(nodenv version-name) == $(nodenv global).\n  typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############\n  # Nvm color.\n  typeset -g POWERLEVEL9K_NVM_FOREGROUND=70\n  # If set to false, hide node version if it's the same as default:\n  # $(nvm version current) == $(nvm version default).\n  typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############\n  # Nodeenv color.\n  typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70\n  # Don't show Node version next to the environment name.\n  typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false\n  # Separate environment name from Node version only with a space.\n  typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############################[ node_version: node.js version ]###############################\n  # Node version color.\n  typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70\n  # Show node version only when in a directory tree containing package.json.\n  typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ go_version: go version (https://golang.org) ]########################\n  # Go version color.\n  typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37\n  # Show go version only when in a go project subdirectory.\n  typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################\n  # Rust version color.\n  typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37\n  # Show rust version only when in a rust project subdirectory.\n  typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################\n  # .NET version color.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134\n  # Show .NET version only when in a .NET project subdirectory.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ php_version: php version (https://www.php.net/) ]######################\n  # PHP version color.\n  typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99\n  # Show PHP version only when in a PHP project subdirectory.\n  typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########\n  # Laravel version color.\n  typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ####################[ java_version: java version (https://www.java.com/) ]####################\n  # Java version color.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32\n  # Show java version only when in a java project subdirectory.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true\n  # Show brief version.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####\n  # Package color.\n  typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117\n  # Package format. The following parameters are available within the expansion.\n  #\n  # - P9K_PACKAGE_NAME     The value of `name` field in package.json.\n  # - P9K_PACKAGE_VERSION  The value of `version` field in package.json.\n  #\n  # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\\%/%%}@${P9K_PACKAGE_VERSION//\\%/%%}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############\n  # Rbenv color.\n  typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168\n  # Hide ruby version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)\n  # If set to false, hide ruby version if it's the same as global:\n  # $(rbenv version-name) == $(rbenv global).\n  typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide ruby version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################\n  # Rvm color.\n  typeset -g POWERLEVEL9K_RVM_FOREGROUND=168\n  # Don't show @gemset at the end.\n  typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false\n  # Don't show ruby- at the front.\n  typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############\n  # Fvm color.\n  typeset -g POWERLEVEL9K_FVM_FOREGROUND=38\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########\n  # Lua color.\n  typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32\n  # Hide lua version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)\n  # If set to false, hide lua version if it's the same as global:\n  # $(luaenv version-name) == $(luaenv global).\n  typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide lua version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################\n  # Java color.\n  typeset -g POWERLEVEL9K_JENV_FOREGROUND=32\n  # Hide java version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)\n  # If set to false, hide java version if it's the same as global:\n  # $(jenv version-name) == $(jenv global).\n  typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide java version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############\n  # Perl color.\n  typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67\n  # Hide perl version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)\n  # If set to false, hide perl version if it's the same as global:\n  # $(plenv version-name) == $(plenv global).\n  typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide perl version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############\n  # Perlbrew color.\n  typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67\n  # Show perlbrew version only when in a perl project subdirectory.\n  typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true\n  # Don't show \"perl-\" at the front.\n  typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############\n  # PHP color.\n  typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99\n  # Hide php version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)\n  # If set to false, hide php version if it's the same as global:\n  # $(phpenv version-name) == $(phpenv global).\n  typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide php version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######\n  # Scala color.\n  typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160\n  # Hide scala version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)\n  # If set to false, hide scala version if it's the same as global:\n  # $(scalaenv version-name) == $(scalaenv global).\n  typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide scala version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########\n  # Haskell color.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172\n  # Hide haskell version if it doesn't come from one of these sources.\n  #\n  #   shell:  version is set by STACK_YAML\n  #   local:  version is set by stack.yaml up the directory tree\n  #   global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)\n  typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)\n  # If set to false, hide haskell version if it's the same as in the implicit global project.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############\n  # Show kubecontext only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show kubecontext.\n  typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'\n\n  # Kubernetes context classes for the purpose of using different colors, icons and expansions with\n  # different contexts.\n  #\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current kubernetes context gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current kubernetes context is \"deathray-testing/default\", its class is TEST\n  # because \"deathray-testing/default\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext\n  # segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # Within the expansion the following parameters are always available:\n  #\n  # - P9K_CONTENT                The content that would've been displayed if there was no content\n  #                              expansion defined.\n  # - P9K_KUBECONTEXT_NAME       The current context's name. Corresponds to column NAME in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_CLUSTER    The current context's cluster. Corresponds to column CLUSTER in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_NAMESPACE  The current context's namespace. Corresponds to column NAMESPACE\n  #                              in the output of `kubectl config get-contexts`. If there is no\n  #                              namespace, the parameter is set to \"default\".\n  # - P9K_KUBECONTEXT_USER       The current context's user. Corresponds to column AUTHINFO in the\n  #                              output of `kubectl config get-contexts`.\n  #\n  # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),\n  # the following extra parameters are available:\n  #\n  # - P9K_KUBECONTEXT_CLOUD_NAME     Either \"gke\" or \"eks\".\n  # - P9K_KUBECONTEXT_CLOUD_ACCOUNT  Account/project ID.\n  # - P9K_KUBECONTEXT_CLOUD_ZONE     Availability zone.\n  # - P9K_KUBECONTEXT_CLOUD_CLUSTER  Cluster.\n  #\n  # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,\n  # if P9K_KUBECONTEXT_CLUSTER is \"gke_my-account_us-east1-a_my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=gke\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  #\n  # If P9K_KUBECONTEXT_CLUSTER is \"arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=eks\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=\n  # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'\n  # Append the current context's namespace if it's not \"default\".\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '\n\n  ################[ terraform: terraform workspace (https://www.terraform.io) ]#################\n  # Don't show terraform workspace if it's literally \"default\".\n  typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false\n  # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current terraform workspace gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current terraform workspace is \"project_test\", its class is TEST because \"project_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n  typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38\n  # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ terraform_version: terraform version (https://www.terraform.io) ]##############\n  # Terraform version color.\n  typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#\n  # Show aws only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show aws.\n  typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current AWS profile gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current AWS profile is \"company_test\", its class is TEST\n  # because \"company_test\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AWS_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208\n  # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # AWS segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_AWS_PROFILE  The name of the current AWS profile.\n  # - P9K_AWS_REGION   The region associated with the current AWS profile.\n  typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\\%/%%}}'\n\n  #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#\n  # AWS Elastic Beanstalk environment color.\n  typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########\n  # Show azure only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show azure.\n  typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current azure account name gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current azure account is \"company_test\", its class is TEST because \"company_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n\n  # Azure account name color.\n  typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########\n  # Show gcloud only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show gcloud.\n  typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'\n   # Google cloud color.\n  typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32\n\n  # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or\n  # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative\n  # enough. You can use the following parameters in the expansions. Each of them corresponds to the\n  # output of `gcloud` tool.\n  #\n  #   Parameter                | Source\n  #   -------------------------|--------------------------------------------------------------------\n  #   P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'\n  #   P9K_GCLOUD_ACCOUNT       | gcloud config get-value account\n  #   P9K_GCLOUD_PROJECT_ID    | gcloud config get-value project\n  #   P9K_GCLOUD_PROJECT_NAME  | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.\n  #\n  # Obtaining project name requires sending a request to Google servers. This can take a long time\n  # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud\n  # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets\n  # set and gcloud prompt segment transitions to state COMPLETE.\n  #\n  # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL\n  # and COMPLETE. You can also hide gcloud in state PARTIAL by setting\n  # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and\n  # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.\n  typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\\%/%%}'\n  typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\\%/%%}'\n\n  # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name\n  # this often. Negative value disables periodic polling. In this mode project name is retrieved\n  # only when the current configuration, account or project id changes.\n  typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#\n  # Show google_app_cred only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show google_app_cred.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt'\n\n  # Google application credentials classes for the purpose of using different colors, icons and\n  # expansions with different credentials.\n  #\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first\n  # element in each pair defines a pattern against which the current kubernetes context gets\n  # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion\n  # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION\n  # parameters, you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.\n  # The first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n  #     '*:*prod*:*'  PROD\n  #     '*:*test*:*'  TEST\n  #     '*'           DEFAULT)\n  #\n  # If your current Google application credentials is \"service_account deathray-testing x@y.com\",\n  # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n      # '*:*prod*:*'  PROD    # These values are examples that are unlikely\n      # '*:*test*:*'  TEST    # to match your needs. Customize them as needed.\n      '*'             DEFAULT)\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32\n  # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by\n  # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # You can use the following parameters in the expansion. Each of them corresponds to one of the\n  # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.\n  #\n  #   Parameter                        | JSON key file field\n  #   ---------------------------------+---------------\n  #   P9K_GOOGLE_APP_CRED_TYPE         | type\n  #   P9K_GOOGLE_APP_CRED_PROJECT_ID   | project_id\n  #   P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\\%/%%}'\n\n  ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############\n  # Toolbox color.\n  typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178\n  # Don't display the name of the toolbox if it matches fedora-toolbox-*.\n  typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '\n\n  ###############################[ public_ip: public IP address ]###############################\n  # Public IP color.\n  typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ########################[ vpn_ip: virtual private network indicator ]#########################\n  # VPN IP color.\n  typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81\n  # When on VPN, show just an icon without the IP address.\n  # Tip: To display the private IP address when on VPN, remove the next line.\n  typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=\n  # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN\n  # to see the name of the interface.\n  typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'\n  # If set to true, show one segment per matching network interface. If set to false, show only\n  # one segment corresponding to the first matching network interface.\n  # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.\n  typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########\n  # IP color.\n  typeset -g POWERLEVEL9K_IP_FOREGROUND=38\n  # The following parameters are accessible within the expansion:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+-------------------------------------------\n  #   P9K_IP_IP             | IP address\n  #   P9K_IP_INTERFACE      | network interface\n  #   P9K_IP_RX_BYTES       | total number of bytes received\n  #   P9K_IP_TX_BYTES       | total number of bytes sent\n  #   P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt\n  #   P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt\n  #   P9K_IP_RX_RATE        | receive rate (since last prompt)\n  #   P9K_IP_TX_RATE        | send rate (since last prompt)\n  typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}'\n  # Show information for the first network interface whose name matches this regular expression.\n  # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.\n  typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #########################[ proxy: system-wide http/https/ftp proxy ]##########################\n  # Proxy color.\n  typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ battery: internal battery ]#################################\n  # Show battery in red when it's below this level and not connected to power supply.\n  typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20\n  typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160\n  # Show battery in green when it's charging or fully charged.\n  typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70\n  # Show battery in yellow when it's discharging.\n  typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178\n  # Battery pictograms going from low to high level of charge.\n  typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')\n  # Don't show the remaining time to charge/discharge.\n  typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false\n\n  #####################################[ wifi: wifi speed ]#####################################\n  # WiFi color.\n  typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).\n  #\n  #   # Wifi colors and icons for different signal strength levels (low to high).\n  #   typeset -g my_wifi_fg=(68 68 68 68 68)                           # <-- change these values\n  #   typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi')     # <-- change these values\n  #\n  #   typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'\n  #   typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'\n  #\n  # The following parameters are accessible within the expansions:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+---------------\n  #   P9K_WIFI_SSID         | service set identifier, a.k.a. network name\n  #   P9K_WIFI_LINK_AUTH    | authentication protocol such as \"wpa2-psk\" or \"none\"; empty if unknown\n  #   P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second\n  #   P9K_WIFI_RSSI         | signal strength in dBm, from -120 to 0\n  #   P9K_WIFI_NOISE        | noise in dBm, from -120 to 0\n  #   P9K_WIFI_BARS         | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)\n\n  ####################################[ time: current time ]####################################\n  # Current time color.\n  typeset -g POWERLEVEL9K_TIME_FOREGROUND=66\n  # Format for the current time: 09:51:02. See `man 3 strftime`.\n  typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'\n  # If set to true, time will update when you hit enter. This way prompts for the past\n  # commands will contain the start times of their commands as opposed to the default\n  # behavior where they contain the end times of their preceding commands.\n  typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '\n\n  # Example of a user-defined prompt segment. Function prompt_example will be called on every\n  # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or\n  # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.\n  #\n  # Type `p10k help segment` for documentation and a more sophisticated example.\n  function prompt_example() {\n    p10k segment -f 208 -i '⭐' -t 'hello, %n'\n  }\n\n  # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job\n  # is to generate the prompt segment for display in instant prompt. See\n  # https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #\n  # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function\n  # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k\n  # will replay these calls without actually calling instant_prompt_*. It is imperative that\n  # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this\n  # rule is not observed, the content of instant prompt will be incorrect.\n  #\n  # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If\n  # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.\n  function instant_prompt_example() {\n    # Since prompt_example always makes the same `p10k segment` calls, we can call it from\n    # instant_prompt_example. This will give us the same `example` prompt segment in the instant\n    # and regular prompts.\n    prompt_example\n  }\n\n  # User-defined prompt segments can be customized the same way as built-in segments.\n  # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208\n  # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt\n  # when accepting a command line. Supported values:\n  #\n  #   - off:      Don't change prompt when accepting a command line.\n  #   - always:   Trim down prompt when accepting a command line.\n  #   - same-dir: Trim down prompt when accepting a command line unless this is the first command\n  #               typed after changing current working directory.\n  typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n  # Instant prompt mode.\n  #\n  #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found\n  #              it incompatible with your zsh configuration files.\n  #   - quiet:   Enable instant prompt and don't print warnings when detecting console output\n  #              during zsh initialization. Choose this if you've read and understood\n  #              https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #   - verbose: Enable instant prompt and print a warning when detecting console output during\n  #              zsh initialization. Choose this if you've never tried instant prompt, haven't\n  #              seen the warning, or if you are unsure what this all means.\n  typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n  # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n  # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n  # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n  # really need it.\n  typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n  # If p10k is already loaded, reload configuration.\n  # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n  (( ! $+functions[p10k] )) || p10k reload\n}\n\n# Tell `p10k configure` which file it should overwrite.\ntypeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'\n"
  },
  {
    "path": "config/p10k-pure.zsh",
    "content": "# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).\n#\n# Differences from Pure:\n#\n#   - Git:\n#     - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state.\n#     - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`).\n#\n# Apart from the differences listed above, the replication of Pure prompt is exact. This includes\n# even the questionable parts. For example, just like in Pure, there is no indication of Git status\n# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt\n# doesn't fit on one line, it wraps around with no attempt to shorten it.\n#\n# If you like the general style of Pure but not particularly attached to all its quirks, type\n# `p10k configure` and pick \"Lean\" style. This will give you slick minimalist prompt while taking\n# advantage of Powerlevel10k features that aren't present in Pure.\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n  emulate -L zsh -o extended_glob\n\n  # Unset all configuration options.\n  unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'\n\n  # Zsh >= 5.1 is required.\n  [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return\n\n  # Prompt colors.\n  local grey=242\n  local red=1\n  local yellow=3\n  local blue=4\n  local magenta=5\n  local cyan=6\n  local white=7\n\n  # Left prompt segments.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    context                   # user@host\n    dir                       # current directory\n    vcs                       # git status\n    command_execution_time    # previous command duration\n    # =========================[ Line #2 ]=========================\n    newline                   # \\n\n    virtualenv                # python virtual environment\n    prompt_char               # prompt symbol\n  )\n\n  # Right prompt segments.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    # command_execution_time  # previous command duration\n    # virtualenv              # python virtual environment\n    # context                 # user@host\n    # time                    # current time\n    # =========================[ Line #2 ]=========================\n    newline                   # \\n\n  )\n\n  # Basic style options that define the overall prompt look.\n  typeset -g POWERLEVEL9K_BACKGROUND=                            # transparent background\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE=  # no surrounding whitespace\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' '  # separate segments with a space\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR=        # no end-of-line symbol\n  typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION=           # no segment icons\n\n  # Add an empty line before each prompt except the first. This doesn't emulate the bug\n  # in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar.\n  typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true\n\n  # Magenta prompt symbol if the last command succeeded.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta\n  # Red prompt symbol if the last command failed.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red\n  # Default prompt symbol.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'\n  # Prompt symbol in command vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'\n  # Prompt symbol in visual vi mode is the same as in command mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮'\n  # Prompt symbol in overwrite vi mode is the same as in command mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false\n\n  # Grey Python Virtual Environment.\n  typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey\n  # Don't show Python version.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false\n  typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=\n\n  # Blue current directory.\n  typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue\n\n  # Context format when root: user@host. The first part white, the rest grey.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE=\"%F{$white}%n%f%F{$grey}@%m%f\"\n  # Context format when not root: user@host. The whole thing grey.\n  typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE=\"%F{$grey}%n@%m%f\"\n  # Don't show context unless root or in SSH.\n  typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=\n\n  # Show previous command duration only if it's >= 5s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5\n  # Don't show fractional seconds. Thus, 7s rather than 7.3s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0\n  # Duration format: 1d 2h 3m 4s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'\n  # Yellow previous command duration.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow\n\n  # Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones.\n  typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey\n\n  # Disable async loading indicator to make directories that aren't Git repositories\n  # indistinguishable from large Git repositories without known state.\n  typeset -g POWERLEVEL9K_VCS_LOADING_TEXT=\n\n  # Don't wait for Git status even for a millisecond, so that prompt always updates\n  # asynchronously when Git state changes.\n  typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0\n\n  # Cyan ahead/behind arrows.\n  typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan\n  # Don't show remote branch, current tag or stashes.\n  typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind)\n  # Don't show the branch icon.\n  typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=\n  # When in detached HEAD state, show @commit where branch normally goes.\n  typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'\n  # Don't show staged, unstaged, untracked indicators.\n  typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=\n  # Show '*' when there are staged, unstaged or untracked files.\n  typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'\n  # Show '⇣' if local branch is behind remote.\n  typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣'\n  # Show '⇡' if local branch is ahead of remote.\n  typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡'\n  # Don't show the number of commits next to the ahead/behind arrows.\n  typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1\n  # Remove space between '⇣' and '⇡' and all trailing spaces.\n  typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }'\n\n  # Grey current time.\n  typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey\n  # Format for the current time: 09:51:02. See `man 3 strftime`.\n  typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'\n  # If set to true, time will update when you hit enter. This way prompts for the past\n  # commands will contain the start times of their commands rather than the end times of\n  # their preceding commands.\n  typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false\n\n  # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt\n  # when accepting a command line. Supported values:\n  #\n  #   - off:      Don't change prompt when accepting a command line.\n  #   - always:   Trim down prompt when accepting a command line.\n  #   - same-dir: Trim down prompt when accepting a command line unless this is the first command\n  #               typed after changing current working directory.\n  typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n  # Instant prompt mode.\n  #\n  #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found\n  #              it incompatible with your zsh configuration files.\n  #   - quiet:   Enable instant prompt and don't print warnings when detecting console output\n  #              during zsh initialization. Choose this if you've read and understood\n  #              https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #   - verbose: Enable instant prompt and print a warning when detecting console output during\n  #              zsh initialization. Choose this if you've never tried instant prompt, haven't\n  #              seen the warning, or if you are unsure what this all means.\n  typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n  # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n  # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n  # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n  # really need it.\n  typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n  # If p10k is already loaded, reload configuration.\n  # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n  (( ! $+functions[p10k] )) || p10k reload\n}\n\n# Tell `p10k configure` which file it should overwrite.\ntypeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'\n"
  },
  {
    "path": "config/p10k-rainbow.zsh",
    "content": "# Config for Powerlevel10k with powerline prompt style with colorful background.\n# Type `p10k configure` to generate your own config based on it.\n#\n# Tip: Looking for a nice color? Here's a one-liner to print colormap.\n#\n#   for i in {0..255}; do print -Pn \"%K{$i}  %k%F{$i}${(l:3::0:)i}%f \" ${${(M)$((i%6)):#3}:+$'\\n'}; done\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n  emulate -L zsh -o extended_glob\n\n  # Unset all configuration options. This allows you to apply configuration changes without\n  # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.\n  unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'\n\n  # Zsh >= 5.1 is required.\n  [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return\n\n  # The list of segments shown on the left. Fill it with the most important segments.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    # os_icon               # os identifier\n    dir                     # current directory\n    vcs                     # git status\n    # =========================[ Line #2 ]=========================\n    newline                 # \\n\n    # prompt_char           # prompt symbol\n  )\n\n  # The list of segments shown on the right. Fill it with less important segments.\n  # Right prompt on the last prompt line (where you are typing your commands) gets\n  # automatically hidden when the input line reaches it. Right prompt above the\n  # last prompt line gets hidden if it would overlap with left prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n    # =========================[ Line #1 ]=========================\n    status                  # exit code of the last command\n    command_execution_time  # duration of the last command\n    background_jobs         # presence of background jobs\n    direnv                  # direnv status (https://direnv.net/)\n    asdf                    # asdf version manager (https://github.com/asdf-vm/asdf)\n    virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)\n    anaconda                # conda environment (https://conda.io/)\n    pyenv                   # python environment (https://github.com/pyenv/pyenv)\n    goenv                   # go environment (https://github.com/syndbg/goenv)\n    nodenv                  # node.js version from nodenv (https://github.com/nodenv/nodenv)\n    nvm                     # node.js version from nvm (https://github.com/nvm-sh/nvm)\n    nodeenv                 # node.js environment (https://github.com/ekalinin/nodeenv)\n    # node_version          # node.js version\n    # go_version            # go version (https://golang.org)\n    # rust_version          # rustc version (https://www.rust-lang.org)\n    # dotnet_version        # .NET version (https://dotnet.microsoft.com)\n    # php_version           # php version (https://www.php.net/)\n    # laravel_version       # laravel php framework version (https://laravel.com/)\n    # java_version          # java version (https://www.java.com/)\n    # package               # name@version from package.json (https://docs.npmjs.com/files/package.json)\n    rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)\n    rvm                     # ruby version from rvm (https://rvm.io)\n    fvm                     # flutter version management (https://github.com/leoafarias/fvm)\n    luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)\n    jenv                    # java version from jenv (https://github.com/jenv/jenv)\n    plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)\n    perlbrew                # perl version from perlbrew (https://github.com/gugod/App-perlbrew)\n    phpenv                  # php version from phpenv (https://github.com/phpenv/phpenv)\n    scalaenv                # scala version from scalaenv (https://github.com/scalaenv/scalaenv)\n    haskell_stack           # haskell version from stack (https://haskellstack.org/)\n    kubecontext             # current kubernetes context (https://kubernetes.io/)\n    terraform               # terraform workspace (https://www.terraform.io)\n    # terraform_version     # terraform version (https://www.terraform.io)\n    aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)\n    aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)\n    azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)\n    gcloud                  # google cloud cli account and project (https://cloud.google.com/)\n    google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)\n    toolbox                 # toolbox name (https://github.com/containers/toolbox)\n    context                 # user@hostname\n    nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)\n    ranger                  # ranger shell (https://github.com/ranger/ranger)\n    yazi                    # yazi shell (https://github.com/sxyazi/yazi)\n    nnn                     # nnn shell (https://github.com/jarun/nnn)\n    lf                      # lf shell (https://github.com/gokcehan/lf)\n    xplr                    # xplr shell (https://github.com/sayanarijit/xplr)\n    vim_shell               # vim shell indicator (:sh)\n    midnight_commander      # midnight commander shell (https://midnight-commander.org/)\n    nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)\n    chezmoi_shell           # chezmoi shell (https://www.chezmoi.io/)\n    # vi_mode               # vi mode (you don't need this if you've enabled prompt_char)\n    # vpn_ip                # virtual private network indicator\n    # load                  # CPU load\n    # disk_usage            # disk usage\n    # ram                   # free RAM\n    # swap                  # used swap\n    todo                    # todo items (https://github.com/todotxt/todo.txt-cli)\n    timewarrior             # timewarrior tracking status (https://timewarrior.net/)\n    taskwarrior             # taskwarrior task count (https://taskwarrior.org/)\n    per_directory_history   # Oh My Zsh per-directory-history local/global indicator\n    # cpu_arch              # CPU architecture\n    # time                  # current time\n    # =========================[ Line #2 ]=========================\n    newline\n    # ip                    # ip address and bandwidth usage for a specified network interface\n    # public_ip             # public IP address\n    # proxy                 # system-wide http/https/ftp proxy\n    # battery               # internal battery\n    # wifi                  # wifi speed\n    # example               # example user-defined segment (see prompt_example function below)\n  )\n\n  # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.\n  typeset -g POWERLEVEL9K_MODE=nerdfont-complete\n  # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid\n  # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.\n  typeset -g POWERLEVEL9K_ICON_PADDING=none\n\n  # When set to true, icons appear before content on both sides of the prompt. When set\n  # to false, icons go after content. If empty or not set, icons go before content in the left\n  # prompt and after content in the right prompt.\n  #\n  # You can also override it for a specific segment:\n  #\n  #   POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false\n  #\n  # Or for a specific segment in specific state:\n  #\n  #   POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false\n  typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=\n\n  # Add an empty line before each prompt.\n  typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true\n\n  # Connect left prompt lines with these symbols. You'll probably want to use the same color\n  # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─'\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─'\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─'\n  # Connect right prompt lines with these symbols.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮'\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤'\n  typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯'\n\n  # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or\n  # '─'. The last two make it easier to see the alignment between left and right prompt and to\n  # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false\n  # for more compact prompt if using this option.\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '\n  typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=\n  typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=\n  if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then\n    # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE\n    # ornaments defined above.\n    typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242\n    # Start filler from the edge of the screen if there are no left segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'\n    # End filler on the edge of the screen if there are no right segments on the first line.\n    typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'\n  fi\n\n  # Separator between same-color segments on the left.\n  typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\\uE0B1'\n  # Separator between same-color segments on the right.\n  typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\\uE0B3'\n  # Separator between different-color segments on the left.\n  typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\\uE0B0'\n  # Separator between different-color segments on the right.\n  typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\\uE0B2'\n  # To remove a separator between two segments, add \"_joined\" to the second segment name.\n  # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined)\n\n  # The right end of left prompt.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\\uE0B0'\n  # The left end of right prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\\uE0B2'\n  # The left end of left prompt.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n  # The right end of right prompt.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n  # Left prompt terminator for lines without any segments.\n  typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n\n  #################################[ os_icon: os identifier ]##################################\n  # OS identifier color.\n  typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232\n  typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'\n\n  ################################[ prompt_char: prompt symbol ]################################\n  # Transparent background.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=\n  # Green prompt symbol if the last command succeeded.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76\n  # Red prompt symbol if the last command failed.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196\n  # Default prompt symbol.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'\n  # Prompt symbol in command vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'\n  # Prompt symbol in visual vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'\n  # Prompt symbol in overwrite vi mode.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true\n  # No line terminator if prompt_char is the last segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n  # No line introducer if prompt_char is the first segment.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n  # No surrounding whitespace.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE=\n\n  ##################################[ dir: current directory ]##################################\n  # Current directory background color.\n  typeset -g POWERLEVEL9K_DIR_BACKGROUND=4\n  # Default current directory foreground color.\n  typeset -g POWERLEVEL9K_DIR_FOREGROUND=254\n  # If directory is too long, shorten some of its segments to the shortest possible unique\n  # prefix. The shortened directory can be tab-completed to the original.\n  typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique\n  # Replace removed segment suffixes with this symbol.\n  typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=\n  # Color of the shortened directory segments.\n  typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250\n  # Color of the anchor directory segments. Anchor segments are never shortened. The first\n  # segment is always an anchor.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255\n  # Display anchor directory segments in bold.\n  typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true\n  # Don't shorten directories that contain any of these files. They are anchors.\n  local anchor_files=(\n    .bzr\n    .citc\n    .git\n    .hg\n    .node-version\n    .python-version\n    .go-version\n    .ruby-version\n    .lua-version\n    .java-version\n    .perl-version\n    .php-version\n    .tool-versions\n    .mise.toml\n    .shorten_folder_marker\n    .svn\n    .terraform\n    CVS\n    Cargo.toml\n    composer.json\n    go.mod\n    package.json\n    stack.yaml\n  )\n  typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER=\"(${(j:|:)anchor_files})\"\n  # If set to \"first\" (\"last\"), remove everything before the first (last) subdirectory that contains\n  # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is\n  # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)\n  # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers\n  # and other directories don't.\n  #\n  # Optionally, \"first\" and \"last\" can be followed by \":<offset>\" where <offset> is an integer.\n  # This moves the truncation point to the right (positive offset) or to the left (negative offset)\n  # relative to the marker. Plain \"first\" and \"last\" are equivalent to \"first:0\" and \"last:0\"\n  # respectively.\n  typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false\n  # Don't shorten this many last directory segments. They are anchors.\n  typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1\n  # Shorten directory if it's longer than this even if there is space for it. The value can\n  # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,\n  # directory will be shortened only when prompt doesn't fit or when other parameters demand it\n  # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).\n  # If set to `0`, directory will always be shortened to its minimum length.\n  typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this\n  # many columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40\n  # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least\n  # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.\n  typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50\n  # If set to true, embed a hyperlink into the directory. Useful for quickly\n  # opening a directory in the file manager simply by clicking the link.\n  # Can also be handy when the directory is shortened, as it allows you to see\n  # the full directory that was used in previous commands.\n  typeset -g POWERLEVEL9K_DIR_HYPERLINK=false\n\n  # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON\n  # and POWERLEVEL9K_DIR_CLASSES below.\n  typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3\n\n  # The default icon shown next to non-writable and non-existent directories when\n  # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.\n  # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'\n\n  # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different\n  # directories. It must be an array with 3 * N elements. Each triplet consists of:\n  #\n  #   1. A pattern against which the current directory ($PWD) is matched. Matching is done with\n  #      extended_glob option enabled.\n  #   2. Directory class for the purpose of styling.\n  #   3. An empty string.\n  #\n  # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.\n  #\n  # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories\n  # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_DIR_CLASSES=(\n  #     '~/work(|/*)'  WORK     ''\n  #     '~(|/*)'       HOME     ''\n  #     '*'            DEFAULT  '')\n  #\n  # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one\n  # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or\n  # WORK_NON_EXISTENT.\n  #\n  # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an\n  # option to define custom colors and icons for different directory classes.\n  #\n  #   # Styling for WORK.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254\n  #   typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250\n  #   typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255\n  #\n  #   # Styling for WORK_NOT_WRITABLE.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255\n  #\n  #   # Styling for WORK_NON_EXISTENT.\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_BACKGROUND=4\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=254\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=250\n  #   typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=255\n  #\n  # If a styling parameter isn't explicitly defined for some class, it falls back to the classless\n  # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls\n  # back to POWERLEVEL9K_DIR_FOREGROUND.\n  #\n  # typeset -g POWERLEVEL9K_DIR_CLASSES=()\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_DIR_PREFIX='in '\n\n  #####################################[ vcs: git status ]######################################\n  # Version control background colors.\n  typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2\n  typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2\n  typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3\n  typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8\n\n  # Branch icon. Set this parameter to '\\UE0A0 ' for the popular Powerline branch icon.\n  typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=\n\n  # Untracked files icon. It's really a question mark, your font isn't broken.\n  # Change the value of this parameter to show a different icon.\n  typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'\n\n  # Formatter for Git status.\n  #\n  # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.\n  #\n  # You can edit the function to customize how Git status looks.\n  #\n  # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:\n  # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.\n  function my_git_formatter() {\n    emulate -L zsh\n\n    if [[ -n $P9K_CONTENT ]]; then\n      # If P9K_CONTENT is not empty, use it. It's either \"loading\" or from vcs_info (not from\n      # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.\n      typeset -g my_git_format=$P9K_CONTENT\n      return\n    fi\n\n    # Styling for different parts of Git status.\n    local       meta='%7F' # white foreground\n    local      clean='%0F' # black foreground\n    local   modified='%0F' # black foreground\n    local  untracked='%0F' # black foreground\n    local conflicted='%1F' # red foreground\n\n    local res\n\n    if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n      local branch=${(V)VCS_STATUS_LOCAL_BRANCH}\n      # If local branch name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show local branch name in full without truncation, delete the next line.\n      (( $#branch > 32 )) && branch[13,-13]=\"…\"  # <-- this line\n      res+=\"${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\\%/%%}\"\n    fi\n\n    if [[ -n $VCS_STATUS_TAG\n          # Show tag only if not on a branch.\n          # Tip: To always show tag, delete the next line.\n          && -z $VCS_STATUS_LOCAL_BRANCH  # <-- this line\n        ]]; then\n      local tag=${(V)VCS_STATUS_TAG}\n      # If tag name is at most 32 characters long, show it in full.\n      # Otherwise show the first 12 … the last 12.\n      # Tip: To always show tag name in full without truncation, delete the next line.\n      (( $#tag > 32 )) && tag[13,-13]=\"…\"  # <-- this line\n      res+=\"${meta}#${clean}${tag//\\%/%%}\"\n    fi\n\n    # Display the current Git commit if there is no branch and no tag.\n    # Tip: To always display the current Git commit, delete the next line.\n    [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] &&  # <-- this line\n      res+=\"${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}\"\n\n    # Show tracking branch name if it differs from local branch.\n    if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then\n      res+=\"${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\\%/%%}\"\n    fi\n\n    # Display \"wip\" if the latest commit's summary contains \"wip\" or \"WIP\".\n    if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then\n      res+=\" ${modified}wip\"\n    fi\n\n    if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then\n      # ⇣42 if behind the remote.\n      (( VCS_STATUS_COMMITS_BEHIND )) && res+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n      # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n      (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=\" \"\n      (( VCS_STATUS_COMMITS_AHEAD  )) && res+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n    elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then\n      # Tip: Uncomment the next line to display '=' if up to date with the remote.\n      # res+=\" ${clean}=\"\n    fi\n\n    # ⇠42 if behind the push remote.\n    (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}\"\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=\" \"\n    # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.\n    (( VCS_STATUS_PUSH_COMMITS_AHEAD  )) && res+=\"${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}\"\n    # *42 if have stashes.\n    (( VCS_STATUS_STASHES        )) && res+=\" ${clean}*${VCS_STATUS_STASHES}\"\n    # 'merge' if the repo is in an unusual state.\n    [[ -n $VCS_STATUS_ACTION     ]] && res+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n    # ~42 if have merge conflicts.\n    (( VCS_STATUS_NUM_CONFLICTED )) && res+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n    # +42 if have staged changes.\n    (( VCS_STATUS_NUM_STAGED     )) && res+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n    # !42 if have unstaged changes.\n    (( VCS_STATUS_NUM_UNSTAGED   )) && res+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n    # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n    # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.\n    # Remove the next line if you don't want to see untracked files at all.\n    (( VCS_STATUS_NUM_UNTRACKED  )) && res+=\" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}\"\n    # \"─\" if the number of unstaged files is unknown. This can happen due to\n    # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower\n    # than the number of files in the Git index, or due to bash.showDirtyState being set to false\n    # in the repository config. The number of staged and untracked files may also be unknown\n    # in this case.\n    (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=\" ${modified}─\"\n\n    typeset -g my_git_format=$res\n  }\n  functions -M my_git_formatter 2>/dev/null\n\n  # Don't count the number of unstaged, untracked and conflicted files in Git repositories with\n  # more than this many files in the index. Negative value means infinity.\n  #\n  # If you are working in Git repositories with tens of millions of files and seeing performance\n  # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output\n  # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's\n  # config: `git config bash.showDirtyState false`.\n  typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1\n\n  # Don't show Git status in prompt for repositories whose workdir matches this pattern.\n  # For example, if set to '~', the Git repository at $HOME/.git will be ignored.\n  # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.\n  typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'\n\n  # Disable the default Git status formatting.\n  typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true\n  # Install our own Git status formatter.\n  typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}'\n  # Enable counters for staged, unstaged, etc.\n  typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_VCS_PREFIX='on '\n\n  # Show status of repositories of these types. You can add svn and/or hg if you are\n  # using them. If you do, your prompt may become slow even when your current directory\n  # isn't in an svn or hg repository.\n  typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)\n\n  ##########################[ status: exit code of the last command ]###########################\n  # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and\n  # style them independently from the regular OK and ERROR state.\n  typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true\n\n  # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as\n  # it will signify success by turning green.\n  typeset -g POWERLEVEL9K_STATUS_OK=true\n  typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'\n  typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2\n  typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0\n\n  # Status when some part of a pipe command fails but the overall exit status is zero. It may look\n  # like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2\n  typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0\n\n  # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as\n  # it will signify error by turning red.\n  typeset -g POWERLEVEL9K_STATUS_ERROR=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'\n  typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3\n  typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1\n\n  # Status when the last command was terminated by a signal.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true\n  # Use terse signal names: \"INT\" instead of \"SIGINT(2)\".\n  typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3\n  typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1\n\n  # Status when some part of a pipe command fails and the overall exit status is also non-zero.\n  # It may look like this: 1|0.\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3\n  typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1\n\n  ###################[ command_execution_time: duration of the last command ]###################\n  # Execution time color.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3\n  # Show duration of the last command if takes at least this many seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3\n  # Show this many fractional digits. Zero means round to seconds.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0\n  # Duration format: 1d 2h 3m 4s.\n  typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took '\n\n  #######################[ background_jobs: presence of background jobs ]#######################\n  # Background jobs color.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0\n  # Don't show the number of background jobs.\n  typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ direnv: direnv status (https://direnv.net/) ]########################\n  # Direnv color.\n  typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3\n  typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############\n  # Default asdf color. Only used to display tools for which there is no color override (see below).\n  # Tip:  Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and\n  # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND.\n  typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7\n\n  # There are four parameters that can be used to hide asdf tools. Each parameter describes\n  # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at\n  # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to\n  # hide a tool, it gets shown.\n  #\n  # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and\n  # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:\n  #\n  #   asdf local  python 3.8.1\n  #   asdf global python 3.8.1\n  #\n  # After running both commands the current python version is 3.8.1 and its source is \"local\" as\n  # it takes precedence over \"global\". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,\n  # it'll hide python version in this case because 3.8.1 is the same as the global version.\n  # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't\n  # contain \"local\".\n\n  # Hide tool versions that don't come from one of these sources.\n  #\n  # Available sources:\n  #\n  # - shell   `asdf current` says \"set by ASDF_${TOOL}_VERSION environment variable\"\n  # - local   `asdf current` says \"set by /some/not/home/directory/file\"\n  # - global  `asdf current` says \"set by /home/username/file\"\n  #\n  # Note: If this parameter is set to (shell local global), it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.\n  typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)\n\n  # If set to false, hide tool versions that are the same as global.\n  #\n  # Note: The name of this parameter doesn't reflect its meaning at all.\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.\n  typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false\n\n  # If set to false, hide tool versions that are equal to \"system\".\n  #\n  # Note: If this parameter is set to true, it won't hide tools.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.\n  typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true\n\n  # If set to non-empty value, hide tools unless there is a file matching the specified file pattern\n  # in the current directory, or its parent directory, or its grandparent directory, and so on.\n  #\n  # Note: If this parameter is set to empty value, it won't hide tools.\n  # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.\n  # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.\n  #\n  # Example: Hide nodejs version when there is no package.json and no *.js files in the current\n  # directory, in `..`, in `../..` and so on.\n  #\n  #   typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'\n  typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=\n\n  # Ruby version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Python version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Go version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Node.js version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Rust version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208\n  # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # .NET Core version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Flutter version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Lua version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Java version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1\n  typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Perl version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4\n  # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Erlang version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Elixir version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Postgres version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # PHP version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5\n  # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Haskell version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  # Julia version from asdf.\n  typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'\n\n  ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########\n  # NordVPN connection indicator color.\n  typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7\n  typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4\n  # Hide NordVPN connection indicator when not connected.\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=\n  typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################\n  # Ranger shell color.\n  typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3\n  typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  \n  ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################\n  # Yazi shell color.\n  typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3\n  typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  \n  ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################\n  # Nnn shell color.\n  typeset -g POWERLEVEL9K_NNN_FOREGROUND=0\n  typeset -g POWERLEVEL9K_NNN_BACKGROUND=6\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################\n  # lf shell color.\n  typeset -g POWERLEVEL9K_LF_FOREGROUND=0\n  typeset -g POWERLEVEL9K_LF_BACKGROUND=6\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################\n  # xplr shell color.\n  typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0\n  typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########################[ vim_shell: vim shell indicator (:sh) ]###########################\n  # Vim shell indicator color.\n  typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######\n  # Midnight Commander shell color.\n  typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3\n  typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##\n  # Nix shell color.\n  typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4\n\n  # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false\n\n  # Tip: If you want to see just the icon without \"pure\" and \"impure\", uncomment the next line.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################\n  # chezmoi shell color.\n  typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_CHEZMOI_SHELL_BACKGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ disk_usage: disk usage ]##################################\n  # Colors for different levels of disk usage.\n  typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3\n  typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1\n  # Thresholds for different levels of disk usage (percentage points).\n  typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90\n  typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95\n  # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.\n  typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########\n  # Foreground color.\n  typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0\n  # Text and color for normal (a.k.a. command) vi mode.\n  typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL\n  typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2\n  # Text and color for visual vi mode.\n  typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL\n  typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4\n  # Text and color for overtype (a.k.a. overwrite and replace) vi mode.\n  typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE\n  typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3\n  # Text and color for insert vi mode.\n  typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=\n  typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ ram: free RAM ]#######################################\n  # RAM color.\n  typeset -g POWERLEVEL9K_RAM_FOREGROUND=0\n  typeset -g POWERLEVEL9K_RAM_BACKGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################################[ swap: used swap ]######################################\n  # Swap color.\n  typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0\n  typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######################################[ load: CPU load ]######################################\n  # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.\n  typeset -g POWERLEVEL9K_LOAD_WHICH=5\n  # Load color when load is under 50%.\n  typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2\n  # Load color when load is between 50% and 70%.\n  typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0\n  typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3\n  # Load color when load is over 70%.\n  typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################\n  # Todo color.\n  typeset -g POWERLEVEL9K_TODO_FOREGROUND=0\n  typeset -g POWERLEVEL9K_TODO_BACKGROUND=8\n  # Hide todo when the total number of tasks is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true\n  # Hide todo when the number of tasks after filtering is zero.\n  typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false\n\n  # Todo format. The following parameters are available within the expansion.\n  #\n  # - P9K_TODO_TOTAL_TASK_COUNT     The total number of tasks.\n  # - P9K_TODO_FILTERED_TASK_COUNT  The number of tasks after filtering.\n  #\n  # These variables correspond to the last line of the output of `todo.sh -p ls`:\n  #\n  #   TODO: 24 of 42 tasks shown\n  #\n  # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.\n  #\n  # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############\n  # Timewarrior color.\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8\n\n  # If the tracked task is longer than 24 characters, truncate and append \"…\".\n  # Tip: To always display tasks without truncation, delete the following parameter.\n  # Tip: To hide task names and display just the icon when time tracking is enabled, set the\n  # value of the following parameter to \"\".\n  typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############\n  # Taskwarrior color.\n  typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0\n  typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6\n\n  # Taskwarrior segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_TASKWARRIOR_PENDING_COUNT   The number of pending tasks: `task +PENDING count`.\n  # - P9K_TASKWARRIOR_OVERDUE_COUNT   The number of overdue tasks: `task +OVERDUE count`.\n  #\n  # Zero values are represented as empty parameters.\n  #\n  # The default format:\n  #\n  #   '${P9K_TASKWARRIOR_OVERDUE_COUNT:+\"!$P9K_TASKWARRIOR_OVERDUE_COUNT/\"}$P9K_TASKWARRIOR_PENDING_COUNT'\n  #\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######\n  # Color when using local/global history.\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_BACKGROUND=5\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_BACKGROUND=3\n\n  # Tip: Uncomment the next two lines to hide \"local\"/\"global\" text and leave just the icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ cpu_arch: CPU architecture ]################################\n  # CPU architecture color.\n  typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0\n  typeset -g POWERLEVEL9K_CPU_ARCH_BACKGROUND=3\n\n  # Hide the segment when on a specific CPU architecture.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=\n  # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##################################[ context: user@hostname ]##################################\n  # Context color when running with privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0\n  # Context color in SSH without privileges.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0\n  # Default context color (no privileges, no SSH).\n  typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3\n  typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0\n\n  # Context format when running with privileges: user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m'\n  # Context format when in SSH without privileges: user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'\n  # Default context format (no privileges, no SSH): user@hostname.\n  typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'\n\n  # Don't show context unless running with privileges or in SSH.\n  # Tip: Remove the next line to always show context.\n  typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with '\n\n  ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###\n  # Python virtual environment color.\n  typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4\n  # Don't show Python version next to the virtual environment name.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false\n  # If set to \"false\", won't show virtualenv if pyenv is already shown.\n  # If set to \"if-different\", won't show virtualenv if it's the same as pyenv.\n  typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false\n  # Separate environment name from Python version only with a space.\n  typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ anaconda: conda environment (https://conda.io/) ]######################\n  # Anaconda environment color.\n  typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0\n  typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4\n\n  # Anaconda segment format. The following parameters are available within the expansion.\n  #\n  # - CONDA_PREFIX                 Absolute path to the active Anaconda/Miniconda environment.\n  # - CONDA_DEFAULT_ENV            Name of the active Anaconda/Miniconda environment.\n  # - CONDA_PROMPT_MODIFIER        Configurable prompt modifier (see below).\n  # - P9K_ANACONDA_PYTHON_VERSION  Current python version (python --version).\n  #\n  # CONDA_PROMPT_MODIFIER can be configured with the following command:\n  #\n  #   conda config --set env_prompt '({default_env}) '\n  #\n  # The last argument is a Python format string that can use the following variables:\n  #\n  # - prefix       The same as CONDA_PREFIX.\n  # - default_env  The same as CONDA_DEFAULT_ENV.\n  # - name         The last segment of CONDA_PREFIX.\n  # - stacked_env  Comma-separated list of names in the environment stack. The first element is\n  #                always the same as default_env.\n  #\n  # Note: '({default_env}) ' is the default value of env_prompt.\n  #\n  # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER\n  # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former\n  # is empty.\n  typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\\(}% }%\\)}:-${CONDA_PREFIX:t}}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################\n  # Pyenv color.\n  typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4\n  # Hide python version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)\n  # If set to false, hide python version if it's the same as global:\n  # $(pyenv version-name) == $(pyenv global).\n  typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide python version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true\n\n  # Pyenv segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_CONTENT                Current pyenv environment (pyenv version-name).\n  # - P9K_PYENV_PYTHON_VERSION   Current python version (python --version).\n  #\n  # The default format has the following logic:\n  #\n  # 1. Display just \"$P9K_CONTENT\" if it's equal to \"$P9K_PYENV_PYTHON_VERSION\" or\n  #    starts with \"$P9K_PYENV_PYTHON_VERSION/\".\n  # 2. Otherwise display \"$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION\".\n  typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################\n  # Goenv color.\n  typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4\n  # Hide go version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)\n  # If set to false, hide go version if it's the same as global:\n  # $(goenv version-name) == $(goenv global).\n  typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide go version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########\n  # Nodenv color.\n  typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2\n  typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0\n  # Hide node version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)\n  # If set to false, hide node version if it's the same as global:\n  # $(nodenv version-name) == $(nodenv global).\n  typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############\n  # Nvm color.\n  typeset -g POWERLEVEL9K_NVM_FOREGROUND=0\n  typeset -g POWERLEVEL9K_NVM_BACKGROUND=5\n  # If set to false, hide node version if it's the same as default:\n  # $(nvm version current) == $(nvm version default).\n  typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide node version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############\n  # Nodeenv color.\n  typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2\n  typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0\n  # Don't show Node version next to the environment name.\n  typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false\n  # Separate environment name from Node version only with a space.\n  typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##############################[ node_version: node.js version ]###############################\n  # Node version color.\n  typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7\n  typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2\n  # Show node version only when in a directory tree containing package.json.\n  typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ go_version: go version (https://golang.org) ]########################\n  # Go version color.\n  typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255\n  typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2\n  # Show go version only when in a go project subdirectory.\n  typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################\n  # Rust version color.\n  typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0\n  typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208\n  # Show rust version only when in a rust project subdirectory.\n  typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################\n  # .NET version color.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5\n  # Show .NET version only when in a .NET project subdirectory.\n  typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #####################[ php_version: php version (https://www.php.net/) ]######################\n  # PHP version color.\n  typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5\n  # Show PHP version only when in a PHP project subdirectory.\n  typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########\n  # Laravel version color.\n  typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1\n  typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############\n  # Rbenv color.\n  typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1\n  # Hide ruby version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)\n  # If set to false, hide ruby version if it's the same as global:\n  # $(rbenv version-name) == $(rbenv global).\n  typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide ruby version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ####################[ java_version: java version (https://www.java.com/) ]####################\n  # Java version color.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1\n  typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7\n  # Show java version only when in a java project subdirectory.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true\n  # Show brief version.\n  typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####\n  # Package color.\n  typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6\n\n  # Package format. The following parameters are available within the expansion.\n  #\n  # - P9K_PACKAGE_NAME     The value of `name` field in package.json.\n  # - P9K_PACKAGE_VERSION  The value of `version` field in package.json.\n  #\n  # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\\%/%%}@${P9K_PACKAGE_VERSION//\\%/%%}'\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################\n  # Rvm color.\n  typeset -g POWERLEVEL9K_RVM_FOREGROUND=0\n  typeset -g POWERLEVEL9K_RVM_BACKGROUND=240\n  # Don't show @gemset at the end.\n  typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false\n  # Don't show ruby- at the front.\n  typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############\n  # Fvm color.\n  typeset -g POWERLEVEL9K_FVM_FOREGROUND=0\n  typeset -g POWERLEVEL9K_FVM_BACKGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########\n  # Lua color.\n  typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4\n  # Hide lua version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)\n  # If set to false, hide lua version if it's the same as global:\n  # $(luaenv version-name) == $(luaenv global).\n  typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide lua version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################\n  # Java color.\n  typeset -g POWERLEVEL9K_JENV_FOREGROUND=1\n  typeset -g POWERLEVEL9K_JENV_BACKGROUND=7\n  # Hide java version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)\n  # If set to false, hide java version if it's the same as global:\n  # $(jenv version-name) == $(jenv global).\n  typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide java version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############\n  # Perl color.\n  typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4\n  # Hide perl version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)\n  # If set to false, hide perl version if it's the same as global:\n  # $(plenv version-name) == $(plenv global).\n  typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide perl version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############\n  # Perlbrew color.\n  typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67\n  # Show perlbrew version only when in a perl project subdirectory.\n  typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true\n  # Don't show \"perl-\" at the front.\n  typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############\n  # PHP color.\n  typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5\n  # Hide php version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)\n  # If set to false, hide php version if it's the same as global:\n  # $(phpenv version-name) == $(phpenv global).\n  typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide PHP version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######\n  # Scala color.\n  typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0\n  typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1\n  # Hide scala version if it doesn't come from one of these sources.\n  typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)\n  # If set to false, hide scala version if it's the same as global:\n  # $(scalaenv version-name) == $(scalaenv global).\n  typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false\n  # If set to false, hide scala version if it's equal to \"system\".\n  typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########\n  # Haskell color.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0\n  typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3\n\n  # Hide haskell version if it doesn't come from one of these sources.\n  #\n  #   shell:  version is set by STACK_YAML\n  #   local:  version is set by stack.yaml up the directory tree\n  #   global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)\n  typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)\n  # If set to false, hide haskell version if it's the same as in the implicit global project.\n  typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################[ terraform: terraform workspace (https://www.terraform.io) ]#################\n  # Don't show terraform workspace if it's literally \"default\".\n  typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false\n  # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current terraform workspace gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current terraform workspace is \"project_test\", its class is TEST because \"project_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_BACKGROUND=0\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n  typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4\n  typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0\n  # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ terraform_version: terraform version (https://www.terraform.io) ]##############\n  # Terraform version color.\n  typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4\n  typeset -g POWERLEVEL9K_TERRAFORM_VERSION_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############\n  # Show kubecontext only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show kubecontext.\n  typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'\n\n  # Kubernetes context classes for the purpose of using different colors, icons and expansions with\n  # different contexts.\n  #\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current kubernetes context gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current kubernetes context is \"deathray-testing/default\", its class is TEST\n  # because \"deathray-testing/default\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext\n  # segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # Within the expansion the following parameters are always available:\n  #\n  # - P9K_CONTENT                The content that would've been displayed if there was no content\n  #                              expansion defined.\n  # - P9K_KUBECONTEXT_NAME       The current context's name. Corresponds to column NAME in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_CLUSTER    The current context's cluster. Corresponds to column CLUSTER in the\n  #                              output of `kubectl config get-contexts`.\n  # - P9K_KUBECONTEXT_NAMESPACE  The current context's namespace. Corresponds to column NAMESPACE\n  #                              in the output of `kubectl config get-contexts`. If there is no\n  #                              namespace, the parameter is set to \"default\".\n  # - P9K_KUBECONTEXT_USER       The current context's user. Corresponds to column AUTHINFO in the\n  #                              output of `kubectl config get-contexts`.\n  #\n  # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),\n  # the following extra parameters are available:\n  #\n  # - P9K_KUBECONTEXT_CLOUD_NAME     Either \"gke\" or \"eks\".\n  # - P9K_KUBECONTEXT_CLOUD_ACCOUNT  Account/project ID.\n  # - P9K_KUBECONTEXT_CLOUD_ZONE     Availability zone.\n  # - P9K_KUBECONTEXT_CLOUD_CLUSTER  Cluster.\n  #\n  # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,\n  # if P9K_KUBECONTEXT_CLUSTER is \"gke_my-account_us-east1-a_my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=gke\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  #\n  # If P9K_KUBECONTEXT_CLUSTER is \"arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01\":\n  #\n  #   - P9K_KUBECONTEXT_CLOUD_NAME=eks\n  #   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012\n  #   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1\n  #   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n  typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=\n  # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'\n  # Append the current context's namespace if it's not \"default\".\n  POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'\n\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at '\n\n  #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#\n  # Show aws only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show aws.\n  typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current AWS profile gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       DEFAULT)\n  #\n  # If your current AWS profile is \"company_test\", its class is TEST\n  # because \"company_test\" doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AWS_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'       DEFAULT)\n  typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7\n  typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1\n  # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # AWS segment format. The following parameters are available within the expansion.\n  #\n  # - P9K_AWS_PROFILE  The name of the current AWS profile.\n  # - P9K_AWS_REGION   The region associated with the current AWS profile.\n  typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\\%/%%}}'\n\n  #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#\n  # AWS Elastic Beanstalk environment color.\n  typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2\n  typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########\n  # Show azure only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show azure.\n  typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt'\n\n  # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element\n  # in each pair defines a pattern against which the current azure account name gets matched.\n  # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n  # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,\n  # you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The\n  # first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n  #     '*prod*'  PROD\n  #     '*test*'  TEST\n  #     '*'       OTHER)\n  #\n  # If your current azure account is \"company_test\", its class is TEST because \"company_test\"\n  # doesn't match the pattern '*prod*' but does match '*test*'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_BACKGROUND=0\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n  typeset -g POWERLEVEL9K_AZURE_CLASSES=(\n      # '*prod*'  PROD    # These values are examples that are unlikely\n      # '*test*'  TEST    # to match your needs. Customize them as needed.\n      '*'         OTHER)\n\n  # Azure account name color.\n  typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7\n  typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########\n  # Show gcloud only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show gcloud.\n  typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'\n  # Google cloud color.\n  typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7\n  typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4\n\n  # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or\n  # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative\n  # enough. You can use the following parameters in the expansions. Each of them corresponds to the\n  # output of `gcloud` tool.\n  #\n  #   Parameter                | Source\n  #   -------------------------|--------------------------------------------------------------------\n  #   P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'\n  #   P9K_GCLOUD_ACCOUNT       | gcloud config get-value account\n  #   P9K_GCLOUD_PROJECT_ID    | gcloud config get-value project\n  #   P9K_GCLOUD_PROJECT_NAME  | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.\n  #\n  # Obtaining project name requires sending a request to Google servers. This can take a long time\n  # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud\n  # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets\n  # set and gcloud prompt segment transitions to state COMPLETE.\n  #\n  # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL\n  # and COMPLETE. You can also hide gcloud in state PARTIAL by setting\n  # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and\n  # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.\n  typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\\%/%%}'\n  typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\\%/%%}'\n\n  # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name\n  # this often. Negative value disables periodic polling. In this mode project name is retrieved\n  # only when the current configuration, account or project id changes.\n  typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60\n\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#\n  # Show google_app_cred only when the command you are typing invokes one of these tools.\n  # Tip: Remove the next line to always show google_app_cred.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt'\n\n  # Google application credentials classes for the purpose of using different colors, icons and\n  # expansions with different credentials.\n  #\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first\n  # element in each pair defines a pattern against which the current kubernetes context gets\n  # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion\n  # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION\n  # parameters, you'll see this value in your prompt. The second element of each pair in\n  # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.\n  # The first match wins.\n  #\n  # For example, given these settings:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n  #     '*:*prod*:*'  PROD\n  #     '*:*test*:*'  TEST\n  #     '*'           DEFAULT)\n  #\n  # If your current Google application credentials is \"service_account deathray-testing x@y.com\",\n  # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.\n  #\n  # You can define different colors, icons and content expansions for different classes:\n  #\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  #   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n      # '*:*prod*:*'  PROD    # These values are examples that are unlikely\n      # '*:*test*:*'  TEST    # to match your needs. Customize them as needed.\n      '*'             DEFAULT)\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4\n  # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by\n  # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n  #\n  # You can use the following parameters in the expansion. Each of them corresponds to one of the\n  # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.\n  #\n  #   Parameter                        | JSON key file field\n  #   ---------------------------------+---------------\n  #   P9K_GOOGLE_APP_CRED_TYPE         | type\n  #   P9K_GOOGLE_APP_CRED_PROJECT_ID   | project_id\n  #   P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email\n  #\n  # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.\n  typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\\%/%%}'\n\n  ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############\n  # Toolbox color.\n  typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=0\n  typeset -g POWERLEVEL9K_TOOLBOX_BACKGROUND=3\n  # Don't display the name of the toolbox if it matches fedora-toolbox-*.\n  typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in '\n\n  ###############################[ public_ip: public IP address ]###############################\n  # Public IP color.\n  typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7\n  typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ########################[ vpn_ip: virtual private network indicator ]#########################\n  # VPN IP color.\n  typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0\n  typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6\n  # When on VPN, show just an icon without the IP address.\n  # Tip: To display the private IP address when on VPN, remove the next line.\n  typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=\n  # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN\n  # to see the name of the interface.\n  typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'\n  # If set to true, show one segment per matching network interface. If set to false, show only\n  # one segment corresponding to the first matching network interface.\n  # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.\n  typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########\n  # IP color.\n  typeset -g POWERLEVEL9K_IP_BACKGROUND=4\n  typeset -g POWERLEVEL9K_IP_FOREGROUND=0\n  # The following parameters are accessible within the expansion:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+-------------------------------------------\n  #   P9K_IP_IP             | IP address\n  #   P9K_IP_INTERFACE      | network interface\n  #   P9K_IP_RX_BYTES       | total number of bytes received\n  #   P9K_IP_TX_BYTES       | total number of bytes sent\n  #   P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt\n  #   P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt\n  #   P9K_IP_RX_RATE        | receive rate (since last prompt)\n  #   P9K_IP_TX_RATE        | send rate (since last prompt)\n  typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP'\n  # Show information for the first network interface whose name matches this regular expression.\n  # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.\n  typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  #########################[ proxy: system-wide http/https/ftp proxy ]##########################\n  # Proxy color.\n  typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4\n  typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  ################################[ battery: internal battery ]#################################\n  # Show battery in red when it's below this level and not connected to power supply.\n  typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20\n  typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1\n  # Show battery in green when it's charging or fully charged.\n  typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2\n  # Show battery in yellow when it's discharging.\n  typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3\n  # Battery pictograms going from low to high level of charge.\n  typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')\n  # Don't show the remaining time to charge/discharge.\n  typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false\n  typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0\n\n  #####################################[ wifi: wifi speed ]#####################################\n  # WiFi color.\n  typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0\n  typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).\n  #\n  #   # Wifi colors and icons for different signal strength levels (low to high).\n  #   typeset -g my_wifi_fg=(0 0 0 0 0)                                # <-- change these values\n  #   typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi')     # <-- change these values\n  #\n  #   typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'\n  #   typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'\n  #\n  # The following parameters are accessible within the expansions:\n  #\n  #   Parameter             | Meaning\n  #   ----------------------+---------------\n  #   P9K_WIFI_SSID         | service set identifier, a.k.a. network name\n  #   P9K_WIFI_LINK_AUTH    | authentication protocol such as \"wpa2-psk\" or \"none\"; empty if unknown\n  #   P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second\n  #   P9K_WIFI_RSSI         | signal strength in dBm, from -120 to 0\n  #   P9K_WIFI_NOISE        | noise in dBm, from -120 to 0\n  #   P9K_WIFI_BARS         | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)\n\n  ####################################[ time: current time ]####################################\n  # Current time color.\n  typeset -g POWERLEVEL9K_TIME_FOREGROUND=0\n  typeset -g POWERLEVEL9K_TIME_BACKGROUND=7\n  # Format for the current time: 09:51:02. See `man 3 strftime`.\n  typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'\n  # If set to true, time will update when you hit enter. This way prompts for the past\n  # commands will contain the start times of their commands as opposed to the default\n  # behavior where they contain the end times of their preceding commands.\n  typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false\n  # Custom icon.\n  # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n  # Custom prefix.\n  # typeset -g POWERLEVEL9K_TIME_PREFIX='at '\n\n  # Example of a user-defined prompt segment. Function prompt_example will be called on every\n  # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or\n  # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background\n  # greeting the user.\n  #\n  # Type `p10k help segment` for documentation and a more sophisticated example.\n  function prompt_example() {\n    p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n'\n  }\n\n  # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job\n  # is to generate the prompt segment for display in instant prompt. See\n  # https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #\n  # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function\n  # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k\n  # will replay these calls without actually calling instant_prompt_*. It is imperative that\n  # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this\n  # rule is not observed, the content of instant prompt will be incorrect.\n  #\n  # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If\n  # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.\n  function instant_prompt_example() {\n    # Since prompt_example always makes the same `p10k segment` calls, we can call it from\n    # instant_prompt_example. This will give us the same `example` prompt segment in the instant\n    # and regular prompts.\n    prompt_example\n  }\n\n  # User-defined prompt segments can be customized the same way as built-in segments.\n  typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3\n  typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1\n  # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n  # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt\n  # when accepting a command line. Supported values:\n  #\n  #   - off:      Don't change prompt when accepting a command line.\n  #   - always:   Trim down prompt when accepting a command line.\n  #   - same-dir: Trim down prompt when accepting a command line unless this is the first command\n  #               typed after changing current working directory.\n  typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n  # Instant prompt mode.\n  #\n  #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found\n  #              it incompatible with your zsh configuration files.\n  #   - quiet:   Enable instant prompt and don't print warnings when detecting console output\n  #              during zsh initialization. Choose this if you've read and understood\n  #              https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #   - verbose: Enable instant prompt and print a warning when detecting console output during\n  #              zsh initialization. Choose this if you've never tried instant prompt, haven't\n  #              seen the warning, or if you are unsure what this all means.\n  typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n  # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n  # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n  # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n  # really need it.\n  typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n  # If p10k is already loaded, reload configuration.\n  # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n  (( ! $+functions[p10k] )) || p10k reload\n}\n\n# Tell `p10k configure` which file it should overwrite.\ntypeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'\n"
  },
  {
    "path": "config/p10k-robbyrussell.zsh",
    "content": "# Config file for Powerlevel10k with the style of robbyrussell theme from Oh My Zsh.\n#\n# Original: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#robbyrussell.\n#\n# Replication of robbyrussell theme is exact. The only observable difference is in\n# performance. Powerlevel10k prompt is very fast everywhere, even in large Git repositories.\n#\n# Usage: Source this file either before or after loading Powerlevel10k.\n#\n#   source ~/powerlevel10k/config/p10k-robbyrussell.zsh\n#   source ~/powerlevel10k/powerlevel10k.zsh-theme\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases'         ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n  emulate -L zsh -o extended_glob\n\n  # Unset all configuration options.\n  unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'\n\n  # Zsh >= 5.1 is required.\n  [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return\n\n  # Left prompt segments.\n  typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(prompt_char dir vcs)\n  # Right prompt segments.\n  typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()\n\n  # Basic style options that define the overall prompt look.\n  typeset -g POWERLEVEL9K_BACKGROUND=                            # transparent background\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE=  # no surrounding whitespace\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' '  # separate segments with a space\n  typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR=        # no end-of-line symbol\n  typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION=           # no segment icons\n\n  # Green prompt symbol if the last command succeeded.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=green\n  # Red prompt symbol if the last command failed.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=red\n  # Prompt symbol: bold arrow.\n  typeset -g POWERLEVEL9K_PROMPT_CHAR_CONTENT_EXPANSION='%B➜ '\n\n  # Cyan current directory.\n  typeset -g POWERLEVEL9K_DIR_FOREGROUND=cyan\n  # Show only the last segment of the current directory.\n  typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_last\n  # Bold directory.\n  typeset -g POWERLEVEL9K_DIR_CONTENT_EXPANSION='%B$P9K_CONTENT'\n\n  # Git status formatter.\n  function my_git_formatter() {\n    emulate -L zsh\n    if [[ -n $P9K_CONTENT ]]; then\n      # If P9K_CONTENT is not empty, it's either \"loading\" or from vcs_info (not from\n      # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.\n      typeset -g my_git_format=$P9K_CONTENT\n    else\n      # Use VCS_STATUS_* parameters to assemble Git status. See reference:\n      # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.\n      typeset -g my_git_format=\"${1+%B%4F}git:(${1+%1F}\"\n      my_git_format+=${${VCS_STATUS_LOCAL_BRANCH:-${VCS_STATUS_COMMIT[1,8]}}//\\%/%%}\n      my_git_format+=\"${1+%4F})\"\n      if (( VCS_STATUS_NUM_CONFLICTED || VCS_STATUS_NUM_STAGED ||\n            VCS_STATUS_NUM_UNSTAGED   || VCS_STATUS_NUM_UNTRACKED )); then\n        my_git_format+=\" ${1+%3F}✗\"\n      fi\n    fi\n  }\n  functions -M my_git_formatter 2>/dev/null\n\n  # Disable the default Git status formatting.\n  typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true\n  # Install our own Git status formatter.\n  typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'\n  typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}'\n  # Grey Git status when loading.\n  typeset -g POWERLEVEL9K_VCS_LOADING_FOREGROUND=246\n\n  # Instant prompt mode.\n  #\n  #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found\n  #              it incompatible with your zsh configuration files.\n  #   - quiet:   Enable instant prompt and don't print warnings when detecting console output\n  #              during zsh initialization. Choose this if you've read and understood\n  #              https://github.com/romkatv/powerlevel10k#instant-prompt.\n  #   - verbose: Enable instant prompt and print a warning when detecting console output during\n  #              zsh initialization. Choose this if you've never tried instant prompt, haven't\n  #              seen the warning, or if you are unsure what this all means.\n  typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n  # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n  # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n  # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n  # really need it.\n  typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n  # If p10k is already loaded, reload configuration.\n  # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n  (( ! $+functions[p10k] )) || p10k reload\n}\n\n# Tell `p10k configure` which file it should overwrite.\ntypeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'\n"
  },
  {
    "path": "font.md",
    "content": "# Recommended font: Meslo Nerd Font patched for Powerlevel10k\n\nGorgeous monospace font designed by Jim Lyles for Bitstream, customized by the same for Apple,\nfurther customized by André Berg, and finally patched by yours truly with customized scripts\noriginally developed by Ryan L McIntyre of Nerd Fonts. Contains all glyphs and symbols that\nPowerlevel10k may need. Battle-tested in dozens of different terminals on all major operating\nsystems.\n\n*FAQ*: [How was the recommended font created?](README.md#how-was-the-recommended-font-created)\n\n## Automatic font installation\n\nIf you are using iTerm2 or Termux, `p10k configure` can install the recommended font for you.\nSimply answer `Yes` when asked whether to install *Meslo Nerd Font*.\n\nIf you are using a different terminal, proceed with manual font installation. 👇\n\n## Manual font installation\n\n1. Download these four ttf files:\n   - [MesloLGS NF Regular.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)\n   - [MesloLGS NF Bold.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)\n   - [MesloLGS NF Italic.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)\n   - [MesloLGS NF Bold Italic.ttf](\n       https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)\n1. Double-click on each file and click \"Install\". This will make `MesloLGS NF` font available to all\n   applications on your system.\n1. Configure your terminal to use this font:\n   - **iTerm2**: Type `p10k configure` and answer `Yes` when asked whether to install\n     *Meslo Nerd Font*. Alternatively, open *iTerm2 → Preferences → Profiles → Text* and set *Font* to\n     `MesloLGS NF`.\n   - **Apple Terminal**: Open *Terminal → Preferences → Profiles → Text*, click *Change* under *Font*\n     and select `MesloLGS NF` family.\n   - **Hyper**: Open *Hyper → Edit → Preferences* and change the value of `fontFamily` under\n     `module.exports.config` to `MesloLGS NF`.\n   - **Visual Studio Code**: Open *File → Preferences → Settings* (PC) or\n     *Code → Preferences → Settings* (Mac), enter `terminal.integrated.fontFamily` in the search box at\n     the top of *Settings* tab and set the value below to `MesloLGS NF`.\n     Consult [this screenshot](\n       https://raw.githubusercontent.com/romkatv/powerlevel10k-media/389133fb8c9a2347929a23702ce3039aacc46c3d/visual-studio-code-font-settings.jpg)\n     to see how it should look like or see [this issue](\n       https://github.com/romkatv/powerlevel10k/issues/671) for extra information.\n\n     Note that software installed via [Snap](https://en.wikipedia.org/wiki/Snap_\\(software\\)) is\n     unable to use system fonts. If you've install Visual Studio Code via Snap, remove it by running\n     `sudo snap remove code` and install the official `.deb` build from the\n     [Visual Studio Code website](https://code.visualstudio.com/Download).\n   - **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the\n     selected profile under *Profiles*. Check *Custom font* under *Text Appearance* and select\n     `MesloLGS NF Regular`.\n   - **Konsole**: Open *Settings → Edit Current Profile → Appearance*, click *Select Font* and select\n     `MesloLGS NF Regular`.\n   - **Tilix**: Open *Tilix → Preferences* and click on the selected profile under *Profiles*. Check\n     *Custom font* under *Text Appearance* and select `MesloLGS NF Regular`.\n   - **Windows Console Host** (the old thing): Click the icon in the top left corner, then\n     *Properties → Font* and set *Font* to `MesloLGS NF`.\n   - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click\n     either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set\n     *Font face* to `MesloLGS NF`.\n   - **Conemu**: Open *Setup → General → Fonts* and set *Main console font* to `MesloLGS NF`.\n   - **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →\n     Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font\n     name to `MesloLGS NF`.\n   - **Termux**: Type `p10k configure` and answer `Yes` when asked whether to install\n     *Meslo Nerd Font*.\n   - **Blink**: Type `config`, go to *Appearance*, tap *Add a new font*, tap *Open Gallery*, select\n     *MesloLGS NF.css*, tap *import* and type `exit` in the home view to reload the font.\n   - **Tabby** (formerly **Terminus**): Open *Settings → Appearance* and set *Font* to `MesloLGS NF`.\n   - **Terminator**: Open *Preferences* using the context menu. Under *Profiles* select the *General*\n     tab (should be selected already), uncheck *Use the system fixed width font* (if not already)\n     and select `MesloLGS NF Regular`. Exit the Preferences dialog by clicking *Close*.\n   - **Guake**: Right Click on an open terminal and open *Preferences*. Under *Appearance*\n     tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.\n     Exit the Preferences dialog by clicking *Close*.\n   - **MobaXterm**: Open *Settings* → *Configuration* → *Terminal* → (under *Terminal look and feel*)\n     and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each\n     of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal\n     Settings* → *Font settings*.\n   - **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable\n     *Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.\n     To change the font for the remote host connections, go to *Preferences → Terminal Options →\n     Look and Feel* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.\n   - **Warp**: Open Warp and Navigate to *Settings* then *Appearance*.  Scroll down to *Text* Section\n     and under *\"Terminal Font\"*, select the `MesloLGS NF` font.\n   - **WSLtty**: Right click on an open terminal and then on *Options*. In the *Text* section, under\n     *Font*, click *\"Select...\"* and set Font to `MesloLGS NF Regular`.\n   - **Yakuake**: Click *≡* → *Manage Profiles* → *New* → *Appearance*. Click *Choose* next to the\n     *Font* dropdown, select `MesloLGS NF` and click *OK*. Click *OK* to save the profile. Select the\n     new profile and click *Set as Default*.\n   - **Alacritty**: Create or open `~/.config/alacritty/alacritty.toml` and add the following\n     section to it:\n     ```toml\n     [font.normal]\n     family = \"MesloLGS NF\"\n     ```\n   - **foot**: Create or open `~/.config/foot/foot.ini` and add the following section to it:\n     ```ini\n     font=MesloLGS NF:size=12\n     ```\n   - **kitty**: Create or open `~/.config/kitty/kitty.conf` and add the following line to it:\n     ```text\n     font_family MesloLGS NF\n     ```\n     Restart kitty by closing all sessions and opening a new session.\n   - **puTTY**: Set *Window* → *Appearance* → *Font* to `MesloLGS NF`. Requires puTTY\n     version >= 0.75.\n   - **WezTerm**: Create or open `$HOME/.config/wezterm/wezterm.lua` and add the following:\n     ```lua\n     local wezterm = require 'wezterm';\n     return {\n         font = wezterm.font(\"MesloLGS NF\"),\n     }\n     ```\n     If the file already exists, only add the line with the font to the existing return.\n     Also add the first line if it is not already present.\n   - **urxvt**: Create or open `~/.Xresources` and add the following line to it:\n     ```text\n     URxvt.font: xft:MesloLGS NF:size=11\n     ```\n     You can adjust the font size to your preference. After changing the config run\n     `xrdb ~/.Xresources` to reload it. The new config is applied to all new terminals.\n   - **xterm**: Create or open `~/.Xresources` and add the following line to it:\n     ```text\n     xterm*faceName: MesloLGS NF\n     ```\n     After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to\n     all new terminals.\n   - **Zed**: Open `~/.config/zed/settings.json` and set `terminal.font_family` to `\"MesloLGS NF\"`.\n     ```jsonc\n     {\n       \"terminal\": {\n         \"font_family\": \"MesloLGS NF\"\n       },\n       // Other settings.\n     }\n     ```\n   - Crostini (Linux on Chrome OS): Open\n     chrome-untrusted://terminal/html/nassh_preferences_editor.html, set *Text font family* to\n      `'MesloLGS NF'` (including the quotes) and *Custom CSS (inline text)* to the following:\n     ```css\n     @font-face {\n      font-family: \"MesloLGS NF\";\n      src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf\");\n      font-weight: normal;\n      font-style: normal;\n     }\n     @font-face {\n         font-family: \"MesloLGS NF\";\n         src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf\");\n         font-weight: bold;\n         font-style: normal;\n     }\n     @font-face {\n         font-family: \"MesloLGS NF\";\n         src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf\");\n         font-weight: normal;\n         font-style: italic;\n     }\n     @font-face {\n         font-family: \"MesloLGS NF\";\n         src: url(\"https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf\");\n         font-weight: bold;\n         font-style: italic;\n     }\n     ```\n     **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.\n   - **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section\n     to it:\n     ```ini\n     [basic.interface.font]\n     value = \"MesloLGS NF\"\n     ```\n   - **Ghostty**: Open *Menu → Open Configuration* (Linux) or *Ghostty → Settings...* (Mac) and add\n     the following line:\n     ```text\n     font-family = \"MesloLGS NF\"\n     ```\n1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work\n   incorrectly with the new font.\n\n_Using a different terminal and know how to set the font for it? Share your knowledge by sending a\nPR to expand the list!_\n"
  },
  {
    "path": "gitstatus/.clang-format",
    "content": "BasedOnStyle: Google\nColumnLimit: 100\nDerivePointerAlignment: false\nPointerAlignment: Left\n"
  },
  {
    "path": "gitstatus/.gitattributes",
    "content": "* text=auto\n\n*.cc   text eol=lf\n*.h    text eol=lf\n*.info text eol=lf\n*.json text eol=lf\n*.md   text eol=lf\n*.sh   text eol=lf\n*.zsh  text eol=lf\n\n/.clang-format text eol=lf\n/LICENSE       text eol=lf\n/Makefile      text eol=lf\n/build         text eol=lf\n/install       text eol=lf\n/mbuild        text eol=lf\n"
  },
  {
    "path": "gitstatus/.gitignore",
    "content": "*.zwc\n/core\n/deps/libgit2-*.tar.gz\n/locks\n/logs\n/obj\n/usrbin/gitstatusd*\n/.vscode/ipch\n"
  },
  {
    "path": "gitstatus/.vscode/c_cpp_properties.json",
    "content": "{\n    \"configurations\": [\n        {\n            \"name\": \"Linux\",\n            \"includePath\": [\n                \"${workspaceFolder}/src\"\n            ],\n            \"defines\": [\n            ],\n            \"compilerPath\": \"/usr/bin/g++\",\n            \"cStandard\": \"c11\",\n            \"cppStandard\": \"c++17\",\n            \"intelliSenseMode\": \"gcc-x64\"\n        }\n    ],\n    \"version\": 4\n}\n"
  },
  {
    "path": "gitstatus/.vscode/settings.json",
    "content": "{\n  \"files.exclude\": {\n    \"*.zwc\": true,\n    \"core\": true,\n    \"locks/\": true,\n    \"logs/\": true,\n    \"obj/\": true,\n    \"usrbin/\": true,\n  },\n  \"files.associations\": {\n    \"array\": \"cpp\",\n    \"atomic\": \"cpp\",\n    \"*.tcc\": \"cpp\",\n    \"cctype\": \"cpp\",\n    \"chrono\": \"cpp\",\n    \"clocale\": \"cpp\",\n    \"cmath\": \"cpp\",\n    \"complex\": \"cpp\",\n    \"condition_variable\": \"cpp\",\n    \"cstddef\": \"cpp\",\n    \"cstdint\": \"cpp\",\n    \"cstdio\": \"cpp\",\n    \"cstdlib\": \"cpp\",\n    \"cstring\": \"cpp\",\n    \"ctime\": \"cpp\",\n    \"cwchar\": \"cpp\",\n    \"cwctype\": \"cpp\",\n    \"deque\": \"cpp\",\n    \"unordered_map\": \"cpp\",\n    \"unordered_set\": \"cpp\",\n    \"vector\": \"cpp\",\n    \"exception\": \"cpp\",\n    \"fstream\": \"cpp\",\n    \"functional\": \"cpp\",\n    \"future\": \"cpp\",\n    \"initializer_list\": \"cpp\",\n    \"iomanip\": \"cpp\",\n    \"iosfwd\": \"cpp\",\n    \"iostream\": \"cpp\",\n    \"istream\": \"cpp\",\n    \"limits\": \"cpp\",\n    \"memory\": \"cpp\",\n    \"mutex\": \"cpp\",\n    \"new\": \"cpp\",\n    \"numeric\": \"cpp\",\n    \"optional\": \"cpp\",\n    \"ostream\": \"cpp\",\n    \"ratio\": \"cpp\",\n    \"sstream\": \"cpp\",\n    \"stdexcept\": \"cpp\",\n    \"streambuf\": \"cpp\",\n    \"string_view\": \"cpp\",\n    \"system_error\": \"cpp\",\n    \"thread\": \"cpp\",\n    \"type_traits\": \"cpp\",\n    \"tuple\": \"cpp\",\n    \"typeinfo\": \"cpp\",\n    \"utility\": \"cpp\",\n    \"variant\": \"cpp\",\n    \"cstdarg\": \"cpp\",\n    \"charconv\": \"cpp\",\n    \"algorithm\": \"cpp\",\n    \"cinttypes\": \"cpp\",\n    \"iterator\": \"cpp\",\n    \"map\": \"cpp\",\n    \"memory_resource\": \"cpp\",\n    \"random\": \"cpp\",\n    \"string\": \"cpp\",\n    \"bit\": \"cpp\",\n    \"netfwd\": \"cpp\"\n  }\n}\n"
  },
  {
    "path": "gitstatus/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "gitstatus/Makefile",
    "content": "APPNAME ?= gitstatusd\nOBJDIR ?= obj\n\nCXX ?= g++\nZSH := $(shell command -v zsh 2> /dev/null)\n\nVERSION ?= $(shell . ./build.info && printf \"%s\" \"$$gitstatus_version\")\n\n# Note: -fsized-deallocation is not used to avoid binary compatibility issues on macOS.\n#\n# Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is\n# missing in macOS prior to 10.13.\nCXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) # -Wall -g -fsanitize=thread\nLDFLAGS += -pthread # -fsanitize=thread\nLDLIBS += -lgit2 # -lprofiler -lunwind\n\nSRCS := $(shell find src -name \"*.cc\")\nOBJS := $(patsubst src/%.cc, $(OBJDIR)/%.o, $(SRCS))\n\nall: $(APPNAME)\n\n$(APPNAME): usrbin/$(APPNAME)\n\nusrbin/$(APPNAME): $(OBJS)\n\t$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@\n\n$(OBJDIR):\n\tmkdir -p -- $(OBJDIR)\n\n$(OBJDIR)/%.o: src/%.cc Makefile build.info | $(OBJDIR)\n\t$(CXX) $(CXXFLAGS) -MM -MT $@ src/$*.cc >$(OBJDIR)/$*.dep\n\t$(CXX) $(CXXFLAGS) -Wall -c -o $@ src/$*.cc\n\nclean:\n\trm -rf -- $(OBJDIR)\n\nzwc:\n\t$(or $(ZSH),:) -fc 'for f in *.zsh install; do zcompile -R -- $$f.zwc $$f || exit; done'\n\nminify:\n\trm -rf -- .clang-format .git .gitattributes .gitignore .vscode deps docs src usrbin/.gitkeep LICENSE Makefile README.md build mbuild\n\npkg: zwc\n\tGITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f\n\n-include $(OBJS:.o=.dep)\n\n.PHONY: help\n\nhelp:\n\t@echo \"Usage: make [TARGET]\"\n\t@echo \"Available targets:\"\n\t@echo \"  all         Build $(APPNAME) (default target)\"\n\t@echo \"  clean       Remove generated files and directories\"\n\t@echo \"  zwc         Compile Zsh files\"\n\t@echo \"  minify      Remove unnecessary files and folders\"\n\t@echo \"  pkg         Create a package\"\n"
  },
  {
    "path": "gitstatus/README.md",
    "content": "# gitstatus\n\n- **THE PROJECT HAS VERY LIMITED SUPPORT**\n- **NO NEW FEATURES ARE IN THE WORKS**\n- **MOST BUGS WILL GO UNFIXED**\n\n**gitstatus** is a 10x faster alternative to `git status` and `git describe`. Its primary use\ncase is to enable fast git prompt in interactive shells.\n\nHeavy lifting is done by **gitstatusd** -- a custom binary written in C++. It comes with Zsh and\nBash bindings for integration with shell.\n\n## Table of Contents\n\n1. [Using from Zsh](#using-from-zsh)\n1. [Using from Bash](#using-from-bash)\n2. [Using from other shells](#using-from-other-shells)\n1. [How it works](#how-it-works)\n1. [Benchmarks](#benchmarks)\n1. [Why fast](#why-fast)\n1. [Requirements](#requirements)\n1. [Compiling](#compiling)\n1. [License](#license)\n\n## Using from Zsh\n\nThe easiest way to take advantage of gitstatus from Zsh is to use a theme that's already integrated\nwith it. For example, [Powerlevel10k](https://github.com/romkatv/powerlevel10k) is a flexible and\nfast theme with first-class gitstatus integration. If you install Powerlevel10k, you don't need to\ninstall gitstatus.\n\n![Powerlevel10k Zsh Theme](\n  https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-styles-high-contrast.png)\n\nFor those who wish to use gitstatus without a theme, there is\n[gitstatus.prompt.zsh](gitstatus.prompt.zsh). Install it as follows:\n\n```zsh\ngit clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus\necho 'source ~/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc\n```\n\nUsers in China can use the official mirror on gitee.com for faster download.<br>\n中国大陆用户可以使用 gitee.com 上的官方镜像加速下载.\n\n```zsh\ngit clone --depth=1 https://gitee.com/romkatv/gitstatus.git ~/gitstatus\necho 'source ~/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc\n```\n\nAlternatively, if you have Homebrew installed:\n\n```zsh\nbrew install romkatv/gitstatus/gitstatus\necho \"source $(brew --prefix)/opt/gitstatus/gitstatus.prompt.zsh\" >>! ~/.zshrc\n```\n\n(If you choose this option, replace `~/gitstatus` with `$(brew --prefix)/opt/gitstatus/gitstatus`\nin all code snippets below.)\n\n_Make sure to disable your current theme if you have one._\n\nThis will give you a basic yet functional prompt with git status in it. It's\n[over 10x faster](#benchmarks) than any alternative that can give you comparable prompt. In order\nto customize it, set `PROMPT` and/or `RPROMPT` at the end of `~/.zshrc` after sourcing\n`gitstatus.prompt.zsh`. Insert `${GITSTATUS_PROMPT}` where you want git status to go. For example:\n\n```zsh\nsource ~/gitstatus/gitstatus.prompt.zsh\n\nPROMPT='%~%# '               # left prompt: directory followed by %/# (normal/root)\nRPROMPT='$GITSTATUS_PROMPT'  # right prompt: git status\n```\n\nThe expansion of `${GITSTATUS_PROMPT}` can contain the following bits:\n\n| segment     |  meaning                                              |\n|-------------|-------------------------------------------------------|\n| `master`    | current branch                                        |\n| `#v1`       | HEAD is tagged with `v1`; not shown when on a branch  |\n| `@5fc6fca4` | current commit; not shown when on a branch or tag     |\n| `⇣1`        | local branch is behind the remote by 1 commit         |\n| `⇡2`        | local branch is ahead of the remote by 2 commits      |\n| `⇠3`        | local branch is behind the push remote by 3 commits   |\n| `⇢4`        | local branch is ahead of the push remote by 4 commits |\n| `*5`        | there are 5 stashes                                   |\n| `merge`     | merge is in progress (could be some other action)     |\n| `~6`        | there are 6 merge conflicts                           |\n| `+7`        | there are 7 staged changes                            |\n| `!8`        | there are 8 unstaged changes                          |\n| `?9`        | there are 9 untracked files                           |\n\n`$GITSTATUS_PROMPT_LEN` tells you how long `$GITSTATUS_PROMPT` is when printed to the console.\n[gitstatus.prompt.zsh](gitstatus.prompt.zsh) has an example of using it to truncate the current\ndirectory.\n\nIf you'd like to change the format of git status, or want to have greater control over the\nprocess of assembling `PROMPT`, you can copy and modify parts of\n[gitstatus.prompt.zsh](gitstatus.prompt.zsh) instead of sourcing the script. Your `~/.zshrc`\nmight look something like this:\n\n```zsh\nsource ~/gitstatus/gitstatus.plugin.zsh\n\nfunction my_set_prompt() {\n  PROMPT='%~%# '\n  RPROMPT=''\n\n  if gitstatus_query MY && [[ $VCS_STATUS_RESULT == ok-sync ]]; then\n    RPROMPT=${${VCS_STATUS_LOCAL_BRANCH:-@${VCS_STATUS_COMMIT}}//\\%/%%}  # escape %\n    (( VCS_STATUS_NUM_STAGED    )) && RPROMPT+='+'\n    (( VCS_STATUS_NUM_UNSTAGED  )) && RPROMPT+='!'\n    (( VCS_STATUS_NUM_UNTRACKED )) && RPROMPT+='?'\n  fi\n\n  setopt no_prompt_{bang,subst} prompt_percent  # enable/disable correct prompt expansions\n}\n\ngitstatus_stop 'MY' && gitstatus_start -s -1 -u -1 -c -1 -d -1 'MY'\nautoload -Uz add-zsh-hook\nadd-zsh-hook precmd my_set_prompt\n```\n\nThis snippet is sourcing `gitstatus.plugin.zsh` rather than `gitstatus.prompt.zsh`. The former\ndefines low-level bindings that communicate with gitstatusd over pipes. The latter is a simple\nscript that uses these bindings to assemble git prompt.\n\nUnlike [Powerlevel10k](https://github.com/romkatv/powerlevel10k), code based on\n[gitstatus.prompt.zsh](gitstatus.prompt.zsh) is communicating with gitstatusd synchronously. This\ncan make your prompt slow when working in a large git repository or on a slow machine. To avoid\nthis problem, call `gitstatus_query` asynchronously as documented in\n[gitstatus.plugin.zsh](gitstatus.plugin.zsh). This can be quite challenging.\n\n## Using from Bash\n\nThe easiest way to take advantage of gitstatus from Bash is via\n[gitstatus.prompt.sh](gitstatus.prompt.sh). Install it as follows:\n\n```bash\ngit clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus\necho 'source ~/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc\n```\n\nUsers in China can use the official mirror on gitee.com for faster download.<br>\n中国大陆用户可以使用 gitee.com 上的官方镜像加速下载.\n\n```bash\ngit clone --depth=1 https://gitee.com/romkatv/gitstatus.git ~/gitstatus\necho 'source ~/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc\n```\n\nAlternatively, if you have Homebrew installed:\n\n```zsh\nbrew install romkatv/gitstatus/gitstatus\necho \"source $(brew --prefix)/opt/gitstatus/gitstatus.prompt.sh\" >> ~/.bashrc\n```\n\n(If you choose this option, replace `~/gitstatus` with `$(brew --prefix)/opt/gitstatus/gitstatus`\nin all code snippets below.)\n\nThis will give you a basic yet functional prompt with git status in it. It's\n[over 10x faster](#benchmarks) than any alternative that can give you comparable prompt.\n\n![Bash Prompt with GitStatus](\n  https://raw.githubusercontent.com/romkatv/gitstatus/1ac366952366d89980b3f3484f270b4fa5ae4293/bash-prompt.png)\n\nIn order to customize your prompt, set `PS1` at the end of `~/.bashrc` after sourcing\n`gitstatus.prompt.sh`. Insert `${GITSTATUS_PROMPT}` where you want git status to go. For example:\n\n```bash\nsource ~/gitstatus/gitstatus.prompt.sh\n\nPS1='\\w ${GITSTATUS_PROMPT}\\n\\$ ' # directory followed by git status and $/# (normal/root)\n```\n\nThe expansion of `${GITSTATUS_PROMPT}` can contain the following bits:\n\n| segment     |  meaning                                              |\n|-------------|-------------------------------------------------------|\n| `master`    | current branch                                        |\n| `#v1`       | HEAD is tagged with `v1`; not shown when on a branch  |\n| `@5fc6fca4` | current commit; not shown when on a branch or tag     |\n| `⇣1`        | local branch is behind the remote by 1 commit         |\n| `⇡2`        | local branch is ahead of the remote by 2 commits      |\n| `⇠3`        | local branch is behind the push remote by 3 commits   |\n| `⇢4`        | local branch is ahead of the push remote by 4 commits |\n| `*5`        | there are 5 stashes                                   |\n| `merge`     | merge is in progress (could be some other action)     |\n| `~6`        | there are 6 merge conflicts                           |\n| `+7`        | there are 7 staged changes                            |\n| `!8`        | there are 8 unstaged changes                          |\n| `?9`        | there are 9 untracked files                           |\n\nIf you'd like to change the format of git status, or want to have greater control over the\nprocess of assembling `PS1`, you can copy and modify parts of\n[gitstatus.prompt.sh](gitstatus.prompt.sh) instead of sourcing the script. Your `~/.bashrc` might\nlook something like this:\n\n```bash\nsource ~/gitstatus/gitstatus.plugin.sh\n\nfunction my_set_prompt() {\n  PS1='\\w'\n\n  if gitstatus_query && [[ \"$VCS_STATUS_RESULT\" == ok-sync ]]; then\n    if [[ -n \"$VCS_STATUS_LOCAL_BRANCH\" ]]; then\n      PS1+=\" ${VCS_STATUS_LOCAL_BRANCH//\\\\/\\\\\\\\}\"  # escape backslash\n    else\n      PS1+=\" @${VCS_STATUS_COMMIT//\\\\/\\\\\\\\}\"       # escape backslash\n    fi\n    (( VCS_STATUS_HAS_STAGED\"    )) && PS1+='+'\n    (( VCS_STATUS_HAS_UNSTAGED\"  )) && PS1+='!'\n    (( VCS_STATUS_HAS_UNTRACKED\" )) && PS1+='?'\n  fi\n\n  PS1+='\\n\\$ '\n\n  shopt -u promptvars  # disable expansion of '$(...)' and the like\n}\n\ngitstatus_stop && gitstatus_start\nPROMPT_COMMAND=my_set_prompt\n```\n\nThis snippet is sourcing `gitstatus.plugin.sh` rather than `gitstatus.prompt.sh`. The former\ndefines low-level bindings that communicate with gitstatusd over pipes. The latter is a simple\nscript that uses these bindings to assemble git prompt.\n\nNote: Bash bindings, unlike Zsh bindings, don't support asynchronous calls.\n\n## Using from other shells\n\nIf there are no gitstatusd bindings for your shell, you'll need to get your hands dirty.\nUse the existing bindings for inspiration; run `gitstatusd --help` or read the same thing in\n[options.cc](src/options.cc).\n\n## How it works\n\ngitstatusd reads requests from stdin and prints responses to stdout. Requests contain an ID and\na directory. Responses contain the same ID and machine-readable git status for the directory.\ngitstatusd keeps some state in memory for the directories it has seen in order to serve future\nrequests faster.\n\n[Zsh bindings](gitstatus.plugin.zsh) and [Bash bindings](gitstatus.plugin.sh) start gitstatusd in\nthe background and communicate with it via pipes. Themes such as\n[Powerlevel10k](https://github.com/romkatv/powerlevel10k) use these bindings to put git status in\n`PROMPT`.\n\nNote that gitstatus cannot be used as a drop-in replacement for `git status` command as it doesn't\nproduce output in the same format. It does perform the same computation though.\n\n## Benchmarks\n\nThe following benchmark results were obtained on Intel i9-7900X running Ubuntu 18.04 in\na clean [chromium](https://github.com/chromium/chromium) repository synced to `9394e49a`. The\nrepository was checked out to an ext4 filesystem on M.2 SSD.\n\nThree functionally equivalent tools for computing git status were benchmarked:\n\n* `gitstatusd`\n* `git` with `core.untrackedcache` enabled and `core.fsmonitor` disabled\n* `lg2` -- a demo/example executable from [libgit2](https://github.com/romkatv/libgit2) that\n  implements a subset of `git` functionality on top of libgit2 API; for the purposes of this\n  benchmark the subset is sufficient to generate the same data as the other tools\n\nEvery tool was benchmark in cold and hot conditions. For `git` the first run in a repository was\nconsidered cold, with the following runs considered hot. `lg2` was patched to compute results twice\nin a single invocation without freeing the repository in between; the second run was considered hot.\nThe same patching was not done for `git` because `git` cannot be easily modified to refresh inmemory\nindex state between invocations; in fact, this limitation is one of the primary reasons developers\nuse libgit2. `gitstatusd` was benchmarked similarly to `lg2` with two result computations in the\nsame invocation.\n\nTwo commands were benchmarked: `status` and `describe`.\n\n### Status\n\nIn this benchmark all tools were computing the equivalent of `git status`. Lower numbers are better.\n\n| Tool          |      Cold  |         Hot |\n|---------------|-----------:|------------:|\n| **gitstatus** | **291 ms** | **30.9 ms** |\n| git           |     876 ms |      295 ms |\n| lg2           |    1730 ms |     1310 ms |\n\ngitstatusd is substantially faster than the alternatives, especially on hot runs. Note that hot runs\nare of primary importance to the main use case of gitstatus in interactive shells.\n\nThe performance of `git status` fluctuated wildly in this benchmarks for reasons unknown to the\nauthor. Moreover, performance is sticky -- once `git status` settles around a number, it stays\nthere for a long time. Numbers as diverse as 295, 352, 663 and 730 had been observed on hot runs on\nthe same repository. The number in the table is the lowest (fastest or best) that `git status` had\nshown.\n\n### Describe\n\nIn this benchmark all tools were computing the equivalent of `git describe --tags --exact-match`\nto find tags that resolve to the same commit as `HEAD`. Lower numbers are better.\n\n| Tool          |       Cold  |           Hot |\n|---------------|------------:|--------------:|\n| **gitstatus** | **4.04 ms** | **0.0345 ms** |\n| git           |     18.0 ms |       14.5 ms |\n| lg2           |      185 ms |       45.2 ms |\n\ngitstatusd is once again faster than the alternatives, more so on hot runs.\n\n## Why fast\n\nSince gitstatusd doesn't have to print all staged/unstaged/untracked files but only report\nwhether there are any, it can terminate repository scan early. It can also remember which files\nwere dirty on the previous run and check them first on the next run to avoid the scan entirely if\nthe files are still dirty. However, the benchmarks above were performed in a clean repository where\nthese shortcuts do not trigger. All benchmarked tools had to do the same work -- check the status\nof every file in the index to see if it has changed, check every directory for newly created files,\netc. And yet, gitstatusd came ahead by a large margin. This section describes what it does that\nmakes it so fast.\n\nMost of the following comparisons are done against libgit2 rather than git because of the author's\nfamiliarity with the former but not the with latter. libgit2 has clean, well-documented APIs and an\nelegant implementation, which makes it so much easier to work with and to analyze performance\nbottlenecks.\n\n### Summary for the impatient\n\nUnder the benchmark conditions described above, the equivalent of libgit2's\n`git_diff_index_to_workdir` (the most expensive part of `status` command) is 46.3 times faster in\ngitstatusd. The speedup comes from the following sources.\n\n* gitstatusd uses more efficient data structures and algorithms and employs performance-conscious\ncoding style throughout the codebase. This reduces CPU time in userspace by 32x compared to libgit2.\n* gitstatusd uses less expensive system calls and makes fewer of them. This reduces CPU time spent\nin kernel by 1.9x.\n* gitstatusd can utilize multiple cores to scan index and workdir in parallel with almost perfect\nscaling. This reduces total run time by 12.4x while having virtually no effect on total CPU time.\n\n### Problem statement\n\nThe most resource-intensive part of the `status` command is finding the difference between _index_\nand _workdir_ (`git_diff_index_to_workdir` in libgit2). Index is a list of all files in the git\nrepository with their last modification times. This is an obvious simplification but it suffices for\nthis exposition. On disk, index is stored sorted by file path. Here's an example of git index:\n\n| File        | Last modification time |\n|-------------|-----------------------:|\n| Makefile    |   2019-04-01T14:12:32Z |\n| src/hello.c |   2019-04-01T14:12:00Z |\n| src/hello.h |   2019-04-01T14:12:32Z |\n\nThis list needs to be compared to the list of files in the working directory. If any of the files\nlisted in the index are missing from the workdir or have different last modification time, they are\n\"unstaged\" in gitstatusd parlance. If you run `git status`, they'll be shown as \"changes not staged\nfor commit\". Thus, any implementation of `status` command has to call `stat()` or one of its\nvariants on every file in the index.\n\nIn addition, all files in the working directory for which there is no entry in the index at all are\n\"untracked\". `git status` will show them as \"untracked files\". Finding untracked files requires some\nform of work directory traversal.\n\n### Single-threaded scan\n\nLet's see how `git_diff_index_to_workdir` from libgit2 accomplishes these tasks. Here's its CPU\nprofile from 200 hot runs over chromium repository.\n\n![libgit2 CPU profile (hot)](\n  https://raw.githubusercontent.com/romkatv/gitstatus/1ac366952366d89980b3f3484f270b4fa5ae4293/cpu-profile-libgit2.png)\n\n(The CPU profile was created with [gperftools](https://github.com/gperftools/gperftools) and\nrendered with [pprof](https://github.com/google/pprof)).\n\nWe can see `__GI__lxstat` taking a lot of time. This is the `stat()` call for every file in the\nindex. We can also identify `__opendir`, `__readdir` and `__GI___close_nocancel` -- glibc wrappers\nfor reading the contents of a directory. This is for finding untracked files. Out of the total 232\nseconds, 111 seconds -- or 47.7% -- was spent on these calls. The rest is computation -- comparing\nstrings, sorting arrays, etc.\n\nNow let's take a look at the CPU profile of gitstatusd on the same task.\n\n![gitstatusd CPU profile (hot)](\n  https://raw.githubusercontent.com/romkatv/gitstatus/1ac366952366d89980b3f3484f270b4fa5ae4293/cpu-profile-gitstatusd-hot.png)\n\nThe first impression is that this profile looks pruned. This isn't an artifact. The profile was\ngenerated with the same tools and the same flags as the profile of libgit2.\n\nSince both profiles were generated from the same workload, absolute numbers can be compared. We can\nsee that gitstatusd took 62 seconds in total compared to libgit2's 232 seconds. System calls at the\ncore of the algorithm are clearly visible. `__GI___fxstatat` is a flavor of `stat()`, and the other\nthree calls -- `__libc_openat64`, `__libc_close` and `__GI___fxstat` are responsible for opening\ndirectories and finding untracked files. Notice that there is almost nothing else in the profile\napart from these calls. The rest of the code accounts for 3.77 seconds of CPU time -- 32 times less\nthan in libgit2.\n\nSo, one reason gitstatusd is fast is that it has efficient diffing code -- very little time is spent\noutside of kernel. However, if we look closely, we can notice that system calls in gitstatusd are\n_also_ faster than in libgit2. For example, libgit2 spent 72.07 seconds in `__GI__lxstat` while\ngitstatusd spent only 48.82 seconds in `__GI___fxstatat`. There are two reasons for this difference.\nFirst, libgit2 makes more `stat()` calls than is strictly required. It's not necessary to stat\ndirectories because index only has files. There are 25k directories in chromium repository (and 300k\nfiles) -- that's 25k `stat()` calls that could be avoided. The second reason is that libgit2 and\ngitstatusd use different flavors of `stat()`. libgit2 uses `lstat()`, which takes a path to the file\nas input. Its performance is linear in the number of subdirectories in the path because it needs to\nperform a lookup for every one of them and to check permissions. gitstatusd uses `fstatat()`, which\ntakes a file descriptor to the parent directory and a name of the file. Just a single lookup, less\nCPU time.\n\nSimilarly to `lstat()` vs `fstatat()`, it's faster to open files and directories with `openat()`\nfrom the parent directory file descriptor than with regular `open()` that accepts full file path.\ngitstatusd takes advantage of `openat()` to open directories as fast as possible. It opens about 90%\nof the directories (this depends on the actual directory structure of the repository) from the\nimmediate parent -- the most efficient way -- and the remaining 10% it opens from the repository's\nroot directory. The reason it's done this way is to keep the maximum number of simultaneously open\nfile descriptors bounded. libgit2 can have O(repository depth) simultaneously open file descriptors,\nwhich may be OK for a single-threaded application but can balloon to a large number when scans are\ndone by many threads simultaneously, like in gitstatusd.\n\nThere is no equivalent to `__opendir` or `__readdir` in the gitstatusd profile because it uses the\nequivalent of [untracked cache](https://git-scm.com/docs/git-update-index#_untracked_cache) from\ngit. On the first scan of the workdir gitstatusd lists all files just like libgit2. But, unlike\nlibgit2, it remembers the last modification time of every directory along with the list of\nuntracked files under it. On the next scan, gitstatusd can skip listing files in directories whose\nlast modification time hasn't changed.\n\nTo summarize, here's what gitstatusd was doing when the CPU profile was captured:\n\n1. `__libc_openat64`: Open every directory for which there are files in the index.\n2. `__GI___fxstat`: Check last modification time of the directory. Since it's the same as on the\n   last scan, this directory has the same list of untracked files as before, which is empty (the\n   repository is clean).\n3. `__GI___fxstatat`: Check last modification time for every file in the index that belongs to this\n   directory.\n4. `__libc_close`: Close the file descriptor to the directory.\n\nHere's how the very first scan of a repository looks like in gitstatusd:\n\n![gitstatusd CPU profile (cold)](\n  https://raw.githubusercontent.com/romkatv/gitstatus/1ac366952366d89980b3f3484f270b4fa5ae4293/cpu-profile-gitstatusd-cold.png)\n\n(Some glibc functions are mislabel on this profile. `explicit_bzero` and `__nss_passwd_lookup` are\nin reality `strcmp` and `memcmp`.)\n\nThis is a superset of the previous -- hot -- profile, with an extra `syscall` and string sorting for\ndirectory listing. gitstatusd uses `getdents64` Linux system call directly, bypassing the glibc\nwrapper that libgit2 uses. This is 23% faster. The details of this optimization can be found in a\n[separate document](docs/listdir.md).\n\n### Multithreading\n\nThe diffing algorithm in gitstatusd was designed from the ground up with the intention of using it\nconcurrently from multiple threads. With a fast SSD, `status` is CPU bound, so taking advantage of\nall available CPU cores is an obvious way to yield results faster.\n\ngitstatusd exhibits almost perfect scaling from multithreading. Engaging all cores allows it to\nproduce results 12.4 times faster than in single-threaded execution. This is on Intel i9-7900X with\n10 cores (20 with hyperthreading) with single-core frequency of 4.3GHz and all-core frequency of\n4.0GHz.\n\nNote: `git status` also uses all available cores in some parts of its algorithm while `lg2` does\neverything in a single thread.\n\n### Postprocessing\n\nOnce the difference between the index and the workdir is found, we have a list of _candidates_ --\nfiles that may be unstaged or untracked. To make the final judgement, these files need to be checked\nagainst `.gitignore` rules and a few other things.\n\ngitstatusd uses [patched libgit2](https://github.com/romkatv/libgit2) for this step. This fork\nadds several optimizations that make libgit2 faster. The patched libgit2 performs more than twice\nas fast in the benchmark as the original even without changes in the user code (that is, in the\ncode that uses the libgit2 APIs). The fork also adds several API extensions, most notable of which\nis the support for multi-threaded scans. If `lg2 status` is modified to take advantage of these\nextensions, it outperforms the original libgit2 by a factor of 18. Lastly, the fork fixes a score of\nbugs, most of which become apparent only when using libgit2 from multiple threads.\n\n_WARNING: Changes to libgit2 are extensive but the testing they underwent isn't. It is\n**not recommended** to use the patched libgit2 in production._\n\n## Requirements\n\n* To compile: binutils, cmake, gcc, g++, git and GNU make.\n* To run: Linux, macOS, FreeBSD, Android, WSL, Cygwin or MSYS2.\n\n## Compiling\n\nThere are prebuilt `gitstatusd` binaries in [releases](\n  https://github.com/romkatv/gitstatus/releases). When using the official shell bindings\nprovided by gitstatus, the right binary for your architecture gets downloaded automatically.\n\nIf prebuilt binaries don't work for you, you'll need to get your hands dirty.\n\n### Compiling for personal use\n\n```zsh\ngit clone --depth=1 https://github.com/romkatv/gitstatus.git\ncd gitstatus\n./build -w -s -d docker\n```\n\nUsers in China can use the official mirror on gitee.com for faster download.<br>\n中国大陆用户可以使用 gitee.com 上的官方镜像加速下载.\n\n```zsh\ngit clone --depth=1 https://gitee.com/romkatv/gitstatus.git\ncd gitstatus\n./build -w -s -d docker\n```\n\n- If it says that `-d docker` is not supported on your OS, remove this flag.\n- If it says that `-s` is not supported on your OS, remove this flag.\n- If it tell you to install docker but you cannot or don't want to, remove `-d docker`.\n- If it says that some command is missing, install it.\n\nIf everything goes well, the newly built binary will appear in `./usrbin`. It'll be picked up\nby shell bindings automatically.\n\nWhen you update shell bindings, they may refuse to work with the binary you've built earlier. In\nthis case you'll need to rebuild.\n\nIf you are using gitstatus through [Powerlevel10k](https://github.com/romkatv/powerlevel10k), the\ninstructions are the same except that you don't need to clone gitstatus. Instead, change your\ncurrent directory to `/path/to/powerlevel10k/gitstatus` (`/path/to/powerlevel10k` is the directory\nwhere you've installed Powerlevel10k) and run `./build -w -s -d docker` from there as described\nabove.\n\n### Compiling for distribution\n\nIt's currently neither easy nor recommended to package and distribute gitstatus. There are no\ninstructions you can follow that would allow you to easily update your package when new versions of\ngitstatus are released. This may change in the future but not soon.\n\n## License\n\nGNU General Public License v3.0. See [LICENSE](LICENSE). Contributions are covered by the same\nlicense.\n"
  },
  {
    "path": "gitstatus/build",
    "content": "#!/bin/sh\n#\n# Type `build -h` for help and see https://github.com/romkatv/gitstatus\n# for full documentation.\n\nset -ue\n\nif [ -n \"${ZSH_VERSION:-}\" ]; then\n  emulate sh -o err_exit -o no_unset\nfi\n\nexport LC_ALL=C\n\nif [ -z \"${ZSH_VERSION-}\" ] && command -v zsh >/dev/null 2>&1; then\n  # Avoid bash 3.*.\n  case \"${BASH_VERSION-}\" in\n    [0-3].*) exec zsh \"$0\" \"$@\";;\n  esac\nfi\n\n# Avoid ksh: https://github.com/romkatv/gitstatus/issues/282.\nif [ -n \"${KSH_VERSION-}\" ]; then\n  if [ -z \"${ZSH_VERSION-}\" ] && command -v zsh >/dev/null 2>&1; then\n    exec zsh \"$0\" \"$@\"\n  elif [ -z \"${BASH_VERSION-}\" ] && command -v bash >/dev/null 2>&1 &&\n       bash_version=\"$(bash --version 2>&1)\"; then\n    case \"$bash_version\" in\n      *version\\ [4-9]*|*version\\ [1-9][0-9]*) exec bash \"$0\" \"$@\";;\n    esac\n  fi\nfi\n\nusage=\"$(command cat <<\\END\nUsage: build [-m ARCH] [-c CPU] [-d CMD] [-i IMAGE] [-s] [-w]\n\nOptions:\n\n  -m ARCH   `uname -m` from the target machine; defaults to `uname -m`\n            from the local machine\n  -c CPU    generate machine instructions for CPU of this type; this\n            value gets passed as `-march` (or `-mcpu` for ppc64le) to gcc;\n            inferred from ARCH if not set explicitly\n  -d CMD    build in a Docker container and use CMD as the `docker`\n            command; e.g., `-d docker` or `-d podman`\n  -i IMAGE  build in this Docker image; inferred from ARCH if not set\n            explicitly\n  -s        install whatever software is necessary for build to\n            succeed; on some operating systems this option is not\n            supported; on others it can have partial effect\n  -w        automatically download tarballs for dependencies if they\n            do not already exist in ./deps; dependencies are described\n            in ./build.info\nEND\n)\"\n\nbuild=\"$(command cat <<\\END\noutdir=\"$(command pwd)\"\n\nif command -v mktemp >/dev/null 2>&1; then\n  workdir=\"$(command mktemp -d \"${TMPDIR:-/tmp}\"/gitstatus-build.XXXXXXXXXX)\"\nelse\n  workdir=\"${TMPDIR:-/tmp}/gitstatus-build.tmp.$$\"\n  command mkdir -- \"$workdir\"\nfi\n\ncd -- \"$workdir\"\nworkdir=\"$(command pwd)\"\n\nnarg() { echo $#; }\n\nif [ \"$(narg $workdir)\" != 1 -o -z \"${workdir##*:*}\" -o -z \"${workdir##*=*}\" ]; then\n  >&2 echo \"[error] cannot build in this directory: $workdir\"\n  exit 1\nfi\n\nappname=gitstatusd\nlibgit2_tmp=\"$outdir\"/deps/\"$appname\".libgit2.tmp\n\ncleanup() {\n  trap - INT QUIT TERM ILL PIPE\n  cd /\n  if ! command rm -rf -- \"$workdir\" \"$outdir\"/usrbin/\"$appname\".tmp \"$libgit2_tmp\"; then\n    command sleep 5\n    command rm -rf -- \"$workdir\" \"$outdir\"/usrbin/\"$appname\".tmp \"$libgit2_tmp\"\n  fi\n}\ntrap cleanup INT QUIT TERM ILL PIPE\n\nif [ -n \"$gitstatus_install_tools\" ]; then\n  case \"$gitstatus_kernel\" in\n    linux)\n      if command -v apk >/dev/null 2>&1; then\n        command apk update\n        command apk add binutils cmake gcc g++ git make musl-dev perl-utils\n      elif command -v apt-get >/dev/null 2>&1; then\n        apt-get update\n        apt-get install -y binutils cmake gcc g++ make wget\n      else\n        >&2 echo \"[error] -s is not supported on this system\"\n        exit 1\n      fi\n    ;;\n    freebsd|dragonfly)\n      command pkg install -y cmake gmake binutils git perl5 wget\n    ;;\n    openbsd)\n      command pkg_add cmake gmake gcc g++ git wget\n    ;;\n    netbsd)\n      command pkgin -y install cmake gmake binutils git\n    ;;\n    darwin)\n      if ! command -v make >/dev/null 2>&1 || ! command -v gcc >/dev/null 2>&1; then\n        >&2 echo \"[error] please run 'xcode-select --install' and retry\"\n        exit 1\n      fi\n      if command -v port >/dev/null 2>&1; then\n        sudo port -N install libiconv cmake wget\n      elif command -v brew >/dev/null 2>&1; then\n        for formula in libiconv cmake git wget; do\n          if command brew ls --version \"$formula\" &>/dev/null; then\n            command brew upgrade \"$formula\"\n          else\n            command brew install \"$formula\"\n          fi\n        done\n      else\n        >&2 echo \"[error] please install MacPorts or Homebrew and retry\"\n        exit 1\n      fi\n    ;;\n    msys*|mingw*)\n      command pacman -Syu --noconfirm\n      command pacman -S --needed --noconfirm binutils cmake gcc git make perl\n    ;;\n    *)\n      >&2 echo \"[internal error] unhandled kernel: $gitstatus_kernel\"\n      exit 1\n    ;;\n  esac\nfi\n\ncpus=\"$(command getconf _NPROCESSORS_ONLN 2>/dev/null)\" ||\n  cpus=\"$(command sysctl -n hw.ncpu 2>/dev/null)\"       ||\n  cpus=8\n\ncase \"$gitstatus_cpu\" in\n  powerpc64|powerpc64le)\n    archflag=\"-mcpu\"\n  ;;\n  *)\n    archflag=\"-march\"\n  ;;\nesac\n\ncase \"$gitstatus_arch\" in\n  e2k)\n    nopltflag=\"\"\n  ;;\n  *)\n    nopltflag=\"-fno-plt\"\n  ;;\nesac\n\ncflags=\"$archflag=$gitstatus_cpu $nopltflag -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie\"\nldflags=\nstatic_pie=\n\nif [ -z \"${CC-}\" ]; then\n  case \"$gitstatus_kernel\" in\n    freebsd) export CC=clang;;\n    *)       export CC=cc;;\n  esac\nfi\n\nprintf 'int main() {}\\n' >\"$workdir\"/cc-test.c\nif 2>/dev/null \"$CC\"   \\\n     -ffile-prefix-map=x=y   \\\n     -Werror                 \\\n     -c \"$workdir\"/cc-test.c \\\n     -o \"$workdir\"/cc-test.o; then\n  cflags=\"$cflags -ffile-prefix-map=$workdir/=\"\nfi\n\ncommand rm -f -- \"$workdir\"/cc-test \"$workdir\"/cc-test.o\nif 2>/dev/null \"$CC\"          \\\n     -fstack-clash-protection \\\n     -Werror                  \\\n     -c \"$workdir\"/cc-test.c  \\\n     -o \"$workdir\"/cc-test.o; then\n  cflags=\"$cflags -fstack-clash-protection\"\nfi\n\ncommand rm -f -- \"$workdir\"/cc-test \"$workdir\"/cc-test.o\nif 2>/dev/null \"$CC\"         \\\n     -fcf-protection         \\\n     -Werror                 \\\n     -c \"$workdir\"/cc-test.c \\\n     -o \"$workdir\"/cc-test.o; then\n  cflags=\"$cflags -fcf-protection\"\nfi\n\ncommand rm -f -- \"$workdir\"/cc-test \"$workdir\"/cc-test.o\nif 2>/dev/null \"$CC\"                             \\\n     -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now \\\n     -Werror                                           \\\n     \"$workdir\"/cc-test.c                              \\\n     -o \"$workdir\"/cc-test; then\n  ldflags=\"$ldflags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now\"\nfi\n\ncommand rm -f -- \"$workdir\"/cc-test \"$workdir\"/cc-test.o\nif 2>/dev/null \"$CC\" \\\n     -fpie -static-pie     \\\n     -Werror               \\\n     \"$workdir\"/cc-test.c  \\\n     -o \"$workdir\"/cc-test; then\n  static_pie='-static-pie'\nfi\n\nif [ \"$gitstatus_cpu\" = x86-64 ]; then\n  cflags=\"$cflags -mtune=generic\"\nfi\n\nlibgit2_cmake_flags=\nlibgit2_cflags=\"${CFLAGS-} $cflags -O3 -DNDEBUG\"\n\ngitstatus_cxx=g++\ngitstatus_cxxflags=\"${CXXFLAGS-} $cflags -I${workdir}/libgit2/include -DGITSTATUS_ZERO_NSEC -D_GNU_SOURCE -D_GLIBCXX_ASSERTIONS\"\ngitstatus_ldflags=\"${LDFLAGS-} $ldflags -L${workdir}/libgit2/build\"\ngitstatus_ldlibs=\ngitstatus_make=make\n\ncase \"$gitstatus_kernel\" in\n  linux)\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  freebsd)\n    gitstatus_cxx=clang++\n    gitstatus_make=gmake\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  dragonfly)\n    gitstatus_cxx=clang++12\n    gitstatus_make=gmake\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  openbsd)\n    gitstatus_cxx=eg++\n    gitstatus_make=gmake\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  netbsd)\n    gitstatus_make=gmake\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  darwin)\n    command mkdir -- \"$workdir\"/lib\n    if [ -e /opt/local/lib/libiconv.a ]; then\n      command ln -s -- /opt/local/lib/libiconv.a \"$workdir\"/lib\n      libgit2_cflags=\"$libgit2_cflags -I/opt/local/include\"\n      gitstatus_cxxflags=\"$gitstatus_cxxflags -I/opt/local/include\"\n    else\n      brew_prefix=\"$(command brew --prefix)\"\n      command ln -s -- \"$brew_prefix\"/opt/libiconv/lib/libiconv.a \"$workdir\"/lib\n      libgit2_cflags=\"$libgit2_cflags -I\"$brew_prefix\"/opt/libiconv/include\"\n      gitstatus_cxxflags=\"$gitstatus_cxxflags -I\"$brew_prefix\"/opt/libiconv/include\"\n    fi\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DUSE_ICONV=ON\"\n    gitstatus_ldlibs=\"$gitstatus_ldlibs -liconv -lz\"\n    gitstatus_ldflags=\"$gitstatus_ldflags -L${workdir}/lib\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=OFF -DUSE_BUNDLED_ZLIB=OFF\"\n  ;;\n  msys*|mingw*)\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  cygwin*)\n    gitstatus_ldflags=\"$gitstatus_ldflags ${static_pie:--static}\"\n    libgit2_cmake_flags=\"$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON\"\n  ;;\n  *)\n    >&2 echo \"[internal error] unhandled kernel: $gitstatus_kernel\"\n    exit 1\n  ;;\nesac\n\nfor cmd in cat cmake git ld ln mkdir rm strip tar \"$gitstatus_make\"; do\n  if ! command -v \"$cmd\" >/dev/null 2>&1; then\n    if [ -n \"$gitstatus_install_tools\" ]; then\n      >&2 echo \"[internal error] $cmd not found\"\n      exit 1\n    else\n      >&2 echo \"[error] command not found: $cmd\"\n      exit 1\n    fi\n  fi\ndone\n\n. \"$outdir\"/build.info\nif [ -z \"${libgit2_version:-}\" ]; then\n  >&2 echo \"[internal error] libgit2_version not set\"\n  exit 1\nfi\nif [ -z \"${libgit2_sha256:-}\" ]; then\n  >&2 echo \"[internal error] libgit2_sha256 not set\"\n  exit 1\nfi\nlibgit2_tarball=\"$outdir\"/deps/libgit2-\"$libgit2_version\".tar.gz\nif [ ! -e \"$libgit2_tarball\" ]; then\n  if [ -n \"$gitstatus_download_deps\" ]; then\n    if ! command -v wget >/dev/null 2>&1; then\n      if [ -n \"$gitstatus_install_tools\" ]; then\n        >&2 echo \"[internal error] wget not found\"\n        exit 1\n      else\n        >&2 echo \"[error] command not found: wget\"\n        exit 1\n      fi\n    fi\n    libgit2_url=https://github.com/romkatv/libgit2/archive/\"$libgit2_version\".tar.gz\n    if ! >\"$libgit2_tmp\" command wget --no-config -qO- -- \"$libgit2_url\" &&\n       ! >\"$libgit2_tmp\" command wget             -qO- -- \"$libgit2_url\"; then\n      set -x\n      >&2 command which wget\n      >&2 command ls -lAd -- \"$(command which wget)\"\n      >&2 command ls -lAd -- \"$outdir\"\n      >&2 command ls -lA -- \"$outdir\"\n      >&2 command ls -lAd -- \"$outdir\"/deps\n      >&2 command ls -lA -- \"$outdir\"/deps\n      set +x\n      exit 1\n    fi\n    command mv -f -- \"$libgit2_tmp\" \"$libgit2_tarball\"\n  else\n    >&2 echo \"[error] file not found: deps/libgit2-\"$libgit2_version\".tar.gz\"\n    exit 1\n  fi\nfi\n\nlibgit2_actual_sha256=\nif command -v shasum >/dev/null 2>/dev/null; then\n  libgit2_actual_sha256=\"$(command shasum -b -a 256 -- \"$libgit2_tarball\")\"\n  libgit2_actual_sha256=\"${libgit2_actual_sha256%% *}\"\nelif command -v sha256sum >/dev/null 2>/dev/null; then\n  libgit2_actual_sha256=\"$(command sha256sum -b -- \"$libgit2_tarball\")\"\n  libgit2_actual_sha256=\"${libgit2_actual_sha256%% *}\"\nelif command -v sha256 >/dev/null 2>/dev/null; then\n  libgit2_actual_sha256=\"$(command sha256 -- \"$libgit2_tarball\" </dev/null)\"\n  # Ignore sha256 output if it's from hashalot. It's incompatible.\n  if [ ${#libgit2_actual_sha256} -lt 64 ]; then\n    libgit2_actual_sha256=\n  else\n    libgit2_actual_sha256=\"${libgit2_actual_sha256##* }\"\n  fi\nfi\n\nif [ -z \"$libgit2_actual_sha256\" ]; then\n  >&2 echo \"[error] command not found: shasum or sha256sum\"\n  exit 1\nfi\n\nif [ \"$libgit2_actual_sha256\" != \"$libgit2_sha256\" ]; then\n  >&2 echo \"[error] sha256 mismatch\"\n  >&2 echo \"\"\n  >&2 echo \"  file    : deps/libgit2-$libgit2_version.tar.gz\"\n  >&2 echo \"  expected: $libgit2_sha256\"\n  >&2 echo \"  actual  : $libgit2_actual_sha256\"\n  exit 1\nfi\n\ncd -- \"$workdir\"\ncommand tar -xzf \"$libgit2_tarball\"\ncommand mv -- libgit2-\"$libgit2_version\" libgit2\ncommand mkdir libgit2/build\ncd libgit2/build\n\nCFLAGS=\"$libgit2_cflags\" command cmake \\\n  -DCMAKE_BUILD_TYPE=None              \\\n  -DZERO_NSEC=ON                       \\\n  -DTHREADSAFE=ON                      \\\n  -DUSE_BUNDLED_ZLIB=ON                \\\n  -DREGEX_BACKEND=builtin              \\\n  -DUSE_HTTP_PARSER=builtin            \\\n  -DUSE_SSH=OFF                        \\\n  -DUSE_HTTPS=OFF                      \\\n  -DBUILD_CLAR=OFF                     \\\n  -DUSE_GSSAPI=OFF                     \\\n  -DUSE_NTLMCLIENT=OFF                 \\\n  -DBUILD_SHARED_LIBS=OFF              \\\n  -G \"Unix Makefiles\"                  \\\n  $libgit2_cmake_flags                 \\\n  ..\ncommand make -j \"$cpus\" VERBOSE=1\n\nAPPNAME=\"$appname\".tmp           \\\n  OBJDIR=\"$workdir\"/gitstatus    \\\n  CXX=\"${CXX:-$gitstatus_cxx}\"   \\\n  CXXFLAGS=\"$gitstatus_cxxflags\" \\\n  LDFLAGS=\"$gitstatus_ldflags\"   \\\n  LDLIBS=\"$gitstatus_ldlibs\"     \\\n  command \"$gitstatus_make\" -C \"$outdir\" -j \"$cpus\"\n\napp=\"$outdir\"/usrbin/\"$appname\"\n\ncommand strip \"$app\".tmp\n\ncommand mkdir -- \"$workdir\"/repo\nprintf '[init]\\n  defaultBranch = master\\n' >\"$workdir\"/.gitconfig\n(\n  cd -- \"$workdir\"/repo\n  GIT_CONFIG_NOSYSTEM=1 HOME=\"$workdir\" command git init\n  GIT_CONFIG_NOSYSTEM=1 HOME=\"$workdir\" command git config user.name \"Your Name\"\n  GIT_CONFIG_NOSYSTEM=1 HOME=\"$workdir\" command git config user.email \"you@example.com\"\n  GIT_CONFIG_NOSYSTEM=1 HOME=\"$workdir\" command git commit \\\n    --allow-empty --allow-empty-message --no-gpg-sign -m ''\n)\n\nresp=\"$(printf \"hello\\037$workdir/repo\\036\" | \"$app\".tmp)\"\ncase \"$resp\" in\n  hello*1*/repo*master*);;\n  *)\n    >&2 echo 'error: invalid gitstatusd response for a git repo'\n    exit 1\n  ;;\nesac\n\nresp=\"$(printf 'hello\\037\\036' | \"$app\".tmp)\"\ncase \"$resp\" in\n  hello*0*);;\n  *)\n    >&2 echo 'error: invalid gitstatusd response for a non-repo'\n    exit 1\n  ;;\nesac\n\ncommand mv -f -- \"$app\".tmp \"$app\"\n\ncleanup\n\ncommand cat >&2 <<-END\n\t-------------------------------------------------\n\tSUCCESS: created usrbin/$appname\n\tEND\nEND\n)\"\n\ndocker_image=\ndocker_cmd=\n\ngitstatus_arch=\ngitstatus_cpu=\ngitstatus_install_tools=\ngitstatus_download_deps=\n\nwhile getopts ':m:c:i:d:swh' opt \"$@\"; do\n  case \"$opt\" in\n    h)\n      printf '%s\\n' \"$usage\"\n      exit\n    ;;\n    m)\n      if [ -n \"$gitstatus_arch\" ]; then\n        >&2 echo \"[error] duplicate option: -$opt\"\n        exit 1\n      fi\n      if [ -z \"$OPTARG\" ]; then\n        >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n        exit 1\n      fi\n      gitstatus_arch=\"$OPTARG\"\n    ;;\n    c)\n      if [ -n \"$gitstatus_cpu\" ]; then\n        >&2 echo \"[error] duplicate option: -$opt\"\n        exit 1\n      fi\n      if [ -z \"$OPTARG\" ]; then\n        >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n        exit 1\n      fi\n      gitstatus_cpu=\"$OPTARG\"\n    ;;\n    i)\n      if [ -n \"$docker_image\" ]; then\n        >&2 echo \"[error] duplicate option: -$opt\"\n        exit 1\n      fi\n      if [ -z \"$OPTARG\" ]; then\n        >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n        exit 1\n      fi\n      docker_image=\"$OPTARG\"\n    ;;\n    d)\n      if [ -n \"$docker_cmd\" ]; then\n        >&2 echo \"[error] duplicate option: -$opt\"\n        exit 1\n      fi\n      if [ -z \"$OPTARG\" ]; then\n        >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n        exit 1\n      fi\n      docker_cmd=\"$OPTARG\"\n    ;;\n    s)\n      if [ -n \"$gitstatus_install_tools\" ]; then\n        >&2 echo \"[error] duplicate option: -$opt\"\n        exit 1\n      fi\n      gitstatus_install_tools=1\n    ;;\n    w)\n      if [ -n \"$gitstatus_download_deps\" ]; then\n        >&2 echo \"[error] duplicate option: -$opt\"\n        exit 1\n      fi\n      gitstatus_download_deps=1\n    ;;\n    \\?) >&2 echo \"[error] invalid option: -$OPTARG\"           ; exit 1;;\n    :)  >&2 echo \"[error] missing required argument: -$OPTARG\"; exit 1;;\n    *)  >&2 echo \"[internal error] unhandled option: -$opt\"   ; exit 1;;\n  esac\ndone\n\nif [ \"$OPTIND\" -le $# ]; then\n  >&2 echo \"[error] unexpected positional argument\"\n  exit 1\nfi\n\nif [ -n \"$docker_image\" -a -z \"$docker_cmd\" ]; then\n  >&2 echo \"[error] cannot use -i without -d\"\n  exit 1\nfi\n\nif [ -z \"$gitstatus_arch\" ]; then\n  gitstatus_arch=\"$(uname -m)\"\n  gitstatus_arch=\"$(printf '%s' \"$gitstatus_arch\" | tr '[A-Z]' '[a-z]')\"\nfi\n\nif [ -z \"$gitstatus_cpu\" ]; then\n  case \"$gitstatus_arch\" in\n    armel)          gitstatus_cpu=armv5;;\n    armv6l|armhf)   gitstatus_cpu=armv6;;\n    armv7l)         gitstatus_cpu=armv7;;\n    arm64|aarch64)  gitstatus_cpu=armv8-a;;\n    ppc64|ppc64le)  gitstatus_cpu=powerpc64le;;\n    riscv64)        gitstatus_cpu=rv64imafdc;;\n    mips64)         gitstatus_cpu=mips64;;\n    loongarch64)    gitstatus_cpu=loongarch64;;\n    x86_64|amd64)   gitstatus_cpu=x86-64;;\n    x86)            gitstatus_cpu=i586;;\n    s390x)          gitstatus_cpu=z900;;\n    e2k)            gitstatus_cpu=native;;\n    i386|i586|i686) gitstatus_cpu=\"$gitstatus_arch\";;\n    *)\n      >&2 echo '[error] unable to infer target CPU architecture'\n      >&2 echo 'Please specify explicitly with `-c CPU`.'\n      exit 1\n    ;;\n  esac\nfi\n\ngitstatus_kernel=\"$(uname -s)\"\ngitstatus_kernel=\"$(printf '%s' \"$gitstatus_kernel\" | tr '[A-Z]' '[a-z]')\"\n\ncase \"$gitstatus_kernel\" in\n  linux)\n    if [ -n \"$docker_cmd\" ]; then\n      if [ -z \"${docker_cmd##*/*}\" ]; then\n        if [ ! -x \"$docker_cmd\" ]; then\n          >&2 echo \"[error] not an executable file: $docker_cmd\"\n          exit 1\n        fi\n      else\n        if ! command -v \"$docker_cmd\" >/dev/null 2>&1; then\n          >&2 echo \"[error] command not found: $docker_cmd\"\n          exit 1\n        fi\n      fi\n      if [ -z \"$docker_image\" ]; then\n        case \"$gitstatus_arch\" in\n          x86_64)             docker_image=alpine:3.11.6;;\n          x86|i386|i586|i686) docker_image=i386/alpine:3.11.6;;\n          armv6l|armhf)       docker_image=arm32v6/alpine:3.11.6;;\n          armv7l)             docker_image=arm32v7/alpine:3.11.6;;\n          aarch64)            docker_image=arm64v8/alpine:3.11.6;;\n          ppc64|ppc64le)      docker_image=ppc64le/alpine:3.11.6;;\n          s390x)              docker_image=s390x/alpine:3.11.6;;\n          *)\n            >&2 echo '[error] unable to infer docker image'\n            >&2 echo 'Please specify explicitly with `-i IMAGE`.'\n            exit 1\n          ;;\n        esac\n      fi\n    fi\n  ;;\n  freebsd|openbsd|netbsd|darwin|dragonfly)\n    if [ -n \"$docker_cmd\" ]; then\n      >&2 echo \"[error] docker (-d) is not supported on $gitstatus_kernel\"\n      exit 1\n    fi\n  ;;\n  msys_nt-*|mingw32_nt-*|mingw64_nt-*|cygwin_nt-*)\n    if ! printf '%s' \"$gitstatus_kernel\" | grep -Eqx '[^-]+-[0-9]+\\.[0-9]+(-.*)?'; then\n      >&2 echo '[error] unsupported kernel, sorry!'\n      exit 1\n    fi\n    gitstatus_kernel=\"$(printf '%s' \"$gitstatus_kernel\" | sed 's/^\\([^-]*-[0-9]*\\.[0-9]*\\).*/\\1/')\"\n    if [ -n \"$docker_cmd\" ]; then\n      >&2 echo '[error] docker (-d) is not supported on windows'\n      exit 1\n    fi\n    if [ -n \"$gitstatus_install_tools\" -a -z \"${gitstatus_kernel##cygwin_nt-*}\" ]; then\n      >&2 echo '[error] -s is not supported on cygwin'\n      exit 1\n    fi\n  ;;\n  *)\n    >&2 echo '[error] unsupported kernel, sorry!'\n    exit 1\n  ;;\nesac\n\ndir=\"$(dirname -- \"$0\")\"\ncd -- \"$dir\"\ndir=\"$(pwd)\"\n\n>&2 echo \"Building gitstatusd...\"\n>&2 echo \"\"\n>&2 echo \"  kernel := $gitstatus_kernel\"\n>&2 echo \"  arch := $gitstatus_arch\"\n>&2 echo \"  cpu := $gitstatus_cpu\"\n[ -z \"$docker_cmd\" ] || >&2 echo \"  docker command := $docker_cmd\"\n[ -z \"$docker_image\"  ] || >&2 echo \"  docker image := $docker_image\"\nif [ -n \"$gitstatus_install_tools\" ]; then\n  >&2 echo \"  install tools := yes\"\nelse\n  >&2 echo \"  install tools := no\"\nfi\nif [ -n \"$gitstatus_download_deps\" ]; then\n  >&2 echo \"  download deps := yes\"\nelse\n  >&2 echo \"  download deps := no\"\nfi\n\nif [ -n \"$docker_cmd\" ]; then\n  \"$docker_cmd\" run                                       \\\n    -e docker_cmd=\"$docker_cmd\"                           \\\n    -e docker_image=\"$docker_image\"                       \\\n    -e gitstatus_kernel=\"$gitstatus_kernel\"               \\\n    -e gitstatus_arch=\"$gitstatus_arch\"                   \\\n    -e gitstatus_cpu=\"$gitstatus_cpu\"                     \\\n    -e gitstatus_install_tools=\"$gitstatus_install_tools\" \\\n    -e gitstatus_download_deps=\"$gitstatus_download_deps\" \\\n    -v \"$dir\":/out                                        \\\n    -w /out                                               \\\n    --rm                                                  \\\n    -- \"$docker_image\" /bin/sh -uexc \"$build\"\nelse\n  eval \"$build\"\nfi\n"
  },
  {
    "path": "gitstatus/build.info",
    "content": "# This value gets embedded in gitstatusd at build time. It is\n# read by ./Makefile. `gitstatusd --version` reports it back.\n#\n# This value is also read by shell bindings (indirectly, through\n# ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd.\ngitstatus_version=\"v1.5.5\"\n\n# libgit2 is a build time dependency of gitstatusd. The values of\n# libgit2_version and libgit2_sha256 are read by ./build.\n#\n# If ./deps/libgit2-${libgit2_version}.tar.gz doesn't exist, build\n# downloads it from the following location:\n#\n#   https://github.com/romkatv/libgit2/archive/${libgit2_version}.tar.gz\n#\n# Once downloaded, the tarball is stored at the path indicated\n# above so that repeated builds don't consume network bandwidth.\n#\n# If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match,\n# build gets aborted.\nlibgit2_version=\"tag-2ecf33948a4df9ef45a66c68b8ef24a5e60eaac6\"\nlibgit2_sha256=\"4ce11d71ee576dbbc410b9fa33a9642809cc1fa687b315f7c23eeb825b251e93\"\n"
  },
  {
    "path": "gitstatus/deps/.gitkeep",
    "content": ""
  },
  {
    "path": "gitstatus/docs/listdir.md",
    "content": "# Fast directory listing\n\nIn order to find untracked files in a git repository, [gitstatusd](../README.md) needs to list the\ncontents of every directory. gitstatusd does it 27% faster than a reasonable implementation that a\nseasoned C/C++ practitioner might write. This document explains the optimizations that went into it.\nAs directory listing is a common operation, many other projects can benefit from applying these\noptimizations.\n\n## v1\n\nGiven a path to a directory, `ListDir()` must produce the list of files in that directory. Moreover,\nthe list must be sorted lexicographically to enable fast comparison with Git index.\n\nThe following C++ implementation gets the job done. For simplicity, it returns an empty list on\nerror.\n\n```c++\nvector<string> ListDir(const char* dirname) {\n  vector<string> entries;\n  if (DIR* dir = opendir(dirname)) {\n    while (struct dirent* ent = (errno = 0, readdir(dir))) {\n      if (!Dots(ent->d_name)) entries.push_back(ent->d_name);\n    }\n    if (errno) entries.clear();\n    sort(entries.begin(), entries.end());\n    closedir(dir);\n  }\n  return entries;\n}\n```\n\nEvery directory has entries `\".\"` and `\"..\"`, which we aren't interested in. We filter them out with\na helper function `Dots()`.\n\n```c++\nbool Dots(const char* s) { return s[0] == '.' && (!s[1] || (s[1] == '.' && !s[2])); }\n```\n\nTo check how fast `ListDir()` performs, we can run it many times on a typical directory. One million\nruns on a directory with 32 files with 16-character names takes 12.7 seconds.\n\n## v2\n\nExperienced C++ practitioners will scoff at our implementation of `ListDir()`. If it's meant to be\nefficient, returning `vector<string>` is an unaffordable convenience. To avoid heap allocations we\ncan use a simple arena that will allow us to reuse memory between different `ListDir()` calls.\n\n(Changed and added lines are marked with comments.)\n\n```c++\nvoid ListDir(const char* dirname, string& arena, vector<char*>& entries) {  // +\n  entries.clear();                                                          // +\n  if (DIR* dir = opendir(dirname)) {\n    arena.clear();                                                          // +\n    while (struct dirent* ent = (errno = 0, readdir(dir))) {\n      if (!Dots(ent->d_name)) {\n        entries.push_back(reinterpret_cast<char*>(arena.size()));           // +\n        arena.append(ent->d_name, strlen(ent->d_name) + 1);                 // +\n      }\n    }\n    if (errno) entries.clear();\n    for (char*& p : entries) p = &arena[reinterpret_cast<size_t>(p)];      // +\n    sort(entries.begin(), entries.end(),                                   // +\n         [](const char* a, const char* b) { return strcmp(a, b) < 0; });   // +\n    closedir(dir);\n  }\n}\n```\n\nTo make performance comparison easier, we can normalize them relative to the baseline. v1 will get\nperformance score of 100. A twice-as-fast alternative will be 200.\n\n| version |     optimization           |     score |\n|---------|----------------------------|----------:|\n| v1      | baseline                   |     100.0 |\n| **v2**  | **avoid heap allocations** | **112.7** |\n\nAvoiding heap allocations makes `ListDir()` 12.7% faster. Not bad. As an added bonus, those casts\nwill fend off the occasional frontend developer who accidentally wanders into the codebase.\n\n## v3\n\n`opendir()` is an expensive call whose performance is linear in the number of subdirectories in the\npath because it needs to perform a lookup for every one of them. We can replace it with `openat()`,\nwhich takes a file descriptor to the parent directory and a name of the subdirectory. Just a single\nlookup, less CPU time. This optimization assumes that callers already have a descriptor to the\nparent directory, which is indeed the case for gitstatusd, and is often the case in other\napplications that traverse filesystem.\n\n```c++\nvoid ListDir(int parent_fd, const char* dirname, string& arena, vector<char*>& entries) {   // +\n  entries.clear();\n  int dir_fd = openat(parent_fd, dirname, O_NOATIME | O_RDONLY | O_DIRECTORY | O_CLOEXEC);  // +\n  if (dir_fd < 0) return;                                                                   // +\n  if (DIR* dir = fdopendir(dir_fd)) {\n    arena.clear();\n    while (struct dirent* ent = (errno = 0, readdir(dir))) {\n      if (!Dots(ent->d_name)) {\n        entries.push_back(reinterpret_cast<char*>(arena.size()));\n        arena.append(ent->d_name, strlen(ent->d_name) + 1);\n      }\n    }\n    if (errno) entries.clear();\n    for (char*& p : entries) p = &arena[reinterpret_cast<size_t>(p)];\n    sort(entries.begin(), entries.end(),\n         [](const char* a, const char* b) { return strcmp(a, b) < 0; });\n    closedir(dir);\n  } else {                                                                                  // +\n    close(dir_fd);                                                                          // +\n  }                                                                                         // +\n}\n```\n\nThis is worth about 3.5% in speed.\n\n| version | optimization                         |     score |\n|---------|--------------------------------------|----------:|\n| v1      | baseline                             |     100.0 |\n| v2      | avoid heap allocations               |     112.7 |\n| **v3**  | **open directories with `openat()`** | **116.2** |\n\n## v4\n\nCopying file names to the arena isn't free but it doesn't seem like we can avoid it. Poking around\nwe can see that the POSIX API we are using is implemented on Linux on top of `getdents64` system\ncall. Its documentation isn't very encouraging:\n\n```text\nThese are not the interfaces you are interested in.  Look at\nreaddir(3) for the POSIX-conforming C library interface.  This page\ndocuments the bare kernel system call interfaces.\n\nNote: There are no glibc wrappers for these system calls.\n```\n\nHmm... The API looks like something we can take advantage of, so let's try it anyway.\n\nFirst, we'll need a simple `Arena` class that can allocate 8KB blocks of memory.\n\n```c++\nclass Arena {\n public:\n  enum { kBlockSize = 8 << 10 };\n\n  char* Alloc() {\n    if (cur_ == blocks_.size()) blocks_.emplace_back(kBlockSize, 0);\n    return blocks_[cur_++].data();\n  }\n\n  void Clear() { cur_ = 0; }\n\n private:\n  size_t cur_ = 0;\n  vector<string> blocks_;\n};\n```\n\nNext, we need to define `struct dirent64_t` ourselves because there is no wrapper for the system\ncall we are about to use.\n\n```c++\nstruct dirent64_t {\n  ino64_t d_ino;\n  off64_t d_off;\n  unsigned short d_reclen;\n  unsigned char d_type;\n  char d_name[];\n};\n```\n\nFinally we can get to the implementation of `ListDir()`.\n\n```c++\nvoid ListDir(int parent_fd, Arena& arena, vector<char*>& entries) {                       // +\n  entries.clear();\n  int dir_fd = openat(parent_fd, dirname, O_NOATIME | O_RDONLY | O_DIRECTORY | O_CLOEXEC);\n  if (dir_fd < 0) return;\n  arena.Clear();                                                                          // +\n  while (true) {                                                                          // +\n    char* buf = arena.Alloc();                                                            // +\n    int n = syscall(SYS_getdents64, dir_fd, buf, Arena::kBlockSize);                      // +\n    if (n <= 0) {                                                                         // +\n      if (n) entries.clear();                                                             // +\n      break;                                                                              // +\n    }                                                                                     // +\n    for (int pos = 0; pos < n;) {                                                         // +\n      auto* ent = reinterpret_cast<dirent64_t*>(buf + pos);                               // +\n      if (!Dots(ent->d_name)) entries.push_back(ent->d_name);                             // +\n      pos += ent->d_reclen;                                                               // +\n    }                                                                                     // +\n  }                                                                                       // +\n  sort(entries.begin(), entries.end(),\n       [](const char* a, const char* b) { return strcmp(a, b) < 0; });\n  close(dir_fd);\n}\n```\n\nHow are we doing with this one?\n\n| version | optimization                     |     score |\n|---------|----------------------------------|----------:|\n| v1      | baseline                         |     100.0 |\n| v2      | avoid heap allocations           |     112.7 |\n| v3      | open directories with `openat()` |     116.2 |\n| **v4**  | **call `getdents64()` directly** | **137.8** |\n\nSolid 20% speedup. Worth the trouble. Unfortunately, we now have just one `reinterpret_cast` instead\nof two, and it's not nearly as scary-looking. Hopefully with the next iteration we can get back some\nof that evil vibe of low-level code.\n\nAs a bonus, every element in `entries` has `d_type` at offset -1. This can be useful to the callers\nthat need to distinguish between regular files and directories (gitstatusd, in fact, needs this).\nNote how `ListDir()` implements this feature at zero cost, as a lucky accident of `dirent64_t`\nmemory layout.\n\n## v5\n\nThe CPU profile of `ListDir()` reveals that almost all userspace CPU time is spent in `strcmp()`.\nDigging into the source code of `std::sort()` we can see that it uses Insertion Sort for short\ncollections. Our 32-element vector falls under the threshold. Insertion Sort makes `O(N^2)`\ncomparisons, hence a lot of CPU time in `strcmp()`. Switching to `qsort()` or\n[Timsort](https://en.wikipedia.org/wiki/Timsort) is of no use as all good sorting algorithms fall\nback to Insertion Sort.\n\nIf we cannot make fewer comparisons, perhaps we can make each of them faster? `strcmp()` compares\ncharacters one at a time. It cannot read ahead as it can be illegal to touch memory past the first\nnull byte. But _we_ know that it's safe to read a few extra bytes past the end of `d_name` for every\nentry except the last in the buffer. And since we own the buffer, we can overallocate it so that\nreading past the end of the last entry is also safe.\n\nCombining these ideas with the fact that file names on Linux are at most 255 bytes long, we can\ninvoke `getdents64()` like this:\n\n```c++\nint n = syscall(SYS_getdents64, dir_fd, buf, Arena::kBlockSize - 256);\n```\n\nAnd then compare entries like this:\n\n```c++\n[](const char* a, const char* b) { return memcmp(a, b, 255) < 0; }\n```\n\nThis version doesn't give any speedup compared to the previous but it opens an avenue for another\noptimization. The pointers we pass to `memcmp()` aren't aligned. To be more specific, their\nnumerical values are `N * 8 + 3` for some `N`. When given such a pointer, `memcmp()` will check the\nfirst 5 bytes one by one, and only then switch to comparing 8 bytes at a time. If we can handle the\nfirst 5 bytes ourselves, we can pass aligned memory to `memcmp()` and take full advantage of its\nvectorized loop.\n\nHere's the implementation:\n\n```c++\nuint64_t Read64(const void* p) {                                                          // +\n  uint64_t x;                                                                             // +\n  memcpy(&x, p, sizeof(x));                                                               // +\n  return x;                                                                               // +\n}                                                                                         // +\n\nvoid ByteSwap64(void* p) {                                                                // +\n  uint64_t x = __builtin_bswap64(Read64(p));                                              // +\n  memcpy(p, &x, sizeof(x));                                                               // +\n}                                                                                         // +\n\nvoid ListDir(int parent_fd, Arena& arena, vector<char*>& entries) {\n  entries.clear();\n  int dir_fd = openat(parent_fd, dirname, O_NOATIME | O_RDONLY | O_DIRECTORY | O_CLOEXEC);\n  if (dir_fd < 0) return;\n  arena.Clear();\n  while (true) {\n    char* buf = arena.Alloc();\n    int n = syscall(SYS_getdents64, dir_fd, buf, Arena::kBlockSize - 256);                // +\n    if (n <= 0) {\n      if (n) entries.clear();\n      break;\n    }\n    for (int pos = 0; pos < n;) {\n      auto* ent = reinterpret_cast<dirent64_t*>(buf + pos);\n      if (!Dots(ent->d_name)) {\n        ByteSwap64(ent->d_name);                                                          // +\n        entries.push_back(ent->d_name);\n      }\n      pos += ent->d_reclen;\n    }\n  }\n  sort(entries.begin(), entries.end(), [](const char* a, const char* b) {\n    uint64_t x = Read64(a);                                                               // +\n    uint64_t y = Read64(b);                                                               // +\n    return x < y || (x == y && a != b && memcmp(a + 5, b + 5, 256) < 0);                  // +\n  });\n  for (char* p : entries) ByteSwap64(p);                                                  // +\n  close(dir_fd);\n}\n```\n\nThis is for Little Endian architecture. Big Endian doesn't need `ByteSwap64()`, so it'll be a bit\nfaster.\n\n| version | optimization                     |     score |\n|---------|----------------------------------|----------:|\n| v1      | baseline                         |     100.0 |\n| v2      | avoid heap allocations           |     112.7 |\n| v3      | open directories with `openat()` |     116.2 |\n| v4      | call `getdents64()` directly     |     137.8 |\n| **v5**  | **hand-optimize `strcmp()`**     | **143.3** |\n\nFast and respectably arcane.\n\n## Conclusion\n\nThrough a series of incremental improvements we've sped up directory listing by 43.3% compared to a\nnaive implementation (v1) and 27.2% compared to a reasonable implementation that a seasoned C/C++\npractitioner might write (v2).\n\nHowever, these numbers are based on an artificial benchmark while the real judge is always the real\ncode. Our goal was to speed up gitstatusd. Benchmark was just a tool. Thankfully, the different\nversions of `ListDir()` have the same comparative performance within gitstatusd as in the benchmark.\nIn truth, the directory chosen for the benchmark wasn't arbitrary. It was picked by sampling\ngitstatusd when it runs on [chromium](https://github.com/chromium/chromium) git repository.\n\nThe final version of `ListDir()` spends 97% of its CPU time in the kernel. If we assume that it\nmakes the minimum possible number of system calls and these calls are optimal (true to the best\nof my knowledge), it puts the upper bound on possible future performance improvements at just 3%.\nThere is almost nothing left in `ListDir()` to optimize.\n\n![ListDir() CPU profile](\n  https://raw.githubusercontent.com/romkatv/gitstatus/1ac366952366d89980b3f3484f270b4fa5ae4293/cpu-profile-listdir.png)\n\n(The CPU profile was created with [gperftools](https://github.com/gperftools/gperftools) and\nrendered with [pprof](https://github.com/google/pprof)).\n"
  },
  {
    "path": "gitstatus/gitstatus.plugin.sh",
    "content": "# Bash bindings for gitstatus.\n\n[[ $- == *i* ]] || return  # non-interactive shell\n\n# Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd\n# is already running.\n#\n# Usage: gitstatus_start [OPTION]...\n#\n#   -t FLOAT  Fail the self-check on initialization if not getting a response from\n#             gitstatusd for this this many seconds. Defaults to 5.\n#\n#   -s INT    Report at most this many staged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -u INT    Report at most this many unstaged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -c INT    Report at most this many conflicted changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -d INT    Report at most this many untracked files; negative value means infinity.\n#             Defaults to 1.\n#\n#   -m INT    Report -1 unstaged, untracked and conflicted if there are more than this many\n#             files in the index. Negative value means infinity. Defaults to -1.\n#\n#   -e        Count files within untracked directories like `git status --untracked-files`.\n#\n#   -U        Unless this option is specified, report zero untracked files for repositories\n#             with status.showUntrackedFiles = false.\n#\n#   -W        Unless this option is specified, report zero untracked files for repositories\n#             with bash.showUntrackedFiles = false.\n#\n#   -D        Unless this option is specified, report zero staged, unstaged and conflicted\n#             changes for repositories with bash.showDirtyState = false.\n#\n#   -r INT    Close git repositories that haven't been used for this many seconds. This is\n#             meant to release resources such as memory and file descriptors. The next request\n#             for a repo that's been closed is much slower than for a repo that hasn't been.\n#             Negative value means infinity. The default is 3600 (one hour).\nfunction gitstatus_start() {\n  if [[ \"$BASH_VERSION\" < 4 ]]; then\n    >&2 printf 'gitstatus_start: need bash version >= 4.0, found %s\\n' \"$BASH_VERSION\"\n    >&2 printf '\\n'\n    >&2 printf 'To see the version of the current shell, type:\\n'\n    >&2 printf '\\n'\n    >&2 printf '    \\033[32mecho\\033[0m \\033[33m\"$BASH_VERSION\"\\033[0m\\n'\n    >&2 printf '\\n'\n    >&2 printf 'The output of `\\033[32mbash\\033[0m --version` may be different and is not relevant.\\n'\n    return 1\n  fi\n\n  unset OPTIND\n  local opt timeout=5 max_dirty=-1 ttl=3600 extra_flags=\n  local max_num_staged=1 max_num_unstaged=1 max_num_conflicted=1 max_num_untracked=1\n  while getopts \"t:s:u:c:d:m:r:eUWD\" opt; do\n    case \"$opt\" in\n      t) timeout=$OPTARG;;\n      s) max_num_staged=$OPTARG;;\n      u) max_num_unstaged=$OPTARG;;\n      c) max_num_conflicted=$OPTARG;;\n      d) max_num_untracked=$OPTARG;;\n      m) max_dirty=$OPTARG;;\n      r) ttl=$OPTARG;;\n      e) extra_flags+='--recurse-untracked-dirs ';;\n      U) extra_flags+='--ignore-status-show-untracked-files ';;\n      W) extra_flags+='--ignore-bash-show-untracked-files ';;\n      D) extra_flags+='--ignore-bash-show-dirty-state ';;\n      *) return 1;;\n    esac\n  done\n\n  (( OPTIND == $# + 1 )) || { echo \"usage: gitstatus_start [OPTION]...\" >&2; return 1; }\n\n  [[ -z \"${GITSTATUS_DAEMON_PID:-}\" ]] || return 0  # already started\n\n  if [[ \"${BASH_SOURCE[0]}\" == */* ]]; then\n    local gitstatus_plugin_dir=\"${BASH_SOURCE[0]%/*}\"\n    if [[ \"$gitstatus_plugin_dir\" != /* ]]; then\n      gitstatus_plugin_dir=\"$PWD\"/\"$gitstatus_plugin_dir\"\n    fi\n  else\n    local gitstatus_plugin_dir=\"$PWD\"\n  fi\n\n  local tmpdir req_fifo resp_fifo culprit\n\n  function gitstatus_start_impl() {\n    local log_level=\"${GITSTATUS_LOG_LEVEL:-}\"\n    [[ -n \"$log_level\" || \"${GITSTATUS_ENABLE_LOGGING:-0}\" != 1 ]] || log_level=INFO\n\n    local uname_sm\n    uname_sm=\"$(command uname -sm)\" || return\n    uname_sm=\"${uname_sm,,}\"\n    local uname_s=\"${uname_sm% *}\"\n    local uname_m=\"${uname_sm#* }\"\n\n    if [[ \"${GITSTATUS_NUM_THREADS:-0}\" -gt 0 ]]; then\n      local threads=\"$GITSTATUS_NUM_THREADS\"\n    else\n      local cpus\n      if ! command -v sysctl &>/dev/null || [[ \"$uname_s\" == linux ]] ||\n         ! cpus=\"$(command sysctl -n hw.ncpu)\"; then\n        if ! command -v getconf &>/dev/null || ! cpus=\"$(command getconf _NPROCESSORS_ONLN)\"; then\n          cpus=8\n        fi\n      fi\n      local threads=$((cpus > 16 ? 32 : cpus > 0 ? 2 * cpus : 16))\n    fi\n\n    local daemon_args=(\n      --parent-pid=\"$$\"\n      --num-threads=\"$threads\"\n      --max-num-staged=\"$max_num_staged\"\n      --max-num-unstaged=\"$max_num_unstaged\"\n      --max-num-conflicted=\"$max_num_conflicted\"\n      --max-num-untracked=\"$max_num_untracked\"\n      --dirty-max-index-size=\"$max_dirty\"\n      --repo-ttl-seconds=\"$ttl\"\n      $extra_flags)\n\n    if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n      local tmpdir=$TMPDIR\n    else\n      local tmpdir=/tmp\n    fi\n    tmpdir=\"$(command mktemp -d \"$tmpdir\"/gitstatus.bash.$$.XXXXXXXXXX)\" || return\n\n    if [[ -n \"$log_level\" ]]; then\n      GITSTATUS_DAEMON_LOG=\"$tmpdir\"/daemon.log\n      [[ \"$log_level\" == INFO ]] || daemon_args+=(--log-level=\"$log_level\")\n    else\n      GITSTATUS_DAEMON_LOG=/dev/null\n    fi\n\n    req_fifo=\"$tmpdir\"/req.fifo\n    resp_fifo=\"$tmpdir\"/resp.fifo\n    command mkfifo -- \"$req_fifo\" \"$resp_fifo\" || return\n\n    {\n      (\n        trap '' INT QUIT TSTP\n        [[ \"$GITSTATUS_DAEMON_LOG\" == /dev/null ]] || set -x\n        builtin cd /\n\n        (\n          local fd_in fd_out\n          exec {fd_in}<\"$req_fifo\" {fd_out}>>\"$resp_fifo\" || exit\n          echo \"$BASHPID\" >&\"$fd_out\"\n\n          local _gitstatus_bash_daemon _gitstatus_bash_version _gitstatus_bash_downloaded\n\n          function _gitstatus_set_daemon() {\n            _gitstatus_bash_daemon=\"$1\"\n            _gitstatus_bash_version=\"$2\"\n            _gitstatus_bash_downloaded=\"$3\"\n          }\n\n          set -- -d \"$gitstatus_plugin_dir\" -s \"$uname_s\" -m \"$uname_m\" \\\n            -p \"printf '.\\036' >&$fd_out\" -e \"$fd_out\" -- _gitstatus_set_daemon\n          [[ \"${GITSTATUS_AUTO_INSTALL:-1}\" -ne 0 ]]  || set -- -n \"$@\"\n          source \"$gitstatus_plugin_dir\"/install      || return\n          [[ -n \"$_gitstatus_bash_daemon\" ]]          || return\n          [[ -n \"$_gitstatus_bash_version\" ]]         || return\n          [[ \"$_gitstatus_bash_downloaded\" == [01] ]] || return\n\n          local sig=(TERM ILL PIPE)\n\n          if (( UID == EUID )); then\n            local home=~\n          else\n            local user\n            user=\"$(command id -un)\"            || return\n            [[ \"$user\" =~ ^[a-zA-Z0-9_,.-]+$ ]] || return\n            eval \"local home=~$user\"\n            [[ -n \"$home\" ]]                    || return\n          fi\n\n          if [[ -x \"$_gitstatus_bash_daemon\" ]]; then\n            HOME=\"$home\" \"$_gitstatus_bash_daemon\" \\\n              -G \"$_gitstatus_bash_version\" \"${daemon_args[@]}\" <&\"$fd_in\" >&\"$fd_out\" &\n            local pid=$!\n            trap \"trap - ${sig[*]}; kill $pid &>/dev/null\" ${sig[@]}\n            wait \"$pid\"\n            local ret=$?\n            trap - ${sig[@]}\n            case \"$ret\" in\n              0|129|130|131|137|141|143|159)\n                echo -nE $'}bye\\x1f0\\x1e' >&\"$fd_out\"\n                exit \"$ret\"\n              ;;\n            esac\n          fi\n\n          (( ! _gitstatus_bash_downloaded ))         || return\n          [[ \"${GITSTATUS_AUTO_INSTALL:-1}\" -ne 0 ]] || return\n          [[ \"$_gitstatus_bash_daemon\" == \\\n             \"${GITSTATUS_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/gitstatus}\"/* ]] || return\n\n          set -- -f \"$@\"\n          _gitstatus_bash_daemon=\n          _gitstatus_bash_version=\n          _gitstatus_bash_downloaded=\n          source \"$gitstatus_plugin_dir\"/install   || return\n          [[ -n \"$_gitstatus_bash_daemon\" ]]       || return\n          [[ -n \"$_gitstatus_bash_version\" ]]      || return\n          [[ \"$_gitstatus_bash_downloaded\" == 1 ]] || return\n\n          HOME=\"$home\" \"$_gitstatus_bash_daemon\" \\\n            -G \"$_gitstatus_bash_version\" \"${daemon_args[@]}\" <&\"$fd_in\" >&\"$fd_out\" &\n          local pid=$!\n          trap \"trap - ${sig[*]}; kill $pid &>/dev/null\" ${sig[@]}\n          wait \"$pid\"\n          trap - ${sig[@]}\n          echo -nE $'}bye\\x1f0\\x1e' >&\"$fd_out\"\n        ) & disown\n      ) & disown\n    } 0</dev/null &>\"$GITSTATUS_DAEMON_LOG\"\n\n    exec {_GITSTATUS_REQ_FD}>>\"$req_fifo\" {_GITSTATUS_RESP_FD}<\"$resp_fifo\"   || return\n    command rm -f -- \"$req_fifo\" \"$resp_fifo\"                                 || return\n    [[ \"$GITSTATUS_DAEMON_LOG\" != /dev/null ]] || command rmdir -- \"$tmpdir\" 2>/dev/null\n\n    IFS='' read -r -u $_GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID || return\n    [[ \"$GITSTATUS_DAEMON_PID\" == [1-9]* ]] || return\n\n    local reply\n    echo -nE $'}hello\\x1f\\x1e' >&$_GITSTATUS_REQ_FD || return\n    local dl=\n    while true; do\n      reply=\n      if ! IFS='' read -rd $'\\x1e' -u $_GITSTATUS_RESP_FD -t \"$timeout\" reply; then\n        culprit=\"$reply\"\n        return 1\n      fi\n      [[ \"$reply\" == $'}hello\\x1f0' ]] && break\n      if [[ -z \"$dl\" ]]; then\n        dl=1\n        if [[ -t 2 ]]; then\n          local spinner=('\\b\\033[33m-\\033[0m' '\\b\\033[33m\\\\\\033[0m' '\\b\\033[33m|\\033[0m' '\\b\\033[33m/\\033[0m')\n          >&2 printf '[\\033[33mgitstatus\\033[0m] fetching \\033[32mgitstatusd\\033[0m ..  '\n        else\n          local spinner=('.')\n          >&2 printf '[gitstatus] fetching gitstatusd ..'\n        fi\n      fi\n      >&2 printf \"${spinner[0]}\"\n      spinner=(\"${spinner[@]:1}\" \"${spinner[0]}\")\n    done\n\n    if [[ -n \"$dl\" ]]; then\n      if [[ -t 2 ]]; then\n        >&2 printf '\\b[\\033[32mok\\033[0m]\\n'\n      else\n        >&2 echo ' [ok]'\n      fi\n    fi\n\n    _GITSTATUS_DIRTY_MAX_INDEX_SIZE=$max_dirty\n    _GITSTATUS_CLIENT_PID=\"$BASHPID\"\n  }\n\n  if ! gitstatus_start_impl; then\n    >&2 printf '\\n'\n    >&2 printf '[\\033[31mERROR\\033[0m]: gitstatus failed to initialize.\\n'\n    if [[ -n \"${culprit-}\" ]]; then\n      >&2 printf '\\n%s\\n' \"$culprit\"\n    fi\n    [[ -z \"${req_fifo:-}\"  ]] || command rm -f \"$req_fifo\"\n    [[ -z \"${resp_fifo:-}\" ]] || command rm -f \"$resp_fifo\"\n    unset -f gitstatus_start_impl\n    gitstatus_stop\n    return 1\n  fi\n\n  export _GITSTATUS_CLIENT_PID _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID\n  unset -f gitstatus_start_impl\n}\n\n# Stops gitstatusd if it's running.\nfunction gitstatus_stop() {\n  if [[ \"${_GITSTATUS_CLIENT_PID:-$BASHPID}\" == \"$BASHPID\" ]]; then\n    [[ -z \"${_GITSTATUS_REQ_FD:-}\"    ]] || exec {_GITSTATUS_REQ_FD}>&-              || true\n    [[ -z \"${_GITSTATUS_RESP_FD:-}\"   ]] || exec {_GITSTATUS_RESP_FD}>&-             || true\n    [[ -z \"${GITSTATUS_DAEMON_PID:-}\" ]] || kill \"$GITSTATUS_DAEMON_PID\" &>/dev/null || true\n  fi\n  unset _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID\n  unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE _GITSTATUS_CLIENT_PID\n}\n\n# Retrieves status of a git repository from a directory under its working tree.\n#\n# Usage: gitstatus_query [OPTION]...\n#\n#   -d STR    Directory to query. Defaults to $PWD. Has no effect if GIT_DIR is set.\n#   -t FLOAT  Timeout in seconds. Will block for at most this long. If no results\n#             are available by then, will return error.\n#   -p        Don't compute anything that requires reading Git index. If this option is used,\n#             the following parameters will be 0: VCS_STATUS_INDEX_SIZE,\n#             VCS_STATUS_{NUM,HAS}_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED}.\n#\n# On success sets VCS_STATUS_RESULT to one of the following values:\n#\n#   norepo-sync  The directory doesn't belong to a git repository.\n#   ok-sync      The directory belongs to a git repository.\n#\n# If VCS_STATUS_RESULT is ok-sync, additional variables are set:\n#\n#   VCS_STATUS_WORKDIR              Git repo working directory. Not empty.\n#   VCS_STATUS_COMMIT               Commit hash that HEAD is pointing to. Either 40 hex digits or\n#                                   empty if there is no HEAD (empty repo).\n#   VCS_STATUS_COMMIT_ENCODING      Encoding of the HEAD's commit message. Empty value means UTF-8.\n#   VCS_STATUS_COMMIT_SUMMARY       The first paragraph of the HEAD's commit message as one line.\n#   VCS_STATUS_LOCAL_BRANCH         Local branch name or empty if not on a branch.\n#   VCS_STATUS_REMOTE_NAME          The remote name, e.g. \"upstream\" or \"origin\".\n#   VCS_STATUS_REMOTE_BRANCH        Upstream branch name. Can be empty.\n#   VCS_STATUS_REMOTE_URL           Remote URL. Can be empty.\n#   VCS_STATUS_ACTION               Repository state, A.K.A. action. Can be empty.\n#   VCS_STATUS_INDEX_SIZE           The number of files in the index.\n#   VCS_STATUS_NUM_STAGED           The number of staged changes.\n#   VCS_STATUS_NUM_CONFLICTED       The number of conflicted changes.\n#   VCS_STATUS_NUM_UNSTAGED         The number of unstaged changes.\n#   VCS_STATUS_NUM_UNTRACKED        The number of untracked files.\n#   VCS_STATUS_HAS_STAGED           1 if there are staged changes, 0 otherwise.\n#   VCS_STATUS_HAS_CONFLICTED       1 if there are conflicted changes, 0 otherwise.\n#   VCS_STATUS_HAS_UNSTAGED         1 if there are unstaged changes, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_NUM_STAGED_NEW       The number of staged new files. Note that renamed files\n#                                   are reported as deleted plus new.\n#   VCS_STATUS_NUM_STAGED_DELETED   The number of staged deleted files. Note that renamed files\n#                                   are reported as deleted plus new.\n#   VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files\n#                                   are reported as deleted plus new.\n#   VCS_STATUS_HAS_UNTRACKED        1 if there are untracked files, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_COMMITS_AHEAD        Number of commits the current branch is ahead of upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_COMMITS_BEHIND       Number of commits the current branch is behind upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_STASHES              Number of stashes. Non-negative integer.\n#   VCS_STATUS_TAG                  The last tag (in lexicographical order) that points to the same\n#                                   commit as HEAD.\n#   VCS_STATUS_PUSH_REMOTE_NAME     The push remote name, e.g. \"upstream\" or \"origin\".\n#   VCS_STATUS_PUSH_REMOTE_URL      Push remote URL. Can be empty.\n#   VCS_STATUS_PUSH_COMMITS_AHEAD   Number of commits the current branch is ahead of push remote.\n#                                   Non-negative integer.\n#   VCS_STATUS_PUSH_COMMITS_BEHIND  Number of commits the current branch is behind push remote.\n#                                   Non-negative integer.\n#   VCS_STATUS_NUM_SKIP_WORKTREE    The number of files in the index with skip-worktree bit set.\n#                                   Non-negative integer.\n#   VCS_STATUS_NUM_ASSUME_UNCHANGED The number of files in the index with assume-unchanged bit set.\n#                                   Non-negative integer.\n#\n# The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in\n# large repos. See -m flag of gitstatus_start.\n#\n# gitstatus_query returns an error if gitstatus_start hasn't been called in the same\n# shell or the call had failed.\nfunction gitstatus_query() {\n  unset OPTIND\n  local opt dir= timeout=() no_diff=0\n  while getopts \"d:c:t:p\" opt \"$@\"; do\n    case \"$opt\" in\n      d) dir=$OPTARG;;\n      t) timeout=(-t \"$OPTARG\");;\n      p) no_diff=1;;\n      *) return 1;;\n    esac\n  done\n  (( OPTIND == $# + 1 )) || { echo \"usage: gitstatus_query [OPTION]...\" >&2; return 1; }\n\n  [[ -n \"${GITSTATUS_DAEMON_PID-}\" ]] || return  # not started\n\n  local req_id=\"$RANDOM.$RANDOM.$RANDOM.$RANDOM\"\n  if [[ -z \"${GIT_DIR:-}\" ]]; then\n    [[ \"$dir\" == /* ]] || dir=\"$(pwd -P)/$dir\" || return\n  elif [[ \"$GIT_DIR\" == /* ]]; then\n    dir=:\"$GIT_DIR\"\n  else\n    dir=:\"$(pwd -P)/$GIT_DIR\" || return\n  fi\n  echo -nE \"$req_id\"$'\\x1f'\"$dir\"$'\\x1f'\"$no_diff\"$'\\x1e' >&$_GITSTATUS_REQ_FD || return\n\n  local -a resp\n  while true; do\n    IFS=$'\\x1f' read -rd $'\\x1e' -a resp -u $_GITSTATUS_RESP_FD \"${timeout[@]}\" || return\n    [[ \"${resp[0]}\" == \"$req_id\" ]] && break\n  done\n\n  if [[ \"${resp[1]}\" == 1 ]]; then\n    VCS_STATUS_RESULT=ok-sync\n    VCS_STATUS_WORKDIR=\"${resp[2]}\"\n    VCS_STATUS_COMMIT=\"${resp[3]}\"\n    VCS_STATUS_LOCAL_BRANCH=\"${resp[4]}\"\n    VCS_STATUS_REMOTE_BRANCH=\"${resp[5]}\"\n    VCS_STATUS_REMOTE_NAME=\"${resp[6]}\"\n    VCS_STATUS_REMOTE_URL=\"${resp[7]}\"\n    VCS_STATUS_ACTION=\"${resp[8]}\"\n    VCS_STATUS_INDEX_SIZE=\"${resp[9]}\"\n    VCS_STATUS_NUM_STAGED=\"${resp[10]}\"\n    VCS_STATUS_NUM_UNSTAGED=\"${resp[11]}\"\n    VCS_STATUS_NUM_CONFLICTED=\"${resp[12]}\"\n    VCS_STATUS_NUM_UNTRACKED=\"${resp[13]}\"\n    VCS_STATUS_COMMITS_AHEAD=\"${resp[14]}\"\n    VCS_STATUS_COMMITS_BEHIND=\"${resp[15]}\"\n    VCS_STATUS_STASHES=\"${resp[16]}\"\n    VCS_STATUS_TAG=\"${resp[17]}\"\n    VCS_STATUS_NUM_UNSTAGED_DELETED=\"${resp[18]}\"\n    VCS_STATUS_NUM_STAGED_NEW=\"${resp[19]:-0}\"\n    VCS_STATUS_NUM_STAGED_DELETED=\"${resp[20]:-0}\"\n    VCS_STATUS_PUSH_REMOTE_NAME=\"${resp[21]:-}\"\n    VCS_STATUS_PUSH_REMOTE_URL=\"${resp[22]:-}\"\n    VCS_STATUS_PUSH_COMMITS_AHEAD=\"${resp[23]:-0}\"\n    VCS_STATUS_PUSH_COMMITS_BEHIND=\"${resp[24]:-0}\"\n    VCS_STATUS_NUM_SKIP_WORKTREE=\"${resp[25]:-0}\"\n    VCS_STATUS_NUM_ASSUME_UNCHANGED=\"${resp[26]:-0}\"\n    VCS_STATUS_COMMIT_ENCODING=\"${resp[27]-}\"\n    VCS_STATUS_COMMIT_SUMMARY=\"${resp[28]-}\"\n    VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))\n    if (( _GITSTATUS_DIRTY_MAX_INDEX_SIZE >= 0 &&\n          VCS_STATUS_INDEX_SIZE > _GITSTATUS_DIRTY_MAX_INDEX_SIZE_ )); then\n      VCS_STATUS_HAS_UNSTAGED=-1\n      VCS_STATUS_HAS_CONFLICTED=-1\n      VCS_STATUS_HAS_UNTRACKED=-1\n    else\n      VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0))\n      VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0))\n      VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0))\n    fi\n  else\n    VCS_STATUS_RESULT=norepo-sync\n    unset VCS_STATUS_WORKDIR\n    unset VCS_STATUS_COMMIT\n    unset VCS_STATUS_LOCAL_BRANCH\n    unset VCS_STATUS_REMOTE_BRANCH\n    unset VCS_STATUS_REMOTE_NAME\n    unset VCS_STATUS_REMOTE_URL\n    unset VCS_STATUS_ACTION\n    unset VCS_STATUS_INDEX_SIZE\n    unset VCS_STATUS_NUM_STAGED\n    unset VCS_STATUS_NUM_UNSTAGED\n    unset VCS_STATUS_NUM_CONFLICTED\n    unset VCS_STATUS_NUM_UNTRACKED\n    unset VCS_STATUS_HAS_STAGED\n    unset VCS_STATUS_HAS_UNSTAGED\n    unset VCS_STATUS_HAS_CONFLICTED\n    unset VCS_STATUS_HAS_UNTRACKED\n    unset VCS_STATUS_COMMITS_AHEAD\n    unset VCS_STATUS_COMMITS_BEHIND\n    unset VCS_STATUS_STASHES\n    unset VCS_STATUS_TAG\n    unset VCS_STATUS_NUM_UNSTAGED_DELETED\n    unset VCS_STATUS_NUM_STAGED_NEW\n    unset VCS_STATUS_NUM_STAGED_DELETED\n    unset VCS_STATUS_PUSH_REMOTE_NAME\n    unset VCS_STATUS_PUSH_REMOTE_URL\n    unset VCS_STATUS_PUSH_COMMITS_AHEAD\n    unset VCS_STATUS_PUSH_COMMITS_BEHIND\n    unset VCS_STATUS_NUM_SKIP_WORKTREE\n    unset VCS_STATUS_NUM_ASSUME_UNCHANGED\n    unset VCS_STATUS_COMMIT_ENCODING\n    unset VCS_STATUS_COMMIT_SUMMARY\n  fi\n}\n\n# Usage: gitstatus_check.\n#\n# Returns 0 if and only if gitstatus_start has succeeded previously.\n# If it returns non-zero, gitstatus_query is guaranteed to return non-zero.\nfunction gitstatus_check() {\n  [[ -n \"$GITSTATUS_DAEMON_PID\" ]]\n}\n"
  },
  {
    "path": "gitstatus/gitstatus.plugin.zsh",
    "content": "# Zsh bindings for gitstatus.\n#\n# ------------------------------------------------------------------\n#\n# Example: Start gitstatusd, send it a request, wait for response and print it.\n#\n#   source ~/gitstatus/gitstatus.plugin.zsh\n#   gitstatus_start MY\n#   gitstatus_query -d $PWD MY\n#   typeset -m 'VCS_STATUS_*'\n#\n# Output:\n#\n#   VCS_STATUS_ACTION=''\n#   VCS_STATUS_COMMIT=c000eddcff0fb38df2d0137efe24d9d2d900f209\n#   VCS_STATUS_COMMITS_AHEAD=0\n#   VCS_STATUS_COMMITS_BEHIND=0\n#   VCS_STATUS_COMMIT_ENCODING=''\n#   VCS_STATUS_COMMIT_SUMMARY='pull upstream changes from gitstatus'\n#   VCS_STATUS_HAS_CONFLICTED=0\n#   VCS_STATUS_HAS_STAGED=0\n#   VCS_STATUS_HAS_UNSTAGED=1\n#   VCS_STATUS_HAS_UNTRACKED=1\n#   VCS_STATUS_INDEX_SIZE=33\n#   VCS_STATUS_LOCAL_BRANCH=master\n#   VCS_STATUS_NUM_ASSUME_UNCHANGED=0\n#   VCS_STATUS_NUM_CONFLICTED=0\n#   VCS_STATUS_NUM_STAGED=0\n#   VCS_STATUS_NUM_UNSTAGED=1\n#   VCS_STATUS_NUM_SKIP_WORKTREE=0\n#   VCS_STATUS_NUM_STAGED_NEW=0\n#   VCS_STATUS_NUM_STAGED_DELETED=0\n#   VCS_STATUS_NUM_UNSTAGED_DELETED=0\n#   VCS_STATUS_NUM_UNTRACKED=1\n#   VCS_STATUS_PUSH_COMMITS_AHEAD=0\n#   VCS_STATUS_PUSH_COMMITS_BEHIND=0\n#   VCS_STATUS_PUSH_REMOTE_NAME=''\n#   VCS_STATUS_PUSH_REMOTE_URL=''\n#   VCS_STATUS_REMOTE_BRANCH=master\n#   VCS_STATUS_REMOTE_NAME=origin\n#   VCS_STATUS_REMOTE_URL=git@github.com:romkatv/powerlevel10k.git\n#   VCS_STATUS_RESULT=ok-sync\n#   VCS_STATUS_STASHES=0\n#   VCS_STATUS_TAG=''\n#   VCS_STATUS_WORKDIR=/home/romka/powerlevel10k\n\n[[ -o 'interactive' ]] || 'return'\n\n# Temporarily change options.\n'builtin' 'local' '-a' '_gitstatus_opts'\n[[ ! -o 'aliases'         ]] || _gitstatus_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || _gitstatus_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || _gitstatus_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\nautoload -Uz add-zsh-hook        || return\nzmodload zsh/datetime zsh/system || return\nzmodload -F zsh/files b:zf_rm    || return\n\ntypeset -g _gitstatus_plugin_dir\"${1:-}\"=\"${${(%):-%x}:A:h}\"\n\n# Retrieves status of a git repo from a directory under its working tree.\n#\n## Usage: gitstatus_query [OPTION]... NAME\n#\n#   -d STR    Directory to query. Defaults to the current directory. Has no effect if GIT_DIR\n#             is set.\n#   -c STR    Callback function to call once the results are available. Called only after\n#             gitstatus_query returns 0 with VCS_STATUS_RESULT=tout.\n#   -t FLOAT  Timeout in seconds. Negative value means infinity. Will block for at most this long.\n#             If no results are available by then: if -c isn't specified, will return 1; otherwise\n#             will set VCS_STATUS_RESULT=tout and return 0.\n#   -p        Don't compute anything that requires reading Git index. If this option is used,\n#             the following parameters will be 0: VCS_STATUS_INDEX_SIZE,\n#             VCS_STATUS_{NUM,HAS}_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED}.\n#\n# On success sets VCS_STATUS_RESULT to one of the following values:\n#\n#   tout         Timed out waiting for data; will call the user-specified callback later.\n#   norepo-sync  The directory isn't a git repo.\n#   ok-sync      The directory is a git repo.\n#\n# When the callback is called, VCS_STATUS_RESULT is set to one of the following values:\n#\n#   norepo-async  The directory isn't a git repo.\n#   ok-async      The directory is a git repo.\n#\n# If VCS_STATUS_RESULT is ok-sync or ok-async, additional variables are set:\n#\n#   VCS_STATUS_WORKDIR              Git repo working directory. Not empty.\n#   VCS_STATUS_COMMIT               Commit hash that HEAD is pointing to. Either 40 hex digits or\n#                                   empty if there is no HEAD (empty repo).\n#   VCS_STATUS_COMMIT_ENCODING      Encoding of the HEAD's commit message. Empty value means UTF-8.\n#   VCS_STATUS_COMMIT_SUMMARY       The first paragraph of the HEAD's commit message as one line.\n#   VCS_STATUS_LOCAL_BRANCH         Local branch name or empty if not on a branch.\n#   VCS_STATUS_REMOTE_NAME          The remote name, e.g. \"upstream\" or \"origin\".\n#   VCS_STATUS_REMOTE_BRANCH        Upstream branch name. Can be empty.\n#   VCS_STATUS_REMOTE_URL           Remote URL. Can be empty.\n#   VCS_STATUS_ACTION               Repository state, A.K.A. action. Can be empty.\n#   VCS_STATUS_INDEX_SIZE           The number of files in the index.\n#   VCS_STATUS_NUM_STAGED           The number of staged changes.\n#   VCS_STATUS_NUM_CONFLICTED       The number of conflicted changes.\n#   VCS_STATUS_NUM_UNSTAGED         The number of unstaged changes.\n#   VCS_STATUS_NUM_UNTRACKED        The number of untracked files.\n#   VCS_STATUS_HAS_STAGED           1 if there are staged changes, 0 otherwise.\n#   VCS_STATUS_HAS_CONFLICTED       1 if there are conflicted changes, 0 otherwise.\n#   VCS_STATUS_HAS_UNSTAGED         1 if there are unstaged changes, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_NUM_STAGED_NEW       The number of staged new files. Note that renamed files\n#                                   are reported as deleted plus new.\n#   VCS_STATUS_NUM_STAGED_DELETED   The number of staged deleted files. Note that renamed files\n#                                   are reported as deleted plus new.\n#   VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files\n#                                   are reported as deleted plus new.\n#   VCS_STATUS_HAS_UNTRACKED        1 if there are untracked files, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_COMMITS_AHEAD        Number of commits the current branch is ahead of upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_COMMITS_BEHIND       Number of commits the current branch is behind upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_STASHES              Number of stashes. Non-negative integer.\n#   VCS_STATUS_TAG                  The last tag (in lexicographical order) that points to the same\n#                                   commit as HEAD.\n#   VCS_STATUS_PUSH_REMOTE_NAME     The push remote name, e.g. \"upstream\" or \"origin\".\n#   VCS_STATUS_PUSH_REMOTE_URL      Push remote URL. Can be empty.\n#   VCS_STATUS_PUSH_COMMITS_AHEAD   Number of commits the current branch is ahead of push remote.\n#                                   Non-negative integer.\n#   VCS_STATUS_PUSH_COMMITS_BEHIND  Number of commits the current branch is behind push remote.\n#                                   Non-negative integer.\n#   VCS_STATUS_NUM_SKIP_WORKTREE    The number of files in the index with skip-worktree bit set.\n#                                   Non-negative integer.\n#   VCS_STATUS_NUM_ASSUME_UNCHANGED The number of files in the index with assume-unchanged bit set.\n#                                   Non-negative integer.\n#\n# The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in\n# large repos. See -m flag of gitstatus_start.\n#\n# gitstatus_query returns an error if gitstatus_start hasn't been called in the same shell or\n# the call had failed.\n#\n#       !!!!! WARNING: CONCURRENT CALLS WITH THE SAME NAME ARE NOT ALLOWED !!!!!\n#\n# It's illegal to call gitstatus_query if the last asynchronous call with the same NAME hasn't\n# completed yet. If you need to issue concurrent requests, use different NAME arguments.\nfunction gitstatus_query\"${1:-}\"() {\n  emulate -L zsh -o no_aliases -o extended_glob -o typeset_silent\n\n  local fsuf=${${(%):-%N}#gitstatus_query}\n\n  unset VCS_STATUS_RESULT\n\n  local opt dir callback OPTARG\n  local -i no_diff OPTIND\n  local -F timeout=-1\n  while getopts \":d:c:t:p\" opt; do\n    case $opt in\n      +p) no_diff=0;;\n      p)  no_diff=1;;\n      d)  dir=$OPTARG;;\n      c)  callback=$OPTARG;;\n      t)\n        if [[ $OPTARG != (|+|-)<->(|.<->)(|[eE](|-|+)<->) ]]; then\n          print -ru2 -- \"gitstatus_query: invalid -t argument: $OPTARG\"\n          return 1\n        fi\n        timeout=OPTARG\n      ;;\n      \\?) print -ru2 -- \"gitstatus_query: invalid option: $OPTARG\"           ; return 1;;\n      :)  print -ru2 -- \"gitstatus_query: missing required argument: $OPTARG\"; return 1;;\n      *)  print -ru2 -- \"gitstatus_query: invalid option: $opt\"              ; return 1;;\n    esac\n  done\n\n  if (( OPTIND != ARGC )); then\n    print -ru2 -- \"gitstatus_query: exactly one positional argument is required\"\n    return 1\n  fi\n\n  local name=$*[OPTIND]\n  if [[ $name != [[:IDENT:]]## ]]; then\n    print -ru2 -- \"gitstatus_query: invalid positional argument: $name\"\n    return 1\n  fi\n\n  (( _GITSTATUS_STATE_$name == 2 )) || return\n\n  if [[ -z $GIT_DIR ]]; then\n    if [[ $dir != /* ]]; then\n      if [[ $PWD == /* && $PWD -ef . ]]; then\n        dir=$PWD/$dir\n      else\n        dir=${dir:a}\n      fi\n    fi\n  else\n    if [[ $GIT_DIR == /* ]]; then\n      dir=:$GIT_DIR\n    elif [[ $PWD == /* && $PWD -ef . ]]; then\n      dir=:$PWD/$GIT_DIR\n    else\n      dir=:${GIT_DIR:a}\n    fi\n  fi\n\n  if [[ $dir != (|:)/* ]]; then\n    typeset -g VCS_STATUS_RESULT=norepo-sync\n    _gitstatus_clear$fsuf\n    return 0\n  fi\n\n  local -i req_fd=${(P)${:-_GITSTATUS_REQ_FD_$name}}\n  local req_id=$EPOCHREALTIME\n  print -rnu $req_fd -- $req_id' '$callback$'\\x1f'$dir$'\\x1f'$no_diff$'\\x1e' || return\n\n  (( ++_GITSTATUS_NUM_INFLIGHT_$name ))\n\n  if (( timeout == 0 )); then\n    typeset -g VCS_STATUS_RESULT=tout\n    _gitstatus_clear$fsuf\n  else\n    while true; do\n      _gitstatus_process_response$fsuf $name $timeout $req_id || return\n      [[ $VCS_STATUS_RESULT == *-async ]] || break\n    done\n  fi\n\n  [[ $VCS_STATUS_RESULT != tout || -n $callback ]]\n}\n\n# If the last call to gitstatus_query timed out (VCS_STATUS_RESULT=tout), wait for the callback\n# to be called. Otherwise do nothing.\n#\n# Usage: gitstatus_process_results [OPTION]... NAME\n#\n#   -t FLOAT  Timeout in seconds. Negative value means infinity. Will block for at most this long.\n#\n# Returns an error only when invoked with incorrect arguments and when gitstatusd isn't running or\n# broken.\n#\n# If a callback gets called, VCS_STATUS_* parameters are set as in gitstatus_query.\n# VCS_STATUS_RESULT is either norepo-async or ok-async.\nfunction gitstatus_process_results\"${1:-}\"() {\n  emulate -L zsh -o no_aliases -o extended_glob -o typeset_silent\n\n  local fsuf=${${(%):-%N}#gitstatus_process_results}\n\n  local opt OPTARG\n  local -i OPTIND\n  local -F timeout=-1\n  while getopts \":t:\" opt; do\n    case $opt in\n      t)\n        if [[ $OPTARG != (|+|-)<->(|.<->)(|[eE](|-|+)<->) ]]; then\n          print -ru2 -- \"gitstatus_process_results: invalid -t argument: $OPTARG\"\n          return 1\n        fi\n        timeout=OPTARG\n      ;;\n      \\?) print -ru2 -- \"gitstatus_process_results: invalid option: $OPTARG\"           ; return 1;;\n      :)  print -ru2 -- \"gitstatus_process_results: missing required argument: $OPTARG\"; return 1;;\n      *)  print -ru2 -- \"gitstatus_process_results: invalid option: $opt\"              ; return 1;;\n    esac\n  done\n\n  if (( OPTIND != ARGC )); then\n    print -ru2 -- \"gitstatus_process_results: exactly one positional argument is required\"\n    return 1\n  fi\n\n  local name=$*[OPTIND]\n  if [[ $name != [[:IDENT:]]## ]]; then\n    print -ru2 -- \"gitstatus_process_results: invalid positional argument: $name\"\n    return 1\n  fi\n\n  (( _GITSTATUS_STATE_$name == 2 )) || return\n\n  while (( _GITSTATUS_NUM_INFLIGHT_$name )); do\n    _gitstatus_process_response$fsuf $name $timeout '' || return\n    [[ $VCS_STATUS_RESULT == *-async ]] || break\n  done\n\n  return 0\n}\n\nfunction _gitstatus_clear\"${1:-}\"() {\n  unset VCS_STATUS_{WORKDIR,COMMIT,LOCAL_BRANCH,REMOTE_BRANCH,REMOTE_NAME,REMOTE_URL,ACTION,INDEX_SIZE,NUM_STAGED,NUM_UNSTAGED,NUM_CONFLICTED,NUM_UNTRACKED,HAS_STAGED,HAS_UNSTAGED,HAS_CONFLICTED,HAS_UNTRACKED,COMMITS_AHEAD,COMMITS_BEHIND,STASHES,TAG,NUM_UNSTAGED_DELETED,NUM_STAGED_NEW,NUM_STAGED_DELETED,PUSH_REMOTE_NAME,PUSH_REMOTE_URL,PUSH_COMMITS_AHEAD,PUSH_COMMITS_BEHIND,NUM_SKIP_WORKTREE,NUM_ASSUME_UNCHANGED}\n}\n\nfunction _gitstatus_process_response\"${1:-}\"() {\n  local name=$1 timeout req_id=$3 buf\n  local -i resp_fd=_GITSTATUS_RESP_FD_$name\n  local -i dirty_max_index_size=_GITSTATUS_DIRTY_MAX_INDEX_SIZE_$name\n\n  (( $2 >= 0 )) && timeout=-t$2 && [[ -t $resp_fd ]]\n  sysread $timeout -i $resp_fd 'buf[$#buf+1]' || {\n    if (( $? == 4 )); then\n      if [[ -n $req_id ]]; then\n        typeset -g VCS_STATUS_RESULT=tout\n        _gitstatus_clear$fsuf\n      fi\n      return 0\n    else\n      gitstatus_stop$fsuf $name\n      return 1\n    fi\n  }\n  while [[ $buf != *$'\\x1e' ]]; do\n    if ! sysread -i $resp_fd 'buf[$#buf+1]'; then\n      gitstatus_stop$fsuf $name\n      return 1\n    fi\n  done\n\n  local s\n  for s in ${(ps:\\x1e:)buf}; do\n    local -a resp=(\"${(@ps:\\x1f:)s}\")\n    if (( resp[2] )); then\n      if [[ $resp[1] == $req_id' '* ]]; then\n        typeset -g VCS_STATUS_RESULT=ok-sync\n      else\n        typeset -g VCS_STATUS_RESULT=ok-async\n      fi\n      for VCS_STATUS_WORKDIR              \\\n          VCS_STATUS_COMMIT               \\\n          VCS_STATUS_LOCAL_BRANCH         \\\n          VCS_STATUS_REMOTE_BRANCH        \\\n          VCS_STATUS_REMOTE_NAME          \\\n          VCS_STATUS_REMOTE_URL           \\\n          VCS_STATUS_ACTION               \\\n          VCS_STATUS_INDEX_SIZE           \\\n          VCS_STATUS_NUM_STAGED           \\\n          VCS_STATUS_NUM_UNSTAGED         \\\n          VCS_STATUS_NUM_CONFLICTED       \\\n          VCS_STATUS_NUM_UNTRACKED        \\\n          VCS_STATUS_COMMITS_AHEAD        \\\n          VCS_STATUS_COMMITS_BEHIND       \\\n          VCS_STATUS_STASHES              \\\n          VCS_STATUS_TAG                  \\\n          VCS_STATUS_NUM_UNSTAGED_DELETED \\\n          VCS_STATUS_NUM_STAGED_NEW       \\\n          VCS_STATUS_NUM_STAGED_DELETED   \\\n          VCS_STATUS_PUSH_REMOTE_NAME     \\\n          VCS_STATUS_PUSH_REMOTE_URL      \\\n          VCS_STATUS_PUSH_COMMITS_AHEAD   \\\n          VCS_STATUS_PUSH_COMMITS_BEHIND  \\\n          VCS_STATUS_NUM_SKIP_WORKTREE    \\\n          VCS_STATUS_NUM_ASSUME_UNCHANGED \\\n          VCS_STATUS_COMMIT_ENCODING      \\\n          VCS_STATUS_COMMIT_SUMMARY in \"${(@)resp[3,29]}\"; do\n      done\n      typeset -gi VCS_STATUS_{INDEX_SIZE,NUM_STAGED,NUM_UNSTAGED,NUM_CONFLICTED,NUM_UNTRACKED,COMMITS_AHEAD,COMMITS_BEHIND,STASHES,NUM_UNSTAGED_DELETED,NUM_STAGED_NEW,NUM_STAGED_DELETED,PUSH_COMMITS_AHEAD,PUSH_COMMITS_BEHIND,NUM_SKIP_WORKTREE,NUM_ASSUME_UNCHANGED}\n      typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))\n      if (( dirty_max_index_size >= 0 && VCS_STATUS_INDEX_SIZE > dirty_max_index_size )); then\n        typeset -gi                    \\\n          VCS_STATUS_HAS_UNSTAGED=-1   \\\n          VCS_STATUS_HAS_CONFLICTED=-1 \\\n          VCS_STATUS_HAS_UNTRACKED=-1\n      else\n        typeset -gi                                                    \\\n          VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0))     \\\n          VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0)) \\\n          VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0))\n      fi\n    else\n      if [[ $resp[1] == $req_id' '* ]]; then\n        typeset -g VCS_STATUS_RESULT=norepo-sync\n      else\n        typeset -g VCS_STATUS_RESULT=norepo-async\n      fi\n      _gitstatus_clear$fsuf\n    fi\n    (( --_GITSTATUS_NUM_INFLIGHT_$name ))\n    [[ $VCS_STATUS_RESULT == *-async ]] && emulate zsh -c \"${resp[1]#* }\"\n  done\n\n  return 0\n}\n\nfunction _gitstatus_daemon\"${1:-}\"() {\n  local -i pipe_fd\n  exec 0<&- {pipe_fd}>&1 1>>$daemon_log 2>&1 || return\n  local pgid=$sysparams[pid]\n  [[ $pgid == <1-> ]] || return\n  builtin cd -q /     || return\n\n  {\n    {\n      trap '' PIPE\n\n      local uname_sm\n      uname_sm=\"${${(L)$(command uname -sm)}//ı/i}\" || return\n      [[ $uname_sm == [^' ']##' '[^' ']## ]]        || return\n      local uname_s=${uname_sm% *}\n      local uname_m=${uname_sm#* }\n\n      if [[ $GITSTATUS_NUM_THREADS == <1-> ]]; then\n        args+=(-t $GITSTATUS_NUM_THREADS)\n      else\n        local cpus\n        if (( ! $+commands[sysctl] )) || [[ $uname_s == linux ]] ||\n            ! cpus=\"$(command sysctl -n hw.ncpu)\"; then\n          if (( ! $+commands[getconf] )) || ! cpus=\"$(command getconf _NPROCESSORS_ONLN)\"; then\n            cpus=8\n          fi\n        fi\n        args+=(-t $((cpus > 16 ? 32 : cpus > 0 ? 2 * cpus : 16)))\n      fi\n\n      command mkfifo -- $file_prefix.fifo   || return\n      print -rnu $pipe_fd -- ${(l:20:)pgid} || return\n      exec <$file_prefix.fifo               || return\n      zf_rm -- $file_prefix.fifo            || return\n\n      local _gitstatus_zsh_daemon _gitstatus_zsh_version _gitstatus_zsh_downloaded\n\n      function _gitstatus_set_daemon$fsuf() {\n        _gitstatus_zsh_daemon=\"$1\"\n        _gitstatus_zsh_version=\"$2\"\n        _gitstatus_zsh_downloaded=\"$3\"\n      }\n\n      local gitstatus_plugin_dir_var=_gitstatus_plugin_dir$fsuf\n      local gitstatus_plugin_dir=${(P)gitstatus_plugin_dir_var}\n      builtin set -- -d $gitstatus_plugin_dir -s $uname_s -m $uname_m \\\n        -p \"printf '\\\\001' >&$pipe_fd\" -e $pipe_fd -- _gitstatus_set_daemon$fsuf\n      [[ ${GITSTATUS_AUTO_INSTALL:-1} == (|-|+)<1-> ]] || builtin set -- -n \"$@\"\n      builtin source $gitstatus_plugin_dir/install     || return\n      [[ -n $_gitstatus_zsh_daemon ]]                  || return\n      [[ -n $_gitstatus_zsh_version ]]                 || return\n      [[ $_gitstatus_zsh_downloaded == [01] ]]         || return\n\n      if (( UID == EUID )); then\n        local home=~\n      else\n        local user\n        user=\"$(command id -un)\" || return\n        local home=${userdirs[$user]}\n        [[ -n $home ]] || return\n      fi\n\n      if [[ -x $_gitstatus_zsh_daemon ]]; then\n        HOME=$home $_gitstatus_zsh_daemon -G $_gitstatus_zsh_version \"${(@)args}\" >&$pipe_fd\n        local -i ret=$?\n        [[ $ret == (0|129|130|131|137|141|143|159) ]] && return ret\n      fi\n\n      (( ! _gitstatus_zsh_downloaded ))                || return\n      [[ ${GITSTATUS_AUTO_INSTALL:-1} == (|-|+)<1-> ]] || return\n      [[ $_gitstatus_zsh_daemon == \\\n         ${GITSTATUS_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/gitstatus}/* ]] || return\n\n      builtin set -- -f \"$@\"\n      _gitstatus_zsh_daemon=\n      _gitstatus_zsh_version=\n      _gitstatus_zsh_downloaded=\n      builtin source $gitstatus_plugin_dir/install || return\n      [[ -n $_gitstatus_zsh_daemon ]]              || return\n      [[ -n $_gitstatus_zsh_version ]]             || return\n      [[ $_gitstatus_zsh_downloaded == 1 ]]        || return\n\n      HOME=$home $_gitstatus_zsh_daemon -G $_gitstatus_zsh_version \"${(@)args}\" >&$pipe_fd\n    } always {\n      local -i ret=$?\n      zf_rm -f -- $file_prefix.lock $file_prefix.fifo\n      kill -- -$pgid\n    }\n  } &!\n\n  (( lock_fd == -1 )) && return\n\n  {\n    if zsystem flock -- $file_prefix.lock && command sleep 5 && [[ -e $file_prefix.lock ]]; then\n      zf_rm -f -- $file_prefix.lock $file_prefix.fifo\n      kill -- -$pgid\n    fi\n  } &!\n}\n\n# Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd is already running.\n#\n# Usage: gitstatus_start [OPTION]... NAME\n#\n#   -t FLOAT  Fail the self-check on initialization if not getting a response from gitstatusd for\n#             this this many seconds. Defaults to 5.\n#\n#   -s INT    Report at most this many staged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -u INT    Report at most this many unstaged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -c INT    Report at most this many conflicted changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -d INT    Report at most this many untracked files; negative value means infinity.\n#             Defaults to 1.\n#\n#   -m INT    Report -1 unstaged, untracked and conflicted if there are more than this many\n#             files in the index. Negative value means infinity. Defaults to -1.\n#\n#   -e        Count files within untracked directories like `git status --untracked-files`.\n#\n#   -U        Unless this option is specified, report zero untracked files for repositories\n#             with status.showUntrackedFiles = false.\n#\n#   -W        Unless this option is specified, report zero untracked files for repositories\n#             with bash.showUntrackedFiles = false.\n#\n#   -D        Unless this option is specified, report zero staged, unstaged and conflicted\n#             changes for repositories with bash.showDirtyState = false.\nfunction gitstatus_start\"${1:-}\"() {\n  emulate -L zsh -o no_aliases -o no_bg_nice -o extended_glob -o typeset_silent || return\n  print -rnu2 || return\n\n  local fsuf=${${(%):-%N}#gitstatus_start}\n\n  local opt OPTARG\n  local -i OPTIND\n  local -F timeout=5\n  local -i async=0\n  local -a args=()\n  local -i dirty_max_index_size=-1\n\n  while getopts \":t:s:u:c:d:m:eaUWD\" opt; do\n    case $opt in\n      a)  async=1;;\n      +a) async=0;;\n      t)\n        if [[ $OPTARG != (|+)<->(|.<->)(|[eE](|-|+)<->) ]] || (( ${timeout::=OPTARG} <= 0 )); then\n          print -ru2 -- \"gitstatus_start: invalid -t argument: $OPTARG\"\n          return 1\n        fi\n      ;;\n      s|u|c|d|m)\n        if [[ $OPTARG != (|-|+)<-> ]]; then\n          print -ru2 -- \"gitstatus_start: invalid -$opt argument: $OPTARG\"\n          return 1\n        fi\n        args+=(-$opt $OPTARG)\n        [[ $opt == m ]] && dirty_max_index_size=OPTARG\n      ;;\n      e|U|W|D)    args+=-$opt;;\n      +(e|U|W|D)) args=(${(@)args:#-$opt});;\n      \\?) print -ru2 -- \"gitstatus_start: invalid option: $OPTARG\"           ; return 1;;\n      :)  print -ru2 -- \"gitstatus_start: missing required argument: $OPTARG\"; return 1;;\n      *)  print -ru2 -- \"gitstatus_start: invalid option: $opt\"              ; return 1;;\n    esac\n  done\n\n  if (( OPTIND != ARGC )); then\n    print -ru2 -- \"gitstatus_start: exactly one positional argument is required\"\n    return 1\n  fi\n\n  local name=$*[OPTIND]\n  if [[ $name != [[:IDENT:]]## ]]; then\n    print -ru2 -- \"gitstatus_start: invalid positional argument: $name\"\n    return 1\n  fi\n\n  local -i lock_fd resp_fd stderr_fd\n  local file_prefix xtrace=/dev/null daemon_log=/dev/null culprit\n\n  {\n    if (( _GITSTATUS_STATE_$name )); then\n      (( async )) && return\n      (( _GITSTATUS_STATE_$name == 2 )) && return\n      lock_fd=_GITSTATUS_LOCK_FD_$name\n      resp_fd=_GITSTATUS_RESP_FD_$name\n      xtrace=${(P)${:-GITSTATUS_XTRACE_$name}}\n      daemon_log=${(P)${:-GITSTATUS_DAEMON_LOG_$name}}\n      file_prefix=${(P)${:-_GITSTATUS_FILE_PREFIX_$name}}\n    else\n      typeset -gi _GITSTATUS_START_COUNTER\n      local log_level=$GITSTATUS_LOG_LEVEL\n      if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n        local tmpdir=$TMPDIR\n      else\n        local tmpdir=/tmp\n      fi\n      local file_prefix=${tmpdir:A}/gitstatus.$name.$EUID\n      file_prefix+=.$sysparams[pid].$EPOCHSECONDS.$((++_GITSTATUS_START_COUNTER))\n      (( GITSTATUS_ENABLE_LOGGING )) && : ${log_level:=INFO}\n      if [[ -n $log_level ]]; then\n        xtrace=$file_prefix.xtrace.log\n        daemon_log=$file_prefix.daemon.log\n      fi\n      args+=(-v ${log_level:-FATAL})\n      typeset -g GITSTATUS_XTRACE_$name=$xtrace\n      typeset -g GITSTATUS_DAEMON_LOG_$name=$daemon_log\n      typeset -g _GITSTATUS_FILE_PREFIX_$name=$file_prefix\n      typeset -gi _GITSTATUS_CLIENT_PID_$name=\"sysparams[pid]\"\n      typeset -gi _GITSTATUS_DIRTY_MAX_INDEX_SIZE_$name=dirty_max_index_size\n    fi\n\n    () {\n      if [[ $xtrace != /dev/null && -o no_xtrace ]]; then\n        exec {stderr_fd}>&2 || return\n        exec 2>>$xtrace     || return\n        setopt xtrace\n      fi\n\n      setopt monitor || return\n\n      if (( ! _GITSTATUS_STATE_$name )); then\n        if [[ -r /proc/version && \"$(</proc/version)\" == *Microsoft* ]]; then\n          lock_fd=-1\n        else\n          print -rn >$file_prefix.lock               || return\n          zsystem flock -f lock_fd $file_prefix.lock || return\n          [[ $lock_fd == <1-> ]]                     || return\n        fi\n\n        typeset -gi _GITSTATUS_LOCK_FD_$name=lock_fd\n\n        if [[ $OSTYPE == cygwin* && -d /proc/self/fd ]]; then\n          # Work around bugs in Cygwin 32-bit.\n          #\n          # This hangs:\n          #\n          #   emulate -L zsh\n          #   () { exec {fd}< $1 } <(:)\n          #   =true  # hangs here\n          #\n          # This hangs:\n          #\n          #   sysopen -r -u fd <(:)\n          local -i fd\n          exec {fd}< <(_gitstatus_daemon$fsuf)                       || return\n          {\n            [[ -r /proc/self/fd/$fd ]]                               || return\n            sysopen -r -o cloexec -u resp_fd /proc/self/fd/$fd       || return\n          } always {\n            exec {fd} >&-                                            || return\n          }\n        else\n          sysopen -r -o cloexec -u resp_fd <(_gitstatus_daemon$fsuf) || return\n        fi\n\n        typeset -gi GITSTATUS_DAEMON_PID_$name=\"${sysparams[procsubstpid]:--1}\"\n\n        [[ $resp_fd == <1-> ]] || return\n        typeset -gi _GITSTATUS_RESP_FD_$name=resp_fd\n        typeset -gi _GITSTATUS_STATE_$name=1\n      fi\n\n      if (( ! async )); then\n        (( _GITSTATUS_CLIENT_PID_$name == sysparams[pid] )) || return\n\n        local pgid\n        while (( $#pgid < 20 )); do\n          [[ -t $resp_fd ]]\n          sysread -s $((20 - $#pgid)) -t $timeout -i $resp_fd 'pgid[$#pgid+1]' || return\n        done\n        [[ $pgid == ' '#<1-> ]] || return\n        typeset -gi GITSTATUS_DAEMON_PID_$name=pgid\n\n        sysopen -w -o cloexec -u req_fd -- $file_prefix.fifo || return\n        [[ $req_fd == <1-> ]]                                || return\n        typeset -gi _GITSTATUS_REQ_FD_$name=req_fd\n\n        print -nru $req_fd -- $'}hello\\x1f\\x1e' || return\n        local expected=$'}hello\\x1f0\\x1e' actual\n        if (( $+functions[p10k] )) && [[ ! -t 1 && ! -t 0 ]]; then\n          local -F deadline='EPOCHREALTIME + 4'\n        else\n          local -F deadline='1'\n        fi\n        while true; do\n          [[ -t $resp_fd ]]\n          sysread -s 1 -t $timeout -i $resp_fd actual || return\n          [[ $expected == $actual* ]] && break\n          if [[ $actual != $'\\1' ]]; then\n            [[ -t $resp_fd ]]\n            while sysread -t $timeout -i $resp_fd 'actual[$#actual+1]'; do\n              [[ -t $resp_fd ]]\n            done\n            culprit=$actual\n            return 1\n          fi\n          (( EPOCHREALTIME < deadline )) && continue\n          if (( deadline > 0 )); then\n            deadline=0\n            if (( stderr_fd )); then\n              unsetopt xtrace\n              exec 2>&$stderr_fd {stderr_fd}>&-\n              stderr_fd=0\n            fi\n            if (( $+functions[p10k] )); then\n              p10k clear-instant-prompt || return\n            fi\n            if [[ $name == POWERLEVEL9K ]]; then\n              local label=powerlevel10k\n            else\n              local label=gitstatus\n            fi\n            if [[ -t 2 ]]; then\n              local spinner=($'\\b%3F-%f' $'\\b%3F\\\\%f' $'\\b%3F|%f' $'\\b%3F/%f')\n              print -Prnu2 -- \"[%3F$label%f] fetching %2Fgitstatusd%f ..  \"\n            else\n              local spinner=('.')\n              print -rnu2 -- \"[$label] fetching gitstatusd ..\"\n            fi\n          fi\n          print -Prnu2 -- $spinner[1]\n          spinner=($spinner[2,-1] $spinner[1])\n        done\n\n        if (( deadline == 0 )); then\n          if [[ -t 2 ]]; then\n            print -Pru2 -- $'\\b[%2Fok%f]'\n          else\n            print -ru2 -- ' [ok]'\n          fi\n          if [[ $xtrace != /dev/null && -o no_xtrace ]]; then\n            exec {stderr_fd}>&2 || return\n            exec 2>>$xtrace     || return\n            setopt xtrace\n          fi\n        fi\n\n        while (( $#actual < $#expected )); do\n          [[ -t $resp_fd ]]\n          sysread -s $(($#expected - $#actual)) -t $timeout -i $resp_fd 'actual[$#actual+1]' || return\n        done\n        [[ $actual == $expected ]] || return\n\n        function _gitstatus_process_response_$name-$fsuf() {\n          emulate -L zsh -o no_aliases -o extended_glob -o typeset_silent\n          local pair=${${(%):-%N}#_gitstatus_process_response_}\n          local name=${pair%%-*}\n          local fsuf=${pair#*-}\n          [[ $name == POWERLEVEL9K && $fsuf == _p9k_ ]] && eval $__p9k_intro_base\n          if (( ARGC == 1 )); then\n            _gitstatus_process_response$fsuf $name 0 ''\n          else\n            gitstatus_stop$fsuf $name\n          fi\n        }\n        if ! zle -F $resp_fd _gitstatus_process_response_$name-$fsuf; then\n          unfunction _gitstatus_process_response_$name-$fsuf\n          return 1\n        fi\n\n        function _gitstatus_cleanup_$name-$fsuf() {\n          emulate -L zsh -o no_aliases -o extended_glob -o typeset_silent\n          local pair=${${(%):-%N}#_gitstatus_cleanup_}\n          local name=${pair%%-*}\n          local fsuf=${pair#*-}\n          (( _GITSTATUS_CLIENT_PID_$name == sysparams[pid] )) || return\n          gitstatus_stop$fsuf $name\n        }\n        if ! add-zsh-hook zshexit _gitstatus_cleanup_$name-$fsuf; then\n          unfunction _gitstatus_cleanup_$name-$fsuf\n          return 1\n        fi\n\n        if (( lock_fd != -1 )); then\n          zf_rm -- $file_prefix.lock || return\n          zsystem flock -u $lock_fd  || return\n        fi\n        unset _GITSTATUS_LOCK_FD_$name\n\n        typeset -gi _GITSTATUS_STATE_$name=2\n      fi\n    }\n  } always {\n    local -i err=$?\n    (( stderr_fd )) && exec 2>&$stderr_fd {stderr_fd}>&-\n    (( err == 0  )) && return\n\n    gitstatus_stop$fsuf $name\n\n    setopt prompt_percent no_prompt_subst no_prompt_bang\n    (( $+functions[p10k] )) && p10k clear-instant-prompt\n    print -ru2  -- ''\n    print -Pru2 -- '[%F{red}ERROR%f]: gitstatus failed to initialize.'\n    print -ru2  -- ''\n    if [[ -n $culprit ]]; then\n      print -ru2 -- $culprit\n      return err\n    fi\n    if [[ -s $xtrace ]]; then\n      print -ru2  -- ''\n      print -Pru2 -- \"  Zsh log (%U${xtrace//\\%/%%}%u):\"\n      print -Pru2 -- '%F{yellow}'\n      print -lru2 -- \"${(@)${(@f)$(<$xtrace)}/#/    }\"\n      print -Pnru2 -- '%f'\n    fi\n    if [[ -s $daemon_log ]]; then\n      print -ru2   -- ''\n      print -Pru2  -- \"  Daemon log (%U${daemon_log//\\%/%%}%u):\"\n      print -Pru2  -- '%F{yellow}'\n      print -lru2  -- \"${(@)${(@f)$(<$daemon_log)}/#/    }\"\n      print -Pnru2 -- '%f'\n    fi\n    if [[ $GITSTATUS_LOG_LEVEL == DEBUG ]]; then\n      print -ru2   -- ''\n      print -ru2   -- '  System information:'\n      print -Pru2  -- '%F{yellow}'\n      print -ru2   -- \"    zsh:      $ZSH_VERSION\"\n      print -ru2   -- \"    uname -a: $(command uname -a)\"\n      print -Pru2  -- '%f'\n      print -ru2   -- '  If you need help, open an issue and attach this whole error message to it:'\n      print -ru2   -- ''\n      print -Pru2  -- '    %Uhttps://github.com/romkatv/gitstatus/issues/new%u'\n    else\n      print -ru2   -- ''\n      local home=~\n      local zshrc=${${${(q)${ZDOTDIR:-~}}/#${(q)home}/'~'}//\\%/%%}/.zshrc\n      print -Pru2   -- \"  Add the following parameter to %U$zshrc%u for extra diagnostics on error:\"\n      print -ru2   -- ''\n      print -Pru2  -- '    %BGITSTATUS_LOG_LEVEL=DEBUG%b'\n      print -ru2   -- ''\n      print -ru2   -- '  Restart Zsh to retry gitstatus initialization:'\n      print -ru2   -- ''\n      print -Pru2   -- '    %F{green}%Uexec%u zsh%f'\n    fi\n  }\n}\n\n# Stops gitstatusd if it's running.\n#\n# Usage: gitstatus_stop NAME.\nfunction gitstatus_stop\"${1:-}\"() {\n  emulate -L zsh -o no_aliases -o extended_glob -o typeset_silent\n\n  local fsuf=${${(%):-%N}#gitstatus_stop}\n\n  if (( ARGC != 1 )); then\n    print -ru2 -- \"gitstatus_stop: exactly one positional argument is required\"\n    return 1\n  fi\n\n  local name=$1\n  if [[ $name != [[:IDENT:]]## ]]; then\n    print -ru2 -- \"gitstatus_stop: invalid positional argument: $name\"\n    return 1\n  fi\n\n  local state_var=_GITSTATUS_STATE_$name\n  local req_fd_var=_GITSTATUS_REQ_FD_$name\n  local resp_fd_var=_GITSTATUS_RESP_FD_$name\n  local lock_fd_var=_GITSTATUS_LOCK_FD_$name\n  local client_pid_var=_GITSTATUS_CLIENT_PID_$name\n  local daemon_pid_var=GITSTATUS_DAEMON_PID_$name\n  local inflight_var=_GITSTATUS_NUM_INFLIGHT_$name\n  local file_prefix_var=_GITSTATUS_FILE_PREFIX_$name\n  local dirty_max_index_size_var=_GITSTATUS_DIRTY_MAX_INDEX_SIZE_$name\n\n  local req_fd=${(P)req_fd_var}\n  local resp_fd=${(P)resp_fd_var}\n  local lock_fd=${(P)lock_fd_var}\n  local daemon_pid=${(P)daemon_pid_var}\n  local file_prefix=${(P)file_prefix_var}\n\n  local cleanup=_gitstatus_cleanup_$name-$fsuf\n  local process=_gitstatus_process_response_$name-$fsuf\n\n  if (( $+functions[$cleanup] )); then\n    add-zsh-hook -d zshexit $cleanup\n    unfunction -- $cleanup\n  fi\n\n  if (( $+functions[$process] )); then\n    [[ -n $resp_fd ]] && zle -F $resp_fd\n    unfunction -- $process\n  fi\n\n  [[ $daemon_pid  == <1-> ]] && kill -- -$daemon_pid 2>/dev/null\n  [[ $file_prefix == /*   ]] && zf_rm -f -- $file_prefix.lock $file_prefix.fifo\n  [[ $lock_fd     == <1-> ]] && zsystem flock -u $lock_fd\n  [[ $req_fd      == <1-> ]] && exec {req_fd}>&-\n  [[ $resp_fd     == <1-> ]] && exec {resp_fd}>&-\n\n  unset $state_var $req_fd_var $lock_fd_var $resp_fd_var $client_pid_var $daemon_pid_var\n  unset $inflight_var $file_prefix_var $dirty_max_index_size_var\n\n  unset VCS_STATUS_RESULT\n  _gitstatus_clear$fsuf\n}\n\n# Usage: gitstatus_check NAME.\n#\n# Returns 0 if and only if `gitstatus_start NAME` has succeeded previously.\n# If it returns non-zero, gitstatus_query NAME is guaranteed to return non-zero.\nfunction gitstatus_check\"${1:-}\"() {\n  emulate -L zsh -o no_aliases -o extended_glob -o typeset_silent\n\n  local fsuf=${${(%):-%N}#gitstatus_check}\n\n  if (( ARGC != 1 )); then\n    print -ru2 -- \"gitstatus_check: exactly one positional argument is required\"\n    return 1\n  fi\n\n  local name=$1\n  if [[ $name != [[:IDENT:]]## ]]; then\n    print -ru2 -- \"gitstatus_check: invalid positional argument: $name\"\n    return 1\n  fi\n\n  (( _GITSTATUS_STATE_$name == 2 ))\n}\n\n(( ${#_gitstatus_opts} )) && setopt ${_gitstatus_opts[@]}\n'builtin' 'unset' '_gitstatus_opts'\n"
  },
  {
    "path": "gitstatus/gitstatus.prompt.sh",
    "content": "# Simple Bash prompt with Git status.\n\n# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory\n# in which the current script resides if the variable isn't set.\nif [[ -n \"${GITSTATUS_DIR-}\" ]]; then\n  source \"$GITSTATUS_DIR\"                           || return\nelif [[ \"${BASH_SOURCE[0]}\" == */* ]]; then\n  source \"${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh\" || return\nelse\n  source gitstatus.plugin.sh                        || return\nfi\n\n# Sets GITSTATUS_PROMPT to reflect the state of the current git repository.\n# The value is empty if not in a git repository. Forwards all arguments to\n# gitstatus_query.\n#\n# Example value of GITSTATUS_PROMPT: master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42\n#\n#   master  current branch\n#      ⇣42  local branch is 42 commits behind the remote\n#      ⇡42  local branch is 42 commits ahead of the remote\n#      ⇠42  local branch is 42 commits behind the push remote\n#      ⇢42  local branch is 42 commits ahead of the push remote\n#      *42  42 stashes\n#    merge  merge in progress\n#      ~42  42 merge conflicts\n#      +42  42 staged changes\n#      !42  42 unstaged changes\n#      ?42  42 untracked files\nfunction gitstatus_prompt_update() {\n  GITSTATUS_PROMPT=\"\"\n\n  gitstatus_query \"$@\"                  || return 1  # error\n  [[ \"$VCS_STATUS_RESULT\" == ok-sync ]] || return 0  # not a git repo\n\n  local      reset=$'\\001\\e[0m\\002'         # no color\n  local      clean=$'\\001\\e[38;5;076m\\002'  # green foreground\n  local  untracked=$'\\001\\e[38;5;014m\\002'  # teal foreground\n  local   modified=$'\\001\\e[38;5;011m\\002'  # yellow foreground\n  local conflicted=$'\\001\\e[38;5;196m\\002'  # red foreground\n\n  local p\n\n  local where  # branch name, tag or commit\n  if [[ -n \"$VCS_STATUS_LOCAL_BRANCH\" ]]; then\n    where=\"$VCS_STATUS_LOCAL_BRANCH\"\n  elif [[ -n \"$VCS_STATUS_TAG\" ]]; then\n    p+=\"${reset}#\"\n    where=\"$VCS_STATUS_TAG\"\n  else\n    p+=\"${reset}@\"\n    where=\"${VCS_STATUS_COMMIT:0:8}\"\n  fi\n\n  (( ${#where} > 32 )) && where=\"${where:0:12}…${where: -12}\"  # truncate long branch names and tags\n  p+=\"${clean}${where}\"\n\n  # ⇣42 if behind the remote.\n  (( VCS_STATUS_COMMITS_BEHIND )) && p+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n  # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n  (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=\" \"\n  (( VCS_STATUS_COMMITS_AHEAD  )) && p+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n  # ⇠42 if behind the push remote.\n  (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=\" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}\"\n  (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=\" \"\n  # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.\n  (( VCS_STATUS_PUSH_COMMITS_AHEAD  )) && p+=\"${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}\"\n  # *42 if have stashes.\n  (( VCS_STATUS_STASHES        )) && p+=\" ${clean}*${VCS_STATUS_STASHES}\"\n  # 'merge' if the repo is in an unusual state.\n  [[ -n \"$VCS_STATUS_ACTION\"   ]] && p+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n  # ~42 if have merge conflicts.\n  (( VCS_STATUS_NUM_CONFLICTED )) && p+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n  # +42 if have staged changes.\n  (( VCS_STATUS_NUM_STAGED     )) && p+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n  # !42 if have unstaged changes.\n  (( VCS_STATUS_NUM_UNSTAGED   )) && p+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n  # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n  (( VCS_STATUS_NUM_UNTRACKED  )) && p+=\" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}\"\n\n  GITSTATUS_PROMPT=\"${p}${reset}\"\n}\n\n# Start gitstatusd in the background.\ngitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1\n\n# On every prompt, fetch git status and set GITSTATUS_PROMPT.\nif [[ -z \"${PROMPT_COMMAND[*]}\" ]]; then\n  PROMPT_COMMAND=gitstatus_prompt_update\nelif [[ ! \"${PROMPT_COMMAND[*]}\" =~ [[:space:]\\;]?gitstatus_prompt_update[[:space:]\\;]? ]]; then\n  # Note: If PROMPT_COMMAND is an array, this will modify its first element.\n  PROMPT_COMMAND=$'gitstatus_prompt_update\\n'\"$PROMPT_COMMAND\"\nfi\n\n# Retain 3 trailing components of the current directory.\nPROMPT_DIRTRIM=3\n\n# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded.\nshopt -s promptvars\n\n# Customize prompt. Put $GITSTATUS_PROMPT in it reflect git status.\n#\n# Example:\n#\n#   user@host ~/projects/skynet master ⇡42\n#   $ █\nPS1='\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\] '           # green user@host\nPS1+='\\[\\033[01;34m\\]\\w\\[\\033[00m\\]'              # blue current working directory\nPS1+='${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}'    # git status (requires promptvars option)\nPS1+='\\n\\[\\033[01;$((31+!$?))m\\]\\$\\[\\033[00m\\] '  # green/red (success/error) $/# (normal/root)\nPS1+='\\[\\e]0;\\u@\\h: \\w\\a\\]'                       # terminal title: user@host: dir\n"
  },
  {
    "path": "gitstatus/gitstatus.prompt.zsh",
    "content": "# Simple Zsh prompt with Git status.\n\n# Source gitstatus.plugin.zsh from $GITSTATUS_DIR or from the same directory\n# in which the current script resides if the variable isn't set.\nsource \"${GITSTATUS_DIR:-${${(%):-%x}:h}}/gitstatus.plugin.zsh\" || return\n\n# Sets GITSTATUS_PROMPT to reflect the state of the current git repository. Empty if not\n# in a git repository. In addition, sets GITSTATUS_PROMPT_LEN to the number of columns\n# $GITSTATUS_PROMPT will occupy when printed.\n#\n# Example:\n#\n#   GITSTATUS_PROMPT='master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42'\n#   GITSTATUS_PROMPT_LEN=39\n#\n#   master  current branch\n#      ⇣42  local branch is 42 commits behind the remote\n#      ⇡42  local branch is 42 commits ahead of the remote\n#      ⇠42  local branch is 42 commits behind the push remote\n#      ⇢42  local branch is 42 commits ahead of the push remote\n#      *42  42 stashes\n#    merge  merge in progress\n#      ~42  42 merge conflicts\n#      +42  42 staged changes\n#      !42  42 unstaged changes\n#      ?42  42 untracked files\nfunction gitstatus_prompt_update() {\n  emulate -L zsh\n  typeset -g  GITSTATUS_PROMPT=''\n  typeset -gi GITSTATUS_PROMPT_LEN=0\n\n  # Call gitstatus_query synchronously. Note that gitstatus_query can also be called\n  # asynchronously; see documentation in gitstatus.plugin.zsh.\n  gitstatus_query 'MY'                  || return 1  # error\n  [[ $VCS_STATUS_RESULT == 'ok-sync' ]] || return 0  # not a git repo\n\n  local      clean='%76F'   # green foreground\n  local   modified='%178F'  # yellow foreground\n  local  untracked='%39F'   # blue foreground\n  local conflicted='%196F'  # red foreground\n\n  local p\n\n  local where  # branch name, tag or commit\n  if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n    where=$VCS_STATUS_LOCAL_BRANCH\n  elif [[ -n $VCS_STATUS_TAG ]]; then\n    p+='%f#'\n    where=$VCS_STATUS_TAG\n  else\n    p+='%f@'\n    where=${VCS_STATUS_COMMIT[1,8]}\n  fi\n\n  (( $#where > 32 )) && where[13,-13]=\"…\"  # truncate long branch names and tags\n  p+=\"${clean}${where//\\%/%%}\"             # escape %\n\n  # ⇣42 if behind the remote.\n  (( VCS_STATUS_COMMITS_BEHIND )) && p+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n  # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n  (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=\" \"\n  (( VCS_STATUS_COMMITS_AHEAD  )) && p+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n  # ⇠42 if behind the push remote.\n  (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=\" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}\"\n  (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=\" \"\n  # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.\n  (( VCS_STATUS_PUSH_COMMITS_AHEAD  )) && p+=\"${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}\"\n  # *42 if have stashes.\n  (( VCS_STATUS_STASHES        )) && p+=\" ${clean}*${VCS_STATUS_STASHES}\"\n  # 'merge' if the repo is in an unusual state.\n  [[ -n $VCS_STATUS_ACTION     ]] && p+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n  # ~42 if have merge conflicts.\n  (( VCS_STATUS_NUM_CONFLICTED )) && p+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n  # +42 if have staged changes.\n  (( VCS_STATUS_NUM_STAGED     )) && p+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n  # !42 if have unstaged changes.\n  (( VCS_STATUS_NUM_UNSTAGED   )) && p+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n  # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n  (( VCS_STATUS_NUM_UNTRACKED  )) && p+=\" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}\"\n\n  GITSTATUS_PROMPT=\"${p}%f\"\n\n  # The length of GITSTATUS_PROMPT after removing %f and %F.\n  GITSTATUS_PROMPT_LEN=\"${(m)#${${GITSTATUS_PROMPT//\\%\\%/x}//\\%(f|<->F)}}\"\n}\n\n# Start gitstatusd instance with name \"MY\". The same name is passed to\n# gitstatus_query in gitstatus_prompt_update. The flags with -1 as values\n# enable staged, unstaged, conflicted and untracked counters.\ngitstatus_stop 'MY' && gitstatus_start -s -1 -u -1 -c -1 -d -1 'MY'\n\n# On every prompt, fetch git status and set GITSTATUS_PROMPT.\nautoload -Uz add-zsh-hook\nadd-zsh-hook precmd gitstatus_prompt_update\n\n# Enable/disable the right prompt options.\nsetopt no_prompt_bang prompt_percent prompt_subst\n\n# Customize prompt. Put $GITSTATUS_PROMPT in it to reflect git status.\n#\n# Example:\n#\n#   user@host ~/projects/skynet master ⇡42\n#   % █\n#\n# The current directory gets truncated from the left if the whole prompt doesn't fit on the line.\nPROMPT='%70F%n@%m%f '                                  # green user@host\nPROMPT+='%39F%$((-GITSTATUS_PROMPT_LEN-1))<…<%~%<<%f'  # blue current working directory\nPROMPT+='${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}'      # git status\nPROMPT+=$'\\n'                                          # new line\nPROMPT+='%F{%(?.76.196)}%#%f '                         # %/# (normal/root); green/red (ok/error)\n"
  },
  {
    "path": "gitstatus/install",
    "content": "#!/bin/sh\n#\n# This script does not have a stable API.\n\n_gitstatus_install_daemon_found() {\n  local installed=\"$1\"\n  shift\n  [ $# = 0 ] || \"$@\" \"$daemon\" \"$version\" \"$installed\"\n}\n\n_gitstatus_install_main() {\n  if [ -n \"${ZSH_VERSION:-}\" ]; then\n    emulate -L sh -o no_unset\n  else\n    set -u\n  fi\n\n  local argv1=\"$1\"\n  shift\n\n  local no_check= no_install= uname_s= uname_m= gitstatus_dir= dl_status= e=\n  local opt= OPTARG= OPTIND=1\n\n  while getopts ':s:m:d:p:e:fnh' opt \"$@\"; do\n    case \"$opt\" in\n      h)\n        command cat <<\\END\nUsage: install [-s KERNEL] [-m ARCH] [-d DIR] [-p CMD] [-e ERRFD] [-f|-n] [-- CMD [ARG]...]\n\nIf positional arguments are specified, call this on success:\n\n  CMD [ARG]... DAEMON VERSION INSTALLED\n\nDAEMON is path to gitstatusd. VERSION is a glob pattern for the\nversion this daemon should support; it's supposed to be passed as\n-G to gitstatusd. INSTALLED is 1 if gitstatusd has just been\ndownloaded and 0 otherwise.\n\nOptions:\n\n  -s KERNEL  use this instead of lowercase `uname -s`\n  -m ARCH    use this instead of lowercase `uname -m`\n  -d DIR     use this instead of `dirname \"$0\"`\n  -p CMD     eval this every second while downloading gitstatusd\n  -e ERRFD   write error messages to this file descriptor\n  -f         download gitstatusd even if there is one locally\n  -n         do not download gitstatusd (fail instead)\nEND\n        return\n      ;;\n      n)\n        if [ -n \"$no_install\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        no_install=1\n      ;;\n      f)\n        if [ -n \"$no_check\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        no_check=1\n      ;;\n      d)\n        if [ -n \"$gitstatus_dir\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        if [ -z \"$OPTARG\" ]; then\n          >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n          return 1\n        fi\n        gitstatus_dir=\"$OPTARG\"\n      ;;\n      p)\n        if [ -n \"$dl_status\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        if [ -z \"$OPTARG\" ]; then\n          >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n          return 1\n        fi\n        dl_status=\"$OPTARG\"\n      ;;\n      e)\n        if [ -n \"$e\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        if [ -z \"$OPTARG\" ]; then\n          >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n          return 1\n        fi\n        e=\"$OPTARG\"\n      ;;\n      m)\n        if [ -n \"$uname_m\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        if [ -z \"$OPTARG\" ]; then\n          >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n          return 1\n        fi\n        uname_m=\"$OPTARG\"\n      ;;\n      s)\n        if [ -n \"$uname_s\" ]; then\n          >&2 echo \"[gitstatus] error: duplicate option: -$opt\"\n          return 1\n        fi\n        if [ -z \"$OPTARG\" ]; then\n          >&2 echo \"[error] incorrect value of -$opt: $OPTARG\"\n          return 1\n        fi\n        uname_s=\"$OPTARG\"\n      ;;\n      \\?) >&2 echo \"[gitstatus] error: invalid option: -$OPTARG\"           ; return 1;;\n      :)  >&2 echo \"[gitstatus] error: missing required argument: -$OPTARG\"; return 1;;\n      *)  >&2 echo \"[gitstatus] internal error: unhandled option: -$opt\"   ; return 1;;\n    esac\n  done\n\n  shift \"$((OPTIND - 1))\"\n\n  : \"${e:=2}\"\n  : \"${gitstatus_dir:=$argv1}\"\n\n  if [ -n \"$no_check\" -a -n \"$no_install\" ]; then\n    >&2 echo \"[gitstatus] error: incompatible options: -f, -n\"\n    return 1\n  fi\n\n  if [ -z \"$uname_s\" ]; then\n    uname_s=\"$(command uname -s)\" || return\n    uname_s=\"$(printf '%s' \"$uname_s\" | command tr '[A-Z]' '[a-z]')\" || return\n  fi\n  if [ -z \"$uname_m\" ]; then\n    uname_m=\"$(command uname -m)\" || return\n    uname_m=\"$(printf '%s' \"$uname_m\" | command tr '[A-Z]' '[a-z]')\" || return\n  fi\n\n  local daemon=\"${GITSTATUS_DAEMON:-}\"\n  local cache_dir=\"${GITSTATUS_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/gitstatus}\"\n\n  if [ -z \"$no_check\" ]; then\n    if [ -n \"${daemon##/*}\" ]; then\n      >&2 echo \"[gitstatus] error: GITSTATUS_DAEMON is not absolute path: $daemon\"\n      return 1\n    fi\n    if [ -z \"$daemon\" -a -e \"$gitstatus_dir\"/usrbin/gitstatusd ]; then\n      daemon=\"$gitstatus_dir\"/usrbin/gitstatusd\n    fi\n    if [ -n \"$daemon\" ]; then\n      local gitstatus_version= libgit2_version=\n      if ! . \"$gitstatus_dir\"/build.info; then\n        >&2 echo \"[gitstatus] internal error: failed to source build.info\"\n        return 1\n      fi\n      if [ -z \"$gitstatus_version\" ]; then\n        >&2 echo \"[gitstatus] internal error: empty gitstatus_version in build.info\"\n        return 1\n      fi\n      local version=\"$gitstatus_version\"\n      _gitstatus_install_daemon_found 0 \"$@\"\n      return\n    fi\n  fi\n\n  while IFS= read -r line; do\n    line=\"${line###*}\"\n    [ -n \"$line\" ] || continue\n\n    local uname_s_glob= uname_m_glob= file= version= sha256=\n    eval \"$line\" || return\n\n    if [ -z \"$uname_s_glob\" -o \\\n         -z \"$uname_m_glob\" -o \\\n         -z \"$file\"         -o \\\n         -z \"$version\"      -o \\\n         -z \"$sha256\" ]; then\n      >&2 echo \"[gitstatus] internal error: invalid install.info line: $line\"\n      return 1\n    fi\n\n    case \"$uname_s\" in\n      $uname_s_glob) ;;\n      *) continue;;\n    esac\n    case \"$uname_m\" in\n      $uname_m_glob) ;;\n      *) continue;;\n    esac\n\n    # Found a match. The while loop will terminate during this iteration.\n\n    if [ -z \"$no_check\" ]; then\n      # Check if a suitable gitstatusd already exists.\n      local daemon=\"$gitstatus_dir\"/usrbin/\"$file\"\n      if [ ! -e \"$daemon\" ]; then\n        daemon=\"$cache_dir\"/\"$file\"\n        [ -e \"$daemon\" ] || daemon=\n      fi\n      if [ -n \"$daemon\" ]; then\n        _gitstatus_install_daemon_found 0 \"$@\"\n        return\n      fi\n    fi\n\n    # No suitable gitstatusd exists. Need to download.\n\n    if [ -n \"$no_install\" ]; then\n      >&2 echo \"[gitstatus] error: no gitstatusd found and installation is disabled\"\n      return 1\n    fi\n\n    local daemon=\"$cache_dir\"/\"$file\"\n\n    if [ -n \"${cache_dir##/*}\" ]; then\n      >&2 echo \"[gitstatus] error: GITSTATUS_CACHE_DIR is not absolute: $cache_dir\"\n      return 1\n    fi\n    if [ ! -d \"$cache_dir\" ] && ! mkdir -p -- \"$cache_dir\" || [ ! -w \"$cache_dir\" ]; then\n      local dir=\"$cache_dir\"\n      while true; do\n        if [ -e \"$dir\" ]; then\n          if [ ! -d \"$dir\" ]; then\n            >&\"$e\" printf 'Not a directory: \\033[4;31m%s\\033[0m\\n' \"$dir\"\n            >&\"$e\" printf '\\n'\n            >&\"$e\" printf 'Delete it, then restart your shell.\\n'\n          elif [ ! -w \"$dir\" ]; then\n            >&\"$e\" printf 'Directory is not writable: \\033[4;31m%s\\033[0m\\n' \"$dir\"\n            >&\"$e\" printf '\\n'\n            >&\"$e\" printf 'Make it writable, then restart your shell.\\n'\n          fi\n          break\n        fi\n        if [ \"$dir\" = / ] || [ \"$dir\" = . ]; then\n          break\n        fi\n        dir=\"$(dirname -- \"$dir\")\"\n      done\n      return 1\n    fi\n\n    if [ -n \"${TMPDIR-}\" -a '(' '(' -d \"${TMPDIR-}\" -a -w \"${TMPDIR-}\" ')' -o '!' '(' -d /tmp -a -w /tmp ')' ')' ]; then\n      local tmp=\"$TMPDIR\"\n    else\n      local tmp=/tmp\n    fi\n    if ! command -v mktemp >/dev/null 2>&1 ||\n       ! tmpdir=\"$(command mktemp -d \"$tmp\"/gitstatus-install.XXXXXXXXXX)\"; then\n      tmpdir=\"$tmp/gitstatus-install.tmp.$$\"\n      if ! mkdir -p -- \"$tmpdir\"; then\n        if [ \"$tmp\" = /tmp ]; then\n          local label='directory'\n        else\n          local label='directory (\\033[1mTMPDIR\\033[m)'\n        fi\n        if [ ! -e \"$tmp\" ]; then\n          >&\"$e\" printf 'Temporary '\"$label\"' does not exist: \\033[4;31m%s\\033[0m\\n' \"$tmp\"\n          >&\"$e\" printf '\\n'\n          >&\"$e\" printf 'Create it, then restart your shell.\\n'\n        elif [ ! -d \"$tmp\" ]; then\n          >&\"$e\" printf 'Not a '\"$label\"': \\033[4;31m%s\\033[0m\\n' \"$tmp\"\n          >&\"$e\" printf '\\n'\n          >&\"$e\" printf 'Make it a directory, then restart your shell.\\n'\n        elif [ ! -w \"$tmp\" ]; then\n          >&\"$e\" printf 'Temporary '\"$label\"' is not writable: \\033[4;31m%s\\033[0m\\n' \"$tmp\"\n          >&\"$e\" printf '\\n'\n          >&\"$e\" printf 'Make it writable, then restart your shell.\\n'\n        fi\n        return 1\n      fi\n    fi\n\n    if ! command -v curl >/dev/null 2>&1 && ! command -v wget >/dev/null 2>&1; then\n      >&\"$e\" printf 'Please install \\033[32mcurl\\033[0m or \\033[32mwget\\033[0m, then restart your shell.\\n'\n      return 1\n    fi\n\n    (\n      run_cmd() {\n        command -v \"$1\" >/dev/null 2>/dev/null || return 127\n        local trapped= pid die ret\n        trap 'trapped=1' $sig\n        # The only reason for suppressing stderr is that `curl -f` cannot be silenced:\n        # `-s` doesn't work despite what the docs say.\n        command \"$@\" 2>/dev/null &\n        ret=\"$?\"\n        if [ \"$ret\" = 0 ]; then\n          pid=\"$!\"\n          die=\"trap - $sig; kill -- $pid 2>/dev/null; wait -- $pid 2>/dev/null; exit 1\"\n          trap \"$die\" $sig\n          [ -z \"$trapped\" ] || eval \"$die\"\n          wait -- \"$pid\" 2>/dev/null\n          ret=\"$?\"\n        fi\n        trap - $sig\n        [ -z \"$trapped\" ] || exit\n        return \"$ret\"\n      }\n\n      check_sha256() {\n        local data_file=\"$tmpdir\"/\"$1\".tar.gz\n        local hash_file=\"$tmpdir\"/\"$1\".tar.gz.sha256\n        local hash=\n        {\n          command -v shasum >/dev/null 2>/dev/null                            &&\n            run_cmd shasum -b -a 256 -- \"$data_file\" >\"$hash_file\" </dev/null &&\n            IFS= read -r hash <\"$hash_file\"                                   &&\n            hash=\"${hash%% *}\"                                                &&\n            [ ${#hash} -eq 64 ]\n        } || {\n          command -v sha256sum >/dev/null 2>/dev/null                         &&\n            run_cmd sha256sum -b -- \"$data_file\" >\"$hash_file\" </dev/null     &&\n            IFS= read -r hash <\"$hash_file\"                                   &&\n            hash=\"${hash%% *}\"                                                &&\n            [ ${#hash} -eq 64 ]\n        } || {\n          # Note: sha256 can be from hashalot. It's incompatible.\n          # Thankfully, it produces shorter output.\n          command -v sha256 >/dev/null 2>/dev/null &&\n            run_cmd sha256 -- \"$data_file\" >\"$hash_file\" </dev/null &&\n            IFS= read -r hash <\"$hash_file\" &&\n            hash=\"${hash##* }\" &&\n            [ ${#hash} -eq 64 ]\n        } || {\n          hash=\n        }\n        [ \"$1\" = 1 -a -z \"$hash\" -o \"$hash\" = \"$sha256\" ]\n      }\n\n      local url1=\"https://github.com/romkatv/gitstatus/releases/download/$version/$file.tar.gz\"\n      local url2=\"https://gitee.com/romkatv/gitstatus/raw/release-$version/release/$file.tar.gz\"\n      local sig='INT QUIT TERM ILL PIPE'\n\n      fetch() {\n        if [ \"$1\" != 1 ] && command -v sleep >/dev/null 2>/dev/null; then\n          if ! run_cmd sleep \"$1\"; then\n            echo -n >\"$tmpdir\"/\"$1\".status\n            return 1\n          fi\n        fi\n        local cmd part url ret\n        for cmd in 'curl -kfsSL' 'wget -qO-' 'curl -q -kfsSL' 'wget --no-config -qO-'; do\n          part=0\n          while true; do\n            if [ \"$part\" = 2 ]; then\n              ret=1\n              break\n            elif [ \"$part\" = 0 ]; then\n              url=\"$2\"\n            else\n              url=\"$2\".\"$part\"\n            fi\n            run_cmd $cmd -- \"$url\" >>\"$tmpdir\"/\"$1\".tar.gz\n            ret=\"$?\"\n            [ \"$ret\" = 0 ] || break\n            check_sha256 \"$1\" && break\n            part=$((part+1))\n          done\n          [ \"$ret\" = 0 ] && break\n          run_cmd rm -f -- \"$tmpdir\"/\"$1\".tar.gz && continue\n          ret=\"$?\"\n          break\n        done\n        echo -n >\"$tmpdir\"/\"$1\".status\n        return \"$ret\"\n      }\n\n      local trapped=\n      trap 'trapped=1' $sig\n      fetch 1 \"$url1\" &\n      local pid1=\"$!\"\n      fetch 2 \"$url2\" &\n      local pid2=\"$!\"\n\n      local die=\"trap - $sig; kill -- $pid1 $pid2 2>/dev/null; wait -- $pid1 $pid2 2>/dev/null; exit 1\"\n      trap \"$die\" $sig\n      [ -z \"$trapped\" ] || eval \"$die\"\n\n      local n=\n      while true; do\n        [ -z \"$dl_status\" ] || eval \"$dl_status\" || eval \"$die\"\n        if command -v sleep >/dev/null 2>/dev/null; then\n          command sleep 1\n        elif command -v true >/dev/null 2>/dev/null; then\n          command true\n        fi\n        if [ -n \"$pid1\" -a -e \"$tmpdir\"/1.status ]; then\n          wait -- \"$pid1\" 2>/dev/null\n          local ret=\"$?\"\n          pid1=\n          if [ \"$ret\" = 0 ]; then\n            if [ -n \"$pid2\" ]; then\n              kill -- \"$pid2\" 2>/dev/null\n              wait -- \"$pid2\" 2>/dev/null\n            fi\n            n=1\n            break\n          elif [ -z \"$pid2\" ]; then\n            break\n          else\n            die=\"trap - $sig; kill -- $pid2 2>/dev/null; wait -- $pid2 2>/dev/null; exit 1\"\n            trap \"$die\" $sig\n          fi\n        elif [ -n \"$pid2\" -a -e \"$tmpdir\"/2.status ]; then\n          wait -- \"$pid2\" 2>/dev/null\n          local ret=\"$?\"\n          pid2=\n          if [ \"$ret\" = 0 ]; then\n            if [ -n \"$pid1\" ]; then\n              kill -- \"$pid1\" 2>/dev/null\n              wait -- \"$pid1\" 2>/dev/null\n            fi\n            n=2\n            break\n          elif [ -z \"$pid1\" ]; then\n            break\n          else\n            die=\"trap - $sig; kill -- $pid1 2>/dev/null; wait -- $pid1 2>/dev/null; exit 1\"\n            trap \"$die\" $sig\n          fi\n        fi\n      done\n\n      trap - $sig\n\n      if [ -z \"$n\" ]; then\n        >&\"$e\" printf 'Failed to download \\033[32m%s\\033[0m from any mirror:\\n' \"$file\"\n        >&\"$e\" printf '\\n'\n        >&\"$e\" printf '  1. \\033[4m%s\\033[0m\\n' \"$url1\"\n        >&\"$e\" printf '  2. \\033[4m%s\\033[0m\\n' \"$url2\"\n        >&\"$e\" printf '\\n'\n        >&\"$e\" printf 'Check your internet connection, then restart your shell.\\n'\n        exit 1\n      fi\n\n      command tar -C \"$tmpdir\" -xzf \"$tmpdir\"/\"$n\".tar.gz || exit\n\n      local tmpfile\n      if ! command -v mktemp >/dev/null 2>&1 ||\n         ! tmpfile=\"$(command mktemp \"$cache_dir\"/gitstatusd.XXXXXXXXXX)\"; then\n        tmpfile=\"$cache_dir\"/gitstatusd.tmp.$$\n      fi\n\n      command mv -f -- \"$tmpdir\"/\"$file\" \"$tmpfile\" || exit\n      command mv -f -- \"$tmpfile\" \"$cache_dir\"/\"$file\" && exit\n      command rm -f -- \"$cache_dir\"/\"$file\"\n      command mv -f -- \"$tmpfile\" \"$cache_dir\"/\"$file\" && exit\n      command rm -f -- \"$tmpfile\"\n      exit 1\n    )\n\n    local ret=\"$?\"\n    command rm -rf -- \"$tmpdir\"\n    [ \"$ret\" = 0 ] || return\n\n    _gitstatus_install_daemon_found 1 \"$@\"\n    return\n  done <\"$gitstatus_dir\"/install.info\n\n  >&\"$e\" printf 'There is no prebuilt \\033[32mgitstatusd\\033[0m for \\033[1m%s\\033[0m.\\n' \"$uname_s $uname_m\"\n  >&\"$e\" printf '\\n'\n  >&\"$e\" printf 'See: \\033[4mhttps://github.com/romkatv/gitstatus#compiling\\033[0m\\n'\n  return 1\n}\n\nif [ -z \"${0##*/*}\" ]; then\n  _gitstatus_install_main \"${0%/*}\" \"$@\"\nelse\n  _gitstatus_install_main . \"$@\"\nfi\n"
  },
  {
    "path": "gitstatus/install.info",
    "content": "# 3\n#\n# This file is used by ./install and indirectly by shell bindings.\n#\n# The first line is read by powerlevel10k instant prompt. It must\n# be updated whenever the content of this file changes. The actual\n# value doesn't matter as long as it's unique. Consecutive integers\n# work fine.\n\n# Official gitstatusd binaries.\nuname_s_glob=\"cygwin_nt-10.0\"; uname_m_glob=\"i686\";    file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"5a8a809dcebdb6aa9b47d37e086c0485424a9d9c136770eec3c26cedf5bb75e3\";\nuname_s_glob=\"cygwin_nt-10.0\"; uname_m_glob=\"x86_64\";  file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.1\"; sha256=\"c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f\";\nuname_s_glob=\"darwin\";         uname_m_glob=\"arm64\";   file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"eae979e990ca37c56ee39fadd0c3f392cbbd0c6bdfb9a603010be60d9e48910a\";\nuname_s_glob=\"darwin\";         uname_m_glob=\"x86_64\";  file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"9fd3913ec1b6b856ab6e08a99a2343f0e8e809eb6b62ca4b0963163656c668e6\";\nuname_s_glob=\"freebsd\";        uname_m_glob=\"amd64\";   file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"8e57ad642251e5acfa430aed82cd4ffe103db0bfadae4a15ccaf462c455d0442\";\nuname_s_glob=\"linux\";          uname_m_glob=\"aarch64\"; file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"32b57eb28bf6d80b280e4020a0045184f8ca897b20b570c12948aa6838673225\";\nuname_s_glob=\"linux\";          uname_m_glob=\"armv6l\";  file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.1\"; sha256=\"4bf5a0d0a082f544a48536ad3675930d5d2cc6a8cf906710045e0788f51192b3\";\nuname_s_glob=\"linux\";          uname_m_glob=\"armv7l\";  file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.1\"; sha256=\"2b9deb29f86c8209114b71b94fc2e1ed936a1658808a1bee46f4a82fd6a1f8cc\";\nuname_s_glob=\"linux\";          uname_m_glob=\"armv8l\";  file=\"gitstatusd-${uname_s}-aarch64\";        version=\"v1.5.4\"; sha256=\"32b57eb28bf6d80b280e4020a0045184f8ca897b20b570c12948aa6838673225\";\nuname_s_glob=\"linux\";          uname_m_glob=\"i686\";    file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"56d55e2e9a202d3072fa612d8fa1faa61243ffc86418a7fa64c2c9d9a82e0f64\";\nuname_s_glob=\"linux\";          uname_m_glob=\"ppc64le\"; file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"1afd072c8c26ef6ec2d9ac11cef96c84cd6f10e859665a6ffcfb6112c758547e\";\nuname_s_glob=\"linux\";          uname_m_glob=\"x86_64\";  file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.4\"; sha256=\"9633816e7832109e530c9e2532b11a1edae08136d63aa7e40246c0339b7db304\";\nuname_s_glob=\"msys_nt-10.0\";   uname_m_glob=\"i686\";    file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.1\"; sha256=\"7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20\";\nuname_s_glob=\"msys_nt-10.0\";   uname_m_glob=\"x86_64\";  file=\"gitstatusd-${uname_s}-${uname_m}\";     version=\"v1.5.1\"; sha256=\"5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732\";\n\n# Fallbacks to official gitstatusd binaries.\nuname_s_glob=\"cygwin_nt-*\";    uname_m_glob=\"i686\";    file=\"gitstatusd-cygwin_nt-10.0-${uname_m}\"; version=\"v1.5.2\"; sha256=\"5a8a809dcebdb6aa9b47d37e086c0485424a9d9c136770eec3c26cedf5bb75e3\";\nuname_s_glob=\"cygwin_nt-*\";    uname_m_glob=\"x86_64\";  file=\"gitstatusd-cygwin_nt-10.0-${uname_m}\"; version=\"v1.5.1\"; sha256=\"c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f\";\nuname_s_glob=\"mingw32_nt-*\";   uname_m_glob=\"i686\";    file=\"gitstatusd-msys_nt-10.0-${uname_m}\";   version=\"v1.5.1\"; sha256=\"7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20\";\nuname_s_glob=\"mingw32_nt-*\";   uname_m_glob=\"x86_64\";  file=\"gitstatusd-msys_nt-10.0-${uname_m}\";   version=\"v1.5.1\"; sha256=\"5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732\";\nuname_s_glob=\"mingw64_nt-*\";   uname_m_glob=\"i686\";    file=\"gitstatusd-msys_nt-10.0-${uname_m}\";   version=\"v1.5.1\"; sha256=\"7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20\";\nuname_s_glob=\"mingw64_nt-*\";   uname_m_glob=\"x86_64\";  file=\"gitstatusd-msys_nt-10.0-${uname_m}\";   version=\"v1.5.1\"; sha256=\"5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732\";\nuname_s_glob=\"msys_nt-*\";      uname_m_glob=\"i686\";    file=\"gitstatusd-msys_nt-10.0-${uname_m}\";   version=\"v1.5.1\"; sha256=\"7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20\";\nuname_s_glob=\"msys_nt-*\";      uname_m_glob=\"x86_64\";  file=\"gitstatusd-msys_nt-10.0-${uname_m}\";   version=\"v1.5.1\"; sha256=\"5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732\";\n"
  },
  {
    "path": "gitstatus/mbuild",
    "content": "#!/usr/bin/env zsh\n#\n# This script does not have a stable API.\n#\n# Usage: mbuild [-b git-ref] [kernel-arch]...\n#\n# Builds a bunch of gitstatusd-* binaries. Without arguments builds binaries\n# for all platforms. git-ref defaults to master.\n#\n# Before using this script you need to set up build servers and list them\n# in ~/.ssh/config. There should be a Host entry for every value of `assets`\n# association defined below. VMs and cloud instances work as well as physical\n# machines, including localhost. As long as the machine has been set up as\n# described below and you can SSH to it without password, it should work.\n#\n#                    ===[ Build Server Setup ]===\n#\n#                              Linux\n#\n# - Install docker.\n#   $ apt install docker.io     # adjust appropriately if there is no `apt`\n#   $ usermod -aG docker $USER  # not needed if going to build as root\n# - Install git.\n#   $ apt install git           # adjust appropriately if there is no `apt`\n#\n#                              macOS\n#\n# - Install compiler tools:\n#   $ xcode-select --install\n# - Install homebrew: https://brew.sh/.\n#   $ bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"\n#\n#                             FreeBSD\n#\n# - Install git.\n#   $ pkg install git\n#\n#                             Windows\n#\n# - Disable Windows Defender (optional).\n#   ps> Set-MpPreference -DisableRealtimeMonitoring $true\n# - Install 64-bit and 32-bit msys2: https://www.msys2.org/wiki/MSYS2-installation/.\n#   - Open each of them after installation, type `pacman -Syu --noconfirm` and close the window.\n#   - Then run in powershell while having no msys2 or cygwin windows open:\n#     ps> C:\\msys32\\autorebase.bat\n#     ps> C:\\msys64\\autorebase.bat\n# - Install 64-bit and 32-bit cygwin: https://cygwin.com/install.html.\n#   - Choose to install 32-bit to c:/cygwin32 instead of the default c:/cygwin.\n#   - Select these packages: binutils, cmake, gcc-core, gcc-g++, git, make, perl, wget.\n#\n# IMPORTANT: Install msys2 and cygwin one at a time.\n#\n# IMPORTANT: msys2 builder can reboot the build machine.\n#\n# Option 1: OpenSSH for Windows\n#\n# - Install OpenSSH: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse.\n#   ps> Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0\n#   ps> Start-Service sshd\n#   ps> Set-Service -Name sshd -StartupType 'Automatic'\n# - Enable publickey authentication: https://stackoverflow.com/a/50502015/1095235.\n#   ps> cd $env:USERPROFILE\n#   ps> mkdir .ssh\n#   ps> notepad.exe .ssh/authorized_keys\n#     - Paste your public key, save, close.\n#   ps> icacls .ssh/authorized_keys /inheritance:r\n#   ps> notepad.exe C:\\ProgramData\\ssh\\sshd_config\n#     - Comment out these two lines, save, close:\n#       # Match Group administrators\n#       #   AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys\n#   ps> Restart-Service sshd\n#\n# Option 2: OpenSSH from WSL\n#\n# - Install WSL.\n# - Install Ubuntu.\n# - Install sshd.\n#   $ apt install openssh-server\n#   $ dpkg-reconfigure openssh-server\n#   $ cat >/etc/ssh/sshd_config <<\\END\n#     ClientAliveInterval 60\n#     AcceptEnv TERM LANG LC_*\n#     PermitRootLogin no\n#     AllowTcpForwarding no\n#     AllowAgentForwarding no\n#     AllowStreamLocalForwarding no\n#     AuthenticationMethods publickey\n#   END\n#   service ssh --full-restart\n# - Add your public ssh key to ~/.ssh/authorized_keys.\n# - Make `sshd` start when Windows boots.\n\n'emulate' '-L' 'zsh' '-o' 'no_aliases' '-o' 'err_return'\nsetopt no_unset extended_glob pipe_fail prompt_percent typeset_silent \\\n  no_prompt_subst no_prompt_bang pushd_silent warn_create_global\n\nif [[ $ZSH_VERSION != (5.<1->*|<6->.*) || $ZSH_VERSION == 5.4(|.*) ]]; then\n  print -ru2 -- \"[error] unsupported zsh version: $ZSH_VERSION\"\n  return 1\nfi\n\nzmodload zsh/system\n\nlocal -r git_url='https://github.com/romkatv/gitstatus.git'\n\nlocal -rA assets=(\n  # target kernel-arch   hostname of the build machine\n  cygwin_nt-10.0-i686    build-windows-x86_64\n  cygwin_nt-10.0-x86_64  build-windows-x86_64\n  msys_nt-10.0-i686      build-windows-x86_64\n  msys_nt-10.0-x86_64    build-windows-x86_64\n  darwin-arm64           build-macos-arm64\n  darwin-x86_64          build-macos-x86_64\n  freebsd-amd64          build-freebsd-amd64\n  linux-aarch64          build-linux-aarch64\n  linux-armv6l           build-linux-armv7l\n  linux-armv7l           build-linux-armv7l\n  linux-i686             build-linux-x86_64\n  linux-ppc64le          build-linux-ppc64le\n  linux-x86_64           build-linux-x86_64\n)\n\nlocal -rA protocol=(\n  'cygwin_nt-10.0-*' windows\n  'msys_nt-10.0-*'   windows\n  'darwin-*'         unix\n  'freebsd-*'        unix\n  'linux-*'          unix\n)\n\nlocal -r rootdir=${ZSH_SCRIPT:h}\nlocal -r logs=$rootdir/logs\nlocal -r locks=$rootdir/locks\nlocal -r binaries=$rootdir/usrbin\n\nfunction usage() {\n  print -r -- 'usage: mbuild [-b REF] [KERNEL-ARCH]...'\n}\n\nlocal OPTARG opt git_ref=master\nlocal -i OPTIND\nwhile getopts \":b:h\" opt; do\n  case $opt in\n    h) usage; return 0;;\n    b) [[ -n $OPTARG ]]; git_ref=$OPTARG;;\n    \\?) print -ru2 -- \"mbuild: invalid option: -$OPTARG\"           ; return 1;;\n    :)  print -ru2 -- \"mbuild: missing required argument: -$OPTARG\"; return 1;;\n    *)  print -ru2 -- \"mbuild: invalid option: -$opt\"              ; return 1;;\n  esac\ndone\n\nshift $((OPTIND - 1))\n\n(( $# )) || set -- ${(ko)assets}\nset -- ${(u)@}\n\nlocal platform\nfor platform; do\n  if (( ! $+assets[$platform] )); then\n    print -ru2 -- \"mbuild: invalid platform: $platform\"\n    return 1\n  fi\ndone\n\nlocal build='\n  rm -rf gitstatus\n  git clone --recursive --shallow-submodules --depth=1 -b '$git_ref' '$git_url'\n  cd gitstatus\n  if command -v zsh >/dev/null 2>&1; then\n    sh=zsh\n  elif command -v dash >/dev/null 2>&1; then\n    sh=dash\n  elif command -v ash >/dev/null 2>&1; then\n    sh=ash\n  else\n    sh=sh\n  fi\n  $sh -x ./build -m '\n\nfunction build-unix() {\n  local intro flags=(-sw)\n  case $2 in\n    linux-ppc64le) ;;\n    linux-*)       flags+=(-d docker);;\n    darwin-arm64)  intro='PATH=\"/opt/homebrew/bin:$PATH\"';;\n    darwin-*)      intro='PATH=\"/usr/local/bin:$PATH\"';;\n  esac\n  ssh $1 -- /bin/sh -uex <<<\"\n    $intro\n    cd /tmp\n    $build ${2##*-} ${(j: :)${(@q)flags}}\"\n  scp $1:/tmp/gitstatus/usrbin/gitstatusd $binaries/gitstatusd-$2\n}\n\nfunction build-windows() {\n  local shell=$(ssh $1 'echo $0')\n  if [[ $shell == '$0'* ]]; then\n    local c='c:'\n  else\n    local c='/mnt/c'\n  fi\n\n  local tmp env bin intro flags=(-w)\n  case $2 in\n    cygwin_nt-10.0-i686)   bin='cygwin32/bin'  ;|\n    cygwin_nt-10.0-x86_64) bin='cygwin64/bin'  ;|\n    msys_nt-10.0-i686)     bin='msys32/usr/bin';|\n    msys_nt-10.0-x86_64)   bin='msys64/usr/bin';|\n    cygwin_nt-10.0-*)\n      tmp='/cygdrive/c/tmp'\n    ;|\n    msys_nt-10.0-*)\n      tmp='/c/tmp'\n      env='MSYSTEM=MSYS'\n      # TODO: fix this (some errors about PGP keys).\n      # flags+=(-s)\n      # intro='pacman -S --needed --noconfirm git; '\n      intro+='PATH=\"$PATH:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl\"'\n      while true; do\n        # TODO: run autorebase only when getting an error that can be fixed by autorebasing.\n        break\n        local out\n        out=\"$(ssh $1 cmd.exe \"$c/${bin%%/*}/autorebase.bat\" 2>&1)\"\n        [[ $out == *\"The following DLLs couldn't be rebased\"* ]] || break\n        # Reboot to get rid of whatever is using those DLLs.\n        ssh $1 powershell.exe <<<'Restart-Computer -Force' || true\n        sleep 30\n        while ! ssh $1 <<<''; do sleep 5; done\n      done\n      () {\n        while true; do\n          # TODO: fix this (some errors about PGP keys).\n          break\n          local -i fd\n          exec {fd}< <(\n            ssh $1 $c/$bin/env.exe $env c:/$bin/bash.exe -l 2>&1 <<<\"\n              pacman -Syu --noconfirm\n              exit\")\n          {\n            local line\n            while true; do\n              IFS= read -u $fd -r line || return 0\n              if [[ $line == *\"warning: terminate MSYS2\"* ]]; then\n                # At this point the machine is hosed. A rogue process with a corrupted name\n                # is eating all CPU. The top SSH connection won't terminate on its own.\n                ssh $1 powershell.exe <<<'Restart-Computer -Force' || true\n                sleep 30\n                while ! ssh $1 <<<''; do sleep 5; done\n                break\n              fi\n            done\n          } always {\n            exec {fd}<&-\n            kill -- -$sysparams[procsubstpid] 2>/dev/null || true\n          }\n        done\n      } \"$@\"\n    ;|\n  esac\n\n  ssh $1 $c/$bin/env.exe $env c:/$bin/bash.exe -l <<<\"\n    set -uex\n    $intro\n    mkdir -p -- $tmp\n    cd -- $tmp\n    $build ${2##*-} ${(j: :)${(@q)flags}}\n    exit\"\n  scp $1:$c/tmp/gitstatus/usrbin/gitstatusd $binaries/gitstatusd-$2\n  chmod +x $binaries/gitstatusd-$2\n}\n\nif [[ -r /proc/version && \"$(</proc/version)\" == *Microsoft* ]]; then\n  () {\n    (( $# )) || return 0\n    print -ru2 -- \"WARNING: lock files exist: $@\"\n    (( $# )) && rm -- $@\n  } $locks/*(N)\n\n  function flock() {\n    local fd\n    sysopen -ro cloexec -u fd <(\n      exec </dev/null 2>/dev/null\n      (\n        trap '' TERM PIPE\n        local fd\n        while true; do\n          sysopen -wo create,excl -u fd -- $1 && break\n          sleep 1\n        done\n        exec {fd}>&-\n        while true; do\n          print || break\n        done\n        rm -- $1\n      ) &!\n    )\n    local REPLY\n    IFS= read -ru $fd\n  }\nelse\n  function flock() {\n    : >>$1\n    zsystem flock $1\n  }\nfi\n\nfunction build() (\n  setopt xtrace\n  local platform=$1\n  local machine=$assets[$platform]\n  flock $locks/$machine\n  build-${protocol[(k)$platform]} $machine $platform\n  local tmp=gitstatusd-$platform.tmp.$$.tar.gz\n  ( cd -q -- $binaries; tar --owner=0 --group=0 -I 'gzip -9' -cf $tmp gitstatusd-$platform )\n  mv -f -- $binaries/$tmp $binaries/gitstatusd-$platform.tar.gz\n  # Make sure the last command is a built-in (important for flock).\n  :\n)\n\nfunction mbuild() {\n  local platform pid pids=()\n  for platform; do\n    build $platform &>$logs/$platform &\n    print -r -- \"starting build for $platform on $assets[$platform] (pid $!)\"\n    pids+=($platform $!)\n  done\n  local failed=()\n  for platform pid in $pids; do\n    print -rn -- \"$platform => \"\n    if wait $pid; then\n      print -r -- \"ok\"\n    else\n      print -r -- \"error\"\n      failed+=$platform\n    fi\n  done\n  (( $#failed )) || return 0\n  print\n  print -r -- \"Error logs:\"\n  print\n  for platform in $failed; do\n    print -r -- \"  $platform => $logs/$platform\"\n  done\n  return 1\n}\n\n# Copied from https://github.com/romkatv/run-process-tree.\nfunction run-process-tree() {\n  zmodload zsh/parameter zsh/param/private || return\n  local -P opt=(${(kv)options[@]})         || return\n  local -P pat=(${patchars[@]})            || return\n  local -P dis_pat=(${dis_patchars[@]})    || return\n  emulate -L zsh -o err_return             || return\n  setopt monitor traps_async pipe_fail no_unset\n  zmodload zsh/system\n\n  if (( $# == 0 )); then\n    print -ru2 -- 'usage: run-process-tree command [arg]...'\n    return 1\n  fi\n\n  local -P stdout REPLY\n  exec {stdout}>&1\n  {\n    {\n      local -Pi pipe\n      local -P gid=$sysparams[pid]\n      local -P sig=(ABRT EXIT HUP ILL INT PIPE QUIT TERM ZERR)\n      local -P trap=(trap \"trap - $sig; kill -- -$sysparams[pid]\" $sig)\n\n      exec {pipe}>&1 1>&$stdout\n      $trap\n\n      {\n        $trap\n        while sleep 1 && print -u $pipe .; do; done\n      } 2>/dev/null &\n      local -Pi watchdog=$!\n\n      {\n        trap - ZERR\n        exec {pipe}>&-\n        enable -p -- $pat\n        disable -p -- $dis_pat\n        options=($opt zle off monitor off)\n        \"$@\"\n      } &\n      local -Pi ret\n      wait $! || ret=$?\n\n      trap \"exit $ret\" TERM\n      kill $watchdog\n      wait $watchdog\n      return ret\n    } | while read; do; done || return\n  } always {\n    exec {stdout}>&-\n  }\n}\n\nmkdir -p -- $logs $locks $binaries\n\n() {\n  run-process-tree mbuild $@\n  exit\n} \"$@\"\n"
  },
  {
    "path": "gitstatus/src/algorithm.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_ALGORITHM_H_\n#define ROMKATV_GITSTATUS_ALGORITHM_H_\n\n#include <algorithm>\n\nnamespace gitstatus {\n\n// Requires: Iter is a BidirectionalIterator.\n//\n// Returns iterator pointing to the last value in [begin, end) that compares equal to the value, or\n// begin if none compare equal.\ntemplate <class Iter, class T>\nIter FindLast(Iter begin, Iter end, const T& val) {\n  while (begin != end && !(*--end == val)) {}\n  return end;\n}\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_ALGORITHM_H_\n"
  },
  {
    "path": "gitstatus/src/arena.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"arena.h\"\n\n#include <algorithm>\n#include <type_traits>\n\n#include \"bits.h\"\n#include \"check.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nsize_t Clamp(size_t min, size_t val, size_t max) { return std::min(max, std::max(min, val)); }\n\nstatic const uintptr_t kSingularity = reinterpret_cast<uintptr_t>(&kSingularity);\n\n}  // namespace\n\n// Triple singularity. We are all fucked.\nArena::Block Arena::g_empty_block = {kSingularity, kSingularity, kSingularity};\n\nArena::Arena(Arena::Options opt) : opt_(std::move(opt)), top_(&g_empty_block) {\n  CHECK(opt_.min_block_size <= opt_.max_block_size);\n}\n\nArena::Arena(Arena&& other) : Arena() { *this = std::move(other); }\n\nArena::~Arena() {\n  // See comments in Makefile for the reason sized deallocation is not used.\n  for (const Block& b : blocks_) ::operator delete(reinterpret_cast<void*>(b.start));\n}\n\nArena& Arena::operator=(Arena&& other) {\n  if (this != &other) {\n    // In case std::vector ever gets small object optimization.\n    size_t idx = other.reusable_ ? other.top_ - other.blocks_.data() : 0;\n    opt_ = other.opt_;\n    blocks_ = std::move(other.blocks_);\n    reusable_ = other.reusable_;\n    top_ = reusable_ ? blocks_.data() + idx : &g_empty_block;\n    other.blocks_.clear();\n    other.reusable_ = 0;\n    other.top_ = &g_empty_block;\n  }\n  return *this;\n}\n\nvoid Arena::Reuse(size_t num_blocks) {\n  reusable_ = std::min(reusable_, num_blocks);\n  for (size_t i = reusable_; i != blocks_.size(); ++i) {\n    const Block& b = blocks_[i];\n    // See comments in Makefile for the reason sized deallocation is not used.\n    ::operator delete(reinterpret_cast<void*>(b.start));\n  }\n  blocks_.resize(reusable_);\n  if (reusable_) {\n    top_ = blocks_.data();\n    top_->tip = top_->start;\n  } else {\n    top_ = &g_empty_block;\n  }\n}\n\nvoid Arena::AddBlock(size_t size, size_t alignment) {\n  if (alignment > alignof(std::max_align_t)) {\n    size += alignment - 1;\n  } else {\n    size = std::max(size, alignment);\n  }\n  if (size <= top_->size() && top_ < blocks_.data() + reusable_ - 1) {\n    assert(blocks_.front().size() == top_->size());\n    ++top_;\n    top_->tip = top_->start;\n    return;\n  }\n  if (size <= opt_.max_alloc_threshold) {\n    size =\n        std::max(size, Clamp(opt_.min_block_size, NextPow2(top_->size() + 1), opt_.max_block_size));\n  }\n\n  auto p = reinterpret_cast<uintptr_t>(::operator new(size));\n  blocks_.push_back(Block{p, p, p + size});\n  if (reusable_) {\n    if (size < blocks_.front().size()) {\n      top_ = &blocks_.back();\n      return;\n    }\n    if (size > blocks_.front().size()) reusable_ = 0;\n  }\n  std::swap(blocks_.back(), blocks_[reusable_]);\n  top_ = &blocks_[reusable_++];\n}\n\nvoid* Arena::AllocateSlow(size_t size, size_t alignment) {\n  assert(alignment && !(alignment & (alignment - 1)));\n  AddBlock(size, alignment);\n  assert(Align(top_->tip, alignment) + size <= top_->end);\n  return Allocate(size, alignment);\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/arena.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_ARENA_H_\n#define ROMKATV_GITSTATUS_ARENA_H_\n\n#include <cassert>\n#include <cstddef>\n#include <cstdint>\n#include <cstring>\n#include <limits>\n#include <new>\n#include <type_traits>\n#include <vector>\n\n#include \"string_view.h\"\n\nnamespace gitstatus {\n\n// Thread-compatible. Very fast and very flexible w.r.t. allocation size and alignment.\n//\n// Natural API extensions:\n//\n//   // Donates a block to the arena. When the time comes, it'll be freed with\n//   // free(p, size, userdata).\n//   void Donate(void* p, size_t size, void* userdata, void(*free)(void*, size_t, void*));\nclass Arena {\n public:\n  struct Options {\n    // The first call to Allocate() will allocate a block of this size. There is one exception when\n    // the first requested allocation size is larger than this limit. Subsequent blocks will be\n    // twice as large as the last until they saturate at max_block_size.\n    size_t min_block_size = 64;\n\n    // Allocate blocks at most this large. There is one exception when the requested allocation\n    // size is larger than this limit.\n    size_t max_block_size = 8 << 10;\n\n    // When the size of the first allocation in a block is larger than this threshold, the block\n    // size will be equal to the allocation size. This is meant to reduce memory waste when making\n    // many allocations with sizes slightly over max_block_size / 2. With max_alloc_threshold equal\n    // to max_block_size / N, the upper bound on wasted memory when making many equally-sized\n    // allocations is 100.0 / (N + 1) percent. When making allocations of different sizes, the upper\n    // bound on wasted memory is 50%.\n    size_t max_alloc_threshold = 1 << 10;\n\n    // Natural extensions:\n    //\n    //   void* userdata;\n    //   void (*alloc)(size_t size, size_t alignment, void* userdata);\n    //   void (*free)(void* p, size_t size, void* userdata);\n  };\n\n  // Requires: opt.min_block_size <= opt.max_block_size.\n  //\n  // Doesn't allocate any memory.\n  Arena(Options opt);\n  Arena() : Arena(Options()) {}\n  Arena(Arena&&);\n  ~Arena();\n\n  Arena& operator=(Arena&& other);\n\n  // Requires: alignment is a power of 2.\n  //\n  // Result is never null and always aligned. If size is zero, the result may be equal to the last.\n  // Alignment above alignof(std::max_align_t) is supported. There is no requirement for alignment\n  // to be less than size or to divide it.\n  inline void* Allocate(size_t size, size_t alignment) {\n    assert(alignment && !(alignment & (alignment - 1)));\n    uintptr_t p = Align(top_->tip, alignment);\n    uintptr_t e = p + size;\n    if (e <= top_->end) {\n      top_->tip = e;\n      return reinterpret_cast<void*>(p);\n    }\n    return AllocateSlow(size, alignment);\n  }\n\n  template <class T>\n  inline T* Allocate(size_t n) {\n    static_assert(!std::is_reference<T>(), \"\");\n    return static_cast<T*>(Allocate(n * sizeof(T), alignof(T)));\n  }\n\n  template <class T>\n  inline T* Allocate() {\n    return Allocate<T>(1);\n  }\n\n  inline char* MemDup(const char* p, size_t len) {\n    char* res = Allocate<char>(len);\n    std::memcpy(res, p, len);\n    return res;\n  }\n\n  // Copies the null-terminated string (including the trailing null character) to the arena and\n  // returns a pointer to the copy.\n  inline char* StrDup(const char* s) {\n    size_t len = std::strlen(s);\n    return MemDup(s, len + 1);\n  }\n\n  // Guarantees: !StrDup(p, len)[len].\n  inline char* StrDup(const char* p, size_t len) {\n    char* res = Allocate<char>(len + 1);\n    std::memcpy(res, p, len);\n    res[len] = 0;\n    return res;\n  }\n\n  // Guarantees: !StrDup(s)[s.len].\n  inline char* StrDup(StringView s) {\n    return StrDup(s.ptr, s.len);\n  }\n\n  template <class... Ts>\n  inline char* StrCat(const Ts&... ts) {\n    return [&](std::initializer_list<StringView> ss) {\n      size_t len = 0;\n      for (StringView s : ss) len += s.len;\n      char* p = Allocate<char>(len + 1);\n      for (StringView s : ss) {\n        std::memcpy(p, s.ptr, s.len);\n        p += s.len;\n      }\n      *p = 0;\n      return p - len;\n    }({ts...});\n  }\n\n  // Copies/moves `val` to the arena and returns a pointer to it.\n  template <class T>\n  inline std::remove_const_t<std::remove_reference_t<T>>* Dup(T&& val) {\n    return DirectInit<std::remove_const_t<std::remove_reference_t<T>>>(std::forward<T>(val));\n  }\n\n  // The same as `new T{args...}` but on the arena.\n  template <class T, class... Args>\n  inline T* DirectInit(Args&&... args) {\n    T* res = Allocate<T>();\n    ::new (const_cast<void*>(static_cast<const void*>(res))) T(std::forward<Args>(args)...);\n    return res;\n  }\n\n  // The same as `new T(args...)` but on the arena.\n  template <class T, class... Args>\n  inline T* BraceInit(Args&&... args) {\n    T* res = Allocate<T>();\n    ::new (const_cast<void*>(static_cast<const void*>(res))) T{std::forward<Args>(args)...};\n    return res;\n  }\n\n  // Tip() and TipSize() allow you to allocate the remainder of the current block. They can be\n  // useful if you are flexible w.r.t. the allocation size.\n  //\n  // Invariant:\n  //\n  //   const void* tip = Tip();\n  //   void* p = Allocate(TipSize(), 1);  // grab the remainder of the current block\n  //   assert(p == tip);\n  const void* Tip() const { return reinterpret_cast<const void*>(top_->tip); }\n  size_t TipSize() const { return top_->end - top_->tip; }\n\n  // Invalidates all allocations (without running destructors of allocated objects) and frees all\n  // blocks except at most the specified number of blocks. The retained blocks will be used to\n  // fulfil future allocation requests.\n  void Reuse(size_t num_blocks = std::numeric_limits<size_t>::max());\n\n private:\n  struct Block {\n    size_t size() const { return end - start; }\n    uintptr_t start;\n    uintptr_t tip;\n    uintptr_t end;\n  };\n\n  inline static size_t Align(size_t n, size_t m) { return (n + m - 1) & ~(m - 1); };\n\n  void AddBlock(size_t size, size_t alignment);\n  bool ReuseBlock(size_t size, size_t alignment);\n\n  __attribute__((noinline)) void* AllocateSlow(size_t size, size_t alignment);\n\n  Options opt_;\n  std::vector<Block> blocks_;\n  // Invariant: !blocks_.empty() <= reusable_ && reusable_ <= blocks_.size().\n  size_t reusable_ = 0;\n  // Invariant: (top_ == &g_empty_block) == blocks_.empty().\n  // Invariant: blocks_.empty() || top_ == &blocks_.back() || top_ < blocks_.data() + reusable_.\n  Block* top_;\n\n  static Block g_empty_block;\n};\n\n// Copies of ArenaAllocator use the same thread-compatible Arena without synchronization.\ntemplate <class T>\nclass ArenaAllocator {\n public:\n  using value_type = T;\n  using pointer = T*;\n  using const_pointer = const T*;\n  using reference = T&;\n  using const_reference = const T&;\n  using size_type = size_t;\n  using difference_type = ptrdiff_t;\n  using propagate_on_container_move_assignment = std::true_type;\n  template <class U>\n  struct rebind {\n    using other = ArenaAllocator<U>;\n  };\n  using is_always_equal = std::false_type;\n\n  ArenaAllocator(Arena* arena = nullptr) : arena_(*arena) {}\n\n  Arena& arena() const { return arena_; }\n\n  pointer address(reference x) const { return &x; }\n  const_pointer address(const_reference x) const { return &x; }\n  pointer allocate(size_type n, const void* hint = nullptr) { return arena_.Allocate<T>(n); }\n  void deallocate(T* p, std::size_t n) {}\n  size_type max_size() const { return std::numeric_limits<size_type>::max() / sizeof(value_type); }\n\n  template <class U, class... Args>\n  void construct(U* p, Args&&... args) {\n    ::new (const_cast<void*>(static_cast<const void*>(p))) U(std::forward<Args>(args)...);\n  }\n\n  template <class U>\n  void destroy(U* p) {\n    p->~U();\n  }\n\n  bool operator==(const ArenaAllocator& other) const { return &arena_ == &other.arena_; }\n  bool operator!=(const ArenaAllocator& other) const { return &arena_ != &other.arena_; }\n\n private:\n  Arena& arena_;\n};\n\ntemplate <class C>\nstruct LazyWithArena;\n\ntemplate <template <class, class> class C, class T1, class A>\nstruct LazyWithArena<C<T1, A>> {\n  using type = C<T1, ArenaAllocator<typename C<T1, A>::value_type>>;\n};\n\ntemplate <template <class, class, class> class C, class T1, class T2, class A>\nstruct LazyWithArena<C<T1, T2, A>> {\n  using type = C<T1, T2, ArenaAllocator<typename C<T1, T2, A>::value_type>>;\n};\n\ntemplate <class C>\nusing WithArena = typename LazyWithArena<C>::type;\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_DIR_H_\n"
  },
  {
    "path": "gitstatus/src/bits.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_BITS_H_\n#define ROMKATV_GITSTATUS_BITS_H_\n\n#include <cstddef>\n\nnamespace gitstatus {\n\ninline size_t NextPow2(size_t n) { return n < 2 ? 1 : (~size_t{0} >> __builtin_clzll(n - 1)) + 1; }\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_BITS_H_\n"
  },
  {
    "path": "gitstatus/src/check.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_CHECK_H_\n#define ROMKATV_GITSTATUS_CHECK_H_\n\n#include \"logging.h\"\n\n#include <stdexcept>\n\n// The argument must be an expression convertible to bool.\n// Does nothing if the expression evaluates to true. Otherwise\n// it's equivalent to LOG(FATAL).\n#define CHECK(cond...) \\\n  static_cast<void>(0), (!!(cond)) ? static_cast<void>(0) : LOG(FATAL) << #cond << \": \"\n\n#define VERIFY(cond...)                                               \\\n  static_cast<void>(0), ::gitstatus::internal_check::Thrower(!(cond)) \\\n                            ? static_cast<void>(0)                    \\\n                            : LOG(ERROR) << #cond << \": \"\n\nnamespace gitstatus {\n\nstruct Exception : std::exception {\n  const char* what() const noexcept override { return \"Exception\"; }\n};\n\nnamespace internal_check {\n\nclass Thrower {\n public:\n  Thrower(bool should_throw) : throw_(should_throw) {}\n  Thrower(Thrower&&) = delete;\n  explicit operator bool() const { return !throw_; }\n  ~Thrower() noexcept(false) {\n    if (throw_) throw Exception();\n  }\n\n private:\n  bool throw_;\n};\n\n}  // namespace internal_check\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_CHECK_H_\n"
  },
  {
    "path": "gitstatus/src/check_dir_mtime.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"check_dir_mtime.h\"\n\n#include <fcntl.h>\n#include <stdlib.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <time.h>\n#include <unistd.h>\n\n#include <cerrno>\n#include <cstring>\n#include <ctime>\n#include <string>\n#include <vector>\n\n#include \"check.h\"\n#include \"dir.h\"\n#include \"logging.h\"\n#include \"print.h\"\n#include \"scope_guard.h\"\n#include \"stat.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nconstexpr char kDirPrefix[] = \".gitstatus.\";\n\nvoid Touch(const char* path) {\n  int fd = creat(path, 0444);\n  VERIFY(fd >= 0) << Errno();\n  CHECK(!close(fd)) << Errno();\n}\n\nbool StatChanged(const char* path, const struct stat& prev) {\n  struct stat cur;\n  VERIFY(!lstat(path, &cur)) << Errno();\n  return !StatEq(prev, cur);\n}\n\nvoid RemoveStaleDirs(const char* root_dir) {\n  int dir_fd = open(root_dir, O_DIRECTORY | O_CLOEXEC);\n  if (dir_fd < 0) return;\n  ON_SCOPE_EXIT(&) { CHECK(!close(dir_fd)) << Errno(); };\n\n  Arena arena;\n  std::vector<char*> entries;\n  const std::time_t now = std::time(nullptr);\n  if (!ListDir(dir_fd, arena, entries,\n               /* precompose_unicode = */ false,\n               /* case_sensitive = */ true)) {\n    return;\n  }\n\n  std::string path = root_dir;\n  const size_t root_dir_len = path.size();\n\n  for (const char* entry : entries) {\n    if (std::strlen(entry) < std::strlen(kDirPrefix)) continue;\n    if (std::memcmp(entry, kDirPrefix, std::strlen(kDirPrefix))) continue;\n\n    struct stat st;\n    if (fstatat(dir_fd, entry, &st, AT_SYMLINK_NOFOLLOW)) {\n      LOG(WARN) << \"Cannot stat \" << Print(entry) << \" in \" << Print(root_dir) << \": \" << Errno();\n      continue;\n    }\n    if (MTim(st).tv_sec + 10 > now) continue;\n\n    path.resize(root_dir_len);\n    path += entry;\n    size_t dir_len = path.size();\n\n    path += \"/b/1\";\n    if (unlink(path.c_str()) && errno != ENOENT) {\n      LOG(WARN) << \"Cannot unlink \" << Print(path) << \": \" << Errno();\n      continue;\n    }\n\n    for (const char* d : {\"/a/1\", \"/a\", \"/b\", \"\"}) {\n      path.resize(dir_len);\n      path += d;\n      if (rmdir(path.c_str()) && errno != ENOENT) {\n        LOG(WARN) << \"Cannot remove \" << Print(path) << \": \" << Errno();\n        break;\n      }\n    }\n  }\n}\n\n}  // namespace\n\nbool CheckDirMtime(const char* root_dir) {\n  try {\n    RemoveStaleDirs(root_dir);\n\n    std::string tmp = std::string() + root_dir + kDirPrefix + \"XXXXXX\";\n    VERIFY(mkdtemp(&tmp[0])) << Errno();\n    ON_SCOPE_EXIT(&) { rmdir(tmp.c_str()); };\n\n    std::string a_dir = tmp + \"/a\";\n    VERIFY(!mkdir(a_dir.c_str(), 0755)) << Errno();\n    ON_SCOPE_EXIT(&) { rmdir(a_dir.c_str()); };\n    struct stat a_st;\n    VERIFY(!lstat(a_dir.c_str(), &a_st)) << Errno();\n\n    std::string b_dir = tmp + \"/b\";\n    VERIFY(!mkdir(b_dir.c_str(), 0755)) << Errno();\n    ON_SCOPE_EXIT(&) { rmdir(b_dir.c_str()); };\n    struct stat b_st;\n    VERIFY(!lstat(b_dir.c_str(), &b_st)) << Errno();\n\n    while (sleep(1)) {\n      // zzzz\n    }\n\n    std::string a1 = a_dir + \"/1\";\n    VERIFY(!mkdir(a1.c_str(), 0755)) << Errno();\n    ON_SCOPE_EXIT(&) { rmdir(a1.c_str()); };\n    if (!StatChanged(a_dir.c_str(), a_st)) {\n      LOG(WARN) << \"Creating a directory doesn't change mtime of the parent: \" << Print(root_dir);\n      return false;\n    }\n\n    std::string b1 = b_dir + \"/1\";\n    Touch(b1.c_str());\n    ON_SCOPE_EXIT(&) { unlink(b1.c_str()); };\n    if (!StatChanged(b_dir.c_str(), b_st)) {\n      LOG(WARN) << \"Creating a file doesn't change mtime of the parent: \" << Print(root_dir);\n      return false;\n    }\n\n    LOG(INFO) << \"All mtime checks have passes. Enabling untracked cache: \" << Print(root_dir);\n    return true;\n  } catch (const Exception&) {\n    LOG(WARN) << \"Error while testing for mtime capability: \" << Print(root_dir);\n    return false;\n  }\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/check_dir_mtime.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_CHECK_DIR_MTIME_H_\n#define ROMKATV_GITSTATUS_CHECK_DIR_MTIME_H_\n\nnamespace gitstatus {\n\n// Similar to `git update-index --test-untracked-cache` but performs all tests\n// in parallel, so the total testing time is one second regardless of the number\n// of tests. It also performs fewer tests because gitstatus imposes fewer\n// requirements on the filesystem in order to take advantage of untracked cache.\nbool CheckDirMtime(const char* root_dir);\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_CHECK_DIR_MTIME_H_\n"
  },
  {
    "path": "gitstatus/src/dir.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"dir.h\"\n\n#include <algorithm>\n#include <atomic>\n#include <cerrno>\n#include <cstring>\n\n#include <dirent.h>\n#include <fcntl.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n#ifdef __linux__\n#include <endian.h>\n#include <sys/syscall.h>\n#endif\n\n#ifdef __APPLE__\n#include <iconv.h>\n#endif\n\n#include \"bits.h\"\n#include \"check.h\"\n#include \"scope_guard.h\"\n#include \"string_cmp.h\"\n#include \"tribool.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nbool Dots(const char* name) {\n  if (name[0] == '.') {\n    if (name[1] == 0) return true;\n    if (name[1] == '.' && name[2] == 0) return true;\n  }\n  return false;\n}\n\n}  // namespace\n\n// The linux-specific implementation is about 20% faster than the generic (posix) implementation.\n#ifdef __linux__\n\nuint64_t Read64(const void* p) {\n  uint64_t res;\n  std::memcpy(&res, p, 8);\n  return res;\n}\n\nvoid Write64(uint64_t x, void* p) { std::memcpy(p, &x, 8); }\n\nvoid SwapBytes(char** begin, char** end) {\n#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__\n  for (; begin != end; ++begin) Write64(__builtin_bswap64(Read64(*begin)), *begin);\n#elif __BYTE_ORDER__ != __ORDER_BIG_ENDIAN__\n#error \"sorry, not implemented\"\n#endif\n}\n\ntemplate <bool kCaseSensitive>\nvoid SortEntries(char** begin, char** end) {\n  static_assert(kCaseSensitive, \"\");\n  SwapBytes(begin, end);\n  std::sort(begin, end, [](const char* a, const char* b) {\n    uint64_t x = Read64(a);\n    uint64_t y = Read64(b);\n    // Add 5 for good luck.\n    return x < y || (x == y && std::memcmp(a + 5, b + 5, 256) < 0);\n  });\n  SwapBytes(begin, end);\n}\n\ntemplate <>\nvoid SortEntries<false>(char** begin, char** end) {\n  std::sort(begin, end, StrLt<false>());\n}\n\nbool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precompose_unicode,\n             bool case_sensitive) {\n  struct linux_dirent64 {\n    ino64_t d_ino;\n    off64_t d_off;\n    unsigned short d_reclen;\n    unsigned char d_type;\n    char d_name[];\n  };\n\n  constexpr size_t kBufSize = 8 << 10;\n  const size_t orig_size = entries.size();\n\n  while (true) {\n    char* buf = static_cast<char*>(arena.Allocate(kBufSize, alignof(linux_dirent64)));\n    // Save 256 bytes for the rainy day.\n    int n = syscall(SYS_getdents64, dir_fd, buf, kBufSize - 256);\n    if (n < 0) {\n      entries.resize(orig_size);\n      return false;\n    }\n    for (int pos = 0; pos < n;) {\n      auto* ent = reinterpret_cast<linux_dirent64*>(buf + pos);\n      if (!Dots(ent->d_name)) entries.push_back(ent->d_name);\n      pos += ent->d_reclen;\n    }\n    if (n == 0) break;\n    // The following optimization relies on SYS_getdents64 always returning as many\n    // entries as would fit. This is not guaranteed by the specification and I don't\n    // know if this is true in practice. The optimization has no measurable effect on\n    // gitstatus performance, so it's turned off.\n    //\n    //   if (n + sizeof(linux_dirent64) + 512 <= kBufSize) break;\n  }\n\n  if (case_sensitive) {\n    SortEntries<true>(entries.data() + orig_size, entries.data() + entries.size());\n  } else {\n    SortEntries<false>(entries.data() + orig_size, entries.data() + entries.size());\n  }\n\n  return true;\n}\n\n#else  // __linux__\n\nnamespace {\n\nchar* DirentDup(Arena& arena, const struct dirent& ent, size_t len) {\n  char* p = arena.Allocate<char>(len + 2);\n  *p++ = ent.d_type;\n  std::memcpy(p, ent.d_name, len + 1);\n  return p;\n}\n\n#ifdef __APPLE__\n\nstd::atomic<bool> g_iconv_error(true);\n\nTribool IConvTry(char* inp, size_t ins, char* outp, size_t outs) {\n  if (outs == 0) return Tribool::kUnknown;\n  iconv_t ic = iconv_open(\"UTF-8\", \"UTF-8-MAC\");\n  if (ic == (iconv_t)-1) {\n    if (g_iconv_error.load(std::memory_order_relaxed) &&\n        g_iconv_error.exchange(false, std::memory_order_relaxed)) {\n      LOG(ERROR) << \"iconv_open(\\\"UTF-8\\\", \\\"UTF-8-MAC\\\") failed\";\n    }\n    return Tribool::kFalse;\n  }\n  ON_SCOPE_EXIT(&) { CHECK(iconv_close(ic) == 0) << Errno(); };\n  --outs;\n  if (iconv(ic, &inp, &ins, &outp, &outs) >= 0) {\n    *outp = 0;\n    return Tribool::kTrue;\n  }\n  return errno == E2BIG ? Tribool::kUnknown : Tribool::kFalse;\n}\n\nchar* DirenvConvert(Arena& arena, struct dirent& ent, bool do_convert) {\n  if (!do_convert) return DirentDup(arena, ent, std::strlen(ent.d_name));\n\n  size_t len = 0;\n  do_convert = false;\n  for (unsigned char c; (c = ent.d_name[len]); ++len) {\n    if (c & 0x80) do_convert = true;\n  }\n  if (!do_convert) return DirentDup(arena, ent, len);\n\n  size_t n = NextPow2(len + 2);\n  while (true) {\n    char* p = arena.Allocate<char>(n);\n    switch (IConvTry(ent.d_name, len, p + 1, n - 1)) {\n      case Tribool::kFalse:\n        return DirentDup(arena, ent, len);\n      case Tribool::kTrue:\n        *p = ent.d_type;\n        return p + 1;\n      case Tribool::kUnknown:\n        break;\n    }\n    n *= 2;\n  }\n}\n\n#else  // __APPLE__\n\nchar* DirenvConvert(Arena& arena, struct dirent& ent, bool do_convert) {\n  return DirentDup(arena, ent, std::strlen(ent.d_name));\n}\n\n#endif  // __APPLE__\n\n}  // namespace\n\nbool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precompose_unicode,\n             bool case_sensitive) {\n  const size_t orig_size = entries.size();\n  dir_fd = dup(dir_fd);\n  if (dir_fd < 0) return false;\n  DIR* dir = fdopendir(dir_fd);\n  if (!dir) {\n    CHECK(!close(dir_fd)) << Errno();\n    return false;\n  }\n  ON_SCOPE_EXIT(&) { CHECK(!closedir(dir)) << Errno(); };\n  while (struct dirent* ent = (errno = 0, readdir(dir))) {\n    if (Dots(ent->d_name)) continue;\n    entries.push_back(DirenvConvert(arena, *ent, precompose_unicode));\n  }\n  if (errno) {\n    entries.resize(orig_size);\n    return false;\n  }\n  StrSort(entries.data() + orig_size, entries.data() + entries.size(), case_sensitive);\n  return true;\n}\n\n#endif  // __linux__\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/dir.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_DIR_H_\n#define ROMKATV_GITSTATUS_DIR_H_\n\n#include <cstddef>\n#include <vector>\n\n#include \"arena.h\"\n\nnamespace gitstatus {\n\n// On error, leaves entries unchanged and returns false. Does not throw.\n//\n// On success, appends names of files from the specified directory to entries and returns true.\n// Every appended entry is a null-terminated string. At -1 offset is its d_type. All elements\n// point into the arena. They are sorted either by strcmp or strcasecmp depending on case_sensitive.\n//\n// Does not close dir_fd.\n//\n// There are two distinct implementations of ListDir -- one for Linux and another for everything\n// else. The linux-specific implementation is 20% faster.\n//\n// The reason sorting is bundled with directory listing is performance on Linux. The API of\n// getdents64 allows for much faster sorting than what can be done with a plain vector<char*>.\n// For the POSIX implementation there is no need to bundle sorting in this way. In fact, it's\n// done at the end with a generic StrSort() call.\n//\n// For best results, reuse the arena and vector for multiple calls to avoid heap allocations.\nbool ListDir(int dir_fd, Arena& arena, std::vector<char*>& entries, bool precompose_unicode,\n             bool case_sensitive);\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_DIR_H_\n"
  },
  {
    "path": "gitstatus/src/git.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"git.h\"\n\n#include <cstdlib>\n#include <cstring>\n#include <fstream>\n#include <sstream>\n#include <utility>\n\n#include <fcntl.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include \"arena.h\"\n#include \"check.h\"\n#include \"print.h\"\n#include \"scope_guard.h\"\n\nnamespace gitstatus {\n\nconst char* GitError() {\n  const git_error* err = git_error_last();\n  return err && err->message ? err->message : \"unknown error\";\n}\n\nstd::string RepoState(git_repository* repo) {\n  Arena arena;\n  StringView gitdir(git_repository_path(repo));\n\n  // These names mostly match gitaction in vcs_info:\n  // https://github.com/zsh-users/zsh/blob/master/Functions/VCS_Info/Backends/VCS_INFO_get_data_git.\n  auto State = [&]() {\n    switch (git_repository_state(repo)) {\n      case GIT_REPOSITORY_STATE_NONE:\n        return \"\";\n      case GIT_REPOSITORY_STATE_MERGE:\n        return \"merge\";\n      case GIT_REPOSITORY_STATE_REVERT:\n        return \"revert\";\n      case GIT_REPOSITORY_STATE_REVERT_SEQUENCE:\n        return \"revert-seq\";\n      case GIT_REPOSITORY_STATE_CHERRYPICK:\n        return \"cherry\";\n      case GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE:\n        return \"cherry-seq\";\n      case GIT_REPOSITORY_STATE_BISECT:\n        return \"bisect\";\n      case GIT_REPOSITORY_STATE_REBASE:\n        return \"rebase\";\n      case GIT_REPOSITORY_STATE_REBASE_INTERACTIVE:\n        return \"rebase-i\";\n      case GIT_REPOSITORY_STATE_REBASE_MERGE:\n        return \"rebase-m\";\n      case GIT_REPOSITORY_STATE_APPLY_MAILBOX:\n        return \"am\";\n      case GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE:\n        return \"am/rebase\";\n    }\n    return \"action\";\n  };\n\n  auto DirExists = [&](StringView name) {\n    int fd = open(arena.StrCat(gitdir, \"/\", name), O_DIRECTORY | O_CLOEXEC);\n    if (fd < 0) return false;\n    CHECK(!close(fd)) << Errno();\n    return true;\n  };\n\n  auto ReadFile = [&](StringView name) {\n    std::ifstream strm(arena.StrCat(gitdir, \"/\", name));\n    std::string res;\n    strm >> res;\n    return res;\n  };\n\n  std::string next;\n  std::string last;\n\n  if (DirExists(\"rebase-merge\")) {\n    next = ReadFile(\"rebase-merge/msgnum\");\n    last = ReadFile(\"rebase-merge/end\");\n  } else if (DirExists(\"rebase-apply\")) {\n    next = ReadFile(\"rebase-apply/next\");\n    last = ReadFile(\"rebase-apply/last\");\n  }\n\n  std::ostringstream res;\n  res << State();\n  if (!next.empty() && !last.empty()) res << ' ' << next << '/' << last;\n  return res.str();\n}\n\nsize_t CountRange(git_repository* repo, const std::string& range) {\n  git_revwalk* walk = nullptr;\n  VERIFY(!git_revwalk_new(&walk, repo)) << GitError();\n  ON_SCOPE_EXIT(=) { git_revwalk_free(walk); };\n  VERIFY(!git_revwalk_push_range(walk, range.c_str())) << GitError();\n  size_t res = 0;\n  while (true) {\n    git_oid oid;\n    switch (git_revwalk_next(&oid, walk)) {\n      case 0:\n        ++res;\n        break;\n      case GIT_ITEROVER:\n        return res;\n      default:\n        LOG(ERROR) << \"git_revwalk_next: \" << range << \": \" << GitError();\n        throw Exception();\n    }\n  }\n}\n\nsize_t NumStashes(git_repository* repo) {\n  size_t res = 0;\n  auto* cb = +[](size_t index, const char* message, const git_oid* stash_id, void* payload) {\n    ++*static_cast<size_t*>(payload);\n    return 0;\n  };\n  if (!git_stash_foreach(repo, cb, &res)) return res;\n  // Example error: failed to parse signature - malformed e-mail.\n  // See https://github.com/romkatv/powerlevel10k/issues/216.\n  LOG(WARN) << \"git_stash_foreach: \" << GitError();\n  return 0;\n}\n\ngit_reference* Head(git_repository* repo) {\n  git_reference* symbolic = nullptr;\n  switch (git_reference_lookup(&symbolic, repo, \"HEAD\")) {\n    case 0:\n      break;\n    case GIT_ENOTFOUND:\n      return nullptr;\n    default:\n      LOG(ERROR) << \"git_reference_lookup: \" << GitError();\n      throw Exception();\n  }\n\n  git_reference* direct = nullptr;\n  if (git_reference_resolve(&direct, symbolic)) {\n    LOG(INFO) << \"Empty git repo (no HEAD)\";\n    return symbolic;\n  }\n  git_reference_free(symbolic);\n  return direct;\n}\n\nconst char* LocalBranchName(const git_reference* ref) {\n  CHECK(ref);\n  git_reference_t type = git_reference_type(ref);\n  switch (type) {\n    case GIT_REFERENCE_DIRECT: {\n      return git_reference_is_branch(ref) ? git_reference_shorthand(ref) : \"\";\n    }\n    case GIT_REFERENCE_SYMBOLIC: {\n      static constexpr char kHeadPrefix[] = \"refs/heads/\";\n      const char* target = git_reference_symbolic_target(ref);\n      if (!target) return \"\";\n      size_t len = std::strlen(target);\n      if (len < sizeof(kHeadPrefix)) return \"\";\n      if (std::memcmp(target, kHeadPrefix, sizeof(kHeadPrefix) - 1)) return \"\";\n      return target + (sizeof(kHeadPrefix) - 1);\n    }\n    case GIT_REFERENCE_INVALID:\n    case GIT_REFERENCE_ALL:\n      break;\n  }\n  LOG(ERROR) << \"Invalid reference type: \" << type;\n  throw Exception();\n}\n\nRemotePtr GetRemote(git_repository* repo, const git_reference* local) {\n  git_remote* remote;\n  git_buf symref = {};\n  if (git_branch_remote(&remote, &symref, repo, git_reference_name(local))) return nullptr;\n  ON_SCOPE_EXIT(&) {\n    git_remote_free(remote);\n    git_buf_free(&symref);\n  };\n\n  git_reference* ref;\n  if (git_reference_lookup(&ref, repo, symref.ptr)) return nullptr;\n  ON_SCOPE_EXIT(&) { if (ref) git_reference_free(ref); };\n\n  const char* branch = nullptr;\n  std::string name = remote ? git_remote_name(remote) : \".\";\n  if (git_branch_name(&branch, ref)) {\n    branch = \"\";\n  } else if (remote) {\n    VERIFY(std::strstr(branch, name.c_str()) == branch);\n    VERIFY(branch[name.size()] == '/');\n    branch += name.size() + 1;\n  }\n\n  auto res = std::make_unique<Remote>();\n  res->name = std::move(name);\n  res->branch = branch;\n  res->url = remote ? (git_remote_url(remote) ?: \"\") : \"\";\n  res->ref = std::exchange(ref, nullptr);\n  return RemotePtr(res.release());\n}\n\nPushRemotePtr GetPushRemote(git_repository* repo, const git_reference* local) {\n  git_remote* remote;\n  git_buf symref = {};\n  if (git_branch_push_remote(&remote, &symref, repo, git_reference_name(local))) return nullptr;\n  ON_SCOPE_EXIT(&) {\n    git_remote_free(remote);\n    git_buf_free(&symref);\n  };\n\n  git_reference* ref;\n  if (git_reference_lookup(&ref, repo, symref.ptr)) return nullptr;\n  ON_SCOPE_EXIT(&) { if (ref) git_reference_free(ref); };\n\n  std::string name = remote ? git_remote_name(remote) : \".\";\n\n  auto res = std::make_unique<PushRemote>();\n  res->name = std::move(name);\n  res->url = remote ? (git_remote_url(remote) ?: \"\") : \"\";\n  res->ref = std::exchange(ref, nullptr);\n  return PushRemotePtr(res.release());\n}\n\nCommitMessage GetCommitMessage(git_repository* repo, const git_oid& id) {\n  git_commit* commit;\n  VERIFY(!git_commit_lookup(&commit, repo, &id)) << GitError();\n  ON_SCOPE_EXIT(=) { git_commit_free(commit); };\n  return {.encoding = git_commit_message_encoding(commit) ?: \"\",\n          .summary = git_commit_summary(commit) ?: \"\"};\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/git.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_GIT_H_\n#define ROMKATV_GITSTATUS_GIT_H_\n\n#include <git2.h>\n\n#include <cstddef>\n#include <memory>\n#include <string>\n\nnamespace gitstatus {\n\n// Not null.\nconst char* GitError();\n\n// Not null.\nstd::string RepoState(git_repository* repo);\n\n// Returns the number of commits in the range.\nsize_t CountRange(git_repository* repo, const std::string& range);\n\n// How many stashes are there?\nsize_t NumStashes(git_repository* repo);\n\n// Returns the origin URL or an empty string. Not null.\nstd::string RemoteUrl(git_repository* repo, const git_reference* ref);\n\n// Returns reference to HEAD or null if not found. The reference is symbolic if the repo is empty\n// and direct otherwise.\ngit_reference* Head(git_repository* repo);\n\n// Returns the name of the local branch, or an empty string.\nconst char* LocalBranchName(const git_reference* ref);\n\nstruct CommitMessage {\n  // Can be empty, meaning \"UTF-8\".\n  std::string encoding;\n  // The first paragraph of the commit's message as a one-liner.\n  std::string summary;\n};\n\nCommitMessage GetCommitMessage(git_repository* repo, const git_oid& id);\n\nstruct Remote {\n  // Tip of the remote branch.\n  git_reference* ref;\n\n  // Name of the tracking remote. For example, \"origin\".\n  std::string name;\n\n  // Name of the tracking remote branch. For example, \"master\".\n  std::string branch;\n\n  // URL of the tracking remote. For example, \"https://foo.com/repo.git\".\n  std::string url;\n\n  // Note: pushurl is not exposed (but could be).\n\n  struct Free {\n    void operator()(const Remote* p) const {\n      if (p) {\n        if (p->ref) git_reference_free(p->ref);\n        delete p;\n      }\n    }\n  };\n};\n\nstruct PushRemote {\n  // Tip of the remote branch.\n  git_reference* ref;\n\n  // Name of the tracking remote. For example, \"origin\".\n  std::string name;\n\n  // URL of the tracking remote. For example, \"https://foo.com/repo.git\".\n  std::string url;\n\n  // Note: pushurl is not exposed (but could be).\n\n  struct Free {\n    void operator()(const PushRemote* p) const {\n      if (p) {\n        if (p->ref) git_reference_free(p->ref);\n        delete p;\n      }\n    }\n  };\n};\n\nusing RemotePtr = std::unique_ptr<Remote, Remote::Free>;\nusing PushRemotePtr = std::unique_ptr<PushRemote, PushRemote::Free>;\n\nRemotePtr GetRemote(git_repository* repo, const git_reference* local);\nPushRemotePtr GetPushRemote(git_repository* repo, const git_reference* local);\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_GIT_H_\n"
  },
  {
    "path": "gitstatus/src/gitstatus.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include <time.h>\n\n#include <cstddef>\n#include <future>\n#include <string>\n\n#include <git2.h>\n\n#include \"check.h\"\n#include \"git.h\"\n#include \"logging.h\"\n#include \"options.h\"\n#include \"print.h\"\n#include \"repo.h\"\n#include \"repo_cache.h\"\n#include \"request.h\"\n#include \"response.h\"\n#include \"scope_guard.h\"\n#include \"thread_pool.h\"\n#include \"timer.h\"\n\nnamespace gitstatus {\nnamespace {\n\nusing namespace std::string_literals;\n\nvoid Truncate(std::string& s, size_t max_len) {\n  if (s.size() > max_len) s.resize(max_len);\n}\n\nvoid ProcessRequest(const Options& opts, RepoCache& cache, Request req) {\n  Timer timer;\n  ON_SCOPE_EXIT(&) { timer.Report(\"request\"); };\n\n  ResponseWriter resp(req.id);\n  Repo* repo = cache.Open(req.dir, req.from_dotgit);\n  if (!repo) return;\n\n  git_config* cfg;\n  VERIFY(!git_repository_config(&cfg, repo->repo())) << GitError();\n  ON_SCOPE_EXIT(=) { git_config_free(cfg); };\n  VERIFY(!git_config_refresh(cfg)) << GitError();\n\n  // Symbolic reference if and only if the repo is empty.\n  git_reference* head = Head(repo->repo());\n  if (!head) return;\n  ON_SCOPE_EXIT(=) { git_reference_free(head); };\n\n  // Null if and only if the repo is empty.\n  const git_oid* head_target = git_reference_target(head);\n\n  // Looking up tags may take some time. Do it in the background while we check for stuff.\n  // Note that GetTagName() doesn't access index, so it'll overlap with index reading and\n  // parsing.\n  std::future<std::string> tag = repo->GetTagName(head_target);\n  ON_SCOPE_EXIT(&) {\n    if (tag.valid()) {\n      try {\n        tag.wait();\n      } catch (const Exception&) {\n      }\n    }\n  };\n\n  // Repository working directory. Absolute; no trailing slash. E.g., \"/home/romka/gitstatus\".\n  StringView workdir(git_repository_workdir(repo->repo()));\n  if (workdir.len == 0) return;\n  if (workdir.len > 1 && workdir.ptr[workdir.len - 1] == '/') --workdir.len;\n  resp.Print(workdir);\n\n  // Revision. Either 40 hex digits or an empty string for empty repo.\n  resp.Print(head_target ? git_oid_tostr_s(head_target) : \"\");\n\n  // Local branch name (e.g., \"master\") or empty string if not on a branch.\n  resp.Print(LocalBranchName(head));\n\n  // Remote tracking branch or null.\n  RemotePtr remote = GetRemote(repo->repo(), head);\n\n  // Tracking remote branch name (e.g., \"master\") or empty string if there is no tracking remote.\n  resp.Print(remote ? remote->branch : \"\");\n\n  // Tracking remote name (e.g., \"origin\") or empty string if there is no tracking remote.\n  resp.Print(remote ? remote->name : \"\");\n\n  // Tracking remote URL or empty string if there is no tracking remote.\n  resp.Print(remote ? remote->url : \"\");\n\n  // Repository state, A.K.A. action. For example, \"merge\".\n  resp.Print(RepoState(repo->repo()));\n\n  IndexStats stats;\n  // Look for staged, unstaged and untracked. This is where most of the time is spent.\n  if (req.diff) stats = repo->GetIndexStats(head_target, cfg);\n\n  // The number of files in the index.\n  resp.Print(stats.index_size);\n  // The number of staged changes. At most opts.max_num_staged.\n  resp.Print(stats.num_staged);\n  // The number of unstaged changes. At most opts.max_num_unstaged. 0 if index is too large.\n  resp.Print(stats.num_unstaged);\n  // The number of conflicted changes. At most opts.max_num_conflicted. 0 if index is too large.\n  resp.Print(stats.num_conflicted);\n  // The number of untracked changes. At most opts.max_num_untracked. 0 if index is too large.\n  resp.Print(stats.num_untracked);\n\n  if (remote && remote->ref) {\n    const char* ref = git_reference_name(remote->ref);\n    // Number of commits we are ahead of upstream. Non-negative integer.\n    resp.Print(CountRange(repo->repo(), ref + \"..HEAD\"s));\n    // Number of commits we are behind upstream. Non-negative integer.\n    resp.Print(CountRange(repo->repo(), \"HEAD..\"s + ref));\n  } else {\n    resp.Print(\"0\");\n    resp.Print(\"0\");\n  }\n\n  // Number of stashes. Non-negative integer.\n  resp.Print(NumStashes(repo->repo()));\n\n  // Tag that points to HEAD (e.g., \"v4.2\") or empty string if there aren't any. The same as\n  // `git describe --tags --exact-match`.\n  resp.Print(tag.get());\n\n  // The number of unstaged deleted files. At most stats.num_unstaged.\n  resp.Print(stats.num_unstaged_deleted);\n  // The number of staged new files. At most stats.num_staged.\n  resp.Print(stats.num_staged_new);\n  // The number of staged deleted files. At most stats.num_staged.\n  resp.Print(stats.num_staged_deleted);\n\n  // Push remote or null.\n  PushRemotePtr push_remote = GetPushRemote(repo->repo(), head);\n\n  // Push remote name (e.g., \"origin\") or empty string if there is no push remote.\n  resp.Print(push_remote ? push_remote->name : \"\");\n\n  // Push remote URL or empty string if there is no push remote.\n  resp.Print(push_remote ? push_remote->url : \"\");\n\n  if (push_remote && push_remote->ref) {\n    const char* ref = git_reference_name(push_remote->ref);\n    // Number of commits we are ahead of push remote. Non-negative integer.\n    resp.Print(CountRange(repo->repo(), ref + \"..HEAD\"s));\n    // Number of commits we are behind upstream. Non-negative integer.\n    resp.Print(CountRange(repo->repo(), \"HEAD..\"s + ref));\n  } else {\n    resp.Print(\"0\");\n    resp.Print(\"0\");\n  }\n\n  // The number of files in the index with skip-worktree bit set.\n  resp.Print(stats.num_skip_worktree);\n  // The number of files in the index with assume-unchanged bit set.\n  resp.Print(stats.num_assume_unchanged);\n\n  CommitMessage msg = head_target ? GetCommitMessage(repo->repo(), *head_target) : CommitMessage();\n  Truncate(msg.summary, opts.max_commit_summary_length);\n  resp.Print(msg.encoding);\n  resp.Print(msg.summary);\n\n  resp.Dump(\"with git status\");\n}\n\nint GitStatus(int argc, char** argv) {\n  tzset();\n  Options opts = ParseOptions(argc, argv);\n  g_min_log_level = opts.log_level;\n  for (int i = 0; i != argc; ++i) LOG(INFO) << \"argv[\" << i << \"]: \" << Print(argv[i]);\n  RequestReader reader(fileno(stdin), opts.lock_fd, opts.parent_pid);\n  RepoCache cache(opts);\n\n  InitGlobalThreadPool(opts.num_threads);\n  git_libgit2_opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 0);\n  git_libgit2_opts(GIT_OPT_DISABLE_INDEX_CHECKSUM_VERIFICATION, 1);\n  git_libgit2_opts(GIT_OPT_DISABLE_INDEX_FILEPATH_VALIDATION, 1);\n  git_libgit2_opts(GIT_OPT_DISABLE_READNG_PACKED_TAGS, 1);\n  git_libgit2_init();\n\n  while (true) {\n    try {\n      Request req;\n      if (reader.ReadRequest(req)) {\n        LOG(INFO) << \"Processing request: \" << req;\n        try {\n          ProcessRequest(opts, cache, req);\n          LOG(INFO) << \"Successfully processed request: \" << req;\n        } catch (const Exception&) {\n          LOG(ERROR) << \"Error processing request: \" << req;\n        }\n      } else if (opts.repo_ttl >= Duration()) {\n        cache.Free(Clock::now() - opts.repo_ttl);\n      }\n    } catch (const Exception&) {\n    }\n  }\n}\n\n}  // namespace\n}  // namespace gitstatus\n\nint main(int argc, char** argv) { gitstatus::GitStatus(argc, argv); }\n"
  },
  {
    "path": "gitstatus/src/index.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"index.h\"\n\n#include <dirent.h>\n#include <fcntl.h>\n#include <unistd.h>\n\n#include <algorithm>\n#include <condition_variable>\n#include <cstdint>\n#include <cstring>\n#include <iomanip>\n#include <iterator>\n#include <mutex>\n#include <stack>\n\n#include \"algorithm.h\"\n#include \"check.h\"\n#include \"dir.h\"\n#include \"git.h\"\n#include \"index.h\"\n#include \"print.h\"\n#include \"scope_guard.h\"\n#include \"stat.h\"\n#include \"string_cmp.h\"\n#include \"thread_pool.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nvoid CommonDir(Str<> str, const char* a, const char* b, size_t* dir_len, size_t* dir_depth) {\n  *dir_len = 0;\n  *dir_depth = 0;\n  for (size_t i = 1; str.Eq(*a, *b) && *a; ++i, ++a, ++b) {\n    if (*a == '/') {\n      *dir_len = i;\n      ++*dir_depth;\n    }\n  }\n}\n\nsize_t Weight(const IndexDir& dir) { return 1 + dir.subdirs.size() + dir.files.size(); }\n\nbool MTimeEq(const git_index_time& index, const struct timespec& workdir) {\n  if (index.seconds != workdir.tv_sec) return false;\n  if (int64_t{index.nanoseconds} == workdir.tv_nsec) return true;\n#ifdef GITSTATUS_ZERO_NSEC\n  return index.nanoseconds == 0;\n#else\n  return false;\n#endif\n}\n\nbool IsModified(const git_index_entry* entry, const struct stat& st, const RepoCaps& caps) {\n  mode_t mode = st.st_mode;\n  if (S_ISREG(mode)) {\n    if (!caps.has_symlinks && S_ISLNK(entry->mode)) {\n      mode = entry->mode;\n    } else if (!caps.trust_filemode) {\n      mode = entry->mode;\n    } else {\n      mode = S_IFREG | (mode & 0100 ? 0755 : 0644);\n    }\n  } else {\n    mode &= S_IFMT;\n  }\n\n  bool res = false;\n\n#define COND(field, cond...) \\\n  if (cond) {                \\\n  } else                     \\\n    res = true,              \\\n    LOG(DEBUG) << \"Dirty candidate (modified): \" << Print(entry->path) << \": \" #field \" \"\n\n  COND(ino, !entry->ino || entry->ino == static_cast<std::uint32_t>(st.st_ino))\n      << entry->ino << \" => \" << static_cast<std::uint32_t>(st.st_ino);\n\n  COND(stage, GIT_INDEX_ENTRY_STAGE(entry) == 0) << \"=> \" << GIT_INDEX_ENTRY_STAGE(entry);\n  COND(fsize, int64_t{entry->file_size} == st.st_size) << entry->file_size << \" => \" << st.st_size;\n  COND(mtime, MTimeEq(entry->mtime, MTim(st))) << Print(entry->mtime) << \" => \" << Print(MTim(st));\n  COND(mode, entry->mode == mode) << std::oct << entry->mode << \" => \" << std::oct << mode;\n\n#undef COND\n\n  return res;\n}\n\nint OpenDir(int parent_fd, const char* name) {\n  return openat(parent_fd, name, O_RDONLY | O_DIRECTORY | O_CLOEXEC);\n}\n\nvoid OpenTail(int* fds, size_t nfds, int root_fd, StringView dirname, Arena& arena) {\n  CHECK(fds && nfds && root_fd >= 0);\n  std::fill(fds, fds + nfds, -1);\n  if (!dirname.len) return;\n  CHECK(dirname.len > 1);\n  CHECK(dirname.ptr[0] != '/');\n  CHECK(dirname.ptr[dirname.len - 1] == '/');\n\n  char* begin = arena.StrDup(dirname.ptr, dirname.len - 1);\n  WithArena<std::vector<const char*>> subdirs(&arena);\n  subdirs.reserve(nfds + 1);\n\n  for (char* sep = begin + dirname.len - 1; subdirs.size() < nfds;) {\n    sep = FindLast(begin, sep, '/');\n    if (sep == begin) break;\n    *sep = 0;\n    subdirs.push_back(sep + 1);\n  }\n  subdirs.push_back(begin);\n  if (subdirs.size() < nfds + 1) subdirs.push_back(\".\");\n  CHECK(subdirs.size() <= nfds + 1);\n\n  for (size_t i = subdirs.size(); i != 1; --i) {\n    const char* path = subdirs[i - 1];\n    if ((root_fd = OpenDir(root_fd, path)) < 0) {\n      for (; i != subdirs.size(); ++i) {\n        CHECK(!close(fds[i - 1])) << Errno();\n        fds[i - 1] = -1;\n      }\n      return;\n    }\n    fds[i - 2] = root_fd;\n  }\n}\n\nstd::vector<const char*> ScanDirs(git_index* index, int root_fd, IndexDir* const* begin,\n                                  IndexDir* const* end, const RepoCaps& caps,\n                                  const ScanOpts& opts) {\n  const Str<> str(caps.case_sensitive);\n\n  Arena arena;\n  std::vector<const char*> dirty_candidates;\n  std::vector<char*> entries;\n  entries.reserve(128);\n\n  auto AddCandidate = [&](const char* kind, const char* path) {\n    if (kind) LOG(DEBUG) << \"Dirty candidate (\" << kind << \"): \" << Print(path);\n    dirty_candidates.push_back(path);\n  };\n\n  constexpr ssize_t kDirStackSize = 5;\n  int dir_fd[kDirStackSize];\n  std::fill(std::begin(dir_fd), std::end(dir_fd), -1);\n  auto Close = [](int& fd) {\n    if (fd >= 0) {\n      CHECK(!close(fd)) << Errno();\n      fd = -1;\n    }\n  };\n  auto CloseAll = [&] { std::for_each(std::begin(dir_fd), std::end(dir_fd), Close); };\n  ON_SCOPE_EXIT(&) { CloseAll(); };\n  if (begin != end) OpenTail(dir_fd, kDirStackSize, root_fd, (*begin)->path, arena);\n\n  for (IndexDir* const* it = begin; it != end; ++it) {\n    IndexDir& dir = **it;\n\n    auto Basename = [&](const git_index_entry* e) { return e->path + dir.path.len; };\n\n    auto AddUnmached = [&](StringView basename) {\n      if (!basename.len) {\n        dir.st = {};\n        dir.unmatched.clear();\n        dir.arena.Reuse();\n      } else if (str.Eq(basename, StringView(\".git/\"))) {\n        return;\n      }\n      char* path = dir.arena.StrCat(dir.path, basename);\n      dir.unmatched.push_back(path);\n      AddCandidate(basename.len ? \"new\" : \"unreadable\", path);\n    };\n\n    auto StatFiles = [&]() {\n      struct stat st;\n      for (const git_index_entry* file : dir.files) {\n        if (fstatat(*dir_fd, Basename(file), &st, AT_SYMLINK_NOFOLLOW)) {\n          AddCandidate(errno == ENOENT ? \"deleted\" : \"unreadable\", file->path);\n        } else if (IsModified(file, st, caps)) {\n          AddCandidate(nullptr, file->path);\n        }\n      }\n    };\n\n    ssize_t d = 0;\n    if ((it == begin || (d = it[-1]->depth + 1 - dir.depth) < kDirStackSize) && dir_fd[d] >= 0) {\n      CHECK(d >= 0);\n      int fd = OpenDir(dir_fd[d], arena.StrDup(dir.basename.ptr, dir.basename.len));\n      for (ssize_t i = 0; i != d; ++i) Close(dir_fd[i]);\n      std::rotate(dir_fd, dir_fd + (d ? d : kDirStackSize) - 1, dir_fd + kDirStackSize);\n      Close(*dir_fd);\n      *dir_fd = fd;\n    } else {\n      CloseAll();\n      if (dir.path.len) {\n        CHECK(dir.path.ptr[0] != '/');\n        CHECK(dir.path.ptr[dir.path.len - 1] == '/');\n        *dir_fd = OpenDir(root_fd, arena.StrDup(dir.path.ptr, dir.path.len - 1));\n      } else {\n        VERIFY((*dir_fd = dup(root_fd)) >= 0) << Errno();\n      }\n    }\n    if (*dir_fd < 0) {\n      CloseAll();\n      AddUnmached(\"\");\n      continue;\n    }\n\n    if (!opts.include_untracked) {\n      StatFiles();\n      continue;\n    }\n\n    if (opts.untracked_cache != Tribool::kFalse) {\n      struct stat st;\n      if (fstat(*dir_fd, &st)) {\n        AddUnmached(\"\");\n        continue;\n      }\n      if (opts.untracked_cache == Tribool::kTrue && StatEq(st, dir.st)) {\n        StatFiles();\n        for (const char* path : dir.unmatched) AddCandidate(\"new\", path);\n        continue;\n      }\n      dir.st = st;\n    }\n\n    entries.clear();\n    arena.Reuse();\n    if (!ListDir(*dir_fd, arena, entries, caps.precompose_unicode, caps.case_sensitive)) {\n      AddUnmached(\"\");\n      continue;\n    }\n    dir.unmatched.clear();\n    dir.arena.Reuse();\n\n    const git_index_entry* const* file = dir.files.data();\n    const git_index_entry* const* file_end = file + dir.files.size();\n    const StringView* subdir = dir.subdirs.data();\n    const StringView* subdir_end = subdir + dir.subdirs.size();\n\n    for (char* entry : entries) {\n      bool matched = false;\n\n      for (; file != file_end; ++file) {\n        int cmp = str.Cmp(Basename(*file), entry);\n        if (cmp < 0) {\n          AddCandidate(\"deleted\", (*file)->path);\n        } else if (cmp == 0) {\n          struct stat st;\n          if (fstatat(*dir_fd, entry, &st, AT_SYMLINK_NOFOLLOW)) {\n            AddCandidate(\"unreadable\", (*file)->path);\n          } else if (IsModified(*file, st, caps)) {\n            AddCandidate(nullptr, (*file)->path);\n          }\n          matched = true;\n          ++file;\n          break;\n        } else {\n          break;\n        }\n      }\n\n      if (matched) continue;\n\n      for (; subdir != subdir_end; ++subdir) {\n        int cmp = str.Cmp(*subdir, entry);\n        if (cmp > 0) break;\n        if (cmp == 0) {\n          matched = true;\n          ++subdir;\n          break;\n        }\n      }\n\n      if (!matched) {\n        StringView basename(entry);\n        if (entry[-1] == DT_DIR) entry[basename.len++] = '/';\n        AddUnmached(basename);\n      }\n    }\n\n    for (; file != file_end; ++file) AddCandidate(\"deleted\", (*file)->path);\n  }\n\n  return dirty_candidates;\n}\n\n}  // namespace\n\nRepoCaps::RepoCaps(git_repository* repo, git_index* index) {\n  trust_filemode = git_index_is_filemode_trustworthy(index);\n  has_symlinks = git_index_supports_symlinks(index);\n  case_sensitive = git_index_is_case_sensitive(index);\n  precompose_unicode = git_index_precompose_unicode(index);\n  LOG(DEBUG) << \"Repository capabilities for \" << Print(git_repository_workdir(repo)) << \": \"\n             << \"is_filemode_trustworthy = \" << std::boolalpha << trust_filemode << \", \"\n             << \"index_supports_symlinks = \" << std::boolalpha << has_symlinks << \", \"\n             << \"index_is_case_sensitive = \" << std::boolalpha << case_sensitive << \", \"\n             << \"precompose_unicode = \" << std::boolalpha << precompose_unicode;\n}\n\nIndex::Index(git_repository* repo, git_index* index)\n    : dirs_(&arena_),\n      splits_(&arena_),\n      git_index_(index),\n      root_dir_(git_repository_workdir(repo)),\n      caps_(repo, index) {\n  size_t total_weight = InitDirs(index);\n  InitSplits(total_weight);\n}\n\nsize_t Index::InitDirs(git_index* index) {\n  const Str<> str(git_index_is_case_sensitive(index));\n  const size_t index_size = git_index_entrycount(index);\n  dirs_.reserve(index_size / 8);\n  std::stack<IndexDir*> stack;\n  stack.push(arena_.DirectInit<IndexDir>(&arena_));\n\n  size_t total_weight = 0;\n  auto PopDir = [&] {\n    CHECK(!stack.empty());\n    IndexDir* top = stack.top();\n    CHECK(top->depth + 1 == stack.size());\n    if (!std::is_sorted(top->subdirs.begin(), top->subdirs.end(), str.Lt)) {\n      StrSort(top->subdirs.begin(), top->subdirs.end(), str.case_sensitive);\n    }\n    total_weight += Weight(*top);\n    dirs_.push_back(top);\n    stack.pop();\n  };\n\n  for (size_t i = 0; i != index_size; ++i) {\n    const git_index_entry* entry = git_index_get_byindex_no_sort(index, i);\n    IndexDir* prev = stack.top();\n    size_t common_len, common_depth;\n    CommonDir(str, prev->path.ptr, entry->path, &common_len, &common_depth);\n    CHECK(common_depth <= prev->depth);\n\n    for (size_t i = common_depth; i != prev->depth; ++i) PopDir();\n\n    for (const char* p = entry->path + common_len; (p = std::strchr(p, '/')); ++p) {\n      IndexDir* top = stack.top();\n      StringView subdir(entry->path + top->path.len, p);\n      top->subdirs.push_back(subdir);\n      IndexDir* dir = arena_.DirectInit<IndexDir>(&arena_);\n      dir->path = StringView(entry->path, p - entry->path + 1);\n      dir->basename = subdir;\n      dir->depth = stack.size();\n      CHECK(dir->path.ptr[dir->path.len - 1] == '/');\n      stack.push(dir);\n    }\n\n    CHECK(!stack.empty());\n    IndexDir* dir = stack.top();\n    dir->files.push_back(entry);\n  }\n\n  CHECK(!stack.empty());\n  do {\n    PopDir();\n  } while (!stack.empty());\n  std::reverse(dirs_.begin(), dirs_.end());\n\n  return total_weight;\n}\n\nvoid Index::InitSplits(size_t total_weight) {\n  constexpr size_t kMinShardWeight = 512;\n  const size_t kNumShards = 16 * GlobalThreadPool()->num_threads();\n  const size_t shard_weight = std::max(kMinShardWeight, total_weight / kNumShards);\n\n  splits_.reserve(kNumShards + 1);\n  splits_.push_back(0);\n\n  for (size_t i = 0, w = 0; i != dirs_.size(); ++i) {\n    w += Weight(*dirs_[i]);\n    if (w >= shard_weight) {\n      w = 0;\n      splits_.push_back(i + 1);\n    }\n  }\n\n  if (splits_.back() != dirs_.size()) splits_.push_back(dirs_.size());\n  CHECK(splits_.size() <= kNumShards + 1);\n  CHECK(std::is_sorted(splits_.begin(), splits_.end()));\n  CHECK(std::adjacent_find(splits_.begin(), splits_.end()) == splits_.end());\n}\n\nstd::vector<const char*> Index::GetDirtyCandidates(const ScanOpts& opts) {\n  int root_fd = open(root_dir_, O_RDONLY | O_DIRECTORY | O_CLOEXEC);\n  VERIFY(root_fd >= 0);\n  ON_SCOPE_EXIT(&) { CHECK(!close(root_fd)) << Errno(); };\n\n  CHECK(!splits_.empty());\n\n  std::mutex mutex;\n  std::condition_variable cv;\n  size_t inflight = splits_.size() - 1;\n  bool error = false;\n  std::vector<const char*> res;\n\n  for (size_t i = 0; i != splits_.size() - 1; ++i) {\n    size_t from = splits_[i];\n    size_t to = splits_[i + 1];\n\n    GlobalThreadPool()->Schedule([&, from, to]() {\n      ON_SCOPE_EXIT(&) {\n        std::unique_lock<std::mutex> lock(mutex);\n        CHECK(inflight);\n        if (--inflight == 0) cv.notify_one();\n      };\n      try {\n        std::vector<const char*> candidates =\n            ScanDirs(git_index_, root_fd, dirs_.data() + from, dirs_.data() + to, caps_, opts);\n        if (!candidates.empty()) {\n          std::unique_lock<std::mutex> lock(mutex);\n          res.insert(res.end(), candidates.begin(), candidates.end());\n        }\n      } catch (const Exception&) {\n        std::unique_lock<std::mutex> lock(mutex);\n        error = true;\n      }\n    });\n  }\n\n  {\n    std::unique_lock<std::mutex> lock(mutex);\n    while (inflight) cv.wait(lock);\n  }\n\n  VERIFY(!error);\n  StrSort(res.begin(), res.end(), git_index_is_case_sensitive(git_index_));\n  auto StrEq = [](const char* a, const char* b) { return !strcmp(a, b); };\n  res.erase(std::unique(res.begin(), res.end(), StrEq), res.end());\n  return res;\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/index.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_INDEX_H_\n#define ROMKATV_GITSTATUS_INDEX_H_\n\n#include <sys/stat.h>\n\n#include <git2.h>\n\n#include <cstddef>\n#include <string>\n#include <vector>\n\n#include \"arena.h\"\n#include \"options.h\"\n#include \"string_view.h\"\n#include \"tribool.h\"\n\nnamespace gitstatus {\n\nstruct RepoCaps {\n  RepoCaps(git_repository* repo, git_index* index);\n\n  bool trust_filemode;\n  bool has_symlinks;\n  bool case_sensitive;\n  bool precompose_unicode;\n};\n\nstruct ScanOpts {\n  bool include_untracked;\n  Tribool untracked_cache;\n};\n\nstruct IndexDir {\n  explicit IndexDir(Arena* arena) : files(arena), subdirs(arena) {}\n\n  StringView path;\n  StringView basename;\n  size_t depth = 0;\n  struct stat st = {};\n  WithArena<std::vector<const git_index_entry*>> files;\n  WithArena<std::vector<StringView>> subdirs;\n\n  Arena arena;\n  std::vector<const char*> unmatched;\n};\n\nclass Index {\n public:\n  Index(git_repository* repo, git_index* index);\n\n  std::vector<const char*> GetDirtyCandidates(const ScanOpts& opts);\n\n private:\n  size_t InitDirs(git_index* index);\n  void InitSplits(size_t total_weight);\n\n  Arena arena_;\n  WithArena<std::vector<IndexDir*>> dirs_;\n  WithArena<std::vector<size_t>> splits_;\n  git_index* git_index_;\n  const char* root_dir_;\n  RepoCaps caps_;\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_GIT_H_\n"
  },
  {
    "path": "gitstatus/src/logging.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"logging.h\"\n\n#include <pthread.h>\n#include <time.h>\n\n#include <cerrno>\n#include <cstdio>\n#include <cstring>\n#include <ctime>\n#include <mutex>\n#include <string>\n\nnamespace gitstatus {\n\nnamespace internal_logging {\n\nnamespace {\n\nstd::mutex g_log_mutex;\n\nconstexpr char kHexLower[] = {'0', '1', '2', '3', '4', '5', '6', '7',\n                              '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\nvoid FormatThreadId(char (&out)[2 * sizeof(std::uintptr_t) + 1]) {\n  std::uintptr_t tid = (std::uintptr_t)pthread_self();\n  char* p = out + sizeof(out) - 1;\n  *p = 0;\n  do {\n    --p;\n    *p = kHexLower[tid & 0xF];\n    tid >>= 4;\n  } while (p != out);\n}\n\nvoid FormatCurrentTime(char (&out)[64]) {\n  std::time_t time = std::time(nullptr);\n  struct tm tm;\n  if (localtime_r(&time, &tm) != &tm || std::strftime(out, sizeof(out), \"%F %T\", &tm) == 0) {\n    std::strcpy(out, \"undef\");\n  }\n}\n\n}  // namespace\n\nLogStreamBase::LogStreamBase(const char* file, int line, LogLevel lvl)\n    : errno_(errno), file_(file), line_(line), lvl_(LogLevelStr(lvl)) {\n  strm_ = std::make_unique<std::ostringstream>();\n}\n\nvoid LogStreamBase::Flush() {\n  {\n    std::string msg = strm_->str();\n    char tid[2 * sizeof(std::uintptr_t) + 1];\n    FormatThreadId(tid);\n    char time[64];\n    FormatCurrentTime(time);\n\n    std::unique_lock<std::mutex> lock(g_log_mutex);\n    std::fprintf(stderr, \"[%s %s %s %s:%d] %s\\n\", time, tid, lvl_, file_, line_, msg.c_str());\n  }\n  strm_.reset();\n  errno = errno_;\n}\n\nstd::ostream& operator<<(std::ostream& strm, Errno e) {\n  // GNU C Library uses a buffer of 1024 characters for strerror(). Mimic to avoid truncations.\n  char buf[1024];\n  auto x = strerror_r(e.err, buf, sizeof(buf));\n  // There are two versions of strerror_r with different semantics. We can figure out which\n  // one we've got by looking at the result type.\n  if (std::is_same<decltype(x), int>::value) {\n    // XSI-compliant version.\n    strm << (x ? \"unknown error\" : buf);\n  } else if (std::is_same<decltype(x), char*>::value) {\n    // GNU-specific version.\n    strm << x;\n  } else {\n    // Something else entirely.\n    strm << \"unknown error\";\n  }\n  return strm;\n}\n\n}  // namespace internal_logging\n\nLogLevel g_min_log_level = INFO;\n\nconst char* LogLevelStr(LogLevel lvl) {\n  switch (lvl) {\n    case DEBUG:\n      return \"DEBUG\";\n    case INFO:\n      return \"INFO\";\n    case WARN:\n      return \"WARN\";\n    case ERROR:\n      return \"ERROR\";\n    case FATAL:\n      return \"FATAL\";\n  }\n  return \"UNKNOWN\";\n}\n\nbool ParseLogLevel(const char* s, LogLevel& lvl) {\n  if (!s)\n    return false;\n  else if (!std::strcmp(s, \"DEBUG\"))\n    lvl = DEBUG;\n  else if (!std::strcmp(s, \"INFO\"))\n    lvl = INFO;\n  else if (!std::strcmp(s, \"WARN\"))\n    lvl = WARN;\n  else if (!std::strcmp(s, \"ERROR\"))\n    lvl = ERROR;\n  else if (!std::strcmp(s, \"FATAL\"))\n    lvl = FATAL;\n  else\n    return false;\n  return true;\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/logging.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_LOGGING_H_\n#define ROMKATV_GITSTATUS_LOGGING_H_\n\n#include <cstdlib>\n#include <memory>\n#include <ostream>\n#include <sstream>\n\n#define LOG(severity) LOG_I(severity)\n\n#define LOG_I(severity)                                                                            \\\n  (::gitstatus::severity < ::gitstatus::g_min_log_level)                                           \\\n      ? static_cast<void>(0)                                                                       \\\n      : ::gitstatus::internal_logging::Assignable() =                                              \\\n            ::gitstatus::internal_logging::LogStream<::gitstatus::severity>(__FILE__, __LINE__,    \\\n                                                                            ::gitstatus::severity) \\\n                .ref()\n\nnamespace gitstatus {\n\nenum LogLevel {\n  DEBUG,\n  INFO,\n  WARN,\n  ERROR,\n  FATAL,\n};\n\nconst char* LogLevelStr(LogLevel lvl);\nbool ParseLogLevel(const char* s, LogLevel& lvl);\n\nextern LogLevel g_min_log_level;\n\nnamespace internal_logging {\n\nstruct Assignable {\n  template <class T>\n  void operator=(const T&) const {}\n};\n\nclass LogStreamBase {\n public:\n  LogStreamBase(const char* file, int line, LogLevel lvl);\n\n  LogStreamBase& ref() { return *this; }\n  std::ostream& strm() { return *strm_; }\n  int stashed_errno() const { return errno_; }\n\n protected:\n  void Flush();\n\n private:\n  int errno_;\n  const char* file_;\n  int line_;\n  const char* lvl_;\n  std::unique_ptr<std::ostringstream> strm_;\n};\n\ntemplate <LogLevel>\nclass LogStream : public LogStreamBase {\n public:\n  using LogStreamBase::LogStreamBase;\n  ~LogStream() { this->Flush(); }\n};\n\ntemplate <>\nclass LogStream<FATAL> : public LogStreamBase {\n public:\n  using LogStreamBase::LogStreamBase;\n  ~LogStream() __attribute__((noreturn)) {\n    this->Flush();\n    std::abort();\n  }\n};\n\ntemplate <class T>\nLogStreamBase& operator<<(LogStreamBase& strm, const T& val) {\n  strm.strm() << val;\n  return strm;\n}\n\ninline LogStreamBase& operator<<(LogStreamBase& strm, std::ostream& (*manip)(std::ostream&)) {\n  strm.strm() << manip;\n  return strm;\n}\n\nstruct Errno {\n  int err;\n};\n\nstd::ostream& operator<<(std::ostream& strm, Errno e);\n\nstruct StashedErrno {};\n\ninline LogStreamBase& operator<<(LogStreamBase& strm, StashedErrno) {\n  return strm << Errno{strm.stashed_errno()};\n}\n\n}  // namespace internal_logging\n\ninline internal_logging::Errno Errno(int err) { return {err}; }\ninline internal_logging::StashedErrno Errno() { return {}; }\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_LOGGING_H_\n"
  },
  {
    "path": "gitstatus/src/options.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"options.h\"\n\n#include <fnmatch.h>\n#include <getopt.h>\n#include <unistd.h>\n\n#include <algorithm>\n#include <climits>\n#include <cstdlib>\n#include <cstring>\n#include <iostream>\n\n#include \"print.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nlong ParseLong(const char* s) {\n  errno = 0;\n  char* end = nullptr;\n  long res = std::strtol(s, &end, 10);\n  if (*end || end == s || errno) {\n    std::cerr << \"gitstatusd: not an integer: \" << s << std::endl;\n    std::exit(10);\n  }\n  return res;\n}\n\nlong ParseInt(const char* s) {\n  long res = ParseLong(s);\n  if (res < INT_MIN || res > INT_MAX) {\n    std::cerr << \"gitstatusd: integer out of bounds: \" << s << std::endl;\n    std::exit(10);\n  }\n  return res;\n}\n\nsize_t ParseSizeT(const char* s) {\n  static_assert(sizeof(long) <= sizeof(size_t), \"\");\n  long res = ParseLong(s);\n  return res >= 0 ? res : -1;\n}\n\nvoid PrintUsage() {\n  std::cout << \"Usage: gitstatusd [OPTION]...\\n\"\n            << \"Print machine-readable status of the git repos for directories in stdin.\\n\"\n            << \"\\n\"\n            << \"OPTIONS\\n\"\n            << \"  -l, --lock-fd=NUM [default=-1]\\n\"\n            << \"   If non-negative, check whether the specified file descriptor is locked when\\n\"\n            << \"   not receiving any requests for one second; exit if it isn't locked.\\n\"\n            << \"\\n\"\n            << \"  -p, --parent-pid=NUM [default=-1]\\n\"\n            << \"   If non-negative, send signal 0 to the specified PID when not receiving any\\n\"\n            << \"   requests for one second; exit if signal sending fails.\\n\"\n            << \"\\n\"\n            << \"  -t, --num-threads=NUM [default=1]\\n\"\n            << \"   Use this many threads to scan git workdir for unstaged and untracked files.\\n\"\n            << \"   Empirically, setting this parameter to twice the number of virtual CPU yields\\n\"\n            << \"   maximum performance.\\n\"\n            << \"\\n\"\n            << \"  -v, --log-level=STR [default=INFO]\\n\"\n            << \"   Don't write entries to log whose log level is below this. Log levels in\\n\"\n            << \"   increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\\n\"\n            << \"\\n\"\n            << \"  -r, --repo-ttl-seconds=NUM [default=3600]\\n\"\n            << \"   Close git repositories that haven't been used for this long. This is meant to\\n\"\n            << \"   release resources such as memory and file descriptors. The next request for a\\n\"\n            << \"   repo that's been closed is much slower than for a repo that hasn't been.\\n\"\n            << \"   Negative value means infinity.\\n\"\n            << \"\\n\"\n            << \"  -z, --max-commit-summary-length=NUM [default=256]\\n\"\n            << \"   Truncate commit summary if it's longer than this many bytes.\\n\"\n            << \"\\n\"\n            << \"  -s, --max-num-staged=NUM [default=1]\\n\"\n            << \"   Report at most this many staged changes; negative value means infinity.\\n\"\n            << \"\\n\"\n            << \"  -u, --max-num-unstaged=NUM [default=1]\\n\"\n            << \"   Report at most this many unstaged changes; negative value means infinity.\\n\"\n            << \"\\n\"\n            << \"  -c, --max-num-conflicted=NUM [default=1]\\n\"\n            << \"   Report at most this many conflicted changes; negative value means infinity.\\n\"\n            << \"\\n\"\n            << \"  -d, --max-num-untracked=NUM [default=1]\\n\"\n            << \"   Report at most this many untracked files; negative value means infinity.\\n\"\n            << \"\\n\"\n            << \"  -m, --dirty-max-index-size=NUM [default=-1]\\n\"\n            << \"   If a repo has more files in its index than this, override --max-num-unstaged\\n\"\n            << \"   and --max-num-untracked (but not --max-num-staged) with zeros; negative value\\n\"\n            << \"   means infinity.\\n\"\n            << \"\\n\"\n            << \"  -e, --recurse-untracked-dirs\\n\"\n            << \"   Count files within untracked directories like `git status --untracked-files`.\\n\"\n            << \"\\n\"\n            << \"  -U, --ignore-status-show-untracked-files\\n\"\n            << \"   Unless this option is specified, report zero untracked files for repositories\\n\"\n            << \"   with status.showUntrackedFiles = false.\\n\"\n            << \"\\n\"\n            << \"  -W, --ignore-bash-show-untracked-files\\n\"\n            << \"   Unless this option is specified, report zero untracked files for repositories\\n\"\n            << \"   with bash.showUntrackedFiles = false.\\n\"\n            << \"\\n\"\n            << \"  -D, --ignore-bash-show-dirty-state\\n\"\n            << \"   Unless this option is specified, report zero staged, unstaged and conflicted\\n\"\n            << \"   changes for repositories with bash.showDirtyState = false.\\n\"\n            << \"\\n\"\n            << \"  -V, --version\\n\"\n            << \"   Print gitstatusd version and exit.\\n\"\n            << \"\\n\"\n            << \"  -G, --version-glob=STR [default=*]\\n\"\n            << \"   Immediately exit with code 11 if gitstatusd version (see --version) doesn't\\n\"\n            << \"   does not match the specified pattern. Matching is done with fnmatch(3)\\n\"\n            << \"   without flags.\\n\"\n            << \"\\n\"\n            << \"  -h, --help\\n\"\n            << \"  Display this help and exit.\\n\"\n            << \"\\n\"\n            << \"INPUT\\n\"\n            << \"\\n\"\n            << \"  Requests are read from stdin, separated by ascii 30 (record separator). Each\\n\"\n            << \"  request is made of the following fields, in the specified order, separated by\\n\"\n            << \"  ascii 31 (unit separator):\\n\"\n            << \"\\n\"\n            << \"    1. Request ID. Any string. Can be empty.\\n\"\n            << \"    2. Path to the directory for which git stats are being requested.\\n\"\n            << \"       If the first character is ':', it is removed and the remaining path\\n\"\n            << \"       is treated as GIT_DIR.\\n\"\n            << \"    3. (Optional) '1' to disable computation of anything that requires reading\\n\"\n            << \"       git index; '0' for the default behavior of computing everything.\\n\"\n            << \"\\n\"\n            << \"OUTPUT\\n\"\n            << \"\\n\"\n            << \"  For every request read from stdin there is response written to stdout.\\n\"\n            << \"  Responses are separated by ascii 30 (record separator). Each response is made\\n\"\n            << \"  of the following fields, in the specified order, separated by ascii 31\\n\"\n            << \"  (unit separator):\\n\"\n            << \"\\n\"\n            << \"     1. Request id. The same as the first field in the request.\\n\"\n            << \"     2. 0 if the directory isn't a git repo, 1 otherwise. If 0, all the\\n\"\n            << \"        following fields are missing.\\n\"\n            << \"     3. Absolute path to the git repository workdir.\\n\"\n            << \"     4. Commit hash that HEAD is pointing to. 40 hex digits.\\n\"\n            << \"     5. Local branch name or empty if not on a branch.\\n\"\n            << \"     6. Upstream branch name. Can be empty.\\n\"\n            << \"     7. The remote name, e.g. \\\"upstream\\\" or \\\"origin\\\".\\n\"\n            << \"     8. Remote URL. Can be empty.\\n\"\n            << \"     9. Repository state, A.K.A. action. Can be empty.\\n\"\n            << \"    10. The number of files in the index.\\n\"\n            << \"    11. The number of staged changes.\\n\"\n            << \"    12. The number of unstaged changes.\\n\"\n            << \"    13. The number of conflicted changes.\\n\"\n            << \"    14. The number of untracked files.\\n\"\n            << \"    15. Number of commits the current branch is ahead of upstream.\\n\"\n            << \"    16. Number of commits the current branch is behind upstream.\\n\"\n            << \"    17. The number of stashes.\\n\"\n            << \"    18. The last tag (in lexicographical order) that points to the same\\n\"\n            << \"        commit as HEAD.\\n\"\n            << \"    19. The number of unstaged deleted files.\\n\"\n            << \"    20. The number of staged new files.\\n\"\n            << \"    21. The number of staged deleted files.\\n\"\n            << \"    22. The push remote name, e.g. \\\"upstream\\\" or \\\"origin\\\".\\n\"\n            << \"    23. Push remote URL. Can be empty.\\n\"\n            << \"    24. Number of commits the current branch is ahead of push remote.\\n\"\n            << \"    25. Number of commits the current branch is behind push remote.\\n\"\n            << \"    26. Number of files in the index with skip-worktree bit set.\\n\"\n            << \"    27. Number of files in the index with assume-unchanged bit set.\\n\"\n            << \"    28. Encoding of the HEAD's commit message. Empty value means UTF-8.\\n\"\n            << \"    29. The first paragraph of the HEAD's commit message as one line.\\n\"\n            << \"\\n\"\n            << \"Note: Renamed files are reported as deleted plus new.\\n\"\n            << \"\\n\"\n            << \"EXAMPLE\\n\"\n            << \"\\n\"\n            << \"  Send a single request and print response (zsh syntax):\\n\"\n            << \"\\n\"\n            << \"    local req_id=id\\n\"\n            << \"    local dir=$PWD\\n\"\n            << \"    echo -nE $req_id$'\\\\x1f'$dir$'\\\\x1e' | ./gitstatusd | {\\n\"\n            << \"      local resp\\n\"\n            << \"      IFS=$'\\\\x1f' read -rd $'\\\\x1e' -A resp && print -lr -- \\\"${(@qq)resp}\\\"\\n\"\n            << \"    }\\n\"\n            << \"\\n\"\n            << \"  Output:\"\n            << \"\\n\"\n            << \"    'id'\\n\"\n            << \"    '1'\\n\"\n            << \"    '/home/romka/gitstatus'\\n\"\n            << \"    'bf46bf03dbab7108801b53f8a720caee8464c9c3'\\n\"\n            << \"    'master'\\n\"\n            << \"    'master'\\n\"\n            << \"    'origin'\\n\"\n            << \"    'git@github.com:romkatv/gitstatus.git'\\n\"\n            << \"    ''\\n\"\n            << \"    '70'\\n\"\n            << \"    '1'\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    '2'\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    ''\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    ''\\n\"\n            << \"    ''\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    '0'\\n\"\n            << \"    ''\\n\"\n            << \"    'add a build server for darwin-arm64'\\n\"\n            << \"\\n\"\n            << \"EXIT STATUS\\n\"\n            << \"\\n\"\n            << \"  The command returns zero on success (when printing help or on EOF),\\n\"\n            << \"  non-zero on failure. In the latter case the output is unspecified.\\n\"\n            << \"\\n\"\n            << \"COPYRIGHT\\n\"\n            << \"\\n\"\n            << \"  Copyright 2019 Roman Perepelitsa\\n\"\n            << \"  This is free software; see https://github.com/romkatv/gitstatus for copying\\n\"\n            << \"  conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR\\n\"\n            << \"  A PARTICULAR PURPOSE.\" << std::endl;\n}\n\nconst char* Version() {\n#define _INTERNAL_GITSTATUS_STRINGIZE(x) _INTERNAL_GITSTATUS_STRINGIZE_I(x)\n#define _INTERNAL_GITSTATUS_STRINGIZE_I(x) #x\n  return _INTERNAL_GITSTATUS_STRINGIZE(GITSTATUS_VERSION);\n#undef _INTERNAL_GITSTATUS_STRINGIZE_I\n#undef _INTERNAL_GITSTATUS_STRINGIZE\n}\n\n}  // namespace\n\nOptions ParseOptions(int argc, char** argv) {\n  const struct option opts[] = {{\"help\", no_argument, nullptr, 'h'},\n                                {\"version\", no_argument, nullptr, 'V'},\n                                {\"version-glob\", required_argument, nullptr, 'G'},\n                                {\"lock-fd\", required_argument, nullptr, 'l'},\n                                {\"parent-pid\", required_argument, nullptr, 'p'},\n                                {\"num-threads\", required_argument, nullptr, 't'},\n                                {\"log-level\", required_argument, nullptr, 'v'},\n                                {\"repo-ttl-seconds\", required_argument, nullptr, 'r'},\n                                {\"max-commit-summary-length\", required_argument, nullptr, 'z'},\n                                {\"max-num-staged\", required_argument, nullptr, 's'},\n                                {\"max-num-unstaged\", required_argument, nullptr, 'u'},\n                                {\"max-num-conflicted\", required_argument, nullptr, 'c'},\n                                {\"max-num-untracked\", required_argument, nullptr, 'd'},\n                                {\"dirty-max-index-size\", required_argument, nullptr, 'm'},\n                                {\"recurse-untracked-dirs\", no_argument, nullptr, 'e'},\n                                {\"ignore-status-show-untracked-files\", no_argument, nullptr, 'U'},\n                                {\"ignore-bash-show-untracked-files\", no_argument, nullptr, 'W'},\n                                {\"ignore-bash-show-dirty-state\", no_argument, nullptr, 'D'},\n                                {}};\n  Options res;\n  while (true) {\n    switch (getopt_long(argc, argv, \"hVG:l:p:t:v:r:z:s:u:c:d:m:eUWD\", opts, nullptr)) {\n      case -1:\n        if (optind != argc) {\n          std::cerr << \"unexpected positional argument: \" << argv[optind] << std::endl;\n          std::exit(10);\n        }\n        return res;\n      case 'h':\n        PrintUsage();\n        std::exit(0);\n      case 'V':\n        std::cout << Version() << std::endl;\n        std::exit(0);\n      case 'G':\n        if (int err = fnmatch(optarg, Version(), 0)) {\n          if (err != FNM_NOMATCH) {\n            std::cerr << \"Cannot match \" << Print(Version()) << \" against pattern \"\n                                         << Print(optarg) << \": error \" << err;\n            std::exit(10);\n          }\n          std::cerr << \"Version mismatch. Wanted (pattern): \" << Print(optarg)\n                    << \". Actual: \" << Print(Version()) << \".\" << std::endl;\n          std::exit(11);\n        }\n        break;\n      case 'l':\n        res.lock_fd = ParseInt(optarg);\n        break;\n      case 'p':\n        res.parent_pid = ParseInt(optarg);\n        break;\n      case 'v':\n        if (!ParseLogLevel(optarg, res.log_level)) {\n          std::cerr << \"invalid log level: \" << optarg << std::endl;\n          std::exit(10);\n        }\n        break;\n      case 'r':\n        res.repo_ttl = std::chrono::seconds(ParseLong(optarg));\n        break;\n      case 't': {\n        long n = ParseLong(optarg);\n        if (n <= 0) {\n          std::cerr << \"invalid number of threads: \" << n << std::endl;\n          std::exit(10);\n        }\n        res.num_threads = n;\n        break;\n      }\n      case 'z':\n        res.max_commit_summary_length = ParseSizeT(optarg);\n        break;\n      case 's':\n        res.max_num_staged = ParseSizeT(optarg);\n        break;\n      case 'u':\n        res.max_num_unstaged = ParseSizeT(optarg);\n        break;\n      case 'c':\n        res.max_num_conflicted = ParseSizeT(optarg);\n        break;\n      case 'd':\n        res.max_num_untracked = ParseSizeT(optarg);\n        break;\n      case 'm':\n        res.dirty_max_index_size = ParseSizeT(optarg);\n        break;\n      case 'e':\n        res.recurse_untracked_dirs = true;\n        break;\n      case 'U':\n        res.ignore_status_show_untracked_files = true;\n        break;\n      case 'W':\n        res.ignore_bash_show_untracked_files = true;\n        break;\n      case 'D':\n        res.ignore_bash_show_dirty_state = true;\n        break;\n      default:\n        std::exit(10);\n    }\n  }\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/options.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_OPTIONS_H_\n#define ROMKATV_GITSTATUS_OPTIONS_H_\n\n#include <chrono>\n#include <string>\n\n#include \"logging.h\"\n#include \"time.h\"\n\nnamespace gitstatus {\n\nstruct Limits {\n  // Truncate commit summary if it's longer than this many bytes.\n  size_t max_commit_summary_length = 256;\n  // Report at most this many staged changes.\n  size_t max_num_staged = 1;\n  // Report at most this many unstaged changes.\n  size_t max_num_unstaged = 1;\n  // Report at most this many conflicted changes.\n  size_t max_num_conflicted = 1;\n  // Report at most this many untracked files.\n  size_t max_num_untracked = 1;\n  // If a repo has more files in its index than this, override max_num_unstaged and\n  // max_num_untracked (but not max_num_staged) with zeros.\n  size_t dirty_max_index_size = -1;\n  // If true, report untracked files like `git status --untracked-files`.\n  bool recurse_untracked_dirs = false;\n  // Unless true, report zero untracked files for repositories with\n  // status.showUntrackedFiles = false.\n  bool ignore_status_show_untracked_files = false;\n  // Unless true, report zero untracked files for repositories with\n  // bash.showUntrackedFiles = false.\n  bool ignore_bash_show_untracked_files = false;\n  // Unless true, report zero staged, unstaged and conflicted changes for repositories with\n  // bash.showDirtyState = false.\n  bool ignore_bash_show_dirty_state = false;\n};\n\nstruct Options : Limits {\n  // Use this many threads to scan git workdir for unstaged and untracked files. Must be positive.\n  size_t num_threads = 1;\n  // If non-negative, check whether the specified file descriptor is locked when not receiving any\n  // requests for one second; exit if it isn't locked.\n  int lock_fd = -1;\n  // If non-negative, send signal 0 to the specified PID when not receiving any requests for one\n  // second; exit if signal sending fails.\n  int parent_pid = -1;\n  // Don't write entries to log whose log level is below this. Log levels in increasing order:\n  // DEBUG, INFO, WARN, ERROR, FATAL.\n  LogLevel log_level = INFO;\n  // Close git repositories that haven't been used for this long. This is meant to release resources\n  // such as memory and file descriptors. The next request for a repo that's been closed is much\n  // slower than for a repo that hasn't been. Negative value means infinity.\n  Duration repo_ttl = std::chrono::seconds(3600);\n};\n\nOptions ParseOptions(int argc, char** argv);\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_OPTIONS_H_\n"
  },
  {
    "path": "gitstatus/src/print.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_PRINT_H_\n#define ROMKATV_GITSTATUS_PRINT_H_\n\n#include <sys/stat.h>\n\n#include <iomanip>\n#include <ostream>\n#include <string>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\n#include <git2.h>\n\n#include \"string_view.h\"\n#include \"strings.h\"\n\nnamespace gitstatus {\n\ntemplate <class T>\nstruct Printable {\n  const T& value;\n};\n\ntemplate <class T>\nPrintable<T> Print(const T& val) {\n  return {val};\n}\n\ntemplate <class T>\nstd::ostream& operator<<(std::ostream& strm, const Printable<T>& p) {\n  static_assert(!std::is_pointer<std::decay_t<T>>(), \"\");\n  return strm << p.value;\n}\n\ninline std::ostream& operator<<(std::ostream& strm, const Printable<StringView>& p) {\n  Quote(strm, p.value.ptr, p.value.ptr + p.value.len);\n  return strm;\n}\n\ninline std::ostream& operator<<(std::ostream& strm, const Printable<std::string>& p) {\n  Quote(strm, p.value.data(), p.value.data() + p.value.size());\n  return strm;\n}\n\ninline std::ostream& operator<<(std::ostream& strm, const Printable<const char*>& p) {\n  Quote(strm, p.value, p.value ? p.value + std::strlen(p.value) : nullptr);\n  return strm;\n}\n\ninline std::ostream& operator<<(std::ostream& strm, const Printable<char*>& p) {\n  Quote(strm, p.value, p.value ? p.value + std::strlen(p.value) : nullptr);\n  return strm;\n}\n\ntemplate <class T, class U>\nstd::ostream& operator<<(std::ostream& strm, const Printable<std::pair<T, U>>& p) {\n  return strm << '{' << Print(p.value.first) << \", \" << Print(p.value.second) << '}';\n}\n\ntemplate <class T>\nstd::ostream& operator<<(std::ostream& strm, const Printable<std::vector<T>>& p) {\n  strm << '[';\n  for (size_t i = 0; i != p.value.size(); ++i) {\n    if (i) strm << \", \";\n    strm << Print(p.value[i]);\n  }\n  strm << ']';\n  return strm;\n}\n\ninline std::ostream& operator<<(std::ostream& strm, const Printable<struct timespec>& p) {\n  strm << p.value.tv_sec << '.' << std::setw(9) << std::setfill('0') << p.value.tv_nsec;\n  return strm;\n}\n\ninline std::ostream& operator<<(std::ostream& strm, const Printable<git_index_time>& p) {\n  strm << p.value.seconds << '.' << std::setw(9) << std::setfill('0') << p.value.nanoseconds;\n  return strm;\n}\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_PRINT_H_\n"
  },
  {
    "path": "gitstatus/src/repo.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"repo.h\"\n\n#include <fcntl.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include <algorithm>\n#include <atomic>\n#include <cstdlib>\n#include <cstring>\n#include <exception>\n#include <iterator>\n#include <memory>\n#include <type_traits>\n#include <utility>\n\n#include \"arena.h\"\n#include \"check.h\"\n#include \"check_dir_mtime.h\"\n#include \"dir.h\"\n#include \"git.h\"\n#include \"print.h\"\n#include \"scope_guard.h\"\n#include \"stat.h\"\n#include \"string_cmp.h\"\n#include \"thread_pool.h\"\n#include \"timer.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nusing namespace std::string_literals;\n\ntemplate <class T>\nT Load(const std::atomic<T>& x) {\n  return x.load(std::memory_order_relaxed);\n}\n\ntemplate <class T>\nvoid Store(std::atomic<T>& x, T v) {\n  x.store(v, std::memory_order_relaxed);\n}\n\ntemplate <class T>\nT Inc(std::atomic<T>& x, T by = 1) {\n  return x.fetch_add(by, std::memory_order_relaxed);\n}\n\ntemplate <class T>\nT Dec(std::atomic<T>& x) {\n  return x.fetch_sub(1, std::memory_order_relaxed);\n}\n\ntemplate <class T>\nT Exchange(std::atomic<T>& x, T v) {\n  return x.exchange(v, std::memory_order_relaxed);\n}\n\nconst char* DeltaStr(git_delta_t t) {\n  switch (t) {\n    case GIT_DELTA_UNMODIFIED: return \"unmodified\";\n    case GIT_DELTA_ADDED: return \"added\";\n    case GIT_DELTA_DELETED: return \"deleted\";\n    case GIT_DELTA_MODIFIED: return \"modified\";\n    case GIT_DELTA_RENAMED: return \"renamed\";\n    case GIT_DELTA_COPIED: return \"copied\";\n    case GIT_DELTA_IGNORED: return \"ignored\";\n    case GIT_DELTA_UNTRACKED: return \"untracked\";\n    case GIT_DELTA_TYPECHANGE: return \"typechange\";\n    case GIT_DELTA_UNREADABLE: return \"unreadable\";\n    case GIT_DELTA_CONFLICTED: return \"conflicted\";\n  }\n  return \"unknown\";\n}\n\n}  // namespace\n\nbool Repo::Shard::Contains(Str<> str, StringView path) const {\n  if (str.Lt(path, start_s)) return false;\n  if (end_s.empty()) return true;\n  path.len = std::min(path.len, end_s.size());\n  return !str.Lt(end_s, path);\n}\n\nRepo::Repo(git_repository* repo, Limits lim) : lim_(std::move(lim)), repo_(repo), tag_db_(repo) {\n  if (lim_.max_num_untracked) {\n    GlobalThreadPool()->Schedule([this] {\n      bool check = CheckDirMtime(git_repository_path(repo_));\n      std::unique_lock<std::mutex> lock(mutex_);\n      CHECK(Load(untracked_cache_) == Tribool::kUnknown);\n      Store(untracked_cache_, check ? Tribool::kTrue : Tribool::kFalse);\n      cv_.notify_one();\n    });\n  } else {\n    untracked_cache_ = Tribool::kFalse;\n  }\n}\n\nRepo::~Repo() {\n  {\n    std::unique_lock<std::mutex> lock(mutex_);\n    while (untracked_cache_ == Tribool::kUnknown) cv_.wait(lock);\n  }\n  if (git_index_) git_index_free(git_index_);\n  git_repository_free(repo_);\n}\n\nIndexStats Repo::GetIndexStats(const git_oid* head, git_config* cfg) {\n  ON_SCOPE_EXIT(this, orig_lim = lim_) { lim_ = orig_lim; };\n  auto Off = [&](const char* name) {\n    int val;\n    if (git_config_get_bool(&val, cfg, name) || val) return false;\n    LOG(INFO) << \"Honoring git config option: \" << name << \" = false\";\n    return true;\n  };\n  if (!lim_.ignore_status_show_untracked_files && Off(\"status.showUntrackedFiles\")) {\n    lim_.max_num_untracked = 0;\n  }\n  if (!lim_.ignore_bash_show_untracked_files && Off(\"bash.showUntrackedFiles\")) {\n    lim_.max_num_untracked = 0;\n  }\n  if (!lim_.ignore_bash_show_dirty_state && Off(\"bash.showDirtyState\")) {\n    lim_.max_num_staged = 0;\n    lim_.max_num_unstaged = 0;\n    lim_.max_num_conflicted = 0;\n  }\n\n  if (git_index_) {\n    int new_index;\n    VERIFY(!git_index_read_ex(git_index_, 0, &new_index)) << GitError();\n    if (new_index) {\n      head_ = {};\n      index_.reset();\n    }\n  } else {\n    VERIFY(!git_repository_index(&git_index_, repo_)) << GitError();\n    // Query an attribute (doesn't matter which) to initialize repo's attribute\n    // cache. It's a workaround for synchronization bugs (data races) in libgit2\n    // that result from lazy cache initialization without synchronization.\n    // Thankfully, subsequent cache reads and writes are properly synchronized.\n    const char* attr;\n    VERIFY(!git_attr_get(&attr, repo_, 0, \"x\", \"x\")) << GitError();\n  }\n\n  UpdateShards();\n  Store(error_, false);\n  Store(unstaged_, {});\n  Store(untracked_, {});\n  Store(unstaged_deleted_, {});\n\n  std::vector<const char*> dirty_candidates;\n  const size_t index_size = git_index_entrycount(git_index_);\n\n  if (!lim_.max_num_staged && !lim_.max_num_conflicted) {\n    head_ = {};\n    Store(staged_, {});\n    Store(conflicted_, {});\n    Store(staged_new_, {});\n    Store(staged_deleted_, {});\n    Store(skip_worktree_, {});\n    Store(assume_unchanged_, {});\n  } else if (head) {\n    if (git_oid_equal(head, &head_)) {\n      LOG(INFO) << \"Index and HEAD unchanged; staged = \" << Load(staged_)\n                << \", conflicted = \" << Load(conflicted_);\n    } else {\n      head_ = *head;\n      Store(staged_, {});\n      Store(conflicted_, {});\n      Store(staged_new_, {});\n      Store(staged_deleted_, {});\n      Store(skip_worktree_, {});\n      Store(assume_unchanged_, {});\n      StartStagedScan(head);\n    }\n  } else {\n    head_ = {};\n    size_t staged = 0;\n    size_t skip_worktree = 0;\n    size_t assume_unchanged = 0;\n    for (size_t i = 0; i != index_size; ++i) {\n      const git_index_entry* entry = git_index_get_byindex_no_sort(git_index_, i);\n      if (!(entry->flags_extended & GIT_INDEX_ENTRY_INTENT_TO_ADD)) ++staged;\n      if (entry->flags_extended & GIT_INDEX_ENTRY_SKIP_WORKTREE) ++skip_worktree;\n      if (entry->flags & GIT_INDEX_ENTRY_VALID) ++assume_unchanged;\n    }\n    Store(staged_, staged);\n    Store(conflicted_, {});\n    Store(staged_new_, staged);\n    Store(staged_deleted_, {});\n    Store(skip_worktree_, skip_worktree);\n    Store(assume_unchanged_, assume_unchanged);\n  }\n\n  if (index_size <= lim_.dirty_max_index_size &&\n      (lim_.max_num_unstaged || lim_.max_num_untracked)) {\n    if (!index_) index_ = std::make_unique<Index>(repo_, git_index_);\n    dirty_candidates = index_->GetDirtyCandidates({.include_untracked = lim_.max_num_untracked > 0,\n                                                   .untracked_cache = Load(untracked_cache_)});\n    if (dirty_candidates.empty()) {\n      LOG(INFO) << \"Clean repo: no dirty candidates\";\n    } else {\n      LOG(INFO) << \"Found \" << dirty_candidates.size() << \" dirty candidate(s) spanning from \"\n                << Print(dirty_candidates.front()) << \" to \" << Print(dirty_candidates.back());\n    }\n    StartDirtyScan(dirty_candidates);\n  }\n\n  Wait();\n  VERIFY(!Load(error_));\n\n  size_t num_staged = std::min(Load(staged_), lim_.max_num_staged);\n  size_t num_unstaged = std::min(Load(unstaged_), lim_.max_num_unstaged);\n  return {.index_size = index_size,\n          .num_staged = num_staged,\n          .num_unstaged = num_unstaged,\n          .num_conflicted = std::min(Load(conflicted_), lim_.max_num_conflicted),\n          .num_untracked = std::min(Load(untracked_), lim_.max_num_untracked),\n          .num_staged_new = std::min(Load(staged_new_), num_staged),\n          .num_staged_deleted = std::min(Load(staged_deleted_), num_staged),\n          .num_unstaged_deleted = std::min(Load(unstaged_deleted_), num_unstaged),\n          .num_skip_worktree = Load(skip_worktree_),\n          .num_assume_unchanged = Load(assume_unchanged_)};\n}\n\nint Repo::OnDelta(const char* type, const git_diff_delta& d, std::atomic<size_t>& c1, size_t m1,\n                  const std::atomic<size_t>& c2, size_t m2) {\n  auto Msg = [&]() {\n    const char* status = DeltaStr(d.status);\n    std::ostringstream strm;\n    strm << \"Found \" << type << \" file\";\n    if (strcmp(status, type)) strm << \" (\" << status << \")\";\n    strm << \": \" << Print(d.new_file.path);\n    return strm.str();\n  };\n\n  size_t v = Inc(c1);\n  if (v) {\n    LOG(DEBUG) << Msg();\n  } else {\n    LOG(INFO) << Msg();\n  }\n  if (v + 1 < m1) return GIT_DIFF_DELTA_DO_NOT_INSERT;\n  if (Load(c2) < m2) return GIT_DIFF_DELTA_DO_NOT_INSERT | GIT_DIFF_DELTA_SKIP_TYPE;\n  return GIT_EUSER;\n}\n\nvoid Repo::StartDirtyScan(const std::vector<const char*>& paths) {\n  if (paths.empty()) return;\n\n  git_diff_options opt = GIT_DIFF_OPTIONS_INIT;\n  opt.payload = this;\n  opt.flags = GIT_DIFF_INCLUDE_TYPECHANGE_TREES | GIT_DIFF_SKIP_BINARY_CHECK |\n              GIT_DIFF_DISABLE_PATHSPEC_MATCH | GIT_DIFF_EXEMPLARS;\n  if (lim_.max_num_untracked) {\n    opt.flags |= GIT_DIFF_INCLUDE_UNTRACKED;\n    if (lim_.recurse_untracked_dirs) opt.flags |= GIT_DIFF_RECURSE_UNTRACKED_DIRS;\n  } else {\n    opt.flags |= GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS;\n  }\n  opt.ignore_submodules = GIT_SUBMODULE_IGNORE_DIRTY;\n  opt.notify_cb = +[](const git_diff* diff, const git_diff_delta* delta,\n                      const char* matched_pathspec, void* payload) -> int {\n    if (delta->status == GIT_DELTA_CONFLICTED) return GIT_DIFF_DELTA_DO_NOT_INSERT;\n    Repo* repo = static_cast<Repo*>(payload);\n    if (Load(repo->error_)) return GIT_EUSER;\n    if (delta->status == GIT_DELTA_UNTRACKED) {\n      return repo->OnDelta(\"untracked\", *delta, repo->untracked_, repo->lim_.max_num_untracked,\n                           repo->unstaged_, repo->lim_.max_num_unstaged);\n    } else {\n      if (delta->status == GIT_DELTA_DELETED) Inc(repo->unstaged_deleted_);\n      return repo->OnDelta(\"unstaged\", *delta, repo->unstaged_, repo->lim_.max_num_unstaged,\n                           repo->untracked_, repo->lim_.max_num_untracked);\n    }\n  };\n\n  const Str<> str(git_index_is_case_sensitive(git_index_));\n  auto shard = shards_.begin();\n  for (auto p = paths.begin(); p != paths.end();) {\n    opt.range_start = *p;\n    opt.range_end = *p;\n    opt.pathspec.strings = const_cast<char**>(&*p);\n    opt.pathspec.count = 1;\n    while (!shard->Contains(str, StringView(*p))) ++shard;\n    while (++p != paths.end() && shard->Contains(str, StringView(*p))) {\n      opt.range_end = *p;\n      ++opt.pathspec.count;\n    }\n    RunAsync([this, opt]() {\n      git_diff* diff = nullptr;\n      LOG(DEBUG) << \"git_diff_index_to_workdir from \" << Print(opt.range_start) << \" to \"\n                 << Print(opt.range_end);\n      switch (git_diff_index_to_workdir(&diff, repo_, git_index_, &opt)) {\n        case 0:\n          git_diff_free(diff);\n          break;\n        case GIT_EUSER:\n          break;\n        default:\n          LOG(ERROR) << \"git_diff_index_to_workdir: \" << GitError();\n          throw Exception();\n      }\n    });\n  }\n}\n\nvoid Repo::StartStagedScan(const git_oid* head) {\n  git_commit* commit = nullptr;\n  VERIFY(!git_commit_lookup(&commit, repo_, head)) << GitError();\n  ON_SCOPE_EXIT(=) { git_commit_free(commit); };\n  git_tree* tree = nullptr;\n  VERIFY(!git_commit_tree(&tree, commit)) << GitError();\n\n  git_diff_options opt = GIT_DIFF_OPTIONS_INIT;\n  opt.flags = GIT_DIFF_EXEMPLARS | GIT_DIFF_INCLUDE_TYPECHANGE_TREES;\n  opt.payload = this;\n  opt.notify_cb = +[](const git_diff* diff, const git_diff_delta* delta,\n                      const char* matched_pathspec, void* payload) -> int {\n    Repo* repo = static_cast<Repo*>(payload);\n    if (Load(repo->error_)) return GIT_EUSER;\n    if (delta->status == GIT_DELTA_CONFLICTED) {\n      return repo->OnDelta(\"conflicted\", *delta, repo->conflicted_, repo->lim_.max_num_conflicted,\n                           repo->staged_, repo->lim_.max_num_staged);\n    } else {\n      if (delta->status == GIT_DELTA_ADDED) Inc(repo->staged_new_);\n      if (delta->status == GIT_DELTA_DELETED) Inc(repo->staged_deleted_);\n      return repo->OnDelta(\"staged\", *delta, repo->staged_, repo->lim_.max_num_staged,\n                           repo->conflicted_, repo->lim_.max_num_conflicted);\n    }\n  };\n\n  for (const Shard& shard : shards_) {\n    RunAsync([this, tree, opt, shard]() mutable {\n      size_t skip_worktree = 0;\n      size_t assume_unchanged = 0;\n      for (size_t i = shard.start_i; i != shard.end_i; ++i) {\n        const git_index_entry* entry = git_index_get_byindex_no_sort(git_index_, i);\n        if (entry->flags_extended & GIT_INDEX_ENTRY_SKIP_WORKTREE) ++skip_worktree;\n        if (entry->flags & GIT_INDEX_ENTRY_VALID) ++assume_unchanged;\n      }\n      Inc(skip_worktree_, skip_worktree);\n      Inc(assume_unchanged_, assume_unchanged);\n      opt.range_start = shard.start_s.c_str();\n      opt.range_end = shard.end_s.c_str();\n      git_diff* diff = nullptr;\n      LOG(DEBUG) << \"git_diff_tree_to_index from \" << Print(opt.range_start) << \" to \"\n                 << Print(opt.range_end);\n      switch (git_diff_tree_to_index(&diff, repo_, tree, git_index_, &opt)) {\n        case 0:\n          git_diff_free(diff);\n          break;\n        case GIT_EUSER:\n          break;\n        default:\n          LOG(ERROR) << \"git_diff_tree_to_index: \" << GitError();\n          throw Exception();\n      }\n    });\n  }\n}\n\nvoid Repo::UpdateShards() {\n  constexpr size_t kEntriesPerShard = 512;\n\n  const Str<> str(git_index_is_case_sensitive(git_index_));\n  size_t index_size = git_index_entrycount(git_index_);\n  ON_SCOPE_EXIT(&) {\n    LOG(INFO) << \"Splitting \" << index_size << \" object(s) into \" << shards_.size() << \" shard(s)\";\n  };\n\n  if (index_size <= kEntriesPerShard || GlobalThreadPool()->num_threads() < 2) {\n    shards_ = {{\n      .start_s = \"\",\n      .end_s = \"\",\n      .start_i = 0,\n      .end_i = index_size}};\n    return;\n  }\n\n  size_t shards =\n      std::min(index_size / kEntriesPerShard + 1, 2 * GlobalThreadPool()->num_threads());\n  shards_.clear();\n  shards_.reserve(shards);\n  std::string last_s;\n  size_t last_i = 0;\n\n  for (size_t i = 0; i != shards - 1; ++i) {\n    size_t idx = (i + 1) * index_size / shards;\n    std::string split = git_index_get_byindex_no_sort(git_index_, idx)->path;\n    auto pos = split.find_last_of('/');\n    if (pos == std::string::npos) continue;\n    split = split.substr(0, pos + 1);\n    Shard shard;\n    shard.end_s = split;\n    --shard.end_s.back();\n    if (!str.Lt(last_s, shard.end_s)) continue;\n    shard.start_s = std::move(last_s);\n    last_s = std::move(split);\n    shard.start_i = last_i;\n    shard.end_i = idx;\n    last_i = idx;\n    shards_.push_back(std::move(shard));\n  }\n  shards_.push_back({\n    .start_s = std::move(last_s),\n    .end_s = \"\",\n    .start_i = last_i,\n    .end_i = index_size});\n\n  CHECK(!shards_.empty());\n  CHECK(shards_.size() <= shards);\n  CHECK(shards_.front().start_s.empty());\n  CHECK(shards_.front().start_i == 0);\n  CHECK(shards_.back().end_s.empty());\n  CHECK(shards_.back().end_i == index_size);\n  for (size_t i = 0; i != shards_.size(); ++i) {\n    if (i) {\n      const git_index_entry* entry = git_index_get_byindex_no_sort(git_index_, shards_[i].start_i);\n      CHECK(!std::memcmp(shards_[i].start_s.c_str(), entry->path, shards_[i].start_s.size()));\n      CHECK(str.Lt(shards_[i - 1].end_s, shards_[i].start_s));\n      CHECK(shards_[i - 1].end_i == shards_[i].start_i);\n    }\n    if (i != shards_.size() - 1) {\n      CHECK(shards_[i].start_i < shards_[i].end_i);\n      CHECK(str.Lt(shards_[i].start_s, shards_[i].end_s));\n    }\n  }\n}\n\nvoid Repo::DecInflight() {\n  std::unique_lock<std::mutex> lock(mutex_);\n  CHECK(Load(inflight_) > 0);\n  if (Dec(inflight_) == 1) cv_.notify_one();\n}\n\nvoid Repo::RunAsync(std::function<void()> f) {\n  Inc(inflight_);\n  try {\n    GlobalThreadPool()->Schedule([this, f = std::move(f)] {\n      try {\n        ON_SCOPE_EXIT(&) { DecInflight(); };\n        f();\n      } catch (const Exception&) {\n        if (!Load(error_)) {\n          std::unique_lock<std::mutex> lock(mutex_);\n          if (!Load(error_)) {\n            Store(error_, true);\n            cv_.notify_one();\n          }\n        }\n      }\n    });\n  } catch (...) {\n    DecInflight();\n    throw;\n  }\n}\n\nvoid Repo::Wait() {\n  std::unique_lock<std::mutex> lock(mutex_);\n  while (inflight_) cv_.wait(lock);\n}\n\nstd::future<std::string> Repo::GetTagName(const git_oid* target) {\n  auto* promise = new std::promise<std::string>;\n  std::future<std::string> res = promise->get_future();\n\n  GlobalThreadPool()->Schedule([=] {\n    ON_SCOPE_EXIT(&) { delete promise; };\n    if (!target) {\n      promise->set_value(\"\");\n      return;\n    }\n    try {\n      promise->set_value(tag_db_.TagForCommit(*target));\n    } catch (const Exception&) {\n      promise->set_exception(std::current_exception());\n    }\n  });\n\n  return res;\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/repo.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_REPO_H_\n#define ROMKATV_GITSTATUS_REPO_H_\n\n#include <stddef.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include <git2.h>\n\n#include <algorithm>\n#include <atomic>\n#include <condition_variable>\n#include <cstddef>\n#include <cstring>\n#include <functional>\n#include <future>\n#include <memory>\n#include <mutex>\n#include <string>\n#include <utility>\n#include <vector>\n\n#include \"check.h\"\n#include \"index.h\"\n#include \"options.h\"\n#include \"string_cmp.h\"\n#include \"tag_db.h\"\n#include \"time.h\"\n\nnamespace gitstatus {\n\nstruct IndexStats {\n  size_t index_size = 0;\n  size_t num_staged = 0;\n  size_t num_unstaged = 0;\n  size_t num_conflicted = 0;\n  size_t num_untracked = 0;\n  size_t num_staged_new = 0;\n  size_t num_staged_deleted = 0;\n  size_t num_unstaged_deleted = 0;\n  size_t num_skip_worktree = 0;\n  size_t num_assume_unchanged = 0;\n};\n\nclass Repo {\n public:\n  explicit Repo(git_repository* repo, Limits lim);\n  Repo(Repo&& other) = delete;\n  ~Repo();\n\n  git_repository* repo() const { return repo_; }\n\n  // Head can be null, in which case has_staged will be false.\n  IndexStats GetIndexStats(const git_oid* head, git_config* cfg);\n\n  // Returns the last tag in lexicographical order whose target is equal to the given, or an\n  // empty string. Target can be null, in which case the tag is empty.\n  std::future<std::string> GetTagName(const git_oid* target);\n\n private:\n  struct Shard {\n    bool Contains(Str<> str, StringView path) const;\n    std::string start_s;\n    std::string end_s;\n    size_t start_i;\n    size_t end_i;\n  };\n\n  void UpdateShards();\n\n  int OnDelta(const char* type, const git_diff_delta& d, std::atomic<size_t>& c1, size_t m1,\n              const std::atomic<size_t>& c2, size_t m2);\n\n  void StartStagedScan(const git_oid* head);\n  void StartDirtyScan(const std::vector<const char*>& paths);\n\n  void DecInflight();\n  void RunAsync(std::function<void()> f);\n  void Wait();\n\n  Limits lim_;\n  git_repository* const repo_;\n  git_index* git_index_ = nullptr;\n  std::vector<Shard> shards_;\n  git_oid head_ = {};\n  TagDb tag_db_;\n\n  std::unique_ptr<Index> index_;\n\n  std::mutex mutex_;\n  std::condition_variable cv_;\n  std::atomic<size_t> inflight_{0};\n  std::atomic<bool> error_{false};\n  std::atomic<size_t> staged_{0};\n  std::atomic<size_t> unstaged_{0};\n  std::atomic<size_t> conflicted_{0};\n  std::atomic<size_t> untracked_{0};\n  std::atomic<size_t> staged_new_{0};\n  std::atomic<size_t> staged_deleted_{0};\n  std::atomic<size_t> unstaged_deleted_{0};\n  std::atomic<size_t> skip_worktree_{0};\n  std::atomic<size_t> assume_unchanged_{0};\n  std::atomic<Tribool> untracked_cache_{Tribool::kUnknown};\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_REPO_H_\n"
  },
  {
    "path": "gitstatus/src/repo_cache.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"repo_cache.h\"\n\n#include <cstring>\n\n#include \"check.h\"\n#include \"git.h\"\n#include \"print.h\"\n#include \"scope_guard.h\"\n#include \"string_view.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nvoid GitDirs(const char* dir, bool from_dotgit, std::string& gitdir, std::string& workdir) {\n  git_buf gitdir_buf = {};\n  git_buf workdir_buf = {};\n  ON_SCOPE_EXIT(&) {\n    git_buf_free(&gitdir_buf);\n    git_buf_free(&workdir_buf);\n  };\n  int flags = from_dotgit ? GIT_REPOSITORY_OPEN_NO_SEARCH | GIT_REPOSITORY_OPEN_NO_DOTGIT : 0;\n  switch (git_repository_discover_ex(&gitdir_buf, &workdir_buf, NULL, NULL, dir, flags, nullptr)) {\n    case 0:\n      gitdir.assign(gitdir_buf.ptr, gitdir_buf.size);\n      workdir.assign(workdir_buf.ptr, workdir_buf.size);\n      VERIFY(!gitdir.empty() && gitdir.front() == '/' && gitdir.back() == '/');\n      VERIFY(!workdir.empty() && workdir.front() == '/' && workdir.back() == '/');\n      break;\n    case GIT_ENOTFOUND:\n      gitdir.clear();\n      workdir.clear();\n      break;\n    default:\n      LOG(ERROR) << \"git_repository_open_ext: \" << Print(dir) << \": \" << GitError();\n      throw Exception();\n  }\n}\n\ngit_repository* OpenRepo(const std::string& dir, bool from_dotgit) {\n  git_repository* repo = nullptr;\n  int flags = from_dotgit ? GIT_REPOSITORY_OPEN_NO_SEARCH | GIT_REPOSITORY_OPEN_NO_DOTGIT : 0;\n  switch (git_repository_open_ext(&repo, dir.c_str(), flags, nullptr)) {\n    case 0:\n      return repo;\n    case GIT_ENOTFOUND:\n      return nullptr;\n    default:\n      LOG(ERROR) << \"git_repository_open_ext: \" << Print(dir) << \": \" << GitError();\n      throw Exception();\n  }\n}\n\nstd::string DirName(std::string path) {\n  if (path.empty()) return \"\";\n  while (path.back() == '/') {\n    path.pop_back();\n    if (path.empty()) return \"\";\n  }\n  do {\n    path.pop_back();\n    if (path.empty()) return \"\";\n  } while (path.back() != '/');\n  return path;\n}\n\n}  // namespace\n\nRepo* RepoCache::Open(const std::string& dir, bool from_dotgit) {\n  if (dir.empty() || dir.front() != '/') return nullptr;\n\n  std::string gitdir, workdir;\n  GitDirs(dir.c_str(), from_dotgit, gitdir, workdir);\n  if (gitdir.empty()) {\n    // This isn't quite correct because of differences in canonicalization, .git files and GIT_DIR.\n    // A proper solution would require tracking the \"discovery dir\" for every repository and\n    // performing path canonicalization.\n    if (from_dotgit) {\n      Erase(cache_.find(dir.back() == '/' ? dir : dir + '/'));\n    } else {\n      std::string path = dir;\n      if (path.back() != '/') path += '/';\n      do {\n        Erase(cache_.find(path + \".git/\"));\n        path = DirName(path);\n      } while (!path.empty());\n    }\n    return nullptr;\n  }\n\n  auto it = cache_.find(gitdir);\n  if (it != cache_.end()) {\n    lru_.erase(it->second->lru);\n    it->second->lru = lru_.insert({Clock::now(), it});\n    return it->second.get();\n  }\n\n  // Opening from gitdir is faster but we cannot use it when gitdir came from a .git file.\n  git_repository* repo =\n      DirName(gitdir) == workdir ? OpenRepo(gitdir, true) : OpenRepo(dir, from_dotgit);\n  if (!repo) return nullptr;\n  ON_SCOPE_EXIT(&) {\n    if (repo) git_repository_free(repo);\n  };\n  if (git_repository_is_bare(repo)) return nullptr;\n  workdir = git_repository_workdir(repo) ?: \"\";\n  if (workdir.empty()) return nullptr;\n  VERIFY(workdir.front() == '/' && workdir.back() == '/') << Print(workdir);\n\n  auto x = cache_.emplace(gitdir, nullptr);\n  std::unique_ptr<Entry>& elem = x.first->second;\n  if (elem) {\n    lru_.erase(elem->lru);\n  } else {\n    LOG(INFO) << \"Initializing new repository: \" << Print(gitdir);\n\n    // Libgit2 initializes odb and refdb lazily with double-locking. To avoid useless work\n    // when multiple threads attempt to initialize the same db at the same time, we trigger\n    // initialization manually before threads are in play.\n    git_odb* odb;\n    VERIFY(!git_repository_odb(&odb, repo)) << GitError();\n    git_odb_free(odb);\n\n    git_refdb* refdb;\n    VERIFY(!git_repository_refdb(&refdb, repo)) << GitError();\n    git_refdb_free(refdb);\n\n    elem = std::make_unique<Entry>(std::exchange(repo, nullptr), lim_);\n  }\n  elem->lru = lru_.insert({Clock::now(), x.first});\n  return elem.get();\n}\n\nvoid RepoCache::Free(Time cutoff) {\n  while (true) {\n    if (lru_.empty()) break;\n    auto it = lru_.begin();\n    if (it->first > cutoff) break;\n    Erase(it->second);\n  }\n}\n\nvoid RepoCache::Erase(Cache::iterator it) {\n  if (it == cache_.end()) return;\n  LOG(INFO) << \"Closing repository: \" << Print(it->first);\n  lru_.erase(it->second->lru);\n  cache_.erase(it);\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/repo_cache.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_REPO_CACHE_H_\n#define ROMKATV_GITSTATUS_REPO_CACHE_H_\n\n#include <map>\n#include <memory>\n#include <string>\n#include <unordered_map>\n#include <utility>\n\n#include <git2.h>\n\n#include \"options.h\"\n#include \"repo.h\"\n#include \"time.h\"\n\nnamespace gitstatus {\n\nclass RepoCache {\n public:\n  explicit RepoCache(Limits lim) : lim_(std::move(lim)) {}\n  Repo* Open(const std::string& dir, bool from_dotgit);\n  void Free(Time cutoff);\n\n private:\n  struct Entry;\n  using Cache = std::unordered_map<std::string, std::unique_ptr<Entry>>;\n  using LRU = std::multimap<Time, Cache::iterator>;\n\n  void Erase(Cache::iterator it);\n\n  Limits lim_;\n  Cache cache_;\n  LRU lru_;\n\n  struct Entry : Repo {\n    using Repo::Repo;\n    LRU::iterator lru;\n  };\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_REPO_CACHE_H_\n"
  },
  {
    "path": "gitstatus/src/request.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"request.h\"\n\n#include <fcntl.h>\n#include <signal.h>\n#include <sys/select.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include <algorithm>\n#include <cstdlib>\n#include <iostream>\n\n#include \"check.h\"\n#include \"logging.h\"\n#include \"print.h\"\n#include \"serialization.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nRequest ParseRequest(const std::string& s) {\n  Request res;\n  auto begin = s.begin(), end = s.end(), sep = std::find(begin, end, kFieldSep);\n  VERIFY(sep != end) << \"Malformed request: \" << s;\n  res.id.assign(begin, sep);\n\n  begin = sep + 1;\n  if (*begin == ':') {\n    res.from_dotgit = true;\n    ++begin;\n  }\n  sep = std::find(begin, end, kFieldSep);\n  res.dir.assign(begin, sep);\n  if (sep == end) return res;\n\n  begin = sep + 1;\n  VERIFY(begin + 1 == end && (*begin == '0' || *begin == '1')) << \"Malformed request: \" << s;\n  res.diff = *begin == '0';\n  return res;\n}\n\nbool IsLockedFd(int fd) {\n  CHECK(fd >= 0);\n  struct flock flock = {};\n  flock.l_type = F_RDLCK;\n  flock.l_whence = SEEK_SET;\n  CHECK(fcntl(fd, F_GETLK, &flock) != -1) << Errno();\n  return flock.l_type != F_UNLCK;\n}\n\n}  // namespace\n\nstd::ostream& operator<<(std::ostream& strm, const Request& req) {\n  strm << Print(req.id) << \" for \" << Print(req.dir);\n  if (req.from_dotgit) strm << \" [from-dotgit]\";\n  if (!req.diff) strm << \" [no-diff]\";\n  return strm;\n}\n\nRequestReader::RequestReader(int fd, int lock_fd, int parent_pid)\n    : fd_(fd), lock_fd_(lock_fd), parent_pid_(parent_pid) {\n  CHECK(fd != lock_fd);\n}\n\nbool RequestReader::ReadRequest(Request& req) {\n  auto eol = std::find(read_.begin(), read_.end(), kMsgSep);\n  if (eol != read_.end()) {\n    std::string msg(read_.begin(), eol);\n    read_.erase(read_.begin(), eol + 1);\n    req = ParseRequest(msg);\n    return true;\n  }\n\n  char buf[256];\n  while (true) {\n    fd_set fds;\n    FD_ZERO(&fds);\n    FD_SET(fd_, &fds);\n    struct timeval timeout = {.tv_sec = 1};\n\n    int n;\n    CHECK((n = select(fd_ + 1, &fds, NULL, NULL, &timeout)) >= 0) << Errno();\n    if (n == 0) {\n      if (lock_fd_ >= 0 && !IsLockedFd(lock_fd_)) {\n        LOG(INFO) << \"Lock on fd \" << lock_fd_ << \" is gone. Exiting.\";\n        std::exit(0);\n      }\n      if (parent_pid_ >= 0 && kill(parent_pid_, 0)) {\n        LOG(INFO) << \"Unable to send signal 0 to \" << parent_pid_ << \". Exiting.\";\n        std::exit(0);\n      }\n      req = {};\n      return false;\n    }\n\n    CHECK((n = read(fd_, buf, sizeof(buf))) >= 0) << Errno();\n    if (n == 0) {\n      LOG(INFO) << \"EOF. Exiting.\";\n      std::exit(0);\n    }\n    read_.insert(read_.end(), buf, buf + n);\n    int eol = std::find(buf, buf + n, kMsgSep) - buf;\n    if (eol != n) {\n      std::string msg(read_.begin(), read_.end() - (n - eol));\n      read_.erase(read_.begin(), read_.begin() + msg.size() + 1);\n      req = ParseRequest(msg);\n      return true;\n    }\n  }\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/request.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_REQUEST_H_\n#define ROMKATV_GITSTATUS_REQUEST_H_\n\n#include <deque>\n#include <ostream>\n#include <string>\n\nnamespace gitstatus {\n\nstruct Request {\n  std::string id;\n  std::string dir;\n  bool from_dotgit = false;\n  bool diff = true;\n};\n\nstd::ostream& operator<<(std::ostream& strm, const Request& req);\n\nclass RequestReader {\n public:\n  RequestReader(int fd, int lock_fd, int parent_pid);\n  bool ReadRequest(Request& req);\n\n private:\n  int fd_;\n  int lock_fd_;\n  int parent_pid_;\n  std::deque<char> read_;\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_REQUEST_H_\n"
  },
  {
    "path": "gitstatus/src/response.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"response.h\"\n\n#include <cctype>\n#include <cstring>\n#include <iostream>\n\n#include \"check.h\"\n#include \"serialization.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nconstexpr char kUnreadable = '?';\n\nvoid SafePrint(std::ostream& strm, StringView s) {\n  for (size_t i = 0; i != s.len; ++i) {\n    char c = s.ptr[i];\n    strm << (c > 127 || std::isprint(c) ? c : kUnreadable);\n  }\n}\n\n}  // namespace\n\nResponseWriter::ResponseWriter(std::string request_id) : request_id_(std::move(request_id)) {\n  SafePrint(strm_, request_id_);\n  Print(1);\n}\n\nResponseWriter::~ResponseWriter() {\n  if (!done_) {\n    strm_.str(\"\");\n    SafePrint(strm_, request_id_);\n    Print(\"0\");\n    Dump(\"without git status\");\n  }\n}\n\nvoid ResponseWriter::Print(ssize_t val) {\n  strm_ << kFieldSep;\n  strm_ << val;\n}\n\nvoid ResponseWriter::Print(StringView val) {\n  strm_ << kFieldSep;\n  SafePrint(strm_, val);\n}\n\nvoid ResponseWriter::Dump(const char* log) {\n  CHECK(!done_);\n  done_ = true;\n  LOG(INFO) << \"Replying \" << log;\n  std::cout << strm_.str() << kMsgSep << std::flush;\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/response.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_RESPONSE_H_\n#define ROMKATV_GITSTATUS_RESPONSE_H_\n\n#include <cstddef>\n#include <cstdint>\n#include <sstream>\n#include <string>\n\n#include \"string_view.h\"\n\nnamespace gitstatus {\n\nclass ResponseWriter {\n public:\n  ResponseWriter(std::string request_id);\n  ResponseWriter(ResponseWriter&&) = delete;\n  ~ResponseWriter();\n\n  void Print(ssize_t val);\n  void Print(StringView val);\n  void Print(const char* val) { Print(StringView(val)); }\n\n  void Dump(const char* log);\n\n private:\n  bool done_ = false;\n  std::string request_id_;\n  std::ostringstream strm_;\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_RESPONSE_H_\n"
  },
  {
    "path": "gitstatus/src/scope_guard.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_SCOPE_GUARD_H_\n#define ROMKATV_GITSTATUS_SCOPE_GUARD_H_\n\n#include <utility>\n\n#define ON_SCOPE_EXIT(capture...)                                     \\\n  auto GITSTATUS_INTERNAL_CAT(_gitstatus_scope_guard_, __COUNTER__) = \\\n      ::gitstatus::internal_scope_guard::ScopeGuardGenerator() = [capture]()\n\n#define GITSTATUS_INTERNAL_CAT_I(x, y) x##y\n#define GITSTATUS_INTERNAL_CAT(x, y) GITSTATUS_INTERNAL_CAT_I(x, y)\n\nnamespace gitstatus {\nnamespace internal_scope_guard {\n\nvoid Undefined();\n\ntemplate <class F>\nclass ScopeGuard {\n public:\n  explicit ScopeGuard(F f) : f_(std::move(f)) {}\n  ~ScopeGuard() { std::move(f_)(); }\n  ScopeGuard(ScopeGuard&& other) : f_(std::move(other.f_)) { Undefined(); }\n\n private:\n  F f_;\n};\n\nstruct ScopeGuardGenerator {\n  template <class F>\n  ScopeGuard<F> operator=(F f) const {\n    return ScopeGuard<F>(std::move(f));\n  }\n};\n\n}  // namespace internal_scope_guard\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_SCOPE_GUARD_H_\n"
  },
  {
    "path": "gitstatus/src/serialization.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_SERIALIZATION_H_\n#define ROMKATV_GITSTATUS_SERIALIZATION_H_\n\nnamespace gitstatus {\n\nconstexpr char kFieldSep = 31;  // ascii 31 is unit separator\nconstexpr char kMsgSep = 30;    // ascii 30 is record separator\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_SERIALIZATION_H_\n"
  },
  {
    "path": "gitstatus/src/stat.h",
    "content": "#ifndef ROMKATV_GITSTATUS_STAT_H_\n#define ROMKATV_GITSTATUS_STAT_H_\n\n#include <sys/stat.h>\n\nnamespace gitstatus {\n\ninline const struct timespec& MTim(const struct stat& s) {\n#ifdef __APPLE__\n  return s.st_mtimespec;\n#else\n  return s.st_mtim;\n#endif\n}\n\ninline bool StatEq(const struct stat& x, const struct stat& y) {\n  return MTim(x).tv_sec == MTim(y).tv_sec && MTim(x).tv_nsec == MTim(y).tv_nsec &&\n         x.st_size == y.st_size && x.st_ino == y.st_ino && x.st_mode == y.st_mode;\n}\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_STAT_H_\n"
  },
  {
    "path": "gitstatus/src/string_cmp.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_STRING_CMP_H_\n#define ROMKATV_GITSTATUS_STRING_CMP_H_\n\n#include <string.h>  // because there is no std::strcasecmp in C++\n\n#include <algorithm>\n#include <cctype>\n#include <cstddef>\n#include <cstring>\n\n#include \"string_view.h\"\n\nnamespace gitstatus {\n\n// WARNING: These routines assume no embedded null characters in StringView. Violations cause UB.\n\ntemplate <int kCaseSensitive = -1>\nstruct StrCmp;\n\ntemplate <>\nstruct StrCmp<0> {\n  int operator()(StringView x, StringView y) const {\n    size_t n = std::min(x.len, y.len);\n    int cmp = strncasecmp(x.ptr, y.ptr, n);\n    if (cmp) return cmp;\n    return static_cast<ssize_t>(x.len) - static_cast<ssize_t>(y.len);\n  }\n\n  int operator()(StringView x, const char* y) const {\n    for (const char *p = x.ptr, *e = p + x.len; p != e; ++p, ++y) {\n      if (int cmp = std::tolower(*p) - std::tolower(*y)) return cmp;\n    }\n    return 0 - *y;\n  }\n\n  int operator()(char x, char y) const { return std::tolower(x) - std::tolower(y); }\n  int operator()(const char* x, const char* y) const { return strcasecmp(x, y); }\n  int operator()(const char* x, StringView y) const { return -operator()(y, x); }\n};\n\ntemplate <>\nstruct StrCmp<1> {\n  int operator()(StringView x, StringView y) const {\n    size_t n = std::min(x.len, y.len);\n    int cmp = std::memcmp(x.ptr, y.ptr, n);\n    if (cmp) return cmp;\n    return static_cast<ssize_t>(x.len) - static_cast<ssize_t>(y.len);\n  }\n\n  int operator()(StringView x, const char* y) const {\n    for (const char *p = x.ptr, *e = p + x.len; p != e; ++p, ++y) {\n      if (int cmp = *p - *y) return cmp;\n    }\n    return 0 - *y;\n  }\n\n  int operator()(char x, char y) const { return x - y; }\n  int operator()(const char* x, const char* y) const { return std::strcmp(x, y); }\n  int operator()(const char* x, StringView y) const { return -operator()(y, x); }\n};\n\ntemplate <>\nstruct StrCmp<-1> {\n  explicit StrCmp(bool case_sensitive) : case_sensitive(case_sensitive) {}\n\n  template <class X, class Y>\n  int operator()(const X& x, const Y& y) const {\n    return case_sensitive ? StrCmp<1>()(x, y) : StrCmp<0>()(x, y);\n  }\n\n  bool case_sensitive;\n};\n\ntemplate <int kCaseSensitive = -1>\nstruct StrLt : private StrCmp<kCaseSensitive> {\n  using StrCmp<kCaseSensitive>::StrCmp;\n\n  template <class X, class Y>\n  bool operator()(const X& x, const Y& y) const {\n    return StrCmp<kCaseSensitive>::operator()(x, y) < 0;\n  }\n};\n\ntemplate <int kCaseSensitive = -1>\nstruct StrEq : private StrCmp<kCaseSensitive> {\n  using StrCmp<kCaseSensitive>::StrCmp;\n\n  template <class X, class Y>\n  bool operator()(const X& x, const Y& y) const {\n    return StrCmp<kCaseSensitive>::operator()(x, y) == 0;\n  }\n\n  bool operator()(const StringView& x, const StringView& y) const {\n    return x.len == y.len && StrCmp<kCaseSensitive>::operator()(x, y) == 0;\n  }\n};\n\ntemplate <int kCaseSensitive = -1>\nstruct Str {\n  static_assert(kCaseSensitive == 0 || kCaseSensitive == 1, \"\");\n\n  static const bool case_sensitive = kCaseSensitive;\n\n  StrCmp<kCaseSensitive> Cmp;\n  StrLt<kCaseSensitive> Lt;\n  StrEq<kCaseSensitive> Eq;\n};\n\ntemplate <int kCaseSensitive>\nconst bool Str<kCaseSensitive>::case_sensitive;\n\ntemplate <>\nstruct Str<-1> {\n  explicit Str(bool case_sensitive)\n      : case_sensitive(case_sensitive),\n        Cmp(case_sensitive),\n        Lt(case_sensitive),\n        Eq(case_sensitive) {}\n\n  bool case_sensitive;\n\n  StrCmp<-1> Cmp;\n  StrLt<-1> Lt;\n  StrEq<-1> Eq;\n};\n\ntemplate <class Iter>\nvoid StrSort(Iter begin, Iter end, bool case_sensitive) {\n  case_sensitive ? std::sort(begin, end, StrLt<true>()) : std::sort(begin, end, StrLt<false>());\n}\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_STRING_CMP_H_\n"
  },
  {
    "path": "gitstatus/src/string_view.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_STRING_VIEW_H_\n#define ROMKATV_GITSTATUS_STRING_VIEW_H_\n\n#include <algorithm>\n#include <cstddef>\n#include <cstring>\n#include <ostream>\n#include <string>\n\nnamespace gitstatus {\n\n// WARNING: StringView must not have embedded null characters. Violations cause UB.\nstruct StringView {\n  StringView() : StringView(\"\") {}\n\n  // Requires: !memchr(s.data(), 0, s.size()).\n  //\n  // WARNING: The existence of this requirement and the fact that this constructor is implicit\n  // means it's dangerous to have std::string instances with embedded null characters anywhere\n  // in the program. If you have an std::string `s` with embedded nulls, an innocent-looking\n  // `F(s)` might perform an implicit conversion to StringView and land you squarely in the\n  // Undefined Behavior land.\n  StringView(const std::string& s) : StringView(s.c_str(), s.size()) {}\n\n  // Requires: !memchr(ptr, 0, len).\n  StringView(const char* ptr, size_t len) : ptr(ptr), len(len) {}\n\n  // Requires: end >= begin && !memchr(begin, 0, end - begin).\n  StringView(const char* begin, const char* end) : StringView(begin, end - begin) {}\n\n  // Requires: strchr(s, 0) == s + N.\n  template <size_t N>\n  StringView(const char (&s)[N]) : StringView(s, N - 1) {\n    static_assert(N, \"\");\n  }\n\n  // Explicit because it's the only constructor that isn't O(1).\n  // Are you sure you don't already known the strings's length?\n  explicit StringView(const char* ptr) : StringView(ptr, ptr ? std::strlen(ptr) : 0) {}\n\n  bool StartsWith(StringView prefix) const {\n    return len >= prefix.len && !std::memcmp(ptr, prefix.ptr, prefix.len);\n  }\n\n  bool EndsWith(StringView suffix) const {\n    return len >= suffix.len && !std::memcmp(ptr + (len - suffix.len), suffix.ptr, suffix.len);\n  }\n\n  const char* ptr;\n  size_t len;\n};\n\ninline std::ostream& operator<<(std::ostream& strm, StringView s) {\n  if (s.ptr) strm.write(s.ptr, s.len);\n  return strm;\n}\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_STRING_VIEW_H_\n"
  },
  {
    "path": "gitstatus/src/strings.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include <cassert>\n\n#include \"strings.h\"\n\nnamespace gitstatus {\n\nvoid CEscape(std::ostream& strm, const char* begin, const char* end) {\n  assert(!begin == !end);\n  if (!begin) return;\n  for (; begin != end; ++begin) {\n    const unsigned char c = *begin;\n    switch (c) {\n      case '\\t':\n        strm << \"\\\\t\";\n        continue;\n      case '\\n':\n        strm << \"\\\\n\";\n        continue;\n      case '\\r':\n        strm << \"\\\\r\";\n        continue;\n      case '\"':\n        strm << \"\\\\\\\"\";\n        continue;\n      case '\\'':\n        strm << \"\\\\'\";\n        continue;\n      case '\\\\':\n        strm << \"\\\\\\\\\";\n        continue;\n    }\n    if (c > 31 && c < 127) {\n      strm << c;\n      continue;\n    }\n    strm << '\\\\';\n    strm << static_cast<char>('0' + ((c >> 6) & 7));\n    strm << static_cast<char>('0' + ((c >> 3) & 7));\n    strm << static_cast<char>('0' + ((c >> 0) & 7));\n  }\n}\n\nvoid Quote(std::ostream& strm, const char* begin, const char* end) {\n  assert(!begin == !end);\n  if (!begin) {\n    strm << \"null\";\n    return;\n  }\n  strm << '\"';\n  CEscape(strm, begin, end);\n  strm << '\"';\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/strings.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_STRINGS_H_\n#define ROMKATV_GITSTATUS_STRINGS_H_\n\n#include <ostream>\n\nnamespace gitstatus {\n\n// If the pointers are null, prints nothing.\n//\n// Requires: !begin == !end.\nvoid CEscape(std::ostream& strm, const char* begin, const char* end);\n\n// If the pointers are null, prints null without quotes.\n//\n// Requires: !begin == !end.\nvoid Quote(std::ostream& strm, const char* begin, const char* end);\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_STRING_VIEW_H_\n"
  },
  {
    "path": "gitstatus/src/tag_db.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"tag_db.h\"\n\n#include <fcntl.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include <algorithm>\n#include <cstdlib>\n#include <cstring>\n#include <iterator>\n#include <utility>\n\n#include \"check.h\"\n#include \"dir.h\"\n#include \"git.h\"\n#include \"print.h\"\n#include \"scope_guard.h\"\n#include \"stat.h\"\n#include \"string_cmp.h\"\n#include \"thread_pool.h\"\n#include \"timer.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\nusing namespace std::string_literals;\n\nstatic constexpr char kTagPrefix[] = \"refs/tags/\";\n\nconstexpr int8_t kUnhex[256] = {\n    0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  // 0\n    0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  // 1\n    0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  // 2\n    0, 1,  2,  3,  4,  5,  6,  7, 8, 9, 0, 0, 0, 0, 0, 0,  // 3\n    0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 4\n    0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  // 5\n    0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0   // 6\n};\n\nstruct {\n  bool operator()(const Tag* x, const git_oid& y) const {\n    return std::memcmp(x->id.id, y.id, GIT_OID_RAWSZ) < 0;\n  }\n  bool operator()(const git_oid& x, const Tag* y) const {\n    return std::memcmp(x.id, y->id.id, GIT_OID_RAWSZ) < 0;\n  }\n  bool operator()(const Tag* x, const Tag* y) const {\n    return std::memcmp(x->id.id, y->id.id, GIT_OID_RAWSZ) < 0;\n  }\n} constexpr ById = {};\n\nstruct {\n  bool operator()(const Tag* x, const char* y) const {\n    return std::strcmp(x->name, y) < 0;\n  }\n  bool operator()(const char* x, const Tag* y) const {\n    return std::strcmp(x, y->name) < 0;\n  }\n  bool operator()(const Tag* x, const Tag* y) const {\n    return std::strcmp(x->name, y->name) < 0;\n  }\n} constexpr ByName = {};\n\nvoid ParseOid(unsigned char* oid, const char* begin, const char* end) {\n  VERIFY(end >= begin + GIT_OID_HEXSZ);\n  for (size_t i = 0; i != GIT_OID_HEXSZ; i += 2) {\n    *oid++ = kUnhex[+begin[i]] << 4 | kUnhex[+begin[i + 1]];\n  }\n}\n\nconst char* StripTag(const char* ref) {\n  for (size_t i = 0; i != sizeof(kTagPrefix) - 1; ++i) {\n    if (*ref++ != kTagPrefix[i]) return nullptr;\n  }\n  return ref;\n}\n\ngit_refdb* RefDb(git_repository* repo) {\n  git_refdb* res;\n  VERIFY(!git_repository_refdb(&res, repo)) << GitError();\n  return res;\n}\n\n}  // namespace\n\nTagDb::TagDb(git_repository* repo)\n    : repo_(repo),\n      refdb_(RefDb(repo)),\n      pack_(&pack_arena_),\n      name2id_(&pack_arena_),\n      id2name_(&pack_arena_) {\n  CHECK(repo_ && refdb_);\n}\n\nTagDb::~TagDb() {\n  Wait();\n  git_refdb_free(refdb_);\n}\n\nstd::string TagDb::TagForCommit(const git_oid& oid) {\n  ReadLooseTags();\n  UpdatePack();\n\n  std::string res;\n\n  std::string ref = \"refs/tags/\";\n  size_t prefix_len = ref.size();\n  for (const char* tag : loose_tags_) {\n    ref.resize(prefix_len);\n    ref += tag;\n    if (res < tag && TagHasTarget(ref.c_str(), &oid)) res = tag;\n  }\n\n  if ((std::unique_lock<std::mutex>(mutex_), id2name_dirty_)) {\n    for (auto it = name2id_.rbegin(); it != name2id_.rend(); ++it) {\n      if (!memcmp((*it)->id.id, oid.id, GIT_OID_RAWSZ) && !IsLooseTag((*it)->name)) {\n        if (res < (*it)->name) res = (*it)->name;\n        break;\n      }\n    }\n  } else {\n    auto r = std::equal_range(id2name_.begin(), id2name_.end(), oid, ById);\n    for (auto it = r.first; it != r.second; ++it) {\n      if (!IsLooseTag((*it)->name) && res < (*it)->name) res = (*it)->name;\n    }\n  }\n\n  return res;\n}\n\nvoid TagDb::ReadLooseTags() {\n  loose_tags_.clear();\n  loose_arena_.Reuse();\n\n  std::string dirname = git_repository_path(repo_) + \"refs/tags\"s;\n  int dir_fd = open(dirname.c_str(), O_RDONLY | O_DIRECTORY | O_CLOEXEC);\n  if (dir_fd < 0) return;\n  ON_SCOPE_EXIT(&) { CHECK(!close(dir_fd)) << Errno(); };\n  // TODO: recursively traverse directories so that the file refs/tags/foo/bar gets interpreted\n  // as the tag foo/bar. See https://github.com/romkatv/gitstatus/issues/254.\n  (void)ListDir(dir_fd, loose_arena_, loose_tags_, /* precompose_unicode = */ false,\n                /* case_sensitive = */ true);\n}\n\nvoid TagDb::UpdatePack() {\n  auto Reset = [&] {\n    auto Wipe = [](auto& x) {\n      x.clear();\n      x.shrink_to_fit();\n    };\n    Wait();\n    Wipe(pack_);\n    Wipe(name2id_);\n    Wipe(id2name_);\n    pack_arena_.Reuse();\n    std::memset(&pack_stat_, 0, sizeof(pack_stat_));\n  };\n\n  std::string pack_path = git_repository_path(repo_) + \"packed-refs\"s;\n  struct stat st;\n  if (stat(pack_path.c_str(), &st)) {\n    Reset();\n    return;\n  }\n  if (StatEq(pack_stat_, st)) return;\n\n  Reset();\n\n  try {\n    while (true) {\n      LOG(INFO) << \"Parsing \" << Print(pack_path);\n      int fd = open(pack_path.c_str(), O_RDONLY | O_CLOEXEC);\n      VERIFY(fd >= 0);\n      ON_SCOPE_EXIT(&) { CHECK(!close(fd)) << Errno(); };\n      pack_.resize(st.st_size + 1);\n      ssize_t n = read(fd, &pack_[0], st.st_size + 1);\n      VERIFY(n >= 0) << Errno();\n      VERIFY(!fstat(fd, &pack_stat_)) << Errno();\n      if (!StatEq(st, pack_stat_)) {\n        st = pack_stat_;\n        continue;\n      }\n      VERIFY(n == st.st_size);\n      pack_.pop_back();\n      break;\n    }\n    ParsePack();\n  } catch (const Exception&) {\n    Reset();\n    throw;\n  }\n}\n\nvoid TagDb::ParsePack() {\n  char* p = &pack_[0];\n  char* e = p + pack_.size();\n\n  // Usually packed-refs starts with the following line:\n  //\n  //   # pack-refs with: peeled fully-peeled sorted\n  //\n  // However, some users can produce pack-refs without this line.\n  // See https://github.com/romkatv/powerlevel10k/issues/1428.\n  // I don't know how they do it. Without the header line we cannot\n  // assume that refs are sorted, which isn't a big deal because we\n  // can just sort them. What's worse is that refs cannot be assumed\n  // to be fully-peeled. We don't want to peel them, so we just drop\n  // all tags.\n  if (*p != '#') {\n    LOG(WARN) << \"packed-refs doesn't have a header. Won't resolve tags.\";\n    return;\n  }\n\n  char* eol = std::strchr(p, '\\n');\n  if (!eol) return;\n  *eol = 0;\n  if (!std::strstr(p, \" fully-peeled\") || !std::strstr(p, \" sorted\")) {\n    LOG(WARN) << \"packed-refs has unexpected header. Won't resolve tags.\";\n  }\n  p = eol + 1;\n\n  name2id_.reserve(pack_.size() / 128);\n  id2name_.reserve(pack_.size() / 128);\n\n  std::vector<Tag*> idx;\n  idx.reserve(pack_.size() / 128);\n\n  while (p != e) {\n    Tag* tag = pack_arena_.Allocate<Tag>();\n    ParseOid(tag->id.id, p, e);\n    p += GIT_OID_HEXSZ;\n    VERIFY(*p++ == ' ');\n    const char* ref = p;\n    VERIFY(p = std::strchr(p, '\\n'));\n    p[p[-1] == '\\r' ? -1 : 0] = 0;\n    ++p;\n    if (*p == '^') {\n      ParseOid(tag->id.id, p + 1, e);\n      p += GIT_OID_HEXSZ + 1;\n      if (p != e) {\n        VERIFY((p = std::strchr(p, '\\n')));\n        ++p;\n      }\n    }\n    tag->name = StripTag(ref);\n    if (!tag->name) continue;\n    name2id_.push_back(tag);\n    id2name_.push_back(tag);\n  }\n\n  if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) {\n    // \"sorted\" in the header of packed-refs promises that this won't trigger.\n    std::sort(name2id_.begin(), name2id_.end(), ByName);\n  }\n\n  id2name_dirty_ = true;\n  GlobalThreadPool()->Schedule([this] {\n    std::sort(id2name_.begin(), id2name_.end(), ById);\n    std::unique_lock<std::mutex> lock(mutex_);\n    CHECK(id2name_dirty_);\n    id2name_dirty_ = false;\n    cv_.notify_one();\n  });\n}\n\nvoid TagDb::Wait() {\n  std::unique_lock<std::mutex> lock(mutex_);\n  while (id2name_dirty_) cv_.wait(lock);\n}\n\nbool TagDb::IsLooseTag(const char* name) const {\n  return std::binary_search(loose_tags_.begin(), loose_tags_.end(), name,\n                            [](const char* a, const char* b) { return std::strcmp(a, b) < 0; });\n}\n\nbool TagDb::TagHasTarget(const char* name, const git_oid* target) const {\n  static constexpr size_t kMaxDerefCount = 10;\n\n  git_reference* ref;\n  if (git_refdb_lookup(&ref, refdb_, name)) return false;\n  ON_SCOPE_EXIT(&) { git_reference_free(ref); };\n\n  for (int i = 0; i != kMaxDerefCount && git_reference_type(ref) == GIT_REFERENCE_SYMBOLIC; ++i) {\n    git_reference* dst;\n    const char* ref_name = git_reference_name(ref);\n    if (git_refdb_lookup(&dst, refdb_, ref_name)) {\n      const char* tag_name = StripTag(ref_name);\n      auto it = std::lower_bound(name2id_.begin(), name2id_.end(), tag_name, ByName);\n      return it != name2id_.end() && !strcmp((*it)->name, tag_name) && !IsLooseTag(tag_name) &&\n             git_oid_equal(&(*it)->id, target);\n    }\n    git_reference_free(ref);\n    ref = dst;\n  }\n\n  if (git_reference_type(ref) == GIT_REFERENCE_SYMBOLIC) return false;\n  const git_oid* oid = git_reference_target_peel(ref) ?: git_reference_target(ref);\n  if (git_oid_equal(oid, target)) return true;\n\n  for (int i = 0; i != kMaxDerefCount; ++i) {\n    git_tag* tag;\n    if (git_tag_lookup(&tag, repo_, oid)) return false;\n    ON_SCOPE_EXIT(&) { git_tag_free(tag); };\n    if (git_tag_target_type(tag) == GIT_OBJECT_COMMIT) {\n      return git_oid_equal(git_tag_target_id(tag), target);\n    }\n    oid = git_tag_target_id(tag);\n  }\n\n  return false;\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/tag_db.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_TAG_DB_H_\n#define ROMKATV_GITSTATUS_TAG_DB_H_\n\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include <git2.h>\n\n#include <condition_variable>\n#include <cstring>\n#include <mutex>\n#include <string>\n#include <vector>\n\n#include \"arena.h\"\n\nnamespace gitstatus {\n\nstruct Tag {\n  const char* name;\n  git_oid id;\n};\n\nclass TagDb {\n public:\n  explicit TagDb(git_repository* repo);\n  TagDb(TagDb&&) = delete;\n  ~TagDb();\n\n  std::string TagForCommit(const git_oid& oid);\n\n private:\n  void ReadLooseTags();\n  void UpdatePack();\n  void ParsePack();\n  void Wait();\n\n  bool IsLooseTag(const char* name) const;\n\n  bool TagHasTarget(const char* name, const git_oid* target) const;\n\n  git_repository* const repo_;\n  git_refdb* const refdb_;\n\n  Arena pack_arena_;\n  struct stat pack_stat_ = {};\n  WithArena<std::string> pack_;\n  WithArena<std::vector<const Tag*>> name2id_;\n  WithArena<std::vector<const Tag*>> id2name_;\n\n  Arena loose_arena_;\n  std::vector<char*> loose_tags_;\n\n  std::mutex mutex_;\n  std::condition_variable cv_;\n  bool id2name_dirty_ = false;\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_TAG_DB_H_\n"
  },
  {
    "path": "gitstatus/src/thread_pool.cc",
    "content": "#include \"thread_pool.h\"\n\n#include <cassert>\n#include <utility>\n\n#include \"check.h\"\n#include \"logging.h\"\n\nnamespace gitstatus {\n\nThreadPool::ThreadPool(size_t num_threads) : num_inflight_(num_threads) {\n  for (size_t i = 0; i != num_threads; ++i) {\n    threads_.emplace_back([=]() { Loop(i + 1); });\n  }\n}\n\nThreadPool::~ThreadPool() {\n  {\n    std::lock_guard<std::mutex> lock(mutex_);\n    exit_ = true;\n  }\n  cv_.notify_all();\n  sleeper_cv_.notify_one();\n  for (std::thread& t : threads_) t.join();\n}\n\nvoid ThreadPool::Schedule(Time t, std::function<void()> f) {\n  std::condition_variable* wake = nullptr;\n  {\n    std::unique_lock<std::mutex> lock(mutex_);\n    work_.push(Work{std::move(t), ++last_idx_, std::move(f)});\n    if (work_.top().idx == last_idx_) wake = have_sleeper_ ? &sleeper_cv_ : &cv_;\n  }\n  if (wake) wake->notify_one();\n}\n\nvoid ThreadPool::Loop(size_t tid) {\n  auto Next = [&]() -> std::function<void()> {\n    std::unique_lock<std::mutex> lock(mutex_);\n    --num_inflight_;\n    if (work_.empty() && num_inflight_ == 0) idle_cv_.notify_all();\n    while (true) {\n      if (exit_) return nullptr;\n      if (work_.empty()) {\n        cv_.wait(lock);\n        continue;\n      }\n      Time now = Clock::now();\n      const Work& top = work_.top();\n      if (top.t <= now) {\n        std::function<void()> res = std::move(top.f);\n        work_.pop();\n        ++num_inflight_;\n        bool notify = !work_.empty() && !have_sleeper_;\n        lock.unlock();\n        if (notify) cv_.notify_one();\n        return res;\n      }\n      if (have_sleeper_) {\n        cv_.wait(lock);\n        continue;\n      }\n      have_sleeper_ = true;\n      sleeper_cv_.wait_until(lock, top.t);\n      assert(have_sleeper_);\n      have_sleeper_ = false;\n    }\n  };\n  while (std::function<void()> f = Next()) f();\n}\n\nvoid ThreadPool::Wait() {\n  std::unique_lock<std::mutex> lock(mutex_);\n  idle_cv_.wait(lock, [&] { return work_.empty() && num_inflight_ == 0; });\n}\n\nstatic ThreadPool* g_thread_pool = nullptr;\n\nvoid InitGlobalThreadPool(size_t num_threads) {\n  CHECK(!g_thread_pool);\n  LOG(INFO) << \"Spawning \" << num_threads << \" thread(s)\";\n  g_thread_pool = new ThreadPool(num_threads);\n}\n\nThreadPool* GlobalThreadPool() { return g_thread_pool; }\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/thread_pool.h",
    "content": "#ifndef ROMKATV_GITSTATUS_THREAD_POOL_H_\n#define ROMKATV_GITSTATUS_THREAD_POOL_H_\n\n#include <condition_variable>\n#include <cstddef>\n#include <cstdint>\n#include <functional>\n#include <mutex>\n#include <queue>\n#include <thread>\n#include <tuple>\n#include <utility>\n\n#include \"time.h\"\n\nnamespace gitstatus {\n\nclass ThreadPool {\n public:\n  explicit ThreadPool(size_t num_threads);\n  ThreadPool(ThreadPool&&) = delete;\n\n  // Waits for the currently running functions to finish.\n  // Does NOT wait for the queue of functions to drain.\n  // If you want the latter, call Wait() manually.\n  ~ThreadPool();\n\n  // Runs `f` on one of the threads at or after time `t`. Can be called\n  // from any thread. Can be called concurrently.\n  //\n  // Does not block.\n  void Schedule(Time t, std::function<void()> f);\n\n  void Schedule(std::function<void()> f) { Schedule(Clock::now(), std::move(f)); }\n\n  // Blocks until the work queue is empty and there are no currently\n  // running functions.\n  void Wait();\n\n  size_t num_threads() const { return threads_.size(); }\n\n private:\n  struct Work {\n    bool operator<(const Work& w) const { return std::tie(w.t, w.idx) < std::tie(t, idx); }\n    Time t;\n    int64_t idx;\n    mutable std::function<void()> f;\n  };\n\n  void Loop(size_t tid);\n\n  int64_t last_idx_ = 0;\n  int64_t num_inflight_;\n  bool exit_ = false;\n  // Do we have a thread waiting on sleeper_cv_?\n  bool have_sleeper_ = false;\n  std::mutex mutex_;\n  // Any number of threads can wait on this condvar. Always without a timeout.\n  std::condition_variable cv_;\n  // At most one thread can wait on this condvar at a time. Always with a timeout.\n  std::condition_variable sleeper_cv_;\n  // Signalled when the work queue is empty and there is nothing inflight.\n  std::condition_variable idle_cv_;\n  std::priority_queue<Work> work_;\n  std::vector<std::thread> threads_;\n};\n\nvoid InitGlobalThreadPool(size_t num_threads);\n\nThreadPool* GlobalThreadPool();\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_THREAD_POOL_H_\n"
  },
  {
    "path": "gitstatus/src/time.h",
    "content": "#ifndef ROMKATV_GITSTATUS_TIME_H_\n#define ROMKATV_GITSTATUS_TIME_H_\n\n#include <chrono>\n\nnamespace gitstatus {\n\nusing Clock = std::chrono::steady_clock;\nusing Time = Clock::time_point;\nusing Duration = Clock::duration;\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_TIME_H_\n"
  },
  {
    "path": "gitstatus/src/timer.cc",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#include \"timer.h\"\n\n#include <sys/resource.h>\n#include <sys/time.h>\n#include <time.h>\n\n#include <cmath>\n#include <limits>\n\n#include \"check.h\"\n#include \"logging.h\"\n\nnamespace gitstatus {\n\nnamespace {\n\ndouble CpuTimeMs() {\n  auto ToMs = [](const timeval& tv) { return 1e3 * tv.tv_sec + 1e-3 * tv.tv_usec; };\n  rusage usage = {};\n  CHECK(getrusage(RUSAGE_SELF, &usage) == 0) << Errno();\n  return ToMs(usage.ru_utime) + ToMs(usage.ru_stime);\n}\n\ndouble WallTimeMs() {\n  // An attempt to call clock_gettime on an ancient version of MacOS fails at runtime.\n  // It's possible to detect the presence of clock_gettime at runtime but I don't have\n  // an ancient MacOS to test the code. Hence this.\n#ifdef __APPLE__\n  return std::numeric_limits<double>::quiet_NaN();\n#else\n  struct timespec ts;\n  clock_gettime(CLOCK_MONOTONIC, &ts);\n  return 1e3 * ts.tv_sec + 1e-6 * ts.tv_nsec;\n#endif\n}\n\n}  // namespace\n\nvoid Timer::Start() {\n  cpu_ = CpuTimeMs();\n  wall_ = WallTimeMs();\n}\n\nvoid Timer::Report(const char* msg) {\n  double cpu = CpuTimeMs() - cpu_;\n  if (std::isnan(wall_)) {\n    LOG(INFO) << \"Timing for: \" << msg << \": \" << cpu << \"ms cpu\";\n  } else {\n    double wall = WallTimeMs() - wall_;\n    LOG(INFO) << \"Timing for: \" << msg << \": \" << cpu << \"ms cpu, \" << wall << \"ms wall\";\n  }\n  Start();\n}\n\n}  // namespace gitstatus\n"
  },
  {
    "path": "gitstatus/src/timer.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_TIMER_H_\n#define ROMKATV_GITSTATUS_TIMER_H_\n\nnamespace gitstatus {\n\nclass Timer {\n public:\n  Timer() { Start(); }\n  void Start();\n  void Report(const char* msg);\n\n private:\n  double cpu_;\n  double wall_;\n};\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_TIMER_H_\n"
  },
  {
    "path": "gitstatus/src/tribool.h",
    "content": "// Copyright 2019 Roman Perepelitsa.\n//\n// This file is part of GitStatus.\n//\n// GitStatus is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// GitStatus is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n#ifndef ROMKATV_GITSTATUS_TRIBOOL_H_\n#define ROMKATV_GITSTATUS_TRIBOOL_H_\n\nnamespace gitstatus {\n\nenum class Tribool : int { kFalse = 0, kTrue = 1, kUnknown = -1 };\n\n}  // namespace gitstatus\n\n#endif  // ROMKATV_GITSTATUS_TRIBOOL_H_\n"
  },
  {
    "path": "gitstatus/usrbin/.gitkeep",
    "content": ""
  },
  {
    "path": "internal/configure.zsh",
    "content": "# Fewer than 47 columns will probably work. Haven't tried it.\ntypeset -gr __p9k_wizard_columns=47\n# The bottleneck is ask_tails with nerd fonts. Everything else works fine with 12 lines.\ntypeset -gr __p9k_wizard_lines=14\ntypeset -gr __p9k_zd=${ZDOTDIR:-$HOME}\ntypeset -gr __p9k_zd_u=${${${(q)__p9k_zd}/#(#b)${(q)HOME}(|\\/*)/'~'$match[1]}//\\%/%%}\ntypeset -gr __p9k_zshrc=${${:-$__p9k_zd/.zshrc}:A}\ntypeset -gr __p9k_zshrc_u=$__p9k_zd_u/.zshrc\ntypeset -gr __p9k_root_dir_u=${${${(q)__p9k_root_dir}/#(#b)${(q)HOME}(|\\/*)/'~'$match[1]}//\\%/%%}\n\nfunction _p9k_can_configure() {\n  [[ $1 == '-q' ]] && local -i q=1 || local -i q=0\n  function $0_error() {\n    (( q )) || print -rP \"%1F[ERROR]%f %Bp10k configure%b: $1\" >&2\n  }\n  typeset -g __p9k_cfg_path_o=${POWERLEVEL9K_CONFIG_FILE:=${ZDOTDIR:-~}/.p10k.zsh}\n  typeset -g __p9k_cfg_basename=${__p9k_cfg_path_o:t}\n  typeset -g __p9k_cfg_path=${__p9k_cfg_path_o:A}\n  typeset -g __p9k_cfg_path_u=${${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}(|\\/*)/'~'$match[1]}//\\%/%%}\n  {\n    [[ -e $__p9k_zd ]]         || { $0_error \"$__p9k_zd_u does not exist\";       return 1 }\n    [[ -d $__p9k_zd ]]         || { $0_error \"$__p9k_zd_u is not a directory\";   return 1 }\n    [[ ! -d $__p9k_cfg_path ]] || { $0_error \"$__p9k_cfg_path_u is a directory\"; return 1 }\n    [[ ! -d $__p9k_zshrc ]]    || { $0_error \"$__p9k_zshrc_u is a directory\";    return 1 }\n\n    local dir=${__p9k_cfg_path:h}\n    while [[ ! -e $dir && $dir != ${dir:h} ]]; do dir=${dir:h}; done\n    if [[ ! -d $dir ]]; then\n      $0_error \"cannot create $__p9k_cfg_path_u because ${dir//\\%/%%} is not a directory\"\n      return 1\n    fi\n    if [[ ! -w $dir ]]; then\n      $0_error \"cannot create $__p9k_cfg_path_u because ${dir//\\%/%%} is readonly\"\n      return 1\n    fi\n\n    [[ ! -e $__p9k_cfg_path || -f $__p9k_cfg_path || -h $__p9k_cfg_path ]] || {\n      $0_error \"$__p9k_cfg_path_u is a special file\"\n      return 1\n    }\n    [[ ! -e $__p9k_zshrc || -f $__p9k_zshrc || -h $__p9k_zshrc ]]          || {\n      $0_error \"$__p9k_zshrc_u a special file\"\n      return 1\n    }\n    [[ ! -e $__p9k_zshrc || -r $__p9k_zshrc ]]                             || {\n      $0_error \"$__p9k_zshrc_u is not readable\"\n      return 1\n    }\n    local style\n    for style in lean lean-8colors classic rainbow pure; do\n      [[ -r $__p9k_root_dir/config/p10k-$style.zsh ]]                      || {\n        $0_error \"$__p9k_root_dir_u/config/p10k-$style.zsh is not readable\"\n        return 1\n      }\n    done\n\n    (( LINES >= __p9k_wizard_lines && COLUMNS >= __p9k_wizard_columns ))   || {\n      $0_error \"terminal size too small; must be at least $__p9k_wizard_columns columns by $__p9k_wizard_lines lines\"\n      return 1\n    }\n    [[ -t 0 && -t 1 ]]                                                     || {\n      $0_error \"no TTY\"\n      return 2\n    }\n    return 0\n  } always {\n    unfunction $0_error\n  }\n}\n\nfunction p9k_configure() {\n  eval \"$__p9k_intro\"\n  _p9k_can_configure || return\n  (\n    set -- -f\n    builtin source $__p9k_root_dir/internal/wizard.zsh\n  )\n  local ret=$?\n  case $ret in\n    0)  builtin source $__p9k_cfg_path; _p9k__force_must_init=1;;\n    69) return 0;;\n    *)  return $ret;;\n  esac\n}\n"
  },
  {
    "path": "internal/icons.zsh",
    "content": "typeset -gA icons\n\nfunction _p9k_init_icons() {\n  [[ -n ${POWERLEVEL9K_MODE-} || ${langinfo[CODESET]} == (utf|UTF)(-|)8 ]] || local POWERLEVEL9K_MODE=ascii\n  [[ $_p9k__icon_mode == $POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING/$POWERLEVEL9K_ICON_PADDING ]] && return\n  typeset -g _p9k__icon_mode=$POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING/$POWERLEVEL9K_ICON_PADDING\n\n  if [[ $POWERLEVEL9K_LEGACY_ICON_SPACING == true ]]; then\n    local s=\n    local q=' '\n  else\n    local s=' '\n    local q=\n  fi\n\n  case $POWERLEVEL9K_MODE in\n    'flat'|'awesome-patched')\n      # Awesome-Patched Font required! See:\n      # https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched\n      icons=(\n        RULER_CHAR                     '\\u2500'               # ─\n        LEFT_SEGMENT_SEPARATOR         '\\uE0B0'               # \n        RIGHT_SEGMENT_SEPARATOR        '\\uE0B2'               # \n        LEFT_SEGMENT_END_SEPARATOR     ' '                    # Whitespace\n        LEFT_SUBSEGMENT_SEPARATOR      '\\uE0B1'               # \n        RIGHT_SUBSEGMENT_SEPARATOR     '\\uE0B3'               # \n        CARRIAGE_RETURN_ICON           '\\u21B5'$s             # ↵\n        ROOT_ICON                      '\\uE801'               # \n        SUDO_ICON                      '\\uE0A2'               # \n        RUBY_ICON                      '\\uE847 '              # \n        AWS_ICON                       '\\uE895'$s             # \n        AWS_EB_ICON                    '\\U1F331'$q            # 🌱\n        BACKGROUND_JOBS_ICON           '\\uE82F '              # \n        TEST_ICON                      '\\uE891'$s             # \n        TODO_ICON                      '\\u2611'               # ☑\n        BATTERY_ICON                   '\\uE894'$s             # \n        DISK_ICON                      '\\uE1AE '              # \n        OK_ICON                        '\\u2714'               # ✔\n        FAIL_ICON                      '\\u2718'               # ✘\n        SYMFONY_ICON                   'SF'\n        NODE_ICON                      '\\u2B22'$s             # ⬢\n        NODEJS_ICON                    '\\u2B22'$s             # ⬢\n        MULTILINE_FIRST_PROMPT_PREFIX  '\\u256D\\U2500'         # ╭─\n        MULTILINE_NEWLINE_PROMPT_PREFIX '\\u251C\\U2500'        # ├─\n        MULTILINE_LAST_PROMPT_PREFIX   '\\u2570\\U2500 '        # ╰─\n        APPLE_ICON                     '\\uE26E'$s             # \n        WINDOWS_ICON                   '\\uE26F'$s             # \n        FREEBSD_ICON                   '\\U1F608'$q            # 😈\n        ANDROID_ICON                   '\\uE270'$s             # \n        LINUX_ICON                     '\\uE271'$s             # \n        LINUX_ARCH_ICON                '\\uE271'$s             # \n        LINUX_DEBIAN_ICON              '\\uE271'$s             # \n        LINUX_RASPBIAN_ICON            '\\uE271'$s             # \n        LINUX_UBUNTU_ICON              '\\uE271'$s             # \n        LINUX_KALI_ICON                '\\uE271'$s             # \n        LINUX_CENTOS_ICON              '\\uE271'$s             # \n        LINUX_COREOS_ICON              '\\uE271'$s             # \n        LINUX_ELEMENTARY_ICON          '\\uE271'$s             # \n        LINUX_MINT_ICON                '\\uE271'$s             # \n        LINUX_FEDORA_ICON              '\\uE271'$s             # \n        LINUX_GENTOO_ICON              '\\uE271'$s             # \n        LINUX_MAGEIA_ICON              '\\uE271'$s             # \n        LINUX_NIXOS_ICON               '\\uE271'$s             # \n        LINUX_MANJARO_ICON             '\\uE271'$s             # \n        LINUX_DEVUAN_ICON              '\\uE271'$s             # \n        LINUX_ALPINE_ICON              '\\uE271'$s             # \n        LINUX_AOSC_ICON                '\\uE271'$s             # \n        LINUX_OPENSUSE_ICON            '\\uE271'$s             # \n        LINUX_SABAYON_ICON             '\\uE271'$s             # \n        LINUX_SLACKWARE_ICON           '\\uE271'$s             # \n        LINUX_VOID_ICON                '\\uE271'$s             # \n        LINUX_ARTIX_ICON               '\\uE271'$s             # \n        LINUX_RHEL_ICON                '\\uE271'$s             # \n        LINUX_AMZN_ICON                '\\uE271'$s             # \n        LINUX_ENDEAVOUROS_ICON         '\\uE271'$s             # \n        LINUX_ROCKY_ICON               '\\uE271'$s             # \n        LINUX_ALMALINUX_ICON           '\\uE271'$s             # \n        LINUX_GUIX_ICON                '\\uE271'$s             # \n        LINUX_NEON_ICON                '\\uE271'$s             # \n        SUNOS_ICON                     '\\U1F31E'$q            # 🌞\n        HOME_ICON                      '\\uE12C'$s             # \n        HOME_SUB_ICON                  '\\uE18D'$s             # \n        FOLDER_ICON                    '\\uE818'$s             # \n        NETWORK_ICON                   '\\uE1AD'$s             # \n        ETC_ICON                       '\\uE82F'$s             # \n        LOAD_ICON                      '\\uE190 '              # \n        SWAP_ICON                      '\\uE87D'$s             # \n        RAM_ICON                       '\\uE1E2 '              # \n        SERVER_ICON                    '\\uE895'$s             # \n        VCS_UNTRACKED_ICON             '\\uE16C'$s             # \n        VCS_UNSTAGED_ICON              '\\uE17C'$s             # \n        VCS_STAGED_ICON                '\\uE168'$s             # \n        VCS_STASH_ICON                 '\\uE133 '              # \n        #VCS_INCOMING_CHANGES_ICON     '\\uE1EB '              # \n        #VCS_INCOMING_CHANGES_ICON     '\\uE80D '              # \n        VCS_INCOMING_CHANGES_ICON      '\\uE131 '              # \n        #VCS_OUTGOING_CHANGES_ICON     '\\uE1EC '              # \n        #VCS_OUTGOING_CHANGES_ICON     '\\uE80E '              # \n        VCS_OUTGOING_CHANGES_ICON      '\\uE132 '              # \n        VCS_TAG_ICON                   '\\uE817 '              # \n        VCS_BOOKMARK_ICON              '\\uE87B'               # \n        VCS_COMMIT_ICON                '\\uE821 '              # \n        VCS_BRANCH_ICON                '\\uE220 '              # \n        VCS_REMOTE_BRANCH_ICON         '\\u2192'               # →\n        VCS_LOADING_ICON               ''\n        VCS_GIT_ICON                   '\\uE20E '              # \n        VCS_GIT_GITHUB_ICON            '\\uE20E '              #\n        VCS_GIT_BITBUCKET_ICON         '\\uE20E '              #\n        VCS_GIT_GITLAB_ICON            '\\uE20E '              #\n        VCS_GIT_AZURE_ICON             '\\uE20E '              #\n        VCS_GIT_ARCHLINUX_ICON         '\\uE20E '              #\n        VCS_GIT_CODEBERG_ICON          '\\uE20E '              #\n        VCS_GIT_DEBIAN_ICON            '\\uE20E '              #\n        VCS_GIT_FREEBSD_ICON           '\\uE20E '              #\n        VCS_GIT_FREEDESKTOP_ICON       '\\uE20E '              #\n        VCS_GIT_GNOME_ICON             '\\uE20E '              #\n        VCS_GIT_GNU_ICON               '\\uE20E '              #\n        VCS_GIT_KDE_ICON               '\\uE20E '              #\n        VCS_GIT_LINUX_ICON             '\\uE20E '              #\n        VCS_GIT_GITEA_ICON             '\\uE20E '              #\n        VCS_GIT_SOURCEHUT_ICON         '\\uE20E '              #\n        VCS_HG_ICON                    '\\uE1C3 '              # \n        VCS_SVN_ICON                   'svn'$q\n        RUST_ICON                      'R'\n        PYTHON_ICON                    '\\uE63C'$s             #  (doesn't always work)\n        CHEZMOI_ICON                   '\\uE12C'$s             # \n        SWIFT_ICON                     'Swift'\n        GO_ICON                        'Go'\n        GOLANG_ICON                    'Go'\n        PUBLIC_IP_ICON                 'IP'\n        LOCK_ICON                      '\\UE138'               # \n        NORDVPN_ICON                   '\\UE138'               # \n        EXECUTION_TIME_ICON            '\\UE89C'$s             # \n        SSH_ICON                       'ssh'\n        VPN_ICON                       '\\UE138'\n        KUBERNETES_ICON                '\\U2388'$s             # ⎈\n        DROPBOX_ICON                   '\\UF16B'$s             #  (doesn't always work)\n        DATE_ICON                      '\\uE184'$s             # \n        TIME_ICON                      '\\uE12E'$s             # \n        JAVA_ICON                      '\\U2615'               # ☕︎\n        LARAVEL_ICON                   ''\n        RANGER_ICON                    '\\u2B50'               # ⭐\n        YAZI_ICON                      '\\u2B50'               # ⭐\n        MIDNIGHT_COMMANDER_ICON        'mc'\n        VIM_ICON                       'vim'\n        TERRAFORM_ICON                 'tf'\n        PROXY_ICON                     '\\u2194'               # ↔\n        DOTNET_ICON                    '.NET'\n        DOTNET_CORE_ICON               '.NET'\n        AZURE_ICON                     '\\u2601'               # ☁\n        DIRENV_ICON                    '\\u25BC'               # ▼\n        FLUTTER_ICON                   'F'\n        GCLOUD_ICON                    'G'\n        LUA_ICON                       'lua'\n        PERL_ICON                      'perl'\n        NNN_ICON                       'nnn'\n        LF_ICON                        'lf'\n        XPLR_ICON                      'xplr'\n        TIMEWARRIOR_ICON               'tw'\n        TASKWARRIOR_ICON               'task'\n        NIX_SHELL_ICON                 'nix'\n        WIFI_ICON                      'WiFi'\n        ERLANG_ICON                    'erl'\n        ELIXIR_ICON                    'elixir'\n        POSTGRES_ICON                  'postgres'\n        PHP_ICON                       'php'\n        HASKELL_ICON                   'hs'\n        PACKAGE_ICON                   'pkg'\n        JULIA_ICON                     'jl'\n        SCALA_ICON                     'scala'\n        TOOLBOX_ICON                   '\\u2B22'               # ⬢\n        ARCH_ICON                      'arch'\n        HISTORY_ICON                   'hist'\n      )\n    ;;\n    'awesome-fontconfig')\n      # fontconfig with awesome-font required! See\n      # https://github.com/gabrielelana/awesome-terminal-fonts\n      icons=(\n        RULER_CHAR                     '\\u2500'               # ─\n        LEFT_SEGMENT_SEPARATOR         '\\uE0B0'               # \n        RIGHT_SEGMENT_SEPARATOR        '\\uE0B2'               # \n        LEFT_SEGMENT_END_SEPARATOR     ' '                    # Whitespace\n        LEFT_SUBSEGMENT_SEPARATOR      '\\uE0B1'               # \n        RIGHT_SUBSEGMENT_SEPARATOR     '\\uE0B3'               # \n        CARRIAGE_RETURN_ICON           '\\u21B5'               # ↵\n        ROOT_ICON                      '\\uF201'$s             # \n        SUDO_ICON                      '\\uF09C'$s             # \n        RUBY_ICON                      '\\uF219 '              # \n        AWS_ICON                       '\\uF270'$s             # \n        AWS_EB_ICON                    '\\U1F331'$q            # 🌱\n        BACKGROUND_JOBS_ICON           '\\uF013 '              # \n        TEST_ICON                      '\\uF291'$s             # \n        TODO_ICON                      '\\u2611'               # ☑\n        BATTERY_ICON                   '\\U1F50B'              # 🔋\n        DISK_ICON                      '\\uF0A0 '              # \n        OK_ICON                        '\\u2714'               # ✔\n        FAIL_ICON                      '\\u2718'               # ✘\n        SYMFONY_ICON                   'SF'\n        NODE_ICON                      '\\u2B22'               # ⬢\n        NODEJS_ICON                    '\\u2B22'               # ⬢\n        MULTILINE_FIRST_PROMPT_PREFIX  '\\u256D\\U2500'         # ╭─\n        MULTILINE_NEWLINE_PROMPT_PREFIX '\\u251C\\U2500'        # ├─\n        MULTILINE_LAST_PROMPT_PREFIX   '\\u2570\\U2500 '        # ╰─\n        APPLE_ICON                     '\\uF179'$s             # \n        WINDOWS_ICON                   '\\uF17A'$s             # \n        FREEBSD_ICON                   '\\U1F608'$q            # 😈\n        ANDROID_ICON                   '\\uE17B'$s             #  (doesn't always work)\n        LINUX_ICON                     '\\uF17C'$s             # \n        LINUX_ARCH_ICON                '\\uF17C'$s             # \n        LINUX_DEBIAN_ICON              '\\uF17C'$s             # \n        LINUX_RASPBIAN_ICON            '\\uF17C'$s             # \n        LINUX_UBUNTU_ICON              '\\uF17C'$s             # \n        LINUX_KALI_ICON                '\\uF17C'$s             # \n        LINUX_CENTOS_ICON              '\\uF17C'$s             # \n        LINUX_COREOS_ICON              '\\uF17C'$s             # \n        LINUX_ELEMENTARY_ICON          '\\uF17C'$s             # \n        LINUX_MINT_ICON                '\\uF17C'$s             # \n        LINUX_FEDORA_ICON              '\\uF17C'$s             # \n        LINUX_GENTOO_ICON              '\\uF17C'$s             # \n        LINUX_MAGEIA_ICON              '\\uF17C'$s             # \n        LINUX_NIXOS_ICON               '\\uF17C'$s             # \n        LINUX_MANJARO_ICON             '\\uF17C'$s             # \n        LINUX_DEVUAN_ICON              '\\uF17C'$s             # \n        LINUX_ALPINE_ICON              '\\uF17C'$s             # \n        LINUX_AOSC_ICON                '\\uF17C'$s             # \n        LINUX_OPENSUSE_ICON            '\\uF17C'$s             # \n        LINUX_SABAYON_ICON             '\\uF17C'$s             # \n        LINUX_SLACKWARE_ICON           '\\uF17C'$s             # \n        LINUX_VOID_ICON                '\\uF17C'$s             # \n        LINUX_ARTIX_ICON               '\\uF17C'$s             # \n        LINUX_RHEL_ICON                '\\uF17C'$s             # \n        LINUX_AMZN_ICON                '\\uF17C'$s             # \n        LINUX_ENDEAVOUROS_ICON         '\\uF17C'$s             # \n        LINUX_ROCKY_ICON               '\\uF17C'$s             # \n        LINUX_ALMALINUX_ICON           '\\uF17C'$s             # \n        LINUX_GUIX_ICON                '\\uF17C'$s             # \n        LINUX_NEON_ICON                '\\uF17C'$s             # \n        SUNOS_ICON                     '\\uF185 '              # \n        HOME_ICON                      '\\uF015'$s             # \n        HOME_SUB_ICON                  '\\uF07C'$s             # \n        FOLDER_ICON                    '\\uF115'$s             # \n        ETC_ICON                       '\\uF013 '              # \n        NETWORK_ICON                   '\\uF09E'$s             # \n        LOAD_ICON                      '\\uF080 '              # \n        SWAP_ICON                      '\\uF0E4'$s             # \n        RAM_ICON                       '\\uF0E4'$s             # \n        SERVER_ICON                    '\\uF233'$s             # \n        VCS_UNTRACKED_ICON             '\\uF059'$s             # \n        VCS_UNSTAGED_ICON              '\\uF06A'$s             # \n        VCS_STAGED_ICON                '\\uF055'$s             # \n        VCS_STASH_ICON                 '\\uF01C '              # \n        VCS_INCOMING_CHANGES_ICON      '\\uF01A '              # \n        VCS_OUTGOING_CHANGES_ICON      '\\uF01B '              # \n        VCS_TAG_ICON                   '\\uF217 '              # \n        VCS_BOOKMARK_ICON              '\\uF27B '              # \n        VCS_COMMIT_ICON                '\\uF221 '              # \n        VCS_BRANCH_ICON                '\\uF126 '              # \n        VCS_REMOTE_BRANCH_ICON         '\\u2192'               # →\n        VCS_LOADING_ICON               ''\n        VCS_GIT_ICON                   '\\uF1D3 '              # \n        VCS_GIT_GITHUB_ICON            '\\uF113 '              # \n        VCS_GIT_BITBUCKET_ICON         '\\uF171 '              # \n        VCS_GIT_GITLAB_ICON            '\\uF296 '              # \n        VCS_GIT_AZURE_ICON             '\\u2601 '              # ☁\n        VCS_GIT_ARCHLINUX_ICON         '\\uF1D3 '              # \n        VCS_GIT_CODEBERG_ICON          '\\uF1D3 '              # \n        VCS_GIT_DEBIAN_ICON            '\\uF1D3 '              # \n        VCS_GIT_FREEBSD_ICON           '\\uF1D3 '              # \n        VCS_GIT_FREEDESKTOP_ICON       '\\uF1D3 '              # \n        VCS_GIT_GNOME_ICON             '\\uF1D3 '              # \n        VCS_GIT_GNU_ICON               '\\uF1D3 '              # \n        VCS_GIT_KDE_ICON               '\\uF1D3 '              # \n        VCS_GIT_LINUX_ICON             '\\uF1D3 '              # \n        VCS_GIT_GITEA_ICON             '\\uF1D3 '              # \n        VCS_GIT_SOURCEHUT_ICON         '\\uF1D3 '              # \n        VCS_HG_ICON                    '\\uF0C3 '              # \n        VCS_SVN_ICON                   'svn'$q\n        RUST_ICON                      '\\uE6A8'               # \n        PYTHON_ICON                    '\\uE63C'$s             # \n        CHEZMOI_ICON                   '\\uF015'$s             # \n        SWIFT_ICON                     'Swift'\n        GO_ICON                        'Go'\n        GOLANG_ICON                    'Go'\n        PUBLIC_IP_ICON                 'IP'\n        LOCK_ICON                      '\\UF023'               # \n        NORDVPN_ICON                   '\\UF023'               # \n        EXECUTION_TIME_ICON            '\\uF253'$s             # \n        SSH_ICON                       'ssh'\n        VPN_ICON                       '\\uF023'\n        KUBERNETES_ICON                '\\U2388'               # ⎈\n        DROPBOX_ICON                   '\\UF16B'$s             # \n        DATE_ICON                      '\\uF073 '              # \n        TIME_ICON                      '\\uF017 '              # \n        JAVA_ICON                      '\\U2615'               # ☕︎\n        LARAVEL_ICON                   ''\n        RANGER_ICON                    '\\u2B50'               # ⭐\n        YAZI_ICON                      '\\u2B50'               # ⭐\n        MIDNIGHT_COMMANDER_ICON        'mc'\n        VIM_ICON                       'vim'\n        TERRAFORM_ICON                 'tf'\n        PROXY_ICON                     '\\u2194'               # ↔\n        DOTNET_ICON                    '.NET'\n        DOTNET_CORE_ICON               '.NET'\n        AZURE_ICON                     '\\u2601'               # ☁\n        DIRENV_ICON                    '\\u25BC'               # ▼\n        FLUTTER_ICON                   'F'\n        GCLOUD_ICON                    'G'\n        LUA_ICON                       'lua'\n        PERL_ICON                      'perl'\n        NNN_ICON                       'nnn'\n        LF_ICON                        'lf'\n        XPLR_ICON                      'xplr'\n        TIMEWARRIOR_ICON               'tw'\n        TASKWARRIOR_ICON               'task'\n        NIX_SHELL_ICON                 'nix'\n        WIFI_ICON                      'WiFi'\n        ERLANG_ICON                    'erl'\n        ELIXIR_ICON                    'elixir'\n        POSTGRES_ICON                  'postgres'\n        PHP_ICON                       'php'\n        HASKELL_ICON                   'hs'\n        PACKAGE_ICON                   'pkg'\n        JULIA_ICON                     'jl'\n        SCALA_ICON                     'scala'\n        TOOLBOX_ICON                   '\\u2B22'               # ⬢\n        ARCH_ICON                      'arch'\n        HISTORY_ICON                   'hist'\n      )\n    ;;\n    'awesome-mapped-fontconfig')\n      # mapped fontconfig with awesome-font required! See\n      # https://github.com/gabrielelana/awesome-terminal-fonts\n      # don't forget to source the font maps in your startup script\n      if [ -z \"$AWESOME_GLYPHS_LOADED\" ]; then\n          echo \"Powerlevel9k warning: Awesome-Font mappings have not been loaded.\n          Source a font mapping in your shell config, per the Awesome-Font docs\n          (https://github.com/gabrielelana/awesome-terminal-fonts),\n          Or use a different Powerlevel9k font configuration.\";\n      fi\n      icons=(\n        RULER_CHAR                     '\\u2500'                                       # ─\n        LEFT_SEGMENT_SEPARATOR         '\\uE0B0'                                       # \n        RIGHT_SEGMENT_SEPARATOR        '\\uE0B2'                                       # \n        LEFT_SEGMENT_END_SEPARATOR     ' '                                            # Whitespace\n        LEFT_SUBSEGMENT_SEPARATOR      '\\uE0B1'                                       # \n        RIGHT_SUBSEGMENT_SEPARATOR     '\\uE0B3'                                       # \n        CARRIAGE_RETURN_ICON           '\\u21B5'                                       # ↵\n        ROOT_ICON                      \"${CODEPOINT_OF_OCTICONS_ZAP:+\\\\u$CODEPOINT_OF_OCTICONS_ZAP}\"\n        SUDO_ICON                      \"${CODEPOINT_OF_AWESOME_UNLOCK:+\\\\u$CODEPOINT_OF_AWESOME_UNLOCK$s}\"\n        RUBY_ICON                      \"${CODEPOINT_OF_OCTICONS_RUBY:+\\\\u$CODEPOINT_OF_OCTICONS_RUBY }\"\n        AWS_ICON                       \"${CODEPOINT_OF_AWESOME_SERVER:+\\\\u$CODEPOINT_OF_AWESOME_SERVER$s}\"\n        AWS_EB_ICON                    '\\U1F331'$q                                      # 🌱\n        BACKGROUND_JOBS_ICON           \"${CODEPOINT_OF_AWESOME_COG:+\\\\u$CODEPOINT_OF_AWESOME_COG }\"\n        TEST_ICON                      \"${CODEPOINT_OF_AWESOME_BUG:+\\\\u$CODEPOINT_OF_AWESOME_BUG$s}\"\n        TODO_ICON                      \"${CODEPOINT_OF_AWESOME_CHECK_SQUARE_O:+\\\\u$CODEPOINT_OF_AWESOME_CHECK_SQUARE_O$s}\"\n        BATTERY_ICON                   \"${CODEPOINT_OF_AWESOME_BATTERY_FULL:+\\\\U$CODEPOINT_OF_AWESOME_BATTERY_FULL$s}\"\n        DISK_ICON                      \"${CODEPOINT_OF_AWESOME_HDD_O:+\\\\u$CODEPOINT_OF_AWESOME_HDD_O }\"\n        OK_ICON                        \"${CODEPOINT_OF_AWESOME_CHECK:+\\\\u$CODEPOINT_OF_AWESOME_CHECK$s}\"\n        FAIL_ICON                      \"${CODEPOINT_OF_AWESOME_TIMES:+\\\\u$CODEPOINT_OF_AWESOME_TIMES}\"\n        SYMFONY_ICON                   'SF'\n        NODE_ICON                      '\\u2B22'                                       # ⬢\n        NODEJS_ICON                    '\\u2B22'                                       # ⬢\n        MULTILINE_FIRST_PROMPT_PREFIX  '\\u256D\\U2500'                                 # ╭─\n        MULTILINE_NEWLINE_PROMPT_PREFIX '\\u251C\\U2500'                                # ├─\n        MULTILINE_LAST_PROMPT_PREFIX   '\\u2570\\U2500 '                                # ╰─\n        APPLE_ICON                     \"${CODEPOINT_OF_AWESOME_APPLE:+\\\\u$CODEPOINT_OF_AWESOME_APPLE$s}\"\n        FREEBSD_ICON                   '\\U1F608'$q                                    # 😈\n        LINUX_ICON                     \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ARCH_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_DEBIAN_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_RASPBIAN_ICON            \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_UBUNTU_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_KALI_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_CENTOS_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_COREOS_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ELEMENTARY_ICON          \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_MINT_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_FEDORA_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_GENTOO_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_MAGEIA_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_NIXOS_ICON               \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_MANJARO_ICON             \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_DEVUAN_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ALPINE_ICON              \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_AOSC_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_OPENSUSE_ICON            \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_SABAYON_ICON             \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_SLACKWARE_ICON           \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_VOID_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ARTIX_ICON               \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_RHEL_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_AMZN_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ENDEAVOUROS_ICON         \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ROCKY_ICON               \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_ALMALINUX_ICON           \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_GUIX_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        LINUX_NEON_ICON                \"${CODEPOINT_OF_AWESOME_LINUX:+\\\\u$CODEPOINT_OF_AWESOME_LINUX$s}\"\n        SUNOS_ICON                     \"${CODEPOINT_OF_AWESOME_SUN_O:+\\\\u$CODEPOINT_OF_AWESOME_SUN_O }\"\n        HOME_ICON                      \"${CODEPOINT_OF_AWESOME_HOME:+\\\\u$CODEPOINT_OF_AWESOME_HOME$s}\"\n        HOME_SUB_ICON                  \"${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}\"\n        FOLDER_ICON                    \"${CODEPOINT_OF_AWESOME_FOLDER_O:+\\\\u$CODEPOINT_OF_AWESOME_FOLDER_O$s}\"\n        ETC_ICON                       \"${CODEPOINT_OF_AWESOME_COG:+\\\\u$CODEPOINT_OF_AWESOME_COG }\"\n        NETWORK_ICON                   \"${CODEPOINT_OF_AWESOME_RSS:+\\\\u$CODEPOINT_OF_AWESOME_RSS$s}\"\n        LOAD_ICON                      \"${CODEPOINT_OF_AWESOME_BAR_CHART:+\\\\u$CODEPOINT_OF_AWESOME_BAR_CHART }\"\n        SWAP_ICON                      \"${CODEPOINT_OF_AWESOME_DASHBOARD:+\\\\u$CODEPOINT_OF_AWESOME_DASHBOARD$s}\"\n        RAM_ICON                       \"${CODEPOINT_OF_AWESOME_DASHBOARD:+\\\\u$CODEPOINT_OF_AWESOME_DASHBOARD$s}\"\n        SERVER_ICON                    \"${CODEPOINT_OF_AWESOME_SERVER:+\\\\u$CODEPOINT_OF_AWESOME_SERVER$s}\"\n        VCS_UNTRACKED_ICON             \"${CODEPOINT_OF_AWESOME_QUESTION_CIRCLE:+\\\\u$CODEPOINT_OF_AWESOME_QUESTION_CIRCLE$s}\"\n        VCS_UNSTAGED_ICON              \"${CODEPOINT_OF_AWESOME_EXCLAMATION_CIRCLE:+\\\\u$CODEPOINT_OF_AWESOME_EXCLAMATION_CIRCLE$s}\"\n        VCS_STAGED_ICON                \"${CODEPOINT_OF_AWESOME_PLUS_CIRCLE:+\\\\u$CODEPOINT_OF_AWESOME_PLUS_CIRCLE$s}\"\n        VCS_STASH_ICON                 \"${CODEPOINT_OF_AWESOME_INBOX:+\\\\u$CODEPOINT_OF_AWESOME_INBOX }\"\n        VCS_INCOMING_CHANGES_ICON      \"${CODEPOINT_OF_AWESOME_ARROW_CIRCLE_DOWN:+\\\\u$CODEPOINT_OF_AWESOME_ARROW_CIRCLE_DOWN }\"\n        VCS_OUTGOING_CHANGES_ICON      \"${CODEPOINT_OF_AWESOME_ARROW_CIRCLE_UP:+\\\\u$CODEPOINT_OF_AWESOME_ARROW_CIRCLE_UP }\"\n        VCS_TAG_ICON                   \"${CODEPOINT_OF_AWESOME_TAG:+\\\\u$CODEPOINT_OF_AWESOME_TAG }\"\n        VCS_BOOKMARK_ICON              \"${CODEPOINT_OF_OCTICONS_BOOKMARK:+\\\\u$CODEPOINT_OF_OCTICONS_BOOKMARK}\"\n        VCS_COMMIT_ICON                \"${CODEPOINT_OF_OCTICONS_GIT_COMMIT:+\\\\u$CODEPOINT_OF_OCTICONS_GIT_COMMIT }\"\n        VCS_BRANCH_ICON                \"${CODEPOINT_OF_OCTICONS_GIT_BRANCH:+\\\\u$CODEPOINT_OF_OCTICONS_GIT_BRANCH }\"\n        VCS_REMOTE_BRANCH_ICON         \"${CODEPOINT_OF_OCTICONS_REPO_PUSH:+\\\\u$CODEPOINT_OF_OCTICONS_REPO_PUSH$s}\"\n        VCS_LOADING_ICON               ''\n        VCS_GIT_ICON                   \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_GITHUB_ICON            \"${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }\"\n        VCS_GIT_BITBUCKET_ICON         \"${CODEPOINT_OF_AWESOME_BITBUCKET:+\\\\u$CODEPOINT_OF_AWESOME_BITBUCKET }\"\n        VCS_GIT_GITLAB_ICON            \"${CODEPOINT_OF_AWESOME_GITLAB:+\\\\u$CODEPOINT_OF_AWESOME_GITLAB }\"\n        VCS_GIT_AZURE_ICON             '\\u2601 '                                      # ☁\n        VCS_GIT_ARCHLINUX_ICON         \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_CODEBERG_ICON          \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_DEBIAN_ICON            \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_FREEBSD_ICON           \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_FREEDESKTOP_ICON       \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_GNOME_ICON             \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_GNU_ICON               \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_KDE_ICON               \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_LINUX_ICON             \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_GITEA_ICON             \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_GIT_SOURCEHUT_ICON         \"${CODEPOINT_OF_AWESOME_GIT:+\\\\u$CODEPOINT_OF_AWESOME_GIT }\"\n        VCS_HG_ICON                    \"${CODEPOINT_OF_AWESOME_FLASK:+\\\\u$CODEPOINT_OF_AWESOME_FLASK }\"\n        VCS_SVN_ICON                   'svn'$q\n        RUST_ICON                      '\\uE6A8'                                       # \n        PYTHON_ICON                    '\\U1F40D'                                      # 🐍\n        CHEZMOI_ICON                    \"${CODEPOINT_OF_AWESOME_HOME:+\\\\u$CODEPOINT_OF_AWESOME_HOME$s}\"\n        SWIFT_ICON                     '\\uE655'$s                                     # \n        PUBLIC_IP_ICON                 \"${CODEPOINT_OF_AWESOME_GLOBE:+\\\\u$CODEPOINT_OF_AWESOME_GLOBE$s}\"\n        LOCK_ICON                      \"${CODEPOINT_OF_AWESOME_LOCK:+\\\\u$CODEPOINT_OF_AWESOME_LOCK}\"\n        NORDVPN_ICON                   \"${CODEPOINT_OF_AWESOME_LOCK:+\\\\u$CODEPOINT_OF_AWESOME_LOCK}\"\n        EXECUTION_TIME_ICON            \"${CODEPOINT_OF_AWESOME_HOURGLASS_END:+\\\\u$CODEPOINT_OF_AWESOME_HOURGLASS_END$s}\"\n        SSH_ICON                       'ssh'\n        VPN_ICON                       \"${CODEPOINT_OF_AWESOME_LOCK:+\\\\u$CODEPOINT_OF_AWESOME_LOCK}\"\n        KUBERNETES_ICON                '\\U2388'                                       # ⎈\n        DROPBOX_ICON                   \"${CODEPOINT_OF_AWESOME_DROPBOX:+\\\\u$CODEPOINT_OF_AWESOME_DROPBOX$s}\"\n        DATE_ICON                      '\\uF073 '                                      # \n        TIME_ICON                      '\\uF017 '                                      # \n        JAVA_ICON                      '\\U2615'                                       # ☕︎\n        LARAVEL_ICON                   ''\n        RANGER_ICON                    '\\u2B50'                                       # ⭐\n        YAZI_ICON                      '\\u2B50'                                       # ⭐\n        MIDNIGHT_COMMANDER_ICON        'mc'\n        VIM_ICON                       'vim'\n        TERRAFORM_ICON                 'tf'\n        PROXY_ICON                     '\\u2194'                                       # ↔\n        DOTNET_ICON                    '.NET'\n        DOTNET_CORE_ICON               '.NET'\n        AZURE_ICON                     '\\u2601'                                       # ☁\n        DIRENV_ICON                    '\\u25BC'                                       # ▼\n        FLUTTER_ICON                   'F'\n        GCLOUD_ICON                    'G'\n        LUA_ICON                       'lua'\n        PERL_ICON                      'perl'\n        NNN_ICON                       'nnn'\n        LF_ICON                        'lf'\n        XPLR_ICON                      'xplr'\n        TIMEWARRIOR_ICON               'tw'\n        TASKWARRIOR_ICON               'task'\n        NIX_SHELL_ICON                 'nix'\n        WIFI_ICON                      'WiFi'\n        ERLANG_ICON                    'erl'\n        ELIXIR_ICON                    'elixir'\n        POSTGRES_ICON                  'postgres'\n        PHP_ICON                       'php'\n        HASKELL_ICON                   'hs'\n        PACKAGE_ICON                   'pkg'\n        JULIA_ICON                     'jl'\n        SCALA_ICON                     'scala'\n        TOOLBOX_ICON                   '\\u2B22'                                       # ⬢\n        ARCH_ICON                      'arch'\n        HISTORY_ICON                   'hist'\n      )\n    ;;\n    'nerdfont-v3')\n      # In this version of Nerd Fonts the Material icons are mapped to U+F0001-U+F19C3.\n      # The font may also have Material icons in the old range of U+F500-U+FD46 but\n      # powerlevel10k won't rely on them.\n      icons=(\n        RULER_CHAR                     '\\u2500'               # ─\n        LEFT_SEGMENT_SEPARATOR         '\\uE0B0'               # \n        RIGHT_SEGMENT_SEPARATOR        '\\uE0B2'               # \n        LEFT_SEGMENT_END_SEPARATOR     ' '                    #\n        LEFT_SUBSEGMENT_SEPARATOR      '\\uE0B1'               # \n        RIGHT_SUBSEGMENT_SEPARATOR     '\\uE0B3'               # \n        CARRIAGE_RETURN_ICON           '\\u21B5'               # ↵\n        ROOT_ICON                      '\\uE614'$q             # \n        SUDO_ICON                      '\\uF09C'$s             # \n        RUBY_ICON                      '\\uF219 '              # \n        AWS_ICON                       '\\uF270'$s             # \n        AWS_EB_ICON                    '\\UF1BD'$q$q           # \n        BACKGROUND_JOBS_ICON           '\\uF013 '              # \n        TEST_ICON                      '\\uF188'$s             # \n        TODO_ICON                      '\\u2611'               # ☑\n        BATTERY_ICON                   '\\UF240 '              # \n        DISK_ICON                      '\\uF0A0'$s             # \n        OK_ICON                        '\\uF00C'$s             # \n        FAIL_ICON                      '\\uF00D'               # \n        SYMFONY_ICON                   '\\uE757'               # \n        NODE_ICON                      '\\uE617 '              # \n        NODEJS_ICON                    '\\uE617 '              # \n        MULTILINE_FIRST_PROMPT_PREFIX  '\\u256D\\U2500'         # ╭─\n        MULTILINE_NEWLINE_PROMPT_PREFIX '\\u251C\\U2500'        # ├─\n        MULTILINE_LAST_PROMPT_PREFIX   '\\u2570\\U2500 '        # ╰─\n        APPLE_ICON                     '\\uF179'               # \n        WINDOWS_ICON                   '\\uF17A'$s             # \n        FREEBSD_ICON                   '\\UF30C '              # \n        ANDROID_ICON                   '\\uF17B'               # \n        LINUX_ARCH_ICON                '\\uF303'               # \n        LINUX_CENTOS_ICON              '\\uF304'$s             # \n        LINUX_COREOS_ICON              '\\uF305'$s             # \n        LINUX_DEBIAN_ICON              '\\uF306'               # \n        LINUX_RASPBIAN_ICON            '\\uF315'               # \n        LINUX_ELEMENTARY_ICON          '\\uF309'$s             # \n        LINUX_FEDORA_ICON              '\\uF30a'$s             # \n        LINUX_GENTOO_ICON              '\\uF30d'$s             # \n        LINUX_MAGEIA_ICON              '\\uF310'               # \n        LINUX_MINT_ICON                '\\uF30e'$s             # \n        LINUX_NIXOS_ICON               '\\uF313'$s             # \n        LINUX_MANJARO_ICON             '\\uF312'$s             # \n        LINUX_DEVUAN_ICON              '\\uF307'$s             # \n        LINUX_ALPINE_ICON              '\\uF300'$s             # \n        LINUX_AOSC_ICON                '\\uF301'$s             # \n        LINUX_OPENSUSE_ICON            '\\uF314'$s             # \n        LINUX_SABAYON_ICON             '\\uF317'$s             # \n        LINUX_SLACKWARE_ICON           '\\uF319'$s             # \n        LINUX_VOID_ICON                '\\UF32E'$s             # \n        LINUX_ARTIX_ICON               '\\UF31F'$s             # \n        LINUX_UBUNTU_ICON              '\\uF31b'$s             # \n        LINUX_KALI_ICON                '\\uF327'$s             # \n        LINUX_RHEL_ICON                '\\UF111B'$s            # 󱄛\n        LINUX_AMZN_ICON                '\\uF270'$s             # \n        LINUX_ENDEAVOUROS_ICON         '\\UF322'$s             # \n        LINUX_ROCKY_ICON               '\\UF32B'$s             # \n        LINUX_ALMALINUX_ICON           '\\UF31D'$s             # \n        LINUX_GUIX_ICON                '\\UF325'$s             # \n        LINUX_NEON_ICON                '\\uF17C'               # \n        LINUX_ICON                     '\\uF17C'               # \n        SUNOS_ICON                     '\\uF185 '              # \n        HOME_ICON                      '\\uF015'$s             # \n        HOME_SUB_ICON                  '\\uF07C'$s             # \n        FOLDER_ICON                    '\\uF115'$s             # \n        ETC_ICON                       '\\uF013'$s             # \n        NETWORK_ICON                   '\\UF0378'$s            # 󰍸\n        LOAD_ICON                      '\\uF080 '              # \n        SWAP_ICON                      '\\uF464'$s             # \n        RAM_ICON                       '\\uF0E4'$s             # \n        SERVER_ICON                    '\\uF0AE'$s             # \n        VCS_UNTRACKED_ICON             '\\uF059'$s             # \n        VCS_UNSTAGED_ICON              '\\uF06A'$s             # \n        VCS_STAGED_ICON                '\\uF055'$s             # \n        VCS_STASH_ICON                 '\\uF01C '              # \n        VCS_INCOMING_CHANGES_ICON      '\\uF01A '              # \n        VCS_OUTGOING_CHANGES_ICON      '\\uF01B '              # \n        VCS_TAG_ICON                   '\\uF02B '              # \n        VCS_BOOKMARK_ICON              '\\uF461 '              # \n        VCS_COMMIT_ICON                '\\uE729 '              # \n        VCS_BRANCH_ICON                '\\uF126 '              # \n        VCS_REMOTE_BRANCH_ICON         '\\uE728 '              # \n        VCS_LOADING_ICON               ''                     #\n        VCS_GIT_ICON                   '\\uF1D3 '              # \n        VCS_GIT_GITHUB_ICON            '\\uF113 '              # \n        VCS_GIT_BITBUCKET_ICON         '\\uE703 '              # \n        VCS_GIT_GITLAB_ICON            '\\uF296 '              # \n        VCS_GIT_AZURE_ICON             '\\uEBE8 '              # \n        VCS_GIT_ARCHLINUX_ICON         '\\uF303 '              # \n        # v3.1 has \\uF330.\n        VCS_GIT_CODEBERG_ICON          '\\uF1D3 '              # \n        VCS_GIT_DEBIAN_ICON            '\\uF306 '              # \n        VCS_GIT_FREEBSD_ICON           '\\UF30C '              # \n        # v3.1 has \\uF360.\n        VCS_GIT_FREEDESKTOP_ICON       '\\uF296 '              # \n        # v3.1 has \\uF361.\n        VCS_GIT_GNOME_ICON             '\\uF296 '              # \n        VCS_GIT_GNU_ICON               '\\uE779 '              # \n        # v3.1 has \\uF332.\n        VCS_GIT_KDE_ICON               '\\uF296 '              # \n        VCS_GIT_LINUX_ICON             '\\uF17C '              # \n        # v3.1 has \\uF339.\n        VCS_GIT_GITEA_ICON             '\\uF1D3 '              # \n        VCS_GIT_SOURCEHUT_ICON         '\\uF1DB '              # \n        VCS_HG_ICON                    '\\uF0C3 '              # \n        VCS_SVN_ICON                   '\\uE72D'$q             # \n        RUST_ICON                      '\\uE7A8'$q             # \n        PYTHON_ICON                    '\\UE73C '              # \n        CHEZMOI_ICON                   '\\uF015'$s             # \n        SWIFT_ICON                     '\\uE755'               # \n        GO_ICON                        '\\uE626'               # \n        GOLANG_ICON                    '\\uE626'               # \n        PUBLIC_IP_ICON                 '\\UF0AC'$s             # \n        LOCK_ICON                      '\\UF023'               # \n        NORDVPN_ICON                   '\\UF023'               # \n        EXECUTION_TIME_ICON            '\\uF252'$s             # \n        SSH_ICON                       '\\uF489'$s             # \n        VPN_ICON                       '\\UF023'               # \n        KUBERNETES_ICON                '\\UF10FE'              # 󱃾\n        DROPBOX_ICON                   '\\UF16B'$s             # \n        DATE_ICON                      '\\uF073 '              # \n        TIME_ICON                      '\\uF017 '              # \n        JAVA_ICON                      '\\uE738'               # \n        LARAVEL_ICON                   '\\ue73f'$q             # \n        RANGER_ICON                    '\\uF00b '              # \n        YAZI_ICON                      '\\uF00b '              # \n        MIDNIGHT_COMMANDER_ICON        'mc'                   # mc\n        VIM_ICON                       '\\uE62B'               # \n        TERRAFORM_ICON                 '\\uF1BB '              # \n        PROXY_ICON                     '\\u2194'               # ↔\n        DOTNET_ICON                    '\\uE77F'               # \n        DOTNET_CORE_ICON               '\\uE77F'               # \n        AZURE_ICON                     '\\uEBD8 '              # \n        DIRENV_ICON                    '\\u25BC'               # ▼\n        FLUTTER_ICON                   'F'                    # F\n        GCLOUD_ICON                    '\\UF02AD'              # 󰊭\n        LUA_ICON                       '\\uE620'               # \n        PERL_ICON                      '\\uE769'               # \n        NNN_ICON                       'nnn'                  # nnn\n        LF_ICON                        'lf'                   # lf\n        XPLR_ICON                      'xplr'                 # xplr\n        TIMEWARRIOR_ICON               '\\uF49B'               # \n        TASKWARRIOR_ICON               '\\uF4A0 '              # \n        NIX_SHELL_ICON                 '\\uF313 '              # \n        WIFI_ICON                      '\\uF1EB '              # \n        ERLANG_ICON                    '\\uE7B1 '              # \n        ELIXIR_ICON                    '\\uE62D'               # \n        POSTGRES_ICON                  '\\uE76E'               # \n        PHP_ICON                       '\\uE608'               # \n        HASKELL_ICON                   '\\uE61F'               # \n        PACKAGE_ICON                   '\\UF03D7'              # 󰏗\n        JULIA_ICON                     '\\uE624'               # \n        SCALA_ICON                     '\\uE737'               # \n        TOOLBOX_ICON                   '\\uE20F'$s             # \n        ARCH_ICON                      '\\uE266'               # \n        HISTORY_ICON                   '\\uF1DA'$s             # \n      )\n    ;;\n    'nerdfont-complete'|'nerdfont-fontconfig')\n      # nerd-font patched (complete) font required! See\n      # https://github.com/ryanoasis/nerd-fonts\n      # http://nerdfonts.com/#cheat-sheet\n      icons=(\n        RULER_CHAR                     '\\u2500'               # ─\n        LEFT_SEGMENT_SEPARATOR         '\\uE0B0'               # \n        RIGHT_SEGMENT_SEPARATOR        '\\uE0B2'               # \n        LEFT_SEGMENT_END_SEPARATOR     ' '                    # Whitespace\n        LEFT_SUBSEGMENT_SEPARATOR      '\\uE0B1'               # \n        RIGHT_SUBSEGMENT_SEPARATOR     '\\uE0B3'               # \n        CARRIAGE_RETURN_ICON           '\\u21B5'               # ↵\n        ROOT_ICON                      '\\uE614'$q             # \n        SUDO_ICON                      '\\uF09C'$s             # \n        RUBY_ICON                      '\\uF219 '              # \n        AWS_ICON                       '\\uF270'$s             # \n        AWS_EB_ICON                    '\\UF1BD'$q$q           # \n        BACKGROUND_JOBS_ICON           '\\uF013 '              # \n        TEST_ICON                      '\\uF188'$s             # \n        TODO_ICON                      '\\u2611'               # ☑\n        BATTERY_ICON                   '\\UF240 '              # \n        DISK_ICON                      '\\uF0A0'$s             # \n        OK_ICON                        '\\uF00C'$s             # \n        FAIL_ICON                      '\\uF00D'               # \n        SYMFONY_ICON                   '\\uE757'               # \n        NODE_ICON                      '\\uE617 '              # \n        NODEJS_ICON                    '\\uE617 '              # \n        MULTILINE_FIRST_PROMPT_PREFIX  '\\u256D\\U2500'         # ╭─\n        MULTILINE_NEWLINE_PROMPT_PREFIX '\\u251C\\U2500'        # ├─\n        MULTILINE_LAST_PROMPT_PREFIX   '\\u2570\\U2500 '        # ╰─\n        APPLE_ICON                     '\\uF179'               # \n        WINDOWS_ICON                   '\\uF17A'$s             # \n        FREEBSD_ICON                   '\\UF30C '              # \n        ANDROID_ICON                   '\\uF17B'               # \n        LINUX_ARCH_ICON                '\\uF303'               # \n        LINUX_CENTOS_ICON              '\\uF304'$s             # \n        LINUX_COREOS_ICON              '\\uF305'$s             # \n        LINUX_DEBIAN_ICON              '\\uF306'               # \n        LINUX_RASPBIAN_ICON            '\\uF315'               # \n        LINUX_ELEMENTARY_ICON          '\\uF309'$s             # \n        LINUX_FEDORA_ICON              '\\uF30a'$s             # \n        LINUX_GENTOO_ICON              '\\uF30d'$s             # \n        LINUX_MAGEIA_ICON              '\\uF310'               # \n        LINUX_MINT_ICON                '\\uF30e'$s             # \n        LINUX_NIXOS_ICON               '\\uF313'$s             # \n        LINUX_MANJARO_ICON             '\\uF312'$s             # \n        LINUX_DEVUAN_ICON              '\\uF307'$s             # \n        LINUX_ALPINE_ICON              '\\uF300'$s             # \n        LINUX_AOSC_ICON                '\\uF301'$s             # \n        LINUX_OPENSUSE_ICON            '\\uF314'$s             # \n        LINUX_SABAYON_ICON             '\\uF317'$s             # \n        LINUX_SLACKWARE_ICON           '\\uF319'$s             # \n        LINUX_VOID_ICON                '\\uF17C'               # \n        LINUX_ARTIX_ICON               '\\uF17C'               # \n        LINUX_UBUNTU_ICON              '\\uF31b'$s             # \n        LINUX_KALI_ICON                '\\uF17C'               # \n        LINUX_RHEL_ICON                '\\uF316'$s             # \n        LINUX_AMZN_ICON                '\\uF270'$s             # \n        LINUX_ENDEAVOUROS_ICON         '\\uF17C'               # \n        LINUX_ROCKY_ICON               '\\uF17C'               # \n        LINUX_ALMALINUX_ICON           '\\uF17C'               # \n        LINUX_GUIX_ICON                '\\uF325'$s             # \n        LINUX_NEON_ICON                '\\uF17C'               # \n        LINUX_ICON                     '\\uF17C'               # \n        SUNOS_ICON                     '\\uF185 '              # \n        HOME_ICON                      '\\uF015'$s             # \n        HOME_SUB_ICON                  '\\uF07C'$s             # \n        FOLDER_ICON                    '\\uF115'$s             # \n        ETC_ICON                       '\\uF013'$s             # \n        NETWORK_ICON                   '\\uF50D'$s             # \n        LOAD_ICON                      '\\uF080 '              # \n        SWAP_ICON                      '\\uF464'$s             # \n        RAM_ICON                       '\\uF0E4'$s             # \n        SERVER_ICON                    '\\uF0AE'$s             # \n        VCS_UNTRACKED_ICON             '\\uF059'$s             # \n        VCS_UNSTAGED_ICON              '\\uF06A'$s             # \n        VCS_STAGED_ICON                '\\uF055'$s             # \n        VCS_STASH_ICON                 '\\uF01C '              # \n        VCS_INCOMING_CHANGES_ICON      '\\uF01A '              # \n        VCS_OUTGOING_CHANGES_ICON      '\\uF01B '              # \n        VCS_TAG_ICON                   '\\uF02B '              # \n        VCS_BOOKMARK_ICON              '\\uF461 '              # \n        VCS_COMMIT_ICON                '\\uE729 '              # \n        VCS_BRANCH_ICON                '\\uF126 '              # \n        VCS_REMOTE_BRANCH_ICON         '\\uE728 '              # \n        VCS_LOADING_ICON               ''\n        VCS_GIT_ICON                   '\\uF1D3 '              # \n        VCS_GIT_GITHUB_ICON            '\\uF113 '              # \n        VCS_GIT_BITBUCKET_ICON         '\\uE703 '              # \n        VCS_GIT_GITLAB_ICON            '\\uF296 '              # \n        VCS_GIT_AZURE_ICON             '\\uFD03 '              # ﴃ\n        VCS_GIT_ARCHLINUX_ICON         '\\uF303 '              # \n        VCS_GIT_CODEBERG_ICON          '\\uF1D3 '              # \n        VCS_GIT_DEBIAN_ICON            '\\uF306 '              # \n        VCS_GIT_FREEBSD_ICON           '\\UF30C '              # \n        VCS_GIT_FREEDESKTOP_ICON       '\\uF296 '              # \n        VCS_GIT_GNOME_ICON             '\\uF296 '              # \n        VCS_GIT_GNU_ICON               '\\uE779 '              # \n        VCS_GIT_KDE_ICON               '\\uF296 '              # \n        VCS_GIT_LINUX_ICON             '\\uF17C '              # \n        VCS_GIT_GITEA_ICON             '\\uF1D3 '              # \n        VCS_GIT_SOURCEHUT_ICON         '\\uF1DB '              # \n        VCS_HG_ICON                    '\\uF0C3 '              # \n        VCS_SVN_ICON                   '\\uE72D'$q             # \n        RUST_ICON                      '\\uE7A8'$q             # \n        PYTHON_ICON                    '\\UE73C '              # \n        CHEZMOI_ICON                   '\\uF015'$s             # \n        SWIFT_ICON                     '\\uE755'               # \n        GO_ICON                        '\\uE626'               # \n        GOLANG_ICON                    '\\uE626'               # \n        PUBLIC_IP_ICON                 '\\UF0AC'$s             # \n        LOCK_ICON                      '\\UF023'               # \n        NORDVPN_ICON                   '\\UF023'               # \n        EXECUTION_TIME_ICON            '\\uF252'$s             # \n        SSH_ICON                       '\\uF489'$s             # \n        VPN_ICON                       '\\UF023'\n        KUBERNETES_ICON                '\\U2388'               # ⎈\n        DROPBOX_ICON                   '\\UF16B'$s             # \n        DATE_ICON                      '\\uF073 '              # \n        TIME_ICON                      '\\uF017 '              # \n        JAVA_ICON                      '\\uE738'               # \n        LARAVEL_ICON                   '\\ue73f'$q             # \n        RANGER_ICON                    '\\uF00b '              # \n        YAZI_ICON                      '\\uF00b '              # \n        MIDNIGHT_COMMANDER_ICON        'mc'\n        VIM_ICON                       '\\uE62B'               # \n        TERRAFORM_ICON                 '\\uF1BB '              # \n        PROXY_ICON                     '\\u2194'               # ↔\n        DOTNET_ICON                    '\\uE77F'               # \n        DOTNET_CORE_ICON               '\\uE77F'               # \n        AZURE_ICON                     '\\uFD03'               # ﴃ\n        DIRENV_ICON                    '\\u25BC'               # ▼\n        FLUTTER_ICON                   'F'\n        GCLOUD_ICON                    '\\uF7B7'               # \n        LUA_ICON                       '\\uE620'               # \n        PERL_ICON                      '\\uE769'               # \n        NNN_ICON                       'nnn'\n        LF_ICON                        'lf'\n        XPLR_ICON                      'xplr'\n        TIMEWARRIOR_ICON               '\\uF49B'               # \n        TASKWARRIOR_ICON               '\\uF4A0 '              # \n        NIX_SHELL_ICON                 '\\uF313 '              # \n        WIFI_ICON                      '\\uF1EB '              # \n        ERLANG_ICON                    '\\uE7B1 '              # \n        ELIXIR_ICON                    '\\uE62D'               # \n        POSTGRES_ICON                  '\\uE76E'               # \n        PHP_ICON                       '\\uE608'               # \n        HASKELL_ICON                   '\\uE61F'               # \n        PACKAGE_ICON                   '\\uF8D6'               # \n        JULIA_ICON                     '\\uE624'               # \n        SCALA_ICON                     '\\uE737'               # \n        TOOLBOX_ICON                   '\\uE20F'$s             # \n        ARCH_ICON                      '\\uE266'               # \n        HISTORY_ICON                   '\\uF1DA'$s             # \n      )\n    ;;\n    ascii)\n      icons=(\n        RULER_CHAR                     '-'\n        LEFT_SEGMENT_SEPARATOR         ''\n        RIGHT_SEGMENT_SEPARATOR        ''\n        LEFT_SEGMENT_END_SEPARATOR     ' '\n        LEFT_SUBSEGMENT_SEPARATOR      '|'\n        RIGHT_SUBSEGMENT_SEPARATOR     '|'\n        CARRIAGE_RETURN_ICON           ''\n        ROOT_ICON                      '#'\n        SUDO_ICON                      ''\n        RUBY_ICON                      'rb'\n        AWS_ICON                       'aws'\n        AWS_EB_ICON                    'eb'\n        BACKGROUND_JOBS_ICON           '%%'\n        TEST_ICON                      ''\n        TODO_ICON                      'todo'\n        BATTERY_ICON                   'battery'\n        DISK_ICON                      'disk'\n        OK_ICON                        'ok'\n        FAIL_ICON                      'err'\n        SYMFONY_ICON                   'symphony'\n        NODE_ICON                      'node'\n        NODEJS_ICON                    'node'\n        MULTILINE_FIRST_PROMPT_PREFIX  ''\n        MULTILINE_NEWLINE_PROMPT_PREFIX ''\n        MULTILINE_LAST_PROMPT_PREFIX   ''\n        APPLE_ICON                     'mac'\n        WINDOWS_ICON                   'win'\n        FREEBSD_ICON                   'bsd'\n        ANDROID_ICON                   'android'\n        LINUX_ICON                     'linux'\n        LINUX_ARCH_ICON                'arch'\n        LINUX_DEBIAN_ICON              'debian'\n        LINUX_RASPBIAN_ICON            'pi'\n        LINUX_UBUNTU_ICON              'ubuntu'\n        LINUX_KALI_ICON                'kali'\n        LINUX_CENTOS_ICON              'centos'\n        LINUX_COREOS_ICON              'coreos'\n        LINUX_ELEMENTARY_ICON          'elementary'\n        LINUX_MINT_ICON                'mint'\n        LINUX_FEDORA_ICON              'fedora'\n        LINUX_GENTOO_ICON              'gentoo'\n        LINUX_MAGEIA_ICON              'mageia'\n        LINUX_NIXOS_ICON               'nixos'\n        LINUX_MANJARO_ICON             'manjaro'\n        LINUX_DEVUAN_ICON              'devuan'\n        LINUX_ALPINE_ICON              'alpine'\n        LINUX_AOSC_ICON                'aosc'\n        LINUX_OPENSUSE_ICON            'suse'\n        LINUX_SABAYON_ICON             'sabayon'\n        LINUX_SLACKWARE_ICON           'slack'\n        LINUX_VOID_ICON                'void'\n        LINUX_ARTIX_ICON               'artix'\n        LINUX_RHEL_ICON                'rhel'\n        LINUX_AMZN_ICON                'amzn'\n        LINUX_ENDEAVOUROS_ICON         'edvos'\n        LINUX_ROCKY_ICON               'rocky'\n        LINUX_ALMALINUX_ICON           'alma'\n        LINUX_GUIX_ICON                'guix'\n        LINUX_NEON_ICON                'neon'\n        SUNOS_ICON                     'sunos'\n        HOME_ICON                      ''\n        HOME_SUB_ICON                  ''\n        FOLDER_ICON                    ''\n        ETC_ICON                       ''\n        NETWORK_ICON                   'ip'\n        LOAD_ICON                      'cpu'\n        SWAP_ICON                      'swap'\n        RAM_ICON                       'ram'\n        SERVER_ICON                    ''\n        VCS_UNTRACKED_ICON             '?'\n        VCS_UNSTAGED_ICON              '!'\n        VCS_STAGED_ICON                '+'\n        VCS_STASH_ICON                 '#'\n        VCS_INCOMING_CHANGES_ICON      '<'\n        VCS_OUTGOING_CHANGES_ICON      '>'\n        VCS_TAG_ICON                   ''\n        VCS_BOOKMARK_ICON              '^'\n        VCS_COMMIT_ICON                '@'\n        VCS_BRANCH_ICON                ''\n        VCS_REMOTE_BRANCH_ICON         ':'\n        VCS_LOADING_ICON               ''\n        VCS_GIT_ICON                   ''\n        VCS_GIT_GITHUB_ICON            ''\n        VCS_GIT_BITBUCKET_ICON         ''\n        VCS_GIT_GITLAB_ICON            ''\n        VCS_GIT_AZURE_ICON             ''\n        VCS_GIT_ARCHLINUX_ICON         ''\n        VCS_GIT_CODEBERG_ICON          ''\n        VCS_GIT_DEBIAN_ICON            ''\n        VCS_GIT_FREEBSD_ICON           ''\n        VCS_GIT_FREEDESKTOP_ICON       ''\n        VCS_GIT_GNOME_ICON             ''\n        VCS_GIT_GNU_ICON               ''\n        VCS_GIT_KDE_ICON               ''\n        VCS_GIT_LINUX_ICON             ''\n        VCS_GIT_GITEA_ICON             ''\n        VCS_GIT_SOURCEHUT_ICON         ''\n        VCS_HG_ICON                    ''\n        VCS_SVN_ICON                   ''\n        RUST_ICON                      'rust'\n        PYTHON_ICON                    'py'\n        CHEZMOI_ICON                   'chezmoi'\n        SWIFT_ICON                     'swift'\n        GO_ICON                        'go'\n        GOLANG_ICON                    'go'\n        PUBLIC_IP_ICON                 'ip'\n        LOCK_ICON                      '!w'\n        NORDVPN_ICON                   'nordvpn'\n        EXECUTION_TIME_ICON            ''\n        SSH_ICON                       'ssh'\n        VPN_ICON                       'vpn'\n        KUBERNETES_ICON                'kube'\n        DROPBOX_ICON                   'dropbox'\n        DATE_ICON                      ''\n        TIME_ICON                      ''\n        JAVA_ICON                      'java'\n        LARAVEL_ICON                   ''\n        RANGER_ICON                    'ranger'\n        YAZI_ICON                      'yazi'\n        MIDNIGHT_COMMANDER_ICON        'mc'\n        VIM_ICON                       'vim'\n        TERRAFORM_ICON                 'tf'\n        PROXY_ICON                     'proxy'\n        DOTNET_ICON                    '.net'\n        DOTNET_CORE_ICON               '.net'\n        AZURE_ICON                     'az'\n        DIRENV_ICON                    'direnv'\n        FLUTTER_ICON                   'flutter'\n        GCLOUD_ICON                    'gcloud'\n        LUA_ICON                       'lua'\n        PERL_ICON                      'perl'\n        NNN_ICON                       'nnn'\n        LF_ICON                        'lf'\n        XPLR_ICON                      'xplr'\n        TIMEWARRIOR_ICON               'tw'\n        TASKWARRIOR_ICON               'task'\n        NIX_SHELL_ICON                 'nix'\n        WIFI_ICON                      'wifi'\n        ERLANG_ICON                    'erlang'\n        ELIXIR_ICON                    'elixir'\n        POSTGRES_ICON                  'postgres'\n        PHP_ICON                       'php'\n        HASKELL_ICON                   'hs'\n        PACKAGE_ICON                   'pkg'\n        JULIA_ICON                     'jl'\n        SCALA_ICON                     'scala'\n        TOOLBOX_ICON                   'toolbox'\n        ARCH_ICON                      'arch'\n        HISTORY_ICON                   'hist'\n      )\n    ;;\n    *)\n      # Powerline-Patched Font required!\n      # See https://github.com/Lokaltog/powerline-fonts\n      icons=(\n        RULER_CHAR                     '\\u2500'               # ─\n        LEFT_SEGMENT_SEPARATOR         '\\uE0B0'               # \n        RIGHT_SEGMENT_SEPARATOR        '\\uE0B2'               # \n        LEFT_SEGMENT_END_SEPARATOR     ' '                    # Whitespace\n        LEFT_SUBSEGMENT_SEPARATOR      '\\uE0B1'               # \n        RIGHT_SUBSEGMENT_SEPARATOR     '\\uE0B3'               # \n        CARRIAGE_RETURN_ICON           '\\u21B5'               # ↵\n        ROOT_ICON                      '\\u26A1'               # ⚡\n        SUDO_ICON                      ''\n        RUBY_ICON                      'Ruby'\n        AWS_ICON                       'AWS'\n        AWS_EB_ICON                    '\\U1F331'$q            # 🌱\n        BACKGROUND_JOBS_ICON           '\\u2699'               # ⚙\n        TEST_ICON                      ''\n        TODO_ICON                      '\\u2206'               # ∆\n        BATTERY_ICON                   '\\U1F50B'              # 🔋\n        DISK_ICON                      'hdd'\n        OK_ICON                        '\\u2714'               # ✔\n        FAIL_ICON                      '\\u2718'               # ✘\n        SYMFONY_ICON                   'SF'\n        NODE_ICON                      'Node'\n        NODEJS_ICON                    'Node'\n        MULTILINE_FIRST_PROMPT_PREFIX  '\\u256D\\U2500'         # ╭─\n        MULTILINE_NEWLINE_PROMPT_PREFIX '\\u251C\\U2500'        # ├─\n        MULTILINE_LAST_PROMPT_PREFIX   '\\u2570\\U2500 '        # ╰─\n        APPLE_ICON                     'OSX'\n        WINDOWS_ICON                   'WIN'\n        FREEBSD_ICON                   'BSD'\n        ANDROID_ICON                   'And'\n        LINUX_ICON                     'Lx'\n        LINUX_ARCH_ICON                'Arc'\n        LINUX_DEBIAN_ICON              'Deb'\n        LINUX_RASPBIAN_ICON            'RPi'\n        LINUX_UBUNTU_ICON              'Ubu'\n        LINUX_KALI_ICON                'Kal'\n        LINUX_CENTOS_ICON              'Cen'\n        LINUX_COREOS_ICON              'Cor'\n        LINUX_ELEMENTARY_ICON          'Elm'\n        LINUX_MINT_ICON                'LMi'\n        LINUX_FEDORA_ICON              'Fed'\n        LINUX_GENTOO_ICON              'Gen'\n        LINUX_MAGEIA_ICON              'Mag'\n        LINUX_NIXOS_ICON               'Nix'\n        LINUX_MANJARO_ICON             'Man'\n        LINUX_DEVUAN_ICON              'Dev'\n        LINUX_ALPINE_ICON              'Alp'\n        LINUX_AOSC_ICON                'Aos'\n        LINUX_OPENSUSE_ICON            'OSu'\n        LINUX_SABAYON_ICON             'Sab'\n        LINUX_SLACKWARE_ICON           'Sla'\n        LINUX_VOID_ICON                'Vo'\n        LINUX_ARTIX_ICON               'Art'\n        LINUX_RHEL_ICON                'RH'\n        LINUX_AMZN_ICON                'Amzn'\n        LINUX_ENDEAVOUROS_ICON         'Edv'\n        LINUX_ROCKY_ICON               'Roc'\n        LINUX_ALMALINUX_ICON           'Alma'\n        LINUX_GUIX_ICON                'Guix'\n        LINUX_NEON_ICON                'Neon'\n        SUNOS_ICON                     'Sun'\n        HOME_ICON                      ''\n        HOME_SUB_ICON                  ''\n        FOLDER_ICON                    ''\n        ETC_ICON                       '\\u2699'               # ⚙\n        NETWORK_ICON                   'IP'\n        LOAD_ICON                      'L'\n        SWAP_ICON                      'SWP'\n        RAM_ICON                       'RAM'\n        SERVER_ICON                    ''\n        VCS_UNTRACKED_ICON             '?'\n        VCS_UNSTAGED_ICON              '\\u25CF'               # ●\n        VCS_STAGED_ICON                '\\u271A'               # ✚\n        VCS_STASH_ICON                 '\\u235F'               # ⍟\n        VCS_INCOMING_CHANGES_ICON      '\\u2193'               # ↓\n        VCS_OUTGOING_CHANGES_ICON      '\\u2191'               # ↑\n        VCS_TAG_ICON                   ''\n        VCS_BOOKMARK_ICON              '\\u263F'               # ☿\n        VCS_COMMIT_ICON                ''\n        VCS_BRANCH_ICON                '\\uE0A0 '              # \n        VCS_REMOTE_BRANCH_ICON         '\\u2192'               # →\n        VCS_LOADING_ICON               ''\n        VCS_GIT_ICON                   ''\n        VCS_GIT_GITHUB_ICON            ''\n        VCS_GIT_BITBUCKET_ICON         ''\n        VCS_GIT_GITLAB_ICON            ''\n        VCS_GIT_AZURE_ICON             ''\n        VCS_GIT_ARCHLINUX_ICON         ''\n        VCS_GIT_CODEBERG_ICON          ''\n        VCS_GIT_DEBIAN_ICON            ''\n        VCS_GIT_FREEBSD_ICON           ''\n        VCS_GIT_FREEDESKTOP_ICON       ''\n        VCS_GIT_GNOME_ICON             ''\n        VCS_GIT_GNU_ICON               ''\n        VCS_GIT_KDE_ICON               ''\n        VCS_GIT_LINUX_ICON             ''\n        VCS_GIT_GITEA_ICON             ''\n        VCS_GIT_SOURCEHUT_ICON         ''\n        VCS_HG_ICON                    ''\n        VCS_SVN_ICON                   ''\n        RUST_ICON                      'R'\n        PYTHON_ICON                    'Py'\n        CHEZMOI_ICON                   'Chez'\n        SWIFT_ICON                     'Swift'\n        GO_ICON                        'Go'\n        GOLANG_ICON                    'Go'\n        PUBLIC_IP_ICON                 'IP'\n        LOCK_ICON                      '\\UE0A2'\n        NORDVPN_ICON                   '\\UE0A2'\n        EXECUTION_TIME_ICON            ''\n        SSH_ICON                       'ssh'\n        VPN_ICON                       'vpn'\n        KUBERNETES_ICON                '\\U2388'               # ⎈\n        DROPBOX_ICON                   'Dropbox'\n        DATE_ICON                      ''\n        TIME_ICON                      ''\n        JAVA_ICON                      '\\U2615'               # ☕︎\n        LARAVEL_ICON                   ''\n        RANGER_ICON                    '\\u2B50'               # ⭐\n        YAZI_ICON                      '\\u2B50'               # ⭐\n        MIDNIGHT_COMMANDER_ICON        'mc'\n        VIM_ICON                       'vim'\n        TERRAFORM_ICON                 'tf'\n        PROXY_ICON                     '\\u2194'               # ↔\n        DOTNET_ICON                    '.NET'\n        DOTNET_CORE_ICON               '.NET'\n        AZURE_ICON                     '\\u2601'               # ☁\n        DIRENV_ICON                    '\\u25BC'               # ▼\n        FLUTTER_ICON                   'F'\n        GCLOUD_ICON                    'G'\n        LUA_ICON                       'lua'\n        PERL_ICON                      'perl'\n        NNN_ICON                       'nnn'\n        LF_ICON                        'lf'\n        XPLR_ICON                      'xplr'\n        TIMEWARRIOR_ICON               'tw'\n        TASKWARRIOR_ICON               'task'\n        NIX_SHELL_ICON                 'nix'\n        WIFI_ICON                      'WiFi'\n        ERLANG_ICON                    'erl'\n        ELIXIR_ICON                    'elixir'\n        POSTGRES_ICON                  'postgres'\n        PHP_ICON                       'php'\n        HASKELL_ICON                   'hs'\n        PACKAGE_ICON                   'pkg'\n        JULIA_ICON                     'jl'\n        SCALA_ICON                     'scala'\n        TOOLBOX_ICON                   '\\u2B22'               # ⬢\n        ARCH_ICON                      'arch'\n        HISTORY_ICON                   'hist'\n      )\n    ;;\n  esac\n\n  # Override the above icon settings with any user-defined variables.\n  case $POWERLEVEL9K_MODE in\n    'flat')\n      icons[LEFT_SEGMENT_SEPARATOR]=''\n      icons[RIGHT_SEGMENT_SEPARATOR]=''\n      icons[LEFT_SUBSEGMENT_SEPARATOR]='|'\n      icons[RIGHT_SUBSEGMENT_SEPARATOR]='|'\n    ;;\n    'compatible')\n      icons[LEFT_SEGMENT_SEPARATOR]='\\u2B80'                  # ⮀\n      icons[RIGHT_SEGMENT_SEPARATOR]='\\u2B82'                 # ⮂\n      icons[VCS_BRANCH_ICON]='@'\n    ;;\n  esac\n\n  if [[ $POWERLEVEL9K_ICON_PADDING == none && $POWERLEVEL9K_MODE != ascii ]]; then\n    icons=(\"${(@kv)icons%% #}\")\n    icons[LEFT_SEGMENT_END_SEPARATOR]+=' '\n    icons[MULTILINE_LAST_PROMPT_PREFIX]+=' '\n    icons[VCS_TAG_ICON]+=' '\n    icons[VCS_BOOKMARK_ICON]+=' '\n    icons[VCS_COMMIT_ICON]+=' '\n    icons[VCS_BRANCH_ICON]+=' '\n    icons[VCS_REMOTE_BRANCH_ICON]+=' '\n  fi\n}\n\n# Sadly, this is a part of public API. Its use is emphatically discouraged.\nfunction print_icon() {\n  eval \"$__p9k_intro\"\n  _p9k_init_icons\n  local var=POWERLEVEL9K_$1\n  if (( $+parameters[$var] )); then\n    echo -n - ${(P)var}\n  else\n    echo -n - $icons[$1]\n  fi\n}\n\n# Prints a list of configured icons.\n#\n#   * $1 string - If \"original\", then the original icons are printed,\n#                 otherwise \"print_icon\" is used, which takes the users\n#                 overrides into account.\nfunction get_icon_names() {\n  eval \"$__p9k_intro\"\n  _p9k_init_icons\n  local key\n  for key in ${(@kon)icons}; do\n    echo -n - \"POWERLEVEL9K_$key: \"\n    print -nP \"%K{red} %k\"\n    if [[ $1 == original ]]; then\n      echo -n - $icons[$key]\n    else\n      print_icon $key\n    fi\n    print -P \"%K{red} %k\"\n  done\n}\n"
  },
  {
    "path": "internal/notes.md",
    "content": "battery: use the same technique as in vpn_ip to avoid reset=2.\n\n---\n\nimplement fake gitstatus api on top of vcs_info (or plain git?) + worker and use it if there is no\ngitstatus.\n\n---\n\n- call vcs_info on worker. the tricky question is what to display while \"loading\".\n\n---\n\n- add _SHOW_SYSTEM to all *env segments.\n\n---\n\n- support states in SHOW_ON_COMMAND: POWERLEVEL9K_SEGMENT_STATE_SHOW_ON_COMMAND='...'\n\n---\n\nadd POWERLEVEL9K_${SEGMENT}_${STATE}_SHOW_IN_DIR='pwd_pattern'; implement the same way as\nSHOW_ON_UPGLOB. how should it interact with POWERLEVEL9K_${SEGMENT}_DISABLED_DIR_PATTERN?\n\n---\n\nadd `p10k upglob`; returns 0 on match and sets REPLY to the directory where match was found.\n\n---\n\nwhen directory cannot be shortened any further, start chopping off segments from the left and\nreplacing the chopped off part with `…`. e.g., `…/x/anchor/y/anchor`. the shortest dir\nrepresentation is thus `…/last` or `…/last` depending on whether the last segment is an anchor.\nthe replacement parameter's value is `…/` (with a slash) to allow for `x/anchor/y/anchor`.\n\n---\n\n- add to faq: how do i display an environment variable in prompt? link it from \"extensible\"\n\n---\n\n- add to faq: how do i display an icon in prompt? link it from \"extensible\"\n\n---\n\n- add root_indicator to config templates\n\n---\n\n- test chruby and add it to config templates\n\n---\n\n- add ssh to config templates\n\n---\n\n- add swift version to config templates; see if there is a good pattern for PROJECT_ONLY\n\n---\n\n- add swiftenv\n\n---\n\n- add faq: how to customize directory shortening? mention POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER,\nPOWERLEVEL9K_DIR_MAX_LENGTH and co., and truncate_to_last.\n\n---\n\nfix a bug in zsh: https://github.com/romkatv/powerlevel10k/issues/502. to reproduce:\n\n```zsh\nemulate zsh -o prompt_percent -c 'print -P \"%F{#ff0000}red%F{green}%B bold green\"'\n```\n\n---\n\nadd `p10k explain` that prints something like this:\n\n```text\nsegment     icons meaning\n\n---\n\n---\n\n---\n\n---\n\n---\n\n---\n\n---\n\n---\n--\nstatus      ✔  ✘  exit code of the last command\n```\n\nimplement it the hard way: for every enabled segment go over all its {state,icon} pairs, resolve\nthe icon (if not absolute), apply VISUAL_IDENTIFIER_EXPANSION, remove leading and trailing\nwhitespace and print without formatting (sort of like `print -P | cat`); print segment names in\ngreen and icons in bold; battery can have an unlimited number of icons, so `...` would be needed\n(based on total length of concatenated icons rather than the number of icons); user-defined\nsegments would have \"unknown\" icons by default (yellow and not bold); can allow them to\nparticipate by defining `explainprompt_foo` that populates array `reply` with strings like this:\n'-s STATE -i LOCK_ICON +r'; the first element must be segment description.\n\n---\n\nadd `docker_context` prompt segment; similar to `kubecontext`; the data should come from\n`currentContext` field in `~/.docker/config.json` (according to\nhttps://github.com/starship/starship/issues/995); there is also `DOCKER_CONTEXT`; more info:\nhttps://docs.docker.com/engine/reference/commandline/context_use; also\nhttps://github.com/starship/starship/pull/996.\n\n---\n\nsupport `env`, `ionice` and `strace` precommands in `parser.zsh`.\n\n---\n\nAdd ruler to configuration wizard. Options: `─`, `·`, `╌`, `┄`, `▁`, `═`.\n\n---\n\nAdd frame styles to the wizard.\n\n```text\n╭─\n╰─\n\n┌─\n└─\n\n┏━\n┗━\n\n╔═\n╚═\n\n▛▀\n▙▄\n```\n\nPrompt connection should have matching options.\n\n---\n\nAdd `POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_MIRROR_SEPARATOR`. If set, left segments get separated with\n`POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR` followed by `POWERLEVEL9K_LEFT_SEGMENT_MIRROR_SEPARATOR`.\nEach is drawn without background. The first with the foreground of left segment, the second with\nthe background of right segment. To insert space in between, embed it in\n`POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_MIRROR_SEPARATOR`.\n`POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR` is unused.\n\n---\n\nAdd *Segment Connection* screen to configuration wizard with options *Fused*, *Touching* and\n*Disjoint*. The last two differ by the absence/presence of space between `SEGMENT_SEPARATOR` and\n`SEGMENT_MIRROR_SEPARATOR`.\n\n*Fused* requires line separator (there is already a screen for it) but the other two options require\ntwo filled separators similar to heads and tail. Figure out how to present this choice.\n\n---\n\nOptimize auto-wizard check.\n\n```text\ntime ( repeat 1000 [[ -z \"${parameters[(I)POWERLEVEL9K_*~(POWERLEVEL9K_MODE|POWERLEVEL9K_CONFIG_FILE)]}\" ]] )\nuser=0.21s system=0.05s cpu=99% total=0.264\n\ntime ( repeat 1000 [[ -z \"${parameters[(I)POWERLEVEL9K_*]}\" ]] )\nuser=0.17s system=0.00s cpu=99% total=0.175\n```\n\n---\n\nAdd the equivalent of `P9K_PYTHON_VERSION` to all `*env` segments where it makes sense.\n\n---\n\nDefine `P9K_ICON` on initialization. Fill it with `$icon`. Duplicate every key that ends in `_ICON`.\nRespect `POWERLEVEL9K_VCS_STASH_ICON` overrides but not anything with segment name or state.\n\nDefine `POWERLEVEL9K_VCS_*` parameters in config templates for all symbols used in\n`my_git_formatter`. Add missing entries to `icons`. Use `$P9K_ICON[...]` within `my_git_formatter`.\nAdd a screen to the wizard to choose between clear and circled icons.\n\n---\n\nAdd a screen to the wizard asking whether to set `POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'`.\nShow it only if there is `$HOME/.git`. By default this parameter should be commented out.\n"
  },
  {
    "path": "internal/p10k.zsh",
    "content": "if [[ $__p9k_sourced != 13 ]]; then\n  >&2 print -P \"\"\n  >&2 print -P \"[%F{1}ERROR%f]: Corrupted powerlevel10k installation.\"\n  >&2 print -P \"\"\n  if (( ${+functions[antigen]} )); then\n    >&2 print -P \"If using %Bantigen%b, run the following command to fix:\"\n    >&2 print -P \"\"\n    >&2 print -P \"    %F{2}antigen%f reset\"\n    if [[ -d ~/.antigen ]]; then\n      >&2 print -P \"\"\n      >&2 print -P \"If it doesn't help, try this:\"\n      >&2 print -P \"\"\n      >&2 print -P \"    %F{2}rm%f -rf %U~/.antigen%u\"\n    fi\n  else\n    >&2 print -P \"Try resetting cache in your plugin manager or\"\n    >&2 print -P \"reinstalling powerlevel10k from scratch.\"\n  fi\n  >&2 print -P \"\"\n  return 1\nfi\n\nif [[ $ZSH_VERSION != (5.<1->*|<6->.*) ]]; then\n  () {\n    >&2 echo -E \"You are using ZSH version $ZSH_VERSION. The minimum required version for Powerlevel10k is 5.1.\"\n    >&2 echo -E \"Type 'echo \\$ZSH_VERSION' to see your current zsh version.\"\n    local def=${SHELL:c:A}\n    local cur=${${ZSH_ARGZERO#-}:c:A}\n    local cur_v=\"$($cur -c 'echo -E $ZSH_VERSION' 2>/dev/null)\"\n    if [[ $cur_v == $ZSH_VERSION && $cur != $def ]]; then\n      >&2 echo -E \"The shell you are currently running is likely $cur.\"\n    fi\n    local other=${${:-zsh}:c}\n    if [[ -n $other ]] && $other -fc '[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]' &>/dev/null; then\n      local other_v=\"$($other -fc 'echo -E $ZSH_VERSION' 2>/dev/null)\"\n      if [[ -n $other_v && $other_v != $ZSH_VERSION ]]; then\n        >&2 echo -E \"You have $other with version $other_v but this is not what you are using.\"\n        if [[ -n $def && $def != ${other:A} ]]; then\n          >&2 echo -E \"To change your user shell, type the following command:\"\n          >&2 echo -E \"\"\n          if [[ \"$(grep -F $other /etc/shells 2>/dev/null)\" != $other ]]; then\n            >&2 echo -E \"  echo ${(q-)other} | sudo tee -a /etc/shells\"\n          fi\n          >&2 echo -E \"  chsh -s ${(q-)other}\"\n        fi\n      fi\n    fi\n  }\n  return 1\nfi\n\nbuiltin source \"${__p9k_root_dir}/internal/configure.zsh\"\nbuiltin source \"${__p9k_root_dir}/internal/worker.zsh\"\nbuiltin source \"${__p9k_root_dir}/internal/parser.zsh\"\nbuiltin source \"${__p9k_root_dir}/internal/icons.zsh\"\n\n# For compatibility with Powerlevel9k. It's not recommended to use mnemonic color\n# names in the configuration except for colors 0-7 as these are standard.\ntypeset -grA __p9k_colors=(\n            black 000               red 001             green 002            yellow 003\n             blue 004           magenta 005              cyan 006             white 007\n             grey 008            maroon 009              lime 010             olive 011\n             navy 012           fuchsia 013              aqua 014              teal 014\n           silver 015             grey0 016          navyblue 017          darkblue 018\n            blue3 020             blue1 021         darkgreen 022      deepskyblue4 025\n      dodgerblue3 026       dodgerblue2 027            green4 028      springgreen4 029\n       turquoise4 030      deepskyblue3 032       dodgerblue1 033          darkcyan 036\n    lightseagreen 037      deepskyblue2 038      deepskyblue1 039            green3 040\n     springgreen3 041             cyan3 043     darkturquoise 044        turquoise2 045\n           green1 046      springgreen2 047      springgreen1 048 mediumspringgreen 049\n            cyan2 050             cyan1 051           purple4 055           purple3 056\n       blueviolet 057            grey37 059     mediumpurple4 060        slateblue3 062\n       royalblue1 063       chartreuse4 064    paleturquoise4 066         steelblue 067\n       steelblue3 068    cornflowerblue 069     darkseagreen4 071         cadetblue 073\n         skyblue3 074       chartreuse3 076         seagreen3 078       aquamarine3 079\n  mediumturquoise 080        steelblue1 081         seagreen2 083         seagreen1 085\n   darkslategray2 087           darkred 088       darkmagenta 091           orange4 094\n       lightpink4 095             plum4 096     mediumpurple3 098        slateblue1 099\n           wheat4 101            grey53 102    lightslategrey 103      mediumpurple 104\n   lightslateblue 105           yellow4 106      darkseagreen 108     lightskyblue3 110\n         skyblue2 111       chartreuse2 112        palegreen3 114    darkslategray3 116\n         skyblue1 117       chartreuse1 118        lightgreen 120       aquamarine1 122\n   darkslategray1 123         deeppink4 125   mediumvioletred 126        darkviolet 128\n           purple 129     mediumorchid3 133      mediumorchid 134     darkgoldenrod 136\n        rosybrown 138            grey63 139     mediumpurple2 140     mediumpurple1 141\n        darkkhaki 143      navajowhite3 144            grey69 145   lightsteelblue3 146\n   lightsteelblue 147   darkolivegreen3 149     darkseagreen3 150        lightcyan3 152\n    lightskyblue1 153       greenyellow 154   darkolivegreen2 155        palegreen1 156\n    darkseagreen2 157    paleturquoise1 159              red3 160         deeppink3 162\n         magenta3 164       darkorange3 166         indianred 167          hotpink3 168\n         hotpink2 169            orchid 170           orange3 172      lightsalmon3 173\n       lightpink3 174             pink3 175             plum3 176            violet 177\n            gold3 178   lightgoldenrod3 179               tan 180        mistyrose3 181\n         thistle3 182             plum2 183           yellow3 184            khaki3 185\n     lightyellow3 187            grey84 188   lightsteelblue1 189           yellow2 190\n  darkolivegreen1 192     darkseagreen1 193         honeydew2 194        lightcyan1 195\n             red1 196         deeppink2 197         deeppink1 199          magenta2 200\n         magenta1 201        orangered1 202        indianred1 204           hotpink 206\n    mediumorchid1 207        darkorange 208           salmon1 209        lightcoral 210\n   palevioletred1 211           orchid2 212           orchid1 213           orange1 214\n       sandybrown 215      lightsalmon1 216        lightpink1 217             pink1 218\n            plum1 219             gold1 220   lightgoldenrod2 222      navajowhite1 223\n       mistyrose1 224          thistle1 225           yellow1 226   lightgoldenrod1 227\n           khaki1 228            wheat1 229         cornsilk1 230           grey100 231\n            grey3 232             grey7 233            grey11 234            grey15 235\n           grey19 236            grey23 237            grey27 238            grey30 239\n           grey35 240            grey39 241            grey42 242            grey46 243\n           grey50 244            grey54 245            grey58 246            grey62 247\n           grey66 248            grey70 249            grey74 250            grey78 251\n           grey82 252            grey85 253            grey89 254            grey93 255)\n\n# For compatibility with Powerlevel9k.\n#\n# Type `getColorCode background` or `getColorCode foreground` to see the list of predefined colors.\nfunction getColorCode() {\n  eval \"$__p9k_intro\"\n  if (( ARGC == 1 )); then\n    case $1 in\n      foreground)\n        local k\n        for k in \"${(k@)__p9k_colors}\"; do\n          local v=${__p9k_colors[$k]}\n          print -rP -- \"%F{$v}$v - $k%f\"\n        done\n        return 0\n        ;;\n      background)\n        local k\n        for k in \"${(k@)__p9k_colors}\"; do\n          local v=${__p9k_colors[$k]}\n          print -rP -- \"%K{$v}$v - $k%k\"\n        done\n        return 0\n        ;;\n    esac\n  fi\n  echo \"Usage: getColorCode background|foreground\" >&2\n  return 1\n}\n\n# _p9k_declare <type> <uppercase-name> [default]...\nfunction _p9k_declare() {\n  local -i set=$+parameters[$2]\n  (( ARGC > 2 || set )) || return 0\n  case $1 in\n    -b)\n      if (( set )); then\n        [[ ${(P)2} == true ]] && typeset -gi _$2=1 || typeset -gi _$2=0\n      else\n        typeset -gi _$2=$3\n      fi\n      ;;\n    -a)\n      local -a v=(\"${(@P)2}\")\n      if (( set )); then\n        eval \"typeset -ga _${(q)2}=(${(@qq)v})\";\n      else\n        if [[ $3 != '--' ]]; then\n          echo \"internal error in _p9k_declare \" \"${(qqq)@}\" >&2\n        fi\n        eval \"typeset -ga _${(q)2}=(${(@qq)*[4,-1]})\"\n      fi\n      ;;\n    -i)\n      (( set )) && typeset -gi _$2=$2 || typeset -gi _$2=$3\n      ;;\n    -F)\n      (( set )) && typeset -gF _$2=$2 || typeset -gF _$2=$3\n      ;;\n    -s)\n      (( set )) && typeset -g _$2=${(P)2} || typeset -g _$2=$3\n      ;;\n    -e)\n      if (( set )); then\n        local v=${(P)2}\n        typeset -g _$2=${(g::)v}\n      else\n        typeset -g _$2=${(g::)3}\n      fi\n      ;;\n    *)\n      echo \"internal error in _p9k_declare \" \"${(qqq)@}\" >&2\n  esac\n}\n\nfunction _p9k_read_word() {\n  local -a stat\n  zstat -A stat +mtime -- $1 2>/dev/null || stat=(-1)\n  local cached=$_p9k__read_word_cache[$1]\n  if [[ $cached == $stat[1]:* ]]; then\n    _p9k__ret=${cached#*:}\n  else\n    local rest\n    _p9k__ret=\n    { read _p9k__ret rest <$1 } 2>/dev/null\n    _p9k__ret=${_p9k__ret%$'\\r'}\n    _p9k__read_word_cache[$1]=$stat[1]:$_p9k__ret\n  fi\n  [[ -n $_p9k__ret ]]\n}\n\nfunction _p9k_fetch_cwd() {\n  if [[ $PWD == /* && $PWD -ef . ]]; then\n    _p9k__cwd=$PWD\n  else\n    _p9k__cwd=${${${:-.}:a}:-.}\n  fi\n  _p9k__cwd_a=${${_p9k__cwd:A}:-.}\n\n  case $_p9k__cwd in\n    /|.)\n      _p9k__parent_dirs=()\n      _p9k__parent_mtimes=()\n      _p9k__parent_mtimes_i=()\n      _p9k__parent_mtimes_s=\n      return\n    ;;\n    ~|~/*)\n      local parent=${${${:-~/..}:a}%/}/\n      local parts=(${(s./.)_p9k__cwd#$parent})\n    ;;\n    *)\n      local parent=/\n      local parts=(${(s./.)_p9k__cwd})\n    ;;\n  esac\n  local MATCH\n  _p9k__parent_dirs=(${(@)${:-{$#parts..1}}/(#m)*/$parent${(pj./.)parts[1,MATCH]}})\n  if ! zstat -A _p9k__parent_mtimes +mtime -- $_p9k__parent_dirs 2>/dev/null; then\n    _p9k__parent_mtimes=(${(@)parts/*/-1})\n  fi\n  _p9k__parent_mtimes_i=(${(@)${:-{1..$#parts}}/(#m)*/$MATCH:$_p9k__parent_mtimes[MATCH]})\n  _p9k__parent_mtimes_s=\"$_p9k__parent_mtimes_i\"\n}\n\n# Usage: _p9k_glob parent_dir_index pattern [glob_qual]\n#\n# parent_dir_index indexes _p9k__parent_dirs.\n#\n# Returns the number of matches.\n#\n# Pattern cannot have slashes.\n#\n# Example: _p9k_glob 3 '*.csproj'\nfunction _p9k_glob() {\n  local dir=$_p9k__parent_dirs[$1]\n  local cached=$_p9k__glob_cache[$dir/$2]\n  if [[ $cached == $_p9k__parent_mtimes[$1]:* ]]; then\n    return ${cached##*:}\n  fi\n  local -a stat\n  zstat -A stat +mtime -- $dir 2>/dev/null || stat=(-1)\n  eval 'local files=($dir/$~2('$3'N:t))'\n  _p9k__glob_cache[$dir/$2]=\"$stat[1]:$#files\"\n  return $#files\n}\n\n# Usage: _p9k_upglob pattern [glob_qual]\n#\n# Returns index within _p9k__parent_dirs or 0 if there is no match.\n#\n# Search stops before reaching ~/../ or / and never matches in those directories.\n#\n# Example: _p9k_upglob '*.csproj'\nfunction _p9k_upglob() {\n  local cached=$_p9k__upsearch_cache[$_p9k__cwd/$1]\n  if [[ -n $cached ]]; then\n    if [[ $_p9k__parent_mtimes_s == ${cached% *}(| *) ]]; then\n      return ${cached##* }\n    fi\n    cached=(${(s: :)cached})\n    local last_idx=$cached[-1]\n    cached[-1]=()\n    local -i i\n    for i in ${(@)${cached:|_p9k__parent_mtimes_i}%:*}; do\n      _p9k_glob $i \"$@\" && continue\n      _p9k__upsearch_cache[$_p9k__cwd/$1]=\"${_p9k__parent_mtimes_i[1,i]} $i\"\n      return i\n    done\n    if (( i != last_idx )); then\n      _p9k__upsearch_cache[$_p9k__cwd/$1]=\"${_p9k__parent_mtimes_i[1,$#cached]} $last_idx\"\n      return last_idx\n    fi\n    i=$(($#cached + 1))\n  else\n    local -i i=1\n  fi\n  for ((; i <= $#_p9k__parent_mtimes; ++i)); do\n    _p9k_glob $i \"$@\" && continue\n    _p9k__upsearch_cache[$_p9k__cwd/$1]=\"${_p9k__parent_mtimes_i[1,i]} $i\"\n    return i\n  done\n  _p9k__upsearch_cache[$_p9k__cwd/$1]=\"$_p9k__parent_mtimes_s 0\"\n  return 0\n}\n\n# If we execute `print -P $1`, how many characters will be printed on the last line?\n# Assumes that `%{%}` and `%G` don't lie.\n#\n#   _p9k_prompt_length '' => 0\n#   _p9k_prompt_length 'abc' => 3\n#   _p9k_prompt_length $'abc\\nxy' => 2\n#   _p9k_prompt_length $'\\t' => 8\n#   _p9k_prompt_length '%F{red}abc' => 3\n#   _p9k_prompt_length $'%{a\\b%Gb%}' => 1\nfunction _p9k_prompt_length() {\n  local -i COLUMNS=1024\n  local -i x y=${#1} m\n  if (( y )); then\n    while (( ${${(%):-$1%$y(l.1.0)}[-1]} )); do\n      x=y\n      (( y *= 2 ))\n    done\n    while (( y > x + 1 )); do\n      (( m = x + (y - x) / 2 ))\n      (( ${${(%):-$1%$m(l.x.y)}[-1]} = m ))\n    done\n  fi\n  typeset -g _p9k__ret=$x\n}\n\ntypeset -gr __p9k_byte_suffix=('B' 'K' 'M' 'G' 'T' 'P' 'E' 'Z' 'Y')\n\n# 512 => 512B\n# 1800 => 1.76K\n# 18000 => 17.6K\nfunction _p9k_human_readable_bytes() {\n  typeset -F n=$1\n  local suf\n  for suf in $__p9k_byte_suffix; do\n    (( n < 1024 )) && break\n    (( n /= 1024 ))\n  done\n  if (( n >= 100 )); then\n    printf -v _p9k__ret '%.0f.' $n\n  elif (( n >= 10 )); then\n    printf -v _p9k__ret '%.1f' $n\n  else\n    printf -v _p9k__ret '%.2f' $n\n  fi\n  _p9k__ret=${${_p9k__ret%%0#}%.}$suf\n}\n\nif [[ $ZSH_VERSION == (5.<4->*|<6->.*) ]]; then\n  function _p9k_print_params() { typeset -p -- \"$@\" }\nelse\n  # Cannot use `typeset -p` unconditionally because of bugs in zsh.\n  function _p9k_print_params() {\n    local name\n    for name; do\n      case $parameters[$name] in\n        array*)\n          print -r -- \"$name=(\" \"${(@q)${(@P)name}}\" \")\"\n        ;;\n        association*)\n          # Cannot use \"${(@q)${(@kvP)name}}\" because of bugs in zsh.\n          local kv=(\"${(@kvP)name}\")\n          print -r -- \"$name=(\" \"${(@q)kv}\" \")\"\n        ;;\n        *)\n          print -r -- \"$name=${(q)${(P)name}}\"\n        ;;\n      esac\n    done\n  }\nfi\n\n# Determine if the passed segment is used in the prompt\n#\n# Pass the name of the segment to this function to test for its presence in\n# either the LEFT or RIGHT prompt arrays.\n#    * $1: The segment to be tested.\n_p9k_segment_in_use() {\n  (( $_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(I)$1(|_joined)] ||\n     $_POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(I)$1(|_joined)] ))\n}\n\n# Caching allows storing array-to-array associations. It should be used like this:\n#\n#   if ! _p9k_cache_get \"$key1\" \"$key2\"; then\n#     # Compute val1 and val2 and then store them in the cache.\n#     _p9k_cache_set \"$val1\" \"$val2\"\n#   fi\n#   # Here ${_p9k__cache_val[1]} and ${_p9k__cache_val[2]} are $val1 and $val2 respectively.\n#\n# Limitations:\n#\n#   * Calling _p9k_cache_set without arguments clears the cache entry. Subsequent calls to\n#     _p9k_cache_get for the same key will return an error.\n#   * There must be no intervening _p9k_cache_get calls between the associated _p9k_cache_get\n#     and _p9k_cache_set.\n_p9k_cache_set() {\n  # Uncomment to see cache misses.\n  # echo \"caching: ${(@0q)_p9k__cache_key} => (${(q)@})\" >&2\n  _p9k_cache[$_p9k__cache_key]=\"${(pj:\\0:)*}0\"\n  _p9k__cache_val=(\"$@\")\n  _p9k__state_dump_scheduled=1\n}\n\n_p9k_cache_get() {\n  _p9k__cache_key=\"${(pj:\\0:)*}\"\n  local v=$_p9k_cache[$_p9k__cache_key]\n  [[ -n $v ]] && _p9k__cache_val=(\"${(@0)${v[1,-2]}}\")\n}\n\n_p9k_cache_ephemeral_set() {\n  # Uncomment to see cache misses.\n  # echo \"caching: ${(@0q)_p9k__cache_key} => (${(q)@})\" >&2\n  _p9k__cache_ephemeral[$_p9k__cache_key]=\"${(pj:\\0:)*}0\"\n  _p9k__cache_val=(\"$@\")\n}\n\n_p9k_cache_ephemeral_get() {\n  _p9k__cache_key=\"${(pj:\\0:)*}\"\n  local v=$_p9k__cache_ephemeral[$_p9k__cache_key]\n  [[ -n $v ]] && _p9k__cache_val=(\"${(@0)${v[1,-2]}}\")\n}\n\n_p9k_cache_stat_get() {\n  local -H stat\n  local label=$1 f\n  shift\n\n  _p9k__cache_stat_meta=\n  _p9k__cache_stat_fprint=\n\n  for f; do\n    if zstat -H stat -- $f 2>/dev/null; then\n      _p9k__cache_stat_meta+=\"${(q)f} $stat[inode] $stat[mtime] $stat[size] $stat[mode]; \"\n    fi\n  done\n\n  if _p9k_cache_get $0 $label meta \"$@\"; then\n     if [[ $_p9k__cache_val[1] == $_p9k__cache_stat_meta ]]; then\n      _p9k__cache_stat_fprint=$_p9k__cache_val[2]\n      local -a key=($0 $label fprint \"$@\" \"$_p9k__cache_stat_fprint\")\n      _p9k__cache_fprint_key=\"${(pj:\\0:)key}\"\n      shift 2 _p9k__cache_val\n      return 0\n    else\n      local -a key=($0 $label fprint \"$@\" \"$_p9k__cache_val[2]\")\n      _p9k__cache_ephemeral[${(pj:\\0:)key}]=\"${(pj:\\0:)_p9k__cache_val[3,-1]}0\"\n    fi\n  fi\n\n  if (( $+commands[md5] )); then\n    _p9k__cache_stat_fprint=\"$(md5 -- $* 2>&1)\"\n  elif (( $+commands[md5sum] )); then\n    _p9k__cache_stat_fprint=\"$(md5sum -b -- $* 2>&1)\"\n  else\n    return 1\n  fi\n\n  local meta_key=$_p9k__cache_key\n  if _p9k_cache_ephemeral_get $0 $label fprint \"$@\" \"$_p9k__cache_stat_fprint\"; then\n    _p9k__cache_fprint_key=$_p9k__cache_key\n    _p9k__cache_key=$meta_key\n    _p9k_cache_set \"$_p9k__cache_stat_meta\" \"$_p9k__cache_stat_fprint\" \"$_p9k__cache_val[@]\"\n    shift 2 _p9k__cache_val\n    return 0\n  fi\n\n  _p9k__cache_fprint_key=$_p9k__cache_key\n  _p9k__cache_key=$meta_key\n  return 1\n}\n\n_p9k_cache_stat_set() {\n  _p9k_cache_set \"$_p9k__cache_stat_meta\" \"$_p9k__cache_stat_fprint\" \"$@\"\n  _p9k__cache_key=$_p9k__cache_fprint_key\n  _p9k_cache_ephemeral_set \"$@\"\n}\n\n# _p9k_param prompt_foo_BAR BACKGROUND red\n_p9k_param() {\n  local key=\"_p9k_param ${(pj:\\0:)*}\"\n  _p9k__ret=$_p9k_cache[$key]\n  if [[ -n $_p9k__ret ]]; then\n    _p9k__ret[-1,-1]=''\n  else\n    if [[ ${1//-/_} == (#b)prompt_([a-z0-9_]#)(*) ]]; then\n      local var=_POWERLEVEL9K_${${(U)match[1]}//İ/I}$match[2]_$2\n      if (( $+parameters[$var] )); then\n        _p9k__ret=${(P)var}\n      else\n        var=_POWERLEVEL9K_${${(U)match[1]%_}//İ/I}_$2\n        if (( $+parameters[$var] )); then\n          _p9k__ret=${(P)var}\n        else\n          var=_POWERLEVEL9K_$2\n          if (( $+parameters[$var] )); then\n            _p9k__ret=${(P)var}\n          else\n            _p9k__ret=$3\n          fi\n        fi\n      fi\n    else\n      local var=_POWERLEVEL9K_$2\n      if (( $+parameters[$var] )); then\n        _p9k__ret=${(P)var}\n      else\n        _p9k__ret=$3\n      fi\n    fi\n    _p9k_cache[$key]=${_p9k__ret}.\n  fi\n}\n\n# _p9k_get_icon prompt_foo_BAR BAZ_ICON quix\n_p9k_get_icon() {\n  local key=\"_p9k_get_icon ${(pj:\\0:)*}\"\n  _p9k__ret=$_p9k_cache[$key]\n  if [[ -n $_p9k__ret ]]; then\n    _p9k__ret[-1,-1]=''\n  else\n    if [[ $2 == $'\\1'* ]]; then\n      _p9k__ret=${2[2,-1]}\n    else\n      _p9k_param \"$1\" \"$2\" ${icons[$2]-$'\\1'$3}\n      if [[ $_p9k__ret == $'\\1'* ]]; then\n        _p9k__ret=${_p9k__ret[2,-1]}\n      else\n        _p9k__ret=${(g::)_p9k__ret}\n        [[ $_p9k__ret != $'\\b'? ]] || _p9k__ret=\"%{$_p9k__ret%}\"  # penance for past sins\n      fi\n    fi\n    _p9k_cache[$key]=${_p9k__ret}.\n  fi\n}\n\n_p9k_translate_color() {\n  if [[ $1 == <-> ]]; then                  # decimal color code: 255\n    _p9k__ret=${(l.3..0.)1}\n  elif [[ $1 == '#'[[:xdigit:]]## ]]; then  # hexadecimal color code: #ffffff\n    _p9k__ret=${${(L)1}//ı/i}\n  else                                      # named color: red\n    # Strip prifixes if there are any.\n    _p9k__ret=$__p9k_colors[${${${1#bg-}#fg-}#br}]\n  fi\n}\n\n# _p9k_color prompt_foo_BAR BACKGROUND red\n_p9k_color() {\n  local key=\"_p9k_color ${(pj:\\0:)*}\"\n  _p9k__ret=$_p9k_cache[$key]\n  if [[ -n $_p9k__ret ]]; then\n    _p9k__ret[-1,-1]=''\n  else\n    _p9k_param \"$@\"\n    _p9k_translate_color $_p9k__ret\n    _p9k_cache[$key]=${_p9k__ret}.\n  fi\n}\n\n# _p9k_vcs_style CLEAN REMOTE_BRANCH\n_p9k_vcs_style() {\n  local key=\"$0 ${(pj:\\0:)*}\"\n  _p9k__ret=$_p9k_cache[$key]\n  if [[ -n $_p9k__ret ]]; then\n    _p9k__ret[-1,-1]=''\n  else\n    local style=%b  # TODO: support bold\n    _p9k_color prompt_vcs_$1 BACKGROUND \"${__p9k_vcs_states[$1]}\"\n    _p9k_background $_p9k__ret\n    style+=$_p9k__ret\n\n    local var=_POWERLEVEL9K_VCS_${1}_${2}FORMAT_FOREGROUND\n    if (( $+parameters[$var] )); then\n      _p9k_translate_color \"${(P)var}\"\n    else\n      var=_POWERLEVEL9K_VCS_${2}FORMAT_FOREGROUND\n      if (( $+parameters[$var] )); then\n        _p9k_translate_color \"${(P)var}\"\n      else\n        _p9k_color prompt_vcs_$1 FOREGROUND \"$_p9k_color1\"\n      fi\n    fi\n\n    _p9k_foreground $_p9k__ret\n    _p9k__ret=$style$_p9k__ret\n    _p9k_cache[$key]=${_p9k__ret}.\n  fi\n}\n\n_p9k_background() {\n  [[ -n $1 ]] && _p9k__ret=\"%K{$1}\" || _p9k__ret=\"%k\"\n}\n\n_p9k_foreground() {\n  # Note: This code used to produce `%1F` instead of `%F{1}` because it's more efficient.\n  # Unfortunately, this triggers a bug in zsh. Namely, `%1F{2}` gets percent-expanded as if\n  # it was `%F{2}`.\n  [[ -n $1 ]] && _p9k__ret=\"%F{$1}\" || _p9k__ret=\"%f\"\n}\n\n_p9k_escape_style() {\n  [[ $1 == *'}'* ]] && _p9k__ret='${:-\"'$1'\"}' || _p9k__ret=$1\n}\n\n_p9k_escape() {\n  [[ $1 == *[\"~!#\\`\\$^&*()\\\\\\\"'<>?{}[]\"]* ]] && _p9k__ret=\"\\${(Q)\\${:-${(qqq)${(q)1}}}}\" || _p9k__ret=$1\n}\n\n# * $1: Name of the function that was originally invoked.\n#       Necessary, to make the dynamic color-overwrite mechanism work.\n# * $2: Background color.\n# * $3: Foreground color.\n# * $4: An identifying icon.\n# * $5: 1 to to perform parameter expansion and process substitution.\n# * $6: If not empty but becomes empty after parameter expansion and process substitution,\n#       the segment isn't rendered.\n# * $7: Content.\n_p9k_left_prompt_segment() {\n  if ! _p9k_cache_get \"$0\" \"$1\" \"$2\" \"$3\" \"$4\" \"$_p9k__segment_index\"; then\n    _p9k_color $1 BACKGROUND $2\n    local bg_color=$_p9k__ret\n    _p9k_background $bg_color\n    local bg=$_p9k__ret\n\n    _p9k_color $1 FOREGROUND $3\n    local fg_color=$_p9k__ret\n    _p9k_foreground $fg_color\n    local fg=$_p9k__ret\n\n    local style=%b$bg$fg\n    local style_=${style//\\}/\\\\\\}}\n\n    _p9k_get_icon $1 LEFT_SEGMENT_SEPARATOR\n    local sep=$_p9k__ret\n    _p9k_escape $_p9k__ret\n    local sep_=$_p9k__ret\n\n    _p9k_get_icon $1 LEFT_SUBSEGMENT_SEPARATOR\n    _p9k_escape $_p9k__ret\n    local subsep_=$_p9k__ret\n\n    local icon_\n    if [[ -n $4 ]]; then\n      _p9k_get_icon $1 $4\n      _p9k_escape $_p9k__ret\n      icon_=$_p9k__ret\n    fi\n\n    _p9k_get_icon $1 LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL\n    local start_sep=$_p9k__ret\n    [[ -n $start_sep ]] && start_sep=\"%b%k%F{$bg_color}$start_sep\"\n\n    _p9k_get_icon $1 LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL $sep\n    _p9k_escape $_p9k__ret\n    local end_sep_=$_p9k__ret\n\n    _p9k_get_icon $1 WHITESPACE_BETWEEN_LEFT_SEGMENTS ' '\n    local space=$_p9k__ret\n\n    _p9k_get_icon $1 LEFT_LEFT_WHITESPACE $space\n    local left_space=$_p9k__ret\n    [[ $left_space == *%* ]] && left_space+=$style\n\n    _p9k_get_icon $1 LEFT_RIGHT_WHITESPACE $space\n    _p9k_escape $_p9k__ret\n    local right_space_=$_p9k__ret\n    [[ $right_space_ == *%* ]] && right_space_+=$style_\n\n    local s='<_p9k__s>' ss='<_p9k__ss>'\n\n    local -i non_hermetic=0\n\n    # Segment separator logic:\n    #\n    #   if [[ $_p9k__bg == NONE ]]; then\n    #     1\n    #   elif (( joined )); then\n    #     2\n    #   elif [[ $bg_color == (${_p9k__bg}|${_p9k__bg:-0}) ]]; then\n    #     3\n    #   else\n    #     4\n    #   fi\n\n    local t=$(($#_p9k_t - __p9k_ksh_arrays))\n    _p9k_t+=$start_sep$style$left_space              # 1\n    _p9k_t+=$style                                   # 2\n    if [[ -n $fg_color && $fg_color == $bg_color ]]; then\n      if [[ $fg_color == $_p9k_color1 ]]; then\n        _p9k_foreground $_p9k_color2\n      else\n        _p9k_foreground $_p9k_color1\n      fi\n      _p9k_t+=%b$bg$_p9k__ret$ss$style$left_space    # 3\n    else\n      _p9k_t+=%b$bg$ss$style$left_space              # 3\n    fi\n    _p9k_t+=%b$bg$s$style$left_space                 # 4\n\n    local join=\"_p9k__i>=$_p9k_left_join[$_p9k__segment_index]\"\n    _p9k_param $1 SELF_JOINED false\n    if [[ $_p9k__ret == false ]]; then\n      if (( _p9k__segment_index > $_p9k_left_join[$_p9k__segment_index] )); then\n        join+=\"&&_p9k__i<$_p9k__segment_index\"\n      else\n        join=\n      fi\n    fi\n\n    local p=\n    p+=\"\\${_p9k__n::=}\"\n    p+=\"\\${\\${\\${_p9k__bg:-0}:#NONE}:-\\${_p9k__n::=$((t+1))}}\"                                # 1\n    if [[ -n $join ]]; then\n      p+=\"\\${_p9k__n:=\\${\\${\\$(($join)):#0}:+$((t+2))}}\"                                      # 2\n    fi\n    if (( __p9k_sh_glob )); then\n      p+=\"\\${_p9k__n:=\\${\\${(M)\\${:-x$bg_color}:#x\\$_p9k__bg}:+$((t+3))}}\"                    # 3\n      p+=\"\\${_p9k__n:=\\${\\${(M)\\${:-x$bg_color}:#x\\$${_p9k__bg:-0}}:+$((t+3))}}\"              # 3\n    else\n      p+=\"\\${_p9k__n:=\\${\\${(M)\\${:-x$bg_color}:#x(\\$_p9k__bg|\\${_p9k__bg:-0})}:+$((t+3))}}\"  # 3\n    fi\n    p+=\"\\${_p9k__n:=$((t+4))}\"                                                                # 4\n\n    _p9k_param $1 VISUAL_IDENTIFIER_EXPANSION '${P9K_VISUAL_IDENTIFIER}'\n    [[ $_p9k__ret == (|*[^\\\\])'$('* ]] && non_hermetic=1\n    local icon_exp_=${_p9k__ret:+\\\"$_p9k__ret\\\"}\n\n    _p9k_param $1 CONTENT_EXPANSION '${P9K_CONTENT}'\n    [[ $_p9k__ret == (|*[^\\\\])'$('* ]] && non_hermetic=1\n    local content_exp_=${_p9k__ret:+\\\"$_p9k__ret\\\"}\n\n    if [[ ( $icon_exp_ != '\"${P9K_VISUAL_IDENTIFIER}\"' && $icon_exp_ == *'$'* ) ||\n          ( $content_exp_ != '\"${P9K_CONTENT}\"' && $content_exp_ == *'$'* ) ]]; then\n      p+=\"\\${P9K_VISUAL_IDENTIFIER::=$icon_}\"\n    fi\n\n    local -i has_icon=-1  # maybe\n\n    if [[ $icon_exp_ != '\"${P9K_VISUAL_IDENTIFIER}\"' && $icon_exp_ == *'$'* ]]; then\n      p+='${_p9k__v::='$icon_exp_$style_'}'\n    else\n      [[ $icon_exp_ == '\"${P9K_VISUAL_IDENTIFIER}\"' ]] && _p9k__ret=$icon_ || _p9k__ret=$icon_exp_\n      if [[ -n $_p9k__ret ]]; then\n        p+=\"\\${_p9k__v::=$_p9k__ret\"\n        [[ $_p9k__ret == *%* ]] && p+=$style_\n        p+=\"}\"\n        has_icon=1  # definitely yes\n      else\n        has_icon=0  # definitely no\n      fi\n    fi\n\n    p+='${_p9k__c::='$content_exp_'}${_p9k__c::=${_p9k__c//'$'\\r''}}'\n    p+='${_p9k__e::=${${_p9k__'${_p9k__line_index}l${${1#prompt_}%%[A-Z0-9_]#}'+00}:-'\n    if (( has_icon == -1 )); then\n      p+='${${(%):-$_p9k__c%1(l.1.0)}[-1]}${${(%):-$_p9k__v%1(l.1.0)}[-1]}}'\n    else\n      p+='${${(%):-$_p9k__c%1(l.1.0)}[-1]}'$has_icon'}'\n    fi\n\n    p+='}}+}'\n\n    p+='${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/'$ss'/$_p9k__ss}/'$s'/$_p9k__s}'\n\n    _p9k_param $1 ICON_BEFORE_CONTENT ''\n    if [[ $_p9k__ret != false ]]; then\n      _p9k_param $1 PREFIX ''\n      _p9k__ret=${(g::)_p9k__ret}\n      _p9k_escape $_p9k__ret\n      p+=$_p9k__ret\n      [[ $_p9k__ret == *%* ]] && local -i need_style=1 || local -i need_style=0\n\n      if (( has_icon != 0 )); then\n        _p9k_color $1 VISUAL_IDENTIFIER_COLOR $fg_color\n        _p9k_foreground $_p9k__ret\n        _p9k__ret=%b$bg$_p9k__ret\n        _p9k__ret=${_p9k__ret//\\}/\\\\\\}}\n        if [[ $_p9k__ret != $style_ ]]; then\n          p+=$_p9k__ret'${_p9k__v}'$style_\n        else\n          (( need_style )) && p+=$style_\n          p+='${_p9k__v}'\n        fi\n\n        _p9k_get_icon $1 LEFT_MIDDLE_WHITESPACE ' '\n        if [[ -n $_p9k__ret ]]; then\n          _p9k_escape $_p9k__ret\n          [[ _p9k__ret == *%* ]] && _p9k__ret+=$style_\n          p+='${${(M)_p9k__e:#11}:+'$_p9k__ret'}'\n        fi\n      elif (( need_style )); then\n        p+=$style_\n      fi\n\n      p+='${_p9k__c}'$style_\n    else\n      _p9k_param $1 PREFIX ''\n      _p9k__ret=${(g::)_p9k__ret}\n      _p9k_escape $_p9k__ret\n      p+=$_p9k__ret\n      [[ $_p9k__ret == *%* ]] && p+=$style_\n\n      p+='${_p9k__c}'$style_\n\n      if (( has_icon != 0 )); then\n        local -i need_style=0\n        _p9k_get_icon $1 LEFT_MIDDLE_WHITESPACE ' '\n        if [[ -n $_p9k__ret ]]; then\n          _p9k_escape $_p9k__ret\n          [[ $_p9k__ret == *%* ]] && need_style=1\n          p+='${${(M)_p9k__e:#11}:+'$_p9k__ret'}'\n        fi\n\n        _p9k_color $1 VISUAL_IDENTIFIER_COLOR $fg_color\n        _p9k_foreground $_p9k__ret\n        _p9k__ret=%b$bg$_p9k__ret\n        _p9k__ret=${_p9k__ret//\\}/\\\\\\}}\n        [[ $_p9k__ret != $style_ || $need_style == 1 ]] && p+=$_p9k__ret\n        p+='$_p9k__v'\n      fi\n    fi\n\n    _p9k_param $1 SUFFIX ''\n    _p9k__ret=${(g::)_p9k__ret}\n    _p9k_escape $_p9k__ret\n    p+=$_p9k__ret\n    [[ $_p9k__ret == *%* && -n $right_space_ ]] && p+=$style_\n    p+=$right_space_\n\n    p+='${${:-'\n    p+=\"\\${_p9k__s::=%F{$bg_color\\}$sep_}\\${_p9k__ss::=$subsep_}\\${_p9k__sss::=%F{$bg_color\\}$end_sep_}\"\n    p+=\"\\${_p9k__i::=$_p9k__segment_index}\\${_p9k__bg::=$bg_color}\"\n    p+='}+}'\n\n    p+='}'\n\n    _p9k_param $1 SHOW_ON_UPGLOB ''\n    _p9k_cache_set \"$p\" $non_hermetic $_p9k__ret\n  fi\n\n  if [[ -n $_p9k__cache_val[3] ]]; then\n    _p9k__has_upglob=1\n    _p9k_upglob $_p9k__cache_val[3] && return\n  fi\n\n  _p9k__non_hermetic_expansion=$_p9k__cache_val[2]\n\n  (( $5 )) && _p9k__ret=\\\"$7\\\" || _p9k_escape $7\n  if [[ -z $6 ]]; then\n    _p9k__prompt+=\"\\${\\${:-\\${P9K_CONTENT::=$_p9k__ret}$_p9k__cache_val[1]\"\n  else\n    _p9k__prompt+=\"\\${\\${:-\\\"$6\\\"}:+\\${\\${:-\\${P9K_CONTENT::=$_p9k__ret}$_p9k__cache_val[1]}\"\n  fi\n}\n\n# The same as _p9k_left_prompt_segment above but for the right prompt.\n_p9k_right_prompt_segment() {\n  if ! _p9k_cache_get \"$0\" \"$1\" \"$2\" \"$3\" \"$4\" \"$_p9k__segment_index\"; then\n    _p9k_color $1 BACKGROUND $2\n    local bg_color=$_p9k__ret\n    _p9k_background $bg_color\n    local bg=$_p9k__ret\n    local bg_=${_p9k__ret//\\}/\\\\\\}}\n\n    _p9k_color $1 FOREGROUND $3\n    local fg_color=$_p9k__ret\n    _p9k_foreground $fg_color\n    local fg=$_p9k__ret\n\n    local style=%b$bg$fg\n    local style_=${style//\\}/\\\\\\}}\n\n    _p9k_get_icon $1 RIGHT_SEGMENT_SEPARATOR\n    local sep=$_p9k__ret\n    _p9k_escape $_p9k__ret\n    local sep_=$_p9k__ret\n\n    _p9k_get_icon $1 RIGHT_SUBSEGMENT_SEPARATOR\n    local subsep=$_p9k__ret\n    [[ $subsep == *%* ]] && subsep+=$style\n\n    local icon_\n    if [[ -n $4 ]]; then\n      _p9k_get_icon $1 $4\n      _p9k_escape $_p9k__ret\n      icon_=$_p9k__ret\n    fi\n\n    _p9k_get_icon $1 RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL $sep\n    local start_sep=$_p9k__ret\n    [[ -n $start_sep ]] && start_sep=\"%b%k%F{$bg_color}$start_sep\"\n\n    _p9k_get_icon $1 RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL\n    _p9k_escape $_p9k__ret\n    local end_sep_=$_p9k__ret\n\n    _p9k_get_icon $1 WHITESPACE_BETWEEN_RIGHT_SEGMENTS ' '\n    local space=$_p9k__ret\n\n    _p9k_get_icon $1 RIGHT_LEFT_WHITESPACE $space\n    local left_space=$_p9k__ret\n    [[ $left_space == *%* ]] && left_space+=$style\n\n    _p9k_get_icon $1 RIGHT_RIGHT_WHITESPACE $space\n    _p9k_escape $_p9k__ret\n    local right_space_=$_p9k__ret\n    [[ $right_space_ == *%* ]] && right_space_+=$style_\n\n    local w='<_p9k__w>' s='<_p9k__s>'\n\n    local -i non_hermetic=0\n\n    # Segment separator logic:\n    #\n    #   if [[ $_p9k__bg == NONE ]]; then\n    #     1\n    #   elif (( joined )); then\n    #     2\n    #   elif [[ $_p9k__bg == (${bg_color}|${bg_color:-0}) ]]; then\n    #     3\n    #   else\n    #     4\n    #   fi\n\n    local t=$(($#_p9k_t - __p9k_ksh_arrays))\n    _p9k_t+=$start_sep$style$left_space           # 1\n    _p9k_t+=$w$style                              # 2\n    _p9k_t+=$w$style$subsep$left_space            # 3\n    _p9k_t+=$w%F{$bg_color}$sep$style$left_space  # 4\n\n    local join=\"_p9k__i>=$_p9k_right_join[$_p9k__segment_index]\"\n    _p9k_param $1 SELF_JOINED false\n    if [[ $_p9k__ret == false ]]; then\n      if (( _p9k__segment_index > $_p9k_right_join[$_p9k__segment_index] )); then\n        join+=\"&&_p9k__i<$_p9k__segment_index\"\n      else\n        join=\n      fi\n    fi\n\n    local p=\n    p+=\"\\${_p9k__n::=}\"\n    p+=\"\\${\\${\\${_p9k__bg:-0}:#NONE}:-\\${_p9k__n::=$((t+1))}}\"                                      # 1\n    if [[ -n $join ]]; then\n      p+=\"\\${_p9k__n:=\\${\\${\\$(($join)):#0}:+$((t+2))}}\"                                            # 2\n    fi\n    if (( __p9k_sh_glob )); then\n      p+=\"\\${_p9k__n:=\\${\\${(M)\\${:-x\\$_p9k__bg}:#x${(b)bg_color}}:+$((t+3))}}\"                     # 3\n      p+=\"\\${_p9k__n:=\\${\\${(M)\\${:-x\\$_p9k__bg}:#x${(b)bg_color:-0}}:+$((t+3))}}\"                  # 3\n    else\n      p+=\"\\${_p9k__n:=\\${\\${(M)\\${:-x\\$_p9k__bg}:#x(${(b)bg_color}|${(b)bg_color:-0})}:+$((t+3))}}\" # 3\n    fi\n    p+=\"\\${_p9k__n:=$((t+4))}\"                                                                      # 4\n\n    _p9k_param $1 VISUAL_IDENTIFIER_EXPANSION '${P9K_VISUAL_IDENTIFIER}'\n    [[ $_p9k__ret == (|*[^\\\\])'$('* ]] && non_hermetic=1\n    local icon_exp_=${_p9k__ret:+\\\"$_p9k__ret\\\"}\n\n    _p9k_param $1 CONTENT_EXPANSION '${P9K_CONTENT}'\n    [[ $_p9k__ret == (|*[^\\\\])'$('* ]] && non_hermetic=1\n    local content_exp_=${_p9k__ret:+\\\"$_p9k__ret\\\"}\n\n    if [[ ( $icon_exp_ != '\"${P9K_VISUAL_IDENTIFIER}\"' && $icon_exp_ == *'$'* ) ||\n          ( $content_exp_ != '\"${P9K_CONTENT}\"' && $content_exp_ == *'$'* ) ]]; then\n      p+=\"\\${P9K_VISUAL_IDENTIFIER::=$icon_}\"\n    fi\n\n    local -i has_icon=-1  # maybe\n\n    if [[ $icon_exp_ != '\"${P9K_VISUAL_IDENTIFIER}\"' && $icon_exp_ == *'$'* ]]; then\n      p+=\"\\${_p9k__v::=$icon_exp_$style_}\"\n    else\n      [[ $icon_exp_ == '\"${P9K_VISUAL_IDENTIFIER}\"' ]] && _p9k__ret=$icon_ || _p9k__ret=$icon_exp_\n      if [[ -n $_p9k__ret ]]; then\n        p+=\"\\${_p9k__v::=$_p9k__ret\"\n        [[ $_p9k__ret == *%* ]] && p+=$style_\n        p+=\"}\"\n        has_icon=1  # definitely yes\n      else\n        has_icon=0  # definitely no\n      fi\n    fi\n\n    p+='${_p9k__c::='$content_exp_'}${_p9k__c::=${_p9k__c//'$'\\r''}}'\n    p+='${_p9k__e::=${${_p9k__'${_p9k__line_index}r${${1#prompt_}%%[A-Z0-9_]#}'+00}:-'\n    if (( has_icon == -1 )); then\n      p+='${${(%):-$_p9k__c%1(l.1.0)}[-1]}${${(%):-$_p9k__v%1(l.1.0)}[-1]}}'\n    else\n      p+='${${(%):-$_p9k__c%1(l.1.0)}[-1]}'$has_icon'}'\n    fi\n\n    p+='}}+}'\n\n    p+='${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/'$w'/$_p9k__w}'\n\n    _p9k_param $1 ICON_BEFORE_CONTENT ''\n    if [[ $_p9k__ret != true ]]; then\n      _p9k_param $1 PREFIX ''\n      _p9k__ret=${(g::)_p9k__ret}\n      _p9k_escape $_p9k__ret\n      p+=$_p9k__ret\n      [[ $_p9k__ret == *%* ]] && p+=$style_\n\n      p+='${_p9k__c}'$style_\n\n      if (( has_icon != 0 )); then\n        local -i need_style=0\n        _p9k_get_icon $1 RIGHT_MIDDLE_WHITESPACE ' '\n        if [[ -n $_p9k__ret ]]; then\n          _p9k_escape $_p9k__ret\n          [[ $_p9k__ret == *%* ]] && need_style=1\n          p+='${${(M)_p9k__e:#11}:+'$_p9k__ret'}'\n        fi\n\n        _p9k_color $1 VISUAL_IDENTIFIER_COLOR $fg_color\n        _p9k_foreground $_p9k__ret\n        _p9k__ret=%b$bg$_p9k__ret\n        _p9k__ret=${_p9k__ret//\\}/\\\\\\}}\n        [[ $_p9k__ret != $style_ || $need_style == 1 ]] && p+=$_p9k__ret\n        p+='$_p9k__v'\n      fi\n    else\n      _p9k_param $1 PREFIX ''\n      _p9k__ret=${(g::)_p9k__ret}\n      _p9k_escape $_p9k__ret\n      p+=$_p9k__ret\n      [[ $_p9k__ret == *%* ]] && local -i need_style=1 || local -i need_style=0\n\n      if (( has_icon != 0 )); then\n        _p9k_color $1 VISUAL_IDENTIFIER_COLOR $fg_color\n        _p9k_foreground $_p9k__ret\n        _p9k__ret=%b$bg$_p9k__ret\n        _p9k__ret=${_p9k__ret//\\}/\\\\\\}}\n        if [[ $_p9k__ret != $style_ ]]; then\n          p+=$_p9k__ret'${_p9k__v}'$style_\n        else\n          (( need_style )) && p+=$style_\n          p+='${_p9k__v}'\n        fi\n\n        _p9k_get_icon $1 RIGHT_MIDDLE_WHITESPACE ' '\n        if [[ -n $_p9k__ret ]]; then\n          _p9k_escape $_p9k__ret\n          [[ _p9k__ret == *%* ]] && _p9k__ret+=$style_\n          p+='${${(M)_p9k__e:#11}:+'$_p9k__ret'}'\n        fi\n      elif (( need_style )); then\n        p+=$style_\n      fi\n\n      p+='${_p9k__c}'$style_\n    fi\n\n    _p9k_param $1 SUFFIX ''\n    _p9k__ret=${(g::)_p9k__ret}\n    _p9k_escape $_p9k__ret\n    p+=$_p9k__ret\n\n    p+='${${:-'\n\n    if [[ -n $fg_color && $fg_color == $bg_color ]]; then\n      if [[ $fg_color == $_p9k_color1 ]]; then\n        _p9k_foreground $_p9k_color2\n      else\n        _p9k_foreground $_p9k_color1\n      fi\n    else\n      _p9k__ret=$fg\n    fi\n    _p9k__ret=${_p9k__ret//\\}/\\\\\\}}\n    p+=\"\\${_p9k__w::=${right_space_:+$style_}$right_space_%b$bg_$_p9k__ret}\"\n\n    p+='${_p9k__sss::='\n    p+=$style_$right_space_\n    [[ $right_space_ == *%* ]] && p+=$style_\n    if [[ -n $end_sep_ ]]; then\n      p+=\"%k%F{$bg_color\\}$end_sep_$style_\"\n    fi\n    p+='}'\n\n    p+=\"\\${_p9k__i::=$_p9k__segment_index}\\${_p9k__bg::=$bg_color}\"\n\n    p+='}+}'\n    p+='}'\n\n    _p9k_param $1 SHOW_ON_UPGLOB ''\n    _p9k_cache_set \"$p\" $non_hermetic $_p9k__ret\n  fi\n\n  if [[ -n $_p9k__cache_val[3] ]]; then\n    _p9k__has_upglob=1\n    _p9k_upglob $_p9k__cache_val[3] && return\n  fi\n\n  _p9k__non_hermetic_expansion=$_p9k__cache_val[2]\n\n  (( $5 )) && _p9k__ret=\\\"$7\\\" || _p9k_escape $7\n  if [[ -z $6 ]]; then\n    _p9k__prompt+=\"\\${\\${:-\\${P9K_CONTENT::=$_p9k__ret}$_p9k__cache_val[1]\"\n  else\n    _p9k__prompt+=\"\\${\\${:-\\\"$6\\\"}:+\\${\\${:-\\${P9K_CONTENT::=$_p9k__ret}$_p9k__cache_val[1]}\"\n  fi\n}\n\nfunction _p9k_prompt_segment() { \"_p9k_${_p9k__prompt_side}_prompt_segment\" \"$@\" }\nfunction p9k_prompt_segment() { p10k segment \"$@\" }\n\nfunction _p9k_python_version() {\n  case $commands[python] in\n    \"\")\n      return 1\n    ;;\n    ${PYENV_ROOT:-~/.pyenv}/shims/python)\n      local P9K_PYENV_PYTHON_VERSION _p9k__pyenv_version\n      local -i _POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=1 _POWERLEVEL9K_PYENV_SHOW_SYSTEM=1\n      local _POWERLEVEL9K_PYENV_SOURCES=(shell local global)\n      if _p9k_pyenv_compute && [[ $P9K_PYENV_PYTHON_VERSION == ([[:digit:].]##)* ]]; then\n        _p9k__ret=$P9K_PYENV_PYTHON_VERSION\n        return 0\n      fi\n    ;&  # fall through\n    *)\n      _p9k_cached_cmd 1 '' python --version || return\n      [[ $_p9k__ret == (#b)Python\\ ([[:digit:].]##)* ]] && _p9k__ret=$match[1]\n    ;;\n  esac\n}\n\n################################################################\n# Prompt Segment Definitions\n################################################################\n\n################################################################\n# Anaconda Environment\nprompt_anaconda() {\n  local msg\n  if _p9k_python_version; then\n    P9K_ANACONDA_PYTHON_VERSION=$_p9k__ret\n    if (( _POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION )); then\n      msg=\"${P9K_ANACONDA_PYTHON_VERSION//\\%/%%} \"\n    fi\n  else\n    unset P9K_ANACONDA_PYTHON_VERSION\n  fi\n  local p=${CONDA_PREFIX:-$CONDA_ENV_PATH}\n  msg+=\"$_POWERLEVEL9K_ANACONDA_LEFT_DELIMITER${${p:t}//\\%/%%}$_POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER\"\n  _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PYTHON_ICON' 0 '' \"$msg\"\n}\n\n_p9k_prompt_anaconda_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${CONDA_PREFIX:-$CONDA_ENV_PATH}'\n}\n\n# Populates array `reply` with \"$#profile:$profile:$region\" where $profile and $region\n# come from the AWS config (~/.aws/config).\nfunction _p9k_parse_aws_config() {\n  local cfg=$1\n  typeset -ga reply=()\n  [[ -f $cfg && -r $cfg ]] || return\n\n  local -a lines\n  lines=(${(f)\"$(<$cfg)\"}) || return\n\n  local line profile\n  local -a match mbegin mend\n  for line in $lines; do\n    if [[ $line == [[:space:]]#'[default]'[[:space:]]#(|'#'*) ]]; then\n      # example: [default]\n      profile=default\n    elif [[ $line == (#b)'[profile'[[:space:]]##([^[:space:]]|[^[:space:]]*[^[:space:]])[[:space:]]#']'[[:space:]]#(|'#'*) ]]; then\n      # example: [profile prod]\n      profile=${(Q)match[1]}\n    elif [[ $line == (#b)[[:space:]]#region[[:space:]]#=[[:space:]]#([^[:space:]]|[^[:space:]]*[^[:space:]])[[:space:]]# ]]; then\n      # example: region = eu-west-1\n      if [[ -n $profile ]]; then\n        reply+=$#profile:$profile:$match[1]\n        profile=\n      fi\n    fi\n  done\n}\n\n################################################################\n# AWS Profile\nprompt_aws() {\n  typeset -g P9K_AWS_PROFILE=\"${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}\"\n  local pat class state\n  for pat class in \"${_POWERLEVEL9K_AWS_CLASSES[@]}\"; do\n    if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then\n      [[ -n $class ]] && state=_${${(U)class}//İ/I}\n      break\n    fi\n  done\n\n  if [[ -n ${AWS_REGION:-$AWS_DEFAULT_REGION} ]]; then\n    typeset -g P9K_AWS_REGION=${AWS_REGION:-$AWS_DEFAULT_REGION}\n  else\n    local cfg=${AWS_CONFIG_FILE:-~/.aws/config}\n    if ! _p9k_cache_stat_get $0 $cfg; then\n      local -a reply\n      _p9k_parse_aws_config $cfg\n      _p9k_cache_stat_set $reply\n    fi\n    local prefix=$#P9K_AWS_PROFILE:$P9K_AWS_PROFILE:\n    local kv=$_p9k__cache_val[(r)${(b)prefix}*]\n    typeset -g P9K_AWS_REGION=${kv#$prefix}\n  fi\n\n  _p9k_prompt_segment \"$0$state\" red white 'AWS_ICON' 0 '' \"${P9K_AWS_PROFILE//\\%/%%}\"\n}\n\n_p9k_prompt_aws_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}'\n}\n\n################################################################\n# Current Elastic Beanstalk environment\nprompt_aws_eb_env() {\n  _p9k_upglob .elasticbeanstalk -/ && return\n  local dir=$_p9k__parent_dirs[$?]\n\n  if ! _p9k_cache_stat_get $0 $dir/.elasticbeanstalk/config.yml; then\n    local env\n    env=\"$(command eb list 2>/dev/null)\" || env=\n    env=\"${${(@M)${(@f)env}:#\\* *}#\\* }\"\n    _p9k_cache_stat_set \"$env\"\n  fi\n  [[ -n $_p9k__cache_val[1] ]] || return\n  _p9k_prompt_segment \"$0\" black green 'AWS_EB_ICON' 0 '' \"${_p9k__cache_val[1]//\\%/%%}\"\n}\n\n_p9k_prompt_aws_eb_env_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[eb]'\n}\n\n################################################################\n# Segment to indicate background jobs with an icon.\nprompt_background_jobs() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  local msg\n  if (( _POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE )); then\n    if (( _POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS )); then\n      msg='${(%):-%j}'\n    else\n      msg='${${(%):-%j}:#1}'\n    fi\n  fi\n  _p9k_prompt_segment $0 \"$_p9k_color1\" cyan BACKGROUND_JOBS_ICON 1 '${${(%):-%j}:#0}' \"$msg\"\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n################################################################\n# Segment that indicates usage level of current partition.\nprompt_disk_usage() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0_CRITICAL red    white        DISK_ICON 1 '$_p9k__disk_usage_critical' '$_p9k__disk_usage_pct%%'\n  _p9k_prompt_segment $0_WARNING  yellow $_p9k_color1 DISK_ICON 1 '$_p9k__disk_usage_warning'  '$_p9k__disk_usage_pct%%'\n  if (( ! _POWERLEVEL9K_DISK_USAGE_ONLY_WARNING )); then\n    _p9k_prompt_segment $0_NORMAL $_p9k_color1 yellow   DISK_ICON 1 '$_p9k__disk_usage_normal'   '$_p9k__disk_usage_pct%%'\n  fi\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_disk_usage_init() {\n  typeset -g _p9k__disk_usage_pct=\n  typeset -g _p9k__disk_usage_normal=\n  typeset -g _p9k__disk_usage_warning=\n  typeset -g _p9k__disk_usage_critical=\n  _p9k__async_segments_compute+='_p9k_worker_invoke disk_usage \"_p9k_prompt_disk_usage_compute ${(q)_p9k__cwd_a}\"'\n}\n\n_p9k_prompt_disk_usage_compute() {\n  (( $+commands[df] )) || return\n  _p9k_worker_async \"_p9k_prompt_disk_usage_async ${(q)1}\" _p9k_prompt_disk_usage_sync\n}\n\n_p9k_prompt_disk_usage_async() {\n  local pct=${${=${(f)\"$(df -P $1 2>/dev/null)\"}[2]}[5]%%%}\n  [[ $pct == <0-100> && $pct != $_p9k__disk_usage_pct ]] || return\n  _p9k__disk_usage_pct=$pct\n  _p9k__disk_usage_normal=\n  _p9k__disk_usage_warning=\n  _p9k__disk_usage_critical=\n  if (( _p9k__disk_usage_pct >= _POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL )); then\n    _p9k__disk_usage_critical=1\n  elif (( _p9k__disk_usage_pct >= _POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL )); then\n    _p9k__disk_usage_warning=1\n  elif (( ! _POWERLEVEL9K_DISK_USAGE_ONLY_WARNING )); then\n    _p9k__disk_usage_normal=1\n  fi\n  _p9k_print_params          \\\n    _p9k__disk_usage_pct     \\\n    _p9k__disk_usage_normal  \\\n    _p9k__disk_usage_warning \\\n    _p9k__disk_usage_critical\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_disk_usage_sync() {\n  eval $REPLY\n  _p9k_worker_reply $REPLY\n}\n\nfunction _p9k_read_file() {\n  _p9k__ret=''\n  [[ -n $1 ]] && IFS='' read -r _p9k__ret <$1\n  [[ -n $_p9k__ret ]]\n}\n\nfunction _p9k_fvm_old() {\n  _p9k_upglob fvm @ && return 1\n  local fvm=$_p9k__parent_dirs[$?]/fvm\n  if [[ ${fvm:A} == (#b)*/versions/([^/]##)/bin/flutter ]]; then\n    _p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\\%/%%}\n    return 0\n  fi\n  return 1\n}\n\nfunction _p9k_fvm_new() {\n  _p9k_upglob .fvm/flutter_sdk @ && return 1\n  local sdk=$_p9k__parent_dirs[$?]/.fvm/flutter_sdk\n  if [[ ${sdk:A} == (#b)*/versions/([^/]##) ]]; then\n    _p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\\%/%%}\n    return 0\n  fi\n  return 1\n}\n\nprompt_fvm() {\n  _p9k_fvm_new || _p9k_fvm_old\n}\n\n_p9k_prompt_fvm_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[fvm]'\n}\n\n################################################################\n# Segment that displays the battery status in levels and colors\nprompt_battery() {\n  [[ $_p9k_os == (Linux|Android) ]] && _p9k_prompt_battery_set_args\n  (( $#_p9k__battery_args )) && _p9k_prompt_segment \"${_p9k__battery_args[@]}\"\n}\n\n_p9k_prompt_battery_init() {\n  typeset -ga _p9k__battery_args=()\n  if [[ $_p9k_os == OSX && $+commands[pmset] == 1 ]]; then\n    _p9k__async_segments_compute+='_p9k_worker_invoke battery _p9k_prompt_battery_compute'\n    return\n  fi\n  if [[ $_p9k_os != (Linux|Android) ||\n        -z /sys/class/power_supply/(CMB*|BAT*|*battery)/(energy_full|charge_full|charge_counter)(#qN) ]]; then\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n  fi\n}\n\n_p9k_prompt_battery_compute() {\n  _p9k_worker_async _p9k_prompt_battery_async _p9k_prompt_battery_sync\n}\n\n_p9k_prompt_battery_async() {\n  local prev=\"${(pj:\\0:)_p9k__battery_args}\"\n  _p9k_prompt_battery_set_args\n  [[ \"${(pj:\\0:)_p9k__battery_args}\" == $prev ]] && return 1\n  _p9k_print_params _p9k__battery_args\n  echo -E - 'reset=2'\n}\n\n_p9k_prompt_battery_sync() {\n  eval $REPLY\n  _p9k_worker_reply $REPLY\n}\n\n_p9k_prompt_battery_set_args() {\n  _p9k__battery_args=()\n\n  local state remain\n  local -i bat_percent\n\n  case $_p9k_os in\n    OSX)\n      (( $+commands[pmset] )) || return\n      local raw_data=${${(Af)\"$(pmset -g batt 2>/dev/null)\"}[2]}\n      [[ $raw_data == *InternalBattery* ]] || return\n      remain=${${(s: :)${${(s:; :)raw_data}[3]}}[1]}\n      [[ $remain == *no* ]] && remain=\"...\"\n      [[ $raw_data =~ '([0-9]+)%' ]] && bat_percent=$match[1]\n\n      case \"${${(s:; :)raw_data}[2]}\" in\n        'charging'|'finishing charge'|'AC attached')\n          if (( bat_percent == 100 )); then\n            state=CHARGED\n            remain=''\n          else\n            state=CHARGING\n          fi\n        ;;\n        'discharging')\n          (( bat_percent < _POWERLEVEL9K_BATTERY_LOW_THRESHOLD )) && state=LOW || state=DISCONNECTED\n        ;;\n        *)\n          state=CHARGED\n          remain=''\n        ;;\n      esac\n    ;;\n\n    Linux|Android)\n      # See https://sourceforge.net/projects/acpiclient.\n      local -a bats=( /sys/class/power_supply/(CMB*|BAT*|*battery)/(FN) )\n      (( $#bats )) || return\n\n      local -i energy_now energy_full power_now\n      local -i is_full=1 is_calculating is_charching\n      local dir\n      for dir in $bats; do\n        _p9k_read_file $dir/status(N) && local bat_status=$_p9k__ret || continue\n        # Skip batteries with \"Unknown\" status: https://github.com/romkatv/powerlevel10k/pull/2562.\n        [[ $bat_status == Unknown ]] && continue\n        local -i pow=0 full=0\n        if _p9k_read_file $dir/(energy_full|charge_full|charge_counter)(N); then\n          (( energy_full += ${full::=_p9k__ret} ))\n        fi\n        if _p9k_read_file $dir/(power|current)_now(N) && (( $#_p9k__ret < 9 )); then\n          (( power_now += ${pow::=$_p9k__ret} ))\n        fi\n        if _p9k_read_file $dir/capacity(N); then\n          (( energy_now += _p9k__ret * full / 100. + 0.5 ))\n        elif _p9k_read_file $dir/(energy|charge)_now(N); then\n          (( energy_now += _p9k__ret ))\n        fi\n        [[ $bat_status != Full                                ]] && is_full=0\n        [[ $bat_status == Charging                            ]] && is_charching=1\n        [[ $bat_status == (Charging|Discharging) && $pow == 0 ]] && is_calculating=1\n      done\n\n      (( energy_full )) || return\n\n      bat_percent=$(( 100. * energy_now / energy_full + 0.5 ))\n      (( bat_percent > 100 )) && bat_percent=100\n\n      if (( is_full || (bat_percent == 100 && is_charching) )); then\n        state=CHARGED\n      else\n        if (( is_charching )); then\n          state=CHARGING\n        elif (( bat_percent < _POWERLEVEL9K_BATTERY_LOW_THRESHOLD )); then\n          state=LOW\n        else\n          state=DISCONNECTED\n        fi\n\n        if (( power_now > 0 )); then\n          (( is_charching )) && local -i e=$((energy_full - energy_now)) || local -i e=energy_now\n          local -i minutes=$(( 60 * e / power_now ))\n          (( minutes > 0 )) && remain=$((minutes/60)):${(l#2##0#)$((minutes%60))}\n        elif (( is_calculating )); then\n          remain=\"...\"\n        fi\n      fi\n    ;;\n\n    *)\n      return 0\n    ;;\n  esac\n\n  (( bat_percent >= _POWERLEVEL9K_BATTERY_${state}_HIDE_ABOVE_THRESHOLD )) && return\n\n  local msg=\"$bat_percent%%\"\n  [[ $_POWERLEVEL9K_BATTERY_VERBOSE == 1 && -n $remain ]] && msg+=\" ($remain)\"\n\n  local icon=BATTERY_ICON\n  local var=_POWERLEVEL9K_BATTERY_${state}_STAGES\n  local -i idx=\"${#${(@P)var}}\"\n  if (( idx )); then\n    (( bat_percent < 100 )) && idx=$((bat_percent * idx / 100 + 1))\n    icon=$'\\1'\"${${(@P)var}[idx]}\"\n  fi\n\n  local bg=$_p9k_color1\n  local var=_POWERLEVEL9K_BATTERY_${state}_LEVEL_BACKGROUND\n  local -i idx=\"${#${(@P)var}}\"\n  if (( idx )); then\n    (( bat_percent < 100 )) && idx=$((bat_percent * idx / 100 + 1))\n    bg=\"${${(@P)var}[idx]}\"\n  fi\n\n  local fg=$_p9k_battery_states[$state]\n  local var=_POWERLEVEL9K_BATTERY_${state}_LEVEL_FOREGROUND\n  local -i idx=\"${#${(@P)var}}\"\n  if (( idx )); then\n    (( bat_percent < 100 )) && idx=$((bat_percent * idx / 100 + 1))\n    fg=\"${${(@P)var}[idx]}\"\n  fi\n\n  _p9k__battery_args=(prompt_battery_$state \"$bg\" \"$fg\" $icon 0 '' $msg)\n}\n\n################################################################\n# Public IP segment\nprompt_public_ip() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  local ip='${_p9k__public_ip:-$_POWERLEVEL9K_PUBLIC_IP_NONE}'\n  if [[ -n $_POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE ]]; then\n    _p9k_prompt_segment \"$0\" \"$_p9k_color1\" \"$_p9k_color2\" PUBLIC_IP_ICON 1 '${_p9k__public_ip_not_vpn:+'$ip'}' $ip\n    _p9k_prompt_segment \"$0\" \"$_p9k_color1\" \"$_p9k_color2\" VPN_ICON 1 '${_p9k__public_ip_vpn:+'$ip'}' $ip\n  else\n    _p9k_prompt_segment \"$0\" \"$_p9k_color1\" \"$_p9k_color2\" PUBLIC_IP_ICON 1 $ip $ip\n  fi\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_public_ip_init() {\n  typeset -g _p9k__public_ip=\n  typeset -gF _p9k__public_ip_next_time=0\n  _p9k__async_segments_compute+='_p9k_worker_invoke public_ip _p9k_prompt_public_ip_compute'\n}\n\n_p9k_prompt_public_ip_compute() {\n  (( EPOCHREALTIME >= _p9k__public_ip_next_time )) || return\n  _p9k_worker_async _p9k_prompt_public_ip_async _p9k_prompt_public_ip_sync\n}\n\n_p9k_prompt_public_ip_async() {\n  local ip method\n  local -F start=EPOCHREALTIME\n  local -F next='start + 5'\n  for method in $_POWERLEVEL9K_PUBLIC_IP_METHODS $_POWERLEVEL9K_PUBLIC_IP_METHODS; do\n    case $method in\n      dig)\n        if (( $+commands[dig] )); then\n          ip=\"$(dig +tries=1 +short -4 A myip.opendns.com @resolver1.opendns.com 2>/dev/null)\"\n          [[ $ip == ';'* ]] && ip=\n          if [[ -z $ip ]]; then\n            ip=\"$(dig +tries=1 +short -6 AAAA myip.opendns.com @resolver1.opendns.com 2>/dev/null)\"\n            [[ $ip == ';'* ]] && ip=\n          fi\n        fi\n      ;;\n      curl)\n        if (( $+commands[curl] )); then\n          ip=\"$(curl --max-time 5 -w '\\n' \"$_POWERLEVEL9K_PUBLIC_IP_HOST\" 2>/dev/null)\"\n        fi\n      ;;\n      wget)\n        if (( $+commands[wget] )); then\n          ip=\"$(wget -T 5 -qO- \"$_POWERLEVEL9K_PUBLIC_IP_HOST\" 2>/dev/null)\"\n        fi\n      ;;\n    esac\n    [[ $ip =~ '^[0-9a-f.:]+$' ]] || ip=''\n    if [[ -n $ip ]]; then\n      next=$((start + _POWERLEVEL9K_PUBLIC_IP_TIMEOUT))\n      break\n    fi\n  done\n  _p9k__public_ip_next_time=$next\n  _p9k_print_params _p9k__public_ip_next_time\n  [[ $_p9k__public_ip == $ip ]] && return\n  _p9k__public_ip=$ip\n  _p9k_print_params _p9k__public_ip\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_public_ip_sync() {\n  eval $REPLY\n  _p9k_worker_reply $REPLY\n}\n\n################################################################\n# Context: user@hostname (who am I and where am I)\nprompt_context() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n\n  local content\n  if [[ $_POWERLEVEL9K_ALWAYS_SHOW_CONTEXT == 0 && -n $DEFAULT_USER && $P9K_SSH == 0 ]]; then\n    local user=\"${(%):-%n}\"\n    if [[ $user == $DEFAULT_USER ]]; then\n      content=\"${user//\\%/%%}\"\n    fi\n  fi\n\n  local state\n  if (( P9K_SSH )); then\n    if [[ -n \"$SUDO_COMMAND\" ]]; then\n      state=\"REMOTE_SUDO\"\n    else\n      state=\"REMOTE\"\n    fi\n  elif [[ -n \"$SUDO_COMMAND\" ]]; then\n    state=\"SUDO\"\n  else\n    state=\"DEFAULT\"\n  fi\n\n  local cond\n  for state cond in $state '${${(%):-%#}:#\\#}' ROOT '${${(%):-%#}:#\\%}'; do\n    local text=$content\n    if [[ -z $text ]]; then\n      local var=_POWERLEVEL9K_CONTEXT_${state}_TEMPLATE\n      if (( $+parameters[$var] )); then\n        text=${(P)var}\n        text=${(g::)text}\n      else\n        text=$_POWERLEVEL9K_CONTEXT_TEMPLATE\n      fi\n    fi\n    _p9k_prompt_segment \"$0_$state\" \"$_p9k_color1\" yellow '' 0 \"$cond\" \"$text\"\n  done\n\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_context() {\n  if [[ $_POWERLEVEL9K_ALWAYS_SHOW_CONTEXT == 0 && -n $DEFAULT_USER && $P9K_SSH == 0 ]]; then\n    if [[ ${(%):-%n} == $DEFAULT_USER ]]; then\n      if (( ! _POWERLEVEL9K_ALWAYS_SHOW_USER )); then\n        return\n      fi\n    fi\n  fi\n  prompt_context\n}\n\n_p9k_prompt_context_init() {\n  if [[ $_POWERLEVEL9K_ALWAYS_SHOW_CONTEXT == 0 && -n $DEFAULT_USER && $P9K_SSH == 0 ]]; then\n    if [[ ${(%):-%n} == $DEFAULT_USER ]]; then\n      if (( ! _POWERLEVEL9K_ALWAYS_SHOW_USER )); then\n        typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n      fi\n    fi\n  fi\n}\n\n################################################################\n# User: user (who am I)\nprompt_user() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment \"${0}_ROOT\" \"${_p9k_color1}\" yellow ROOT_ICON 0 '${${(%):-%#}:#\\%}' \"$_POWERLEVEL9K_USER_TEMPLATE\"\n  if [[ -n \"$SUDO_COMMAND\" ]]; then\n    _p9k_prompt_segment \"${0}_SUDO\" \"${_p9k_color1}\" yellow SUDO_ICON 0 '${${(%):-%#}:#\\#}' \"$_POWERLEVEL9K_USER_TEMPLATE\"\n  else\n    _p9k_prompt_segment \"${0}_DEFAULT\" \"${_p9k_color1}\" yellow USER_ICON 0 '${${(%):-%#}:#\\#}' \"%n\"\n  fi\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_user() {\n  if [[ $_POWERLEVEL9K_ALWAYS_SHOW_USER == 0 && \"${(%):-%n}\" == $DEFAULT_USER ]]; then\n    return\n  fi\n  prompt_user\n}\n\n_p9k_prompt_user_init() {\n  if [[ $_POWERLEVEL9K_ALWAYS_SHOW_USER == 0 && \"${(%):-%n}\" == $DEFAULT_USER ]]; then\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n  fi\n}\n\n################################################################\n# Host: machine (where am I)\nprompt_host() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  if (( P9K_SSH )); then\n    _p9k_prompt_segment \"$0_REMOTE\" \"${_p9k_color1}\" yellow SSH_ICON 0 '' \"$_POWERLEVEL9K_HOST_TEMPLATE\"\n  else\n    _p9k_prompt_segment \"$0_LOCAL\" \"${_p9k_color1}\" yellow HOST_ICON 0 '' \"$_POWERLEVEL9K_HOST_TEMPLATE\"\n  fi\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_host() { prompt_host; }\n\n################################################################\n# Toolbox: https://github.com/containers/toolbox\nfunction prompt_toolbox() {\n  _p9k_prompt_segment $0 $_p9k_color1 yellow TOOLBOX_ICON 0 '' $P9K_TOOLBOX_NAME\n}\n\n_p9k_prompt_toolbox_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$P9K_TOOLBOX_NAME'\n}\n\nfunction instant_prompt_toolbox() {\n  _p9k_prompt_segment prompt_toolbox $_p9k_color1 yellow TOOLBOX_ICON 1 '$P9K_TOOLBOX_NAME' '$P9K_TOOLBOX_NAME'\n}\n\n################################################################\n# The 'custom` prompt provides a way for users to invoke commands and display\n# the output in a segment.\n_p9k_custom_prompt() {\n  local segment_name=${1:u}\n  local command=_POWERLEVEL9K_CUSTOM_${segment_name}\n  command=${(P)command}\n  local parts=(\"${(@z)command}\")\n  local cmd=\"${(Q)parts[1]}\"\n  (( $+functions[$cmd] || $+commands[$cmd] )) || return\n  local content=\"$(eval $command)\"\n  [[ -n $content ]] || return\n  _p9k_prompt_segment \"prompt_custom_$1\" $_p9k_color2 $_p9k_color1 \"CUSTOM_${segment_name}_ICON\" 0 '' \"$content\"\n}\n\n################################################################\n# Display the duration the command needed to run.\nprompt_command_execution_time() {\n  (( $+P9K_COMMAND_DURATION_SECONDS )) || return\n  (( P9K_COMMAND_DURATION_SECONDS >= _POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD )) || return\n\n  if (( P9K_COMMAND_DURATION_SECONDS < 60 )); then\n    if (( !_POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION )); then\n      local -i sec=$((P9K_COMMAND_DURATION_SECONDS + 0.5))\n    else\n      local -F $_POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION sec=P9K_COMMAND_DURATION_SECONDS\n    fi\n    local text=${sec}s\n  else\n    local -i d=$((P9K_COMMAND_DURATION_SECONDS + 0.5))\n    if [[ $_POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT == \"H:M:S\" ]]; then\n      local text=${(l.2..0.)$((d % 60))}\n      if (( d >= 60 )); then\n        text=${(l.2..0.)$((d / 60 % 60))}:$text\n        if (( d >= 36000 )); then\n          text=$((d / 3600)):$text\n        elif (( d >= 3600 )); then\n          text=0$((d / 3600)):$text\n        fi\n      fi\n    else\n      local text=\"$((d % 60))s\"\n      if (( d >= 60 )); then\n        text=\"$((d / 60 % 60))m $text\"\n        if (( d >= 3600 )); then\n          text=\"$((d / 3600 % 24))h $text\"\n          if (( d >= 86400 )); then\n            text=\"$((d / 86400))d $text\"\n          fi\n        fi\n      fi\n    fi\n  fi\n\n  _p9k_prompt_segment \"$0\" \"red\" \"yellow1\" 'EXECUTION_TIME_ICON' 0 '' $text\n}\n\nfunction _p9k_shorten_delim_len() {\n  local def=$1\n  _p9k__ret=${_POWERLEVEL9K_SHORTEN_DELIMITER_LENGTH:--1}\n  (( _p9k__ret >= 0 )) || _p9k_prompt_length $1\n}\n\n# Percents are duplicated because this function is currently used only\n# where the result is going to be percent-expanded.\nfunction _p9k_url_escape() {\n  emulate -L zsh -o no_multi_byte -o extended_glob\n  local MATCH MBEGIN MEND\n  _p9k__ret=${1//(#m)[^a-zA-Z0-9\"\\/:_.-!'()~\"]/%%${(l:2::0:)$(([##16]#MATCH))}}\n}\n\n################################################################\n# Dir: current working directory\nprompt_dir() {\n  if (( _POWERLEVEL9K_DIR_PATH_ABSOLUTE )); then\n    local p=${(V)_p9k__cwd}\n    local -a parts=(\"${(s:/:)p}\")\n  elif [[ -o auto_name_dirs ]]; then\n    local p=${(V)${_p9k__cwd/#(#b)$HOME(|\\/*)/'~'$match[1]}}\n    local -a parts=(\"${(s:/:)p}\")\n  else\n    local p=${(%):-%~}\n    if [[ $p == '~['* ]]; then\n      # If \"${(%):-%~}\" expands to \"~[a]/]/b\", is the first component \"~[a]\" or \"~[a]/]\"?\n      # One would expect \"${(%):-%-1~}\" to give the right answer but alas it always simply\n      # gives the segment before the first slash, which would be \"~[a]\" in this case. Worse,\n      # for \"~[a/b]\" it'll give the nonsensical \"~[a\". To solve this problem we have to\n      # repeat what \"${(%):-%~}\" does and hope that it produces the same result.\n      local func=''\n      local -a parts=()\n      for func in zsh_directory_name $zsh_directory_name_functions; do\n        local reply=()\n        if (( $+functions[$func] )) && $func d $_p9k__cwd && [[ $p == '~['${(V)reply[1]}']'* ]]; then\n          parts+='~['${(V)reply[1]}']'\n          break\n        fi\n      done\n      if (( $#parts )); then\n        parts+=(${(s:/:)${p#$parts[1]}})\n      else\n        p=${(V)_p9k__cwd}\n        parts=(\"${(s:/:)p}\")\n      fi\n    else\n      local -a parts=(\"${(s:/:)p}\")\n    fi\n  fi\n\n  local -i fake_first=0 expand=0 shortenlen=${_POWERLEVEL9K_SHORTEN_DIR_LENGTH:--1}\n\n  if (( $+_POWERLEVEL9K_SHORTEN_DELIMITER )); then\n    local delim=$_POWERLEVEL9K_SHORTEN_DELIMITER\n  else\n    if [[ $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then\n      local delim=$'\\u2026'\n    else\n      local delim='..'\n    fi\n  fi\n\n  case $_POWERLEVEL9K_SHORTEN_STRATEGY in\n    truncate_absolute|truncate_absolute_chars)\n      if (( shortenlen > 0 && $#p > shortenlen )); then\n        _p9k_shorten_delim_len $delim\n        if (( $#p > shortenlen + $_p9k__ret )); then\n          local -i n=shortenlen\n          local -i i=$#parts\n          while true; do\n            local dir=$parts[i]\n            local -i len=$(( $#dir + (i > 1) ))\n            if (( len <= n )); then\n              (( n -= len ))\n              (( --i ))\n            else\n              parts[i]=$'\\1'$dir[-n,-1]\n              parts[1,i-1]=()\n              break\n            fi\n          done\n        fi\n      fi\n    ;;\n    truncate_with_package_name|truncate_middle|truncate_from_right)\n      () {\n        [[ $_POWERLEVEL9K_SHORTEN_STRATEGY == truncate_with_package_name &&\n           $+commands[jq] == 1 && $#_POWERLEVEL9K_DIR_PACKAGE_FILES > 0 ]] || return\n        local pats=\"(${(j:|:)_POWERLEVEL9K_DIR_PACKAGE_FILES})\"\n        local -i i=$#parts\n        local dir=$_p9k__cwd\n        for (( ; i > 0; --i )); do\n          local markers=($dir/${~pats}(N))\n          if (( $#markers )); then\n            local pat= pkg_file=\n            for pat in $_POWERLEVEL9K_DIR_PACKAGE_FILES; do\n              for pkg_file in $markers; do\n                [[ $pkg_file == $dir/${~pat} ]] || continue\n                if ! _p9k_cache_stat_get $0_pkg $pkg_file; then\n                  local pkg_name=''\n                  pkg_name=\"$(jq -j '.name | select(. != null)' <$pkg_file 2>/dev/null)\" || pkg_name=''\n                  _p9k_cache_stat_set \"$pkg_name\"\n                fi\n                [[ -n $_p9k__cache_val[1] ]] || continue\n                parts[1,i]=($_p9k__cache_val[1])\n                fake_first=1\n                return 0\n              done\n            done\n          fi\n          dir=${dir:h}\n        done\n      }\n      if (( shortenlen > 0 )); then\n        _p9k_shorten_delim_len $delim\n        local -i d=_p9k__ret pref=shortenlen suf=0 i=2\n        [[ $_POWERLEVEL9K_SHORTEN_STRATEGY == truncate_middle ]] && suf=pref\n        for (( ; i < $#parts; ++i )); do\n          local dir=$parts[i]\n          if (( $#dir > pref + suf + d )); then\n            dir[pref+1,-suf-1]=$'\\1'\n            parts[i]=$dir\n          fi\n        done\n      fi\n    ;;\n    truncate_to_last)\n      shortenlen=${_POWERLEVEL9K_SHORTEN_DIR_LENGTH:-1}\n      (( shortenlen > 0 )) || shortenlen=1\n      local -i i='shortenlen+1'\n      if [[ $#parts -gt i || $p[1] != / && $#parts -gt shortenlen ]]; then\n        fake_first=1\n        parts[1,-i]=()\n      fi\n    ;;\n    truncate_to_first_and_last)\n      if (( shortenlen > 0 )); then\n        local -i i=$(( shortenlen + 1 ))\n        [[ $p == /* ]] && (( ++i ))\n        for (( ; i <= $#parts - shortenlen; ++i )); do\n          parts[i]=$'\\1'\n        done\n      fi\n    ;;\n    truncate_to_unique)\n      expand=1\n      delim=${_POWERLEVEL9K_SHORTEN_DELIMITER-'*'}\n      shortenlen=${_POWERLEVEL9K_SHORTEN_DIR_LENGTH:-1}\n      (( shortenlen >= 0 )) || shortenlen=1\n      local rp=${(g:oce:)p}\n      local rparts=(\"${(@s:/:)rp}\")\n\n      local -i i=2 e=$(($#parts - shortenlen))\n      if [[ -n $_POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER ]]; then\n        (( e += shortenlen ))\n        local orig=(\"$parts[2]\" \"${(@)parts[$((shortenlen > $#parts ? -$#parts : -shortenlen)),-1]}\")\n      elif [[ $p[1] == / ]]; then\n        (( ++i ))\n      fi\n      if (( i <= e )); then\n        local mtimes=(${(Oa)_p9k__parent_mtimes:$(($#parts-e)):$((e-i+1))})\n        local key=\"${(pj.:.)mtimes}\"\n      else\n        local key=\n      fi\n      if ! _p9k_cache_ephemeral_get $0 $e $i $_p9k__cwd $p || [[ $key != $_p9k__cache_val[1] ]]; then\n        local rtail=${(j./.)rparts[i,-1]}\n        local parent=$_p9k__cwd[1,-2-$#rtail]\n        _p9k_prompt_length $delim\n        local -i real_delim_len=_p9k__ret\n        [[ -n $parts[i-1] ]] && parts[i-1]=\"\\${(Q)\\${:-${(qqq)${(q)parts[i-1]}}}}\"$'\\2'\n        local -i d=${_POWERLEVEL9K_SHORTEN_DELIMITER_LENGTH:--1}\n        (( d >= 0 )) || d=real_delim_len\n        local -i m=1\n        for (( ; i <= e; ++i, ++m )); do\n          local sub=$parts[i]\n          local rsub=$rparts[i]\n          local dir=$parent/$rsub mtime=$mtimes[m]\n          local pair=$_p9k__dir_stat_cache[$dir]\n          if [[ $pair == ${mtime:-x}:* ]]; then\n            parts[i]=${pair#*:}\n          else\n            [[ $sub != *[\"~!#\\`\\$^&*()\\\\\\\"'<>?{}[]\"]* ]]\n            local -i q=$?\n            if [[ -n $_POWERLEVEL9K_SHORTEN_FOLDER_MARKER &&\n                  -n $dir/${~_POWERLEVEL9K_SHORTEN_FOLDER_MARKER}(#qN) ]]; then\n              (( q )) && parts[i]=\"\\${(Q)\\${:-${(qqq)${(q)sub}}}}\"\n              parts[i]+=$'\\2'\n            else\n              local -i j=$rsub[(i)[^.]]\n              for (( ; j + d < $#rsub; ++j )); do\n                local -a matching=($parent/$rsub[1,j]*/(N))\n                (( $#matching == 1 )) && break\n              done\n              local -i saved=$((${(m)#${(V)${rsub:$j}}} - d))\n              if (( saved > 0 )); then\n                if (( q )); then\n                  parts[i]='${${${_p9k__d:#-*}:+${(Q)${:-'${(qqq)${(q)sub}}'}}}:-${(Q)${:-'\n                  parts[i]+=$'\\3'${(qqq)${(q)${(V)${rsub[1,j]}}}}$'}}\\1\\3''${$((_p9k__d+='$saved'))+}}'\n                else\n                  parts[i]='${${${_p9k__d:#-*}:+'$sub$'}:-\\3'${(V)${rsub[1,j]}}$'\\1\\3''${$((_p9k__d+='$saved'))+}}'\n                fi\n              else\n                (( q )) && parts[i]=\"\\${(Q)\\${:-${(qqq)${(q)sub}}}}\"\n              fi\n            fi\n            [[ -n $mtime ]] && _p9k__dir_stat_cache[$dir]=\"$mtime:$parts[i]\"\n          fi\n          parent+=/$rsub\n        done\n        if [[ -n $_POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER ]]; then\n          local _2=$'\\2'\n          if [[ $_POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER == last* ]]; then\n            (( e = ${parts[(I)*$_2]} + ${_POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER#*:} ))\n          else\n            (( e = ${parts[(ib:2:)*$_2]} + ${_POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER#*:} ))\n          fi\n          if (( e > 1 && e <= $#parts )); then\n            parts[1,e-1]=()\n            fake_first=1\n          elif [[ $p == /?* ]]; then\n            parts[2]=\"\\${(Q)\\${:-${(qqq)${(q)orig[1]}}}}\"$'\\2'\n          fi\n          for ((i = $#parts < shortenlen ? $#parts : shortenlen; i > 0; --i)); do\n            [[ $#parts[-i] == *$'\\2' ]] && continue\n            if [[ $orig[-i] == *[\"~!#\\`\\$^&*()\\\\\\\"'<>?{}[]\"]* ]]; then\n              parts[-i]='${(Q)${:-'${(qqq)${(q)orig[-i]}}'}}'$'\\2'\n            else\n              parts[-i]=${orig[-i]}$'\\2'\n            fi\n          done\n        else\n          for ((; i <= $#parts; ++i)); do\n            [[ $parts[i] == *[\"~!#\\`\\$^&*()\\\\\\\"'<>?{}[]\"]* ]] && parts[i]='${(Q)${:-'${(qqq)${(q)parts[i]}}'}}'\n            parts[i]+=$'\\2'\n          done\n        fi\n        _p9k_cache_ephemeral_set \"$key\" \"${parts[@]}\"\n      fi\n      parts=(\"${(@)_p9k__cache_val[2,-1]}\")\n    ;;\n    truncate_with_folder_marker)\n      if [[ -n $_POWERLEVEL9K_SHORTEN_FOLDER_MARKER ]]; then\n        local dir=$_p9k__cwd\n        local -a m=()\n        local -i i=$(($#parts - 1))\n        for (( ; i > 1; --i )); do\n          dir=${dir:h}\n          [[ -n $dir/${~_POWERLEVEL9K_SHORTEN_FOLDER_MARKER}(#qN) ]] && m+=$i\n        done\n        m+=1\n        for (( i=1; i < $#m; ++i )); do\n          (( m[i] - m[i+1] > 2 )) && parts[m[i+1]+1,m[i]-1]=($'\\1')\n        done\n      fi\n    ;;\n    *)\n      if (( shortenlen > 0 )); then\n        local -i len=$#parts\n        [[ -z $parts[1] ]] && (( --len ))\n        if (( len > shortenlen )); then\n          parts[1,-shortenlen-1]=($'\\1')\n        fi\n      fi\n    ;;\n  esac\n\n  # w=0: writable\n  # w=1: not writable\n  # w=2: does not exist\n  (( !_POWERLEVEL9K_DIR_SHOW_WRITABLE )) || [[ -w $_p9k__cwd ]]\n  local -i w=$?\n  (( w && _POWERLEVEL9K_DIR_SHOW_WRITABLE > 2 )) && [[ ! -e $_p9k__cwd ]] && w=2\n  if ! _p9k_cache_ephemeral_get $0 $_p9k__cwd $p $w $fake_first \"${parts[@]}\"; then\n    local state=$0\n    local icon=''\n    local a='' b='' c=''\n    for a b c in \"${_POWERLEVEL9K_DIR_CLASSES[@]}\"; do\n      if [[ $_p9k__cwd == ${~a} ]]; then\n        [[ -n $b ]] && state+=_${${(U)b}//İ/I}\n        icon=$'\\1'$c\n        break\n      fi\n    done\n    if (( w )); then\n      if (( _POWERLEVEL9K_DIR_SHOW_WRITABLE == 1 )); then\n        state=${0}_NOT_WRITABLE\n      elif (( w == 2 )); then\n        state+=_NON_EXISTENT\n      else\n        state+=_NOT_WRITABLE\n      fi\n      icon=LOCK_ICON\n    fi\n\n    local state_u=${${(U)state}//İ/I}\n\n    local style=%b\n    _p9k_color $state BACKGROUND blue\n    _p9k_background $_p9k__ret\n    style+=$_p9k__ret\n    _p9k_color $state FOREGROUND \"$_p9k_color1\"\n    _p9k_foreground $_p9k__ret\n    style+=$_p9k__ret\n    if (( expand )); then\n      _p9k_escape_style $style\n      style=$_p9k__ret\n    fi\n\n    parts=(\"${(@)parts//\\%/%%}\")\n    if [[ $_POWERLEVEL9K_HOME_FOLDER_ABBREVIATION != '~' && $fake_first == 0 && $p == ('~'|'~/'*) ]]; then\n      (( expand )) && _p9k_escape $_POWERLEVEL9K_HOME_FOLDER_ABBREVIATION || _p9k__ret=$_POWERLEVEL9K_HOME_FOLDER_ABBREVIATION\n      parts[1]=$_p9k__ret\n      [[ $_p9k__ret == *%* ]] && parts[1]+=$style\n    elif [[ $_POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER == 1 && $fake_first == 0 && $#parts > 1 && -z $parts[1] && -n $parts[2] ]]; then\n      parts[1]=()\n    fi\n\n    local last_style=\n    _p9k_param $state PATH_HIGHLIGHT_BOLD ''\n    [[ $_p9k__ret == true ]] && last_style+=%B\n    if (( $+parameters[_POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND] ||\n          $+parameters[_POWERLEVEL9K_${state_u}_PATH_HIGHLIGHT_FOREGROUND] )); then\n      _p9k_color $state PATH_HIGHLIGHT_FOREGROUND ''\n      _p9k_foreground $_p9k__ret\n      last_style+=$_p9k__ret\n    fi\n    if [[ -n $last_style ]]; then\n      (( expand )) && _p9k_escape_style $last_style || _p9k__ret=$last_style\n      parts[-1]=$_p9k__ret${parts[-1]//$'\\1'/$'\\1'$_p9k__ret}$style\n    fi\n\n    local anchor_style=\n    _p9k_param $state ANCHOR_BOLD ''\n    [[ $_p9k__ret == true ]] && anchor_style+=%B\n    if (( $+parameters[_POWERLEVEL9K_DIR_ANCHOR_FOREGROUND] ||\n          $+parameters[_POWERLEVEL9K_${state_u}_ANCHOR_FOREGROUND] )); then\n      _p9k_color $state ANCHOR_FOREGROUND ''\n      _p9k_foreground $_p9k__ret\n      anchor_style+=$_p9k__ret\n    fi\n    if [[ -n $anchor_style ]]; then\n      (( expand )) && _p9k_escape_style $anchor_style || _p9k__ret=$anchor_style\n      if [[ -z $last_style ]]; then\n        parts=(\"${(@)parts/%(#b)(*)$'\\2'/$_p9k__ret$match[1]$style}\")\n      else\n        (( $#parts > 1 )) && parts[1,-2]=(\"${(@)parts[1,-2]/%(#b)(*)$'\\2'/$_p9k__ret$match[1]$style}\")\n        parts[-1]=${parts[-1]/$'\\2'}\n      fi\n    else\n      parts=(\"${(@)parts/$'\\2'}\")\n    fi\n\n    if (( $+parameters[_POWERLEVEL9K_DIR_SHORTENED_FOREGROUND] ||\n          $+parameters[_POWERLEVEL9K_${state_u}_SHORTENED_FOREGROUND] )); then\n      _p9k_color $state SHORTENED_FOREGROUND ''\n      _p9k_foreground $_p9k__ret\n      (( expand )) && _p9k_escape_style $_p9k__ret\n      local shortened_fg=$_p9k__ret\n      (( expand )) && _p9k_escape $delim || _p9k__ret=$delim\n      [[ $_p9k__ret == *%* ]] && _p9k__ret+=$style$shortened_fg\n      parts=(\"${(@)parts/(#b)$'\\3'(*)$'\\1'(*)$'\\3'/$shortened_fg$match[1]$_p9k__ret$match[2]$style}\")\n      parts=(\"${(@)parts/(#b)(*)$'\\1'(*)/$shortened_fg$match[1]$_p9k__ret$match[2]$style}\")\n    else\n      (( expand )) && _p9k_escape $delim || _p9k__ret=$delim\n      [[ $_p9k__ret == *%* ]] && _p9k__ret+=$style\n      parts=(\"${(@)parts/$'\\1'/$_p9k__ret}\")\n      parts=(\"${(@)parts//$'\\3'}\")\n    fi\n\n    if [[ $_p9k__cwd == / && $_POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER == 1 ]]; then\n      local sep='/'\n    else\n      local sep=''\n      if (( $+parameters[_POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND] ||\n            $+parameters[_POWERLEVEL9K_${state_u}_PATH_SEPARATOR_FOREGROUND] )); then\n        _p9k_color $state PATH_SEPARATOR_FOREGROUND ''\n        _p9k_foreground $_p9k__ret\n        (( expand )) && _p9k_escape_style $_p9k__ret\n        sep=$_p9k__ret\n      fi\n      _p9k_param $state PATH_SEPARATOR /\n      _p9k__ret=${(g::)_p9k__ret}\n      (( expand )) && _p9k_escape $_p9k__ret\n      sep+=$_p9k__ret\n      [[ $sep == *%* ]] && sep+=$style\n    fi\n\n    local content=\"${(pj.$sep.)parts}\"\n    if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )) && [[ $_p9k__cwd == /* ]]; then\n      _p9k_url_escape $_p9k__cwd\n      local header=$'%{\\e]8;;file://'$_p9k__ret$'\\a%}'\n      local footer=$'%{\\e]8;;\\a%}'\n      if (( expand )); then\n        _p9k_escape $header\n        header=$_p9k__ret\n        _p9k_escape $footer\n        footer=$_p9k__ret\n      fi\n      content=$header$content$footer\n    fi\n\n    (( expand )) && _p9k_prompt_length \"${(e):-\"\\${\\${_p9k__d::=0}+}$content\"}\" || _p9k__ret=\n    _p9k_cache_ephemeral_set \"$state\" \"$icon\" \"$expand\" \"$content\" $_p9k__ret\n  fi\n\n  if (( _p9k__cache_val[3] )); then\n    if (( $+_p9k__dir )); then\n      _p9k__cache_val[4]='${${_p9k__d::=-1024}+}'$_p9k__cache_val[4]\n    else\n      _p9k__dir=$_p9k__cache_val[4]\n      _p9k__dir_len=$_p9k__cache_val[5]\n      _p9k__cache_val[4]='%{d%}'$_p9k__cache_val[4]'%{d%}'\n    fi\n  fi\n  _p9k_prompt_segment \"$_p9k__cache_val[1]\" \"blue\" \"$_p9k_color1\" \"$_p9k__cache_val[2]\" \"$_p9k__cache_val[3]\" \"\" \"$_p9k__cache_val[4]\"\n}\n\ninstant_prompt_dir() { prompt_dir; }\n\n################################################################\n# Docker machine\nprompt_docker_machine() {\n  _p9k_prompt_segment \"$0\" \"magenta\" \"$_p9k_color1\" 'SERVER_ICON' 0 '' \"${DOCKER_MACHINE_NAME//\\%/%%}\"\n}\n\n_p9k_prompt_docker_machine_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$DOCKER_MACHINE_NAME'\n}\n\n################################################################\n# GO prompt\nprompt_go_version() {\n  _p9k_cached_cmd 0 '' go version || return\n  [[ $_p9k__ret == (#b)*go([[:digit:].]##)* ]] || return\n  local v=$match[1]\n  if (( _POWERLEVEL9K_GO_VERSION_PROJECT_ONLY )); then\n    local p=$GOPATH\n    if [[ -z $p ]]; then\n      if [[ -d $HOME/go ]]; then\n        p=$HOME/go\n      else\n        p=\"$(go env GOPATH 2>/dev/null)\" && [[ -n $p ]] || return\n      fi\n    fi\n    if [[ $_p9k__cwd/ != $p/* && $_p9k__cwd_a/ != $p/* ]]; then\n      _p9k_upglob go.mod -. && return\n    fi\n  fi\n  _p9k_prompt_segment \"$0\" \"green\" \"grey93\" \"GO_ICON\" 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_go_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[go]'\n}\n\n################################################################\n# Command number (in local history)\nprompt_history() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment \"$0\" \"grey50\" \"$_p9k_color1\" '' 0 '' '%h'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\nprompt_package() {\n  unset P9K_PACKAGE_NAME P9K_PACKAGE_VERSION\n  _p9k_upglob package.json -. && return\n\n  local file=$_p9k__parent_dirs[$?]/package.json\n  if ! _p9k_cache_stat_get $0 $file; then\n    () {\n      local data field\n      local -A found\n      # Redneck json parsing. Yields correct results for any well-formed json document.\n      # Produces random garbage for invalid json.\n      { data=\"$(<$file)\" || return } 2>/dev/null\n      data=${${data//$'\\r'}##[[:space:]]#}\n      [[ $data == '{'* ]] || return\n      data[1]=\n      local -i depth=1\n      while true; do\n        data=${data##[[:space:]]#}\n        [[ -n $data ]] || return\n        case $data[1] in\n          '{'|'[')      data[1]=; (( ++depth ));;\n          '}'|']')      data[1]=; (( --depth > 0 )) || return;;\n          ':')          data[1]=;;\n          ',')          data[1]=; field=;;\n          [[:alnum:].]) data=${data##[[:alnum:].]#};;\n          '\"')\n            local tail=${data##\\\"([^\\\"\\\\]|\\\\?)#}\n            [[ $tail == '\"'* ]] || return\n            local s=${data:1:-$#tail}\n            data=${tail:1}\n            (( depth == 1 )) || continue\n            if [[ -z $field ]]; then\n              field=${s:-x}\n            elif [[ $field == (name|version) ]]; then\n              (( ! $+found[$field] ))   || return\n              [[ -n $s ]]               || return\n              [[ $s != *($'\\n'|'\\')* ]] || return\n              found[$field]=$s\n              (( $#found == 2 )) && break\n            fi\n          ;;\n          *) return 1;;\n        esac\n      done\n      _p9k_cache_stat_set 1 $found[name] $found[version]\n      return 0\n    } || _p9k_cache_stat_set 0\n  fi\n  (( _p9k__cache_val[1] )) || return\n\n  P9K_PACKAGE_NAME=$_p9k__cache_val[2]\n  P9K_PACKAGE_VERSION=$_p9k__cache_val[3]\n  _p9k_prompt_segment \"$0\" \"cyan\" \"$_p9k_color1\" PACKAGE_ICON 0 '' ${P9K_PACKAGE_VERSION//\\%/%%}\n}\n\n################################################################\n# Detection for virtualization (systemd based systems only)\nprompt_detect_virt() {\n  local virt=\"$(systemd-detect-virt 2>/dev/null)\"\n  if [[ \"$virt\" == \"none\" ]]; then\n    local -a inode\n    if zstat -A inode +inode / 2>/dev/null && [[ $inode[1] != 2 ]]; then\n      virt=\"chroot\"\n    fi\n  fi\n  if [[ -n \"${virt}\" ]]; then\n    _p9k_prompt_segment \"$0\" \"$_p9k_color1\" \"yellow\" '' 0 '' \"${virt//\\%/%%}\"\n  fi\n}\n\n_p9k_prompt_detect_virt_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[systemd-detect-virt]'\n}\n\n################################################################\n# Segment to display the current IP address\nprompt_ip() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment \"$0\" \"cyan\" \"$_p9k_color1\" 'NETWORK_ICON' 1 '$P9K_IP_IP' '$P9K_IP_IP'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n################################################################\n# Segment to display if VPN is active\nprompt_vpn_ip() {\n  typeset -ga _p9k__vpn_ip_segments\n  _p9k__vpn_ip_segments+=($_p9k__prompt_side $_p9k__line_index $_p9k__segment_index)\n  local p='${(e)_p9k__vpn_ip_'$_p9k__prompt_side$_p9k__segment_index'}'\n  _p9k__prompt+=$p\n  typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$p\n}\n\n_p9k_vpn_ip_render() {\n  local _p9k__segment_name=vpn_ip _p9k__prompt_side ip\n  local -i _p9k__has_upglob _p9k__segment_index\n  for _p9k__prompt_side _p9k__line_index _p9k__segment_index in $_p9k__vpn_ip_segments; do\n    local _p9k__prompt=\n    for ip in $_p9k__vpn_ip_ips; do\n      _p9k_prompt_segment prompt_vpn_ip \"cyan\" \"$_p9k_color1\" 'VPN_ICON' 0 '' $ip\n    done\n    typeset -g _p9k__vpn_ip_$_p9k__prompt_side$_p9k__segment_index=$_p9k__prompt\n  done\n}\n\n################################################################\n# Segment to display laravel version\nprompt_laravel_version() {\n  # TODO: add a '-/' or '-.' here depending on whether artisan is a directory or a file.\n  _p9k_upglob artisan && return\n  local dir=$_p9k__parent_dirs[$?]\n  local app=$dir/vendor/laravel/framework/src/Illuminate/Foundation/Application.php\n  [[ -r $app ]] || return\n  if ! _p9k_cache_stat_get $0 $dir/artisan $app; then\n    local v=\"$(php $dir/artisan --version 2> /dev/null)\"\n    v=\"${${(M)v:#Laravel Framework *}#Laravel Framework }\"\n    # In some versions the output is colorized.\n    # https://github.com/romkatv/powerlevel10k/issues/2534\n    v=${${v#$'\\e['<->m}%$'\\e['<->m}\n    _p9k_cache_stat_set \"$v\"\n  fi\n  [[ -n $_p9k__cache_val[1] ]] || return\n  _p9k_prompt_segment \"$0\" \"maroon\" \"white\" 'LARAVEL_ICON' 0 '' \"${_p9k__cache_val[1]//\\%/%%}\"\n}\n\n_p9k_prompt_laravel_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[php]'\n}\n\n################################################################\n# Segment to display load\nprompt_load() {\n  if [[ $_p9k_os == (OSX|BSD) ]]; then\n    local -i len=$#_p9k__prompt _p9k__has_upglob\n    _p9k_prompt_segment $0_CRITICAL red    \"$_p9k_color1\" LOAD_ICON 1 '$_p9k__load_critical' '$_p9k__load_value'\n    _p9k_prompt_segment $0_WARNING  yellow \"$_p9k_color1\" LOAD_ICON 1 '$_p9k__load_warning'  '$_p9k__load_value'\n    _p9k_prompt_segment $0_NORMAL   green  \"$_p9k_color1\" LOAD_ICON 1 '$_p9k__load_normal'   '$_p9k__load_value'\n    (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n    return\n  fi\n\n  [[ -r /proc/loadavg ]] || return\n  _p9k_read_file /proc/loadavg || return\n  local load=${${(A)=_p9k__ret}[_POWERLEVEL9K_LOAD_WHICH]//,/.}\n  local -F pct='100. * load / _p9k_num_cpus'\n  if (( pct > _POWERLEVEL9K_LOAD_CRITICAL_PCT )); then\n    _p9k_prompt_segment $0_CRITICAL red    \"$_p9k_color1\" LOAD_ICON 0 '' $load\n  elif (( pct > _POWERLEVEL9K_LOAD_WARNING_PCT )); then\n    _p9k_prompt_segment $0_WARNING  yellow \"$_p9k_color1\" LOAD_ICON 0 '' $load\n  else\n    _p9k_prompt_segment $0_NORMAL   green  \"$_p9k_color1\" LOAD_ICON 0 '' $load\n  fi\n}\n\n_p9k_prompt_load_init() {\n  if [[ $_p9k_os == (OSX|BSD) ]]; then\n    typeset -g _p9k__load_value=\n    typeset -g _p9k__load_normal=\n    typeset -g _p9k__load_warning=\n    typeset -g _p9k__load_critical=\n    _p9k__async_segments_compute+='_p9k_worker_invoke load _p9k_prompt_load_compute'\n  elif [[ ! -r /proc/loadavg ]]; then\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n  fi\n}\n\n_p9k_prompt_load_compute() {\n  (( $+commands[sysctl] )) || return\n  _p9k_worker_async _p9k_prompt_load_async _p9k_prompt_load_sync\n}\n\n_p9k_prompt_load_async() {\n  local load=\"$(sysctl -n vm.loadavg 2>/dev/null)\" || return\n  load=${${(A)=load}[_POWERLEVEL9K_LOAD_WHICH+1]//,/.}\n  [[ $load == <->(|.<->) && $load != $_p9k__load_value ]] || return\n  _p9k__load_value=$load\n  _p9k__load_normal=\n  _p9k__load_warning=\n  _p9k__load_critical=\n  local -F pct='100. * _p9k__load_value / _p9k_num_cpus'\n  if (( pct > _POWERLEVEL9K_LOAD_CRITICAL_PCT )); then\n    _p9k__load_critical=1\n  elif (( pct > _POWERLEVEL9K_LOAD_WARNING_PCT )); then\n    _p9k__load_warning=1\n  else\n    _p9k__load_normal=1\n  fi\n  _p9k_print_params     \\\n    _p9k__load_value    \\\n    _p9k__load_normal   \\\n    _p9k__load_warning  \\\n    _p9k__load_critical\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_load_sync() {\n  eval $REPLY\n  _p9k_worker_reply $REPLY\n}\n\n# Usage: _p9k_cached_cmd <0|1> <dep> <cmd> [args...]\n#\n# The first argument says whether to capture stderr (1) or ignore it (0).\n# The second argument can be empty or a file. If it's a file, the\n# output of the command is presumed to potentially depend on it.\nfunction _p9k_cached_cmd() {\n  local cmd=$commands[$3]\n  [[ -n $cmd ]] || return\n  if ! _p9k_cache_stat_get $0\" ${(q)*}\" $2 $cmd; then\n    local out\n    if (( $1 )); then\n      out=\"$($cmd \"${@:4}\" 2>&1)\"\n    else\n      out=\"$($cmd \"${@:4}\" 2>/dev/null)\"\n    fi\n    _p9k_cache_stat_set $(( ! $? )) \"$out\"\n  fi\n  (( $_p9k__cache_val[1] )) || return\n  _p9k__ret=$_p9k__cache_val[2]\n}\n\n################################################################\n# Segment to display Node version\nprompt_node_version() {\n  _p9k_upglob package.json -.\n  local -i idx=$?\n  (( idx || ! _POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY )) || return\n\n  local node=$commands[node]\n  local -a file_deps env_deps\n  if [[ $node == ${NODENV_ROOT:-$HOME/.nodenv}/shims/node ]]; then\n    env_deps+=(\"$NODENV_VERSION\")\n    file_deps+=(${NODENV_ROOT:-$HOME/.nodenv}/version)\n    if [[ $NODENV_DIR != (|.) ]]; then\n      [[ $NODENV_DIR == /* ]] && local dir=$NODENV_DIR || local dir=\"$_p9k__cwd_a/$NODENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if [[ -e $dir/.node-version ]]; then\n            file_deps+=($dir/.node-version)\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    _p9k_upglob .node-version -. || file_deps+=($_p9k__parent_dirs[idx]/.node-version)\n  elif (( idx )); then\n    file_deps+=($_p9k__parent_dirs[idx]/package.json)\n  fi\n\n  if ! _p9k_cache_stat_get \"$0 $#env_deps ${(j: :)${(@q)env_deps}} ${(j: :)${(@q)file_deps}}\" $file_deps $node; then\n    local out\n    out=$($node --version 2>/dev/null)\n    _p9k_cache_stat_set $(( ! $? )) \"$out\"\n  fi\n  (( $_p9k__cache_val[1] )) || return\n  local v=$_p9k__cache_val[2]\n  [[ $v == v?* ]] || return\n  _p9k_prompt_segment \"$0\" \"green\" \"white\" 'NODE_ICON' 0 '' \"${${v#v}//\\%/%%}\"\n}\n\n_p9k_prompt_node_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[node]'\n}\n\n# Almost the same as `nvm_version default` but faster. The differences shouldn't affect\n# the observable behavior of Powerlevel10k.\nfunction _p9k_nvm_ls_default() {\n  local v=default\n  local -a seen=($v)\n  while [[ -r $NVM_DIR/alias/$v ]]; do\n    local target=\n    IFS='' read -r target <$NVM_DIR/alias/$v\n    target=${target%$'\\r'}\n    [[ -z $target ]] && break\n    (( $seen[(I)$target] )) && return\n    seen+=$target\n    v=$target\n  done\n\n  case $v in\n    default|N/A)\n      return 1\n    ;;\n    system|v)\n      _p9k__ret=system\n      return 0\n    ;;\n    iojs-[0-9]*)\n      v=iojs-v${v#iojs-}\n    ;;\n    [0-9]*)\n      v=v$v\n    ;;\n  esac\n\n  if [[ $v == v*.*.* ]]; then\n    if [[ -x $NVM_DIR/versions/node/$v/bin/node || -x $NVM_DIR/$v/bin/node ]]; then\n      _p9k__ret=$v\n      return 0\n    elif [[ -x $NVM_DIR/versions/io.js/$v/bin/node ]]; then\n      _p9k__ret=iojs-$v\n      return 0\n    else\n      return 1\n    fi\n  fi\n\n  local -a dirs=()\n  case $v in\n    node|node-|stable)\n      dirs=($NVM_DIR/versions/node $NVM_DIR)\n      v='(v[1-9]*|v0.*[02468].*)'\n    ;;\n    unstable)\n      dirs=($NVM_DIR/versions/node $NVM_DIR)\n      v='v0.*[13579].*'\n    ;;\n    iojs*)\n      dirs=($NVM_DIR/versions/io.js)\n      v=v${${${v#iojs}#-}#v}'*'\n    ;;\n    *)\n      dirs=($NVM_DIR/versions/node $NVM_DIR $NVM_DIR/versions/io.js)\n      v=v${v#v}'*'\n    ;;\n  esac\n\n  local -a matches=(${^dirs}/${~v}(/N))\n  (( $#matches )) || return\n\n  local max path\n  for path in ${(Oa)matches}; do\n    [[ ${path:t} == (#b)v(*).(*).(*) ]] || continue\n    v=${(j::)${(@l:6::0:)match}}\n    [[ $v > $max ]] || continue\n    max=$v\n    _p9k__ret=${path:t}\n    [[ ${path:h:t} != io.js ]] || _p9k__ret=iojs-$_p9k__ret\n  done\n\n  [[ -n $max ]]\n}\n\n# The same as `nvm_version current` but faster.\n_p9k_nvm_ls_current() {\n  local node_path=${commands[node]:A}\n  [[ -n $node_path ]] || return\n\n  local nvm_dir=${NVM_DIR:A}\n  if [[ -n $nvm_dir && $node_path == $nvm_dir/versions/io.js/* ]]; then\n    _p9k_cached_cmd 0 '' iojs --version || return\n    _p9k__ret=iojs-v${_p9k__ret#v}\n  elif [[ -n $nvm_dir && $node_path == $nvm_dir/* ]]; then\n    _p9k_cached_cmd 0 '' node --version || return\n    _p9k__ret=v${_p9k__ret#v}\n  else\n    _p9k__ret=system\n  fi\n}\n\n################################################################\n# Segment to display Node version from NVM\n# Only prints the segment if different than the default value\nprompt_nvm() {\n  [[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return\n  local current=$_p9k__ret\n  (( _POWERLEVEL9K_NVM_SHOW_SYSTEM )) ||\n    [[ $current != system ]]          ||\n    return\n  (( _POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )) ||\n    ! _p9k_nvm_ls_default                    ||\n    [[ $_p9k__ret != $current ]]             ||\n    return\n  _p9k_prompt_segment \"$0\" \"magenta\" \"black\" 'NODE_ICON' 0 '' \"${${current#v}//\\%/%%}\"\n}\n\n_p9k_prompt_nvm_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[nvm]:-${${+functions[nvm]}:#0}}'\n}\n\n################################################################\n# Segment to display NodeEnv\nprompt_nodeenv() {\n  local msg\n  if (( _POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION )) && _p9k_cached_cmd 0 '' node --version; then\n    msg=\"${_p9k__ret//\\%/%%} \"\n  fi\n  msg+=\"$_POWERLEVEL9K_NODEENV_LEFT_DELIMITER${${NODE_VIRTUAL_ENV:t}//\\%/%%}$_POWERLEVEL9K_NODEENV_RIGHT_DELIMITER\"\n  _p9k_prompt_segment \"$0\" \"black\" \"green\" 'NODE_ICON' 0 '' \"$msg\"\n}\n\n_p9k_prompt_nodeenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$NODE_VIRTUAL_ENV'\n}\n\nfunction _p9k_nodeenv_version_transform() {\n  local dir=${NODENV_ROOT:-$HOME/.nodenv}/versions\n  [[ -z $1 || $1 == system ]] && _p9k__ret=$1          && return\n  [[ -d $dir/$1 ]]            && _p9k__ret=$1          && return\n  [[ -d $dir/${1/v} ]]        && _p9k__ret=${1/v}      && return\n  [[ -d $dir/${1#node-} ]]    && _p9k__ret=${1#node-}  && return\n  [[ -d $dir/${1#node-v} ]]   && _p9k__ret=${1#node-v} && return\n  return 1\n}\n\nfunction _p9k_nodenv_global_version() {\n  _p9k_read_word ${NODENV_ROOT:-$HOME/.nodenv}/version || _p9k__ret=system\n}\n\n################################################################\n# Segment to display nodenv information\n# https://github.com/nodenv/nodenv\nprompt_nodenv() {\n  if [[ -n $NODENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_NODENV_SOURCES[(I)shell]} )) || return\n    local v=$NODENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_NODENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $NODENV_DIR != (|.) ]]; then\n      [[ $NODENV_DIR == /* ]] && local dir=$NODENV_DIR || local dir=\"$_p9k__cwd_a/$NODENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.node-version; then\n            (( ${_POWERLEVEL9K_NODENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .node-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.node-version; then\n        (( ${_POWERLEVEL9K_NODENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_NODENV_SOURCES[(I)global]} )) || return\n      _p9k_nodenv_global_version\n    fi\n\n    _p9k_nodeenv_version_transform $_p9k__ret || return\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_nodenv_global_version\n    _p9k_nodeenv_version_transform $_p9k__ret && [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_NODENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"black\" \"green\" 'NODE_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_nodenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[nodenv]:-${${+functions[nodenv]}:#0}}'\n}\n\nprompt_dotnet_version() {\n  if (( _POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY )); then\n    _p9k_upglob 'project.json|global.json|packet.dependencies|*.csproj|*.fsproj|*.xproj|*.sln' -. && return\n  fi\n\n  local cfg\n  _p9k_upglob global.json -. || cfg=$_p9k__parent_dirs[$?]/global.json\n  _p9k_cached_cmd 0 \"$cfg\" dotnet --version || return\n  _p9k_prompt_segment \"$0\" \"magenta\" \"white\" 'DOTNET_ICON' 0 '' \"$_p9k__ret\"\n}\n\n_p9k_prompt_dotnet_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[dotnet]'\n}\n\n################################################################\n# Segment to print a little OS icon\nprompt_os_icon() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment \"$0\" \"black\" \"white\" '' 0 '' \"$_p9k_os_icon\"\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_os_icon() { prompt_os_icon; }\n\n################################################################\n# Segment to display PHP version number\nprompt_php_version() {\n  if (( _POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY )); then\n    _p9k_upglob 'composer.json|*.php' -. && return\n  fi\n  _p9k_cached_cmd 0 '' php --version || return\n  [[ $_p9k__ret == (#b)(*$'\\n')#'PHP '([[:digit:].]##)* ]] || return\n  local v=$match[2]\n  _p9k_prompt_segment \"$0\" \"fuchsia\" \"grey93\" 'PHP_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_php_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[php]'\n}\n\n################################################################\n# Segment to display free RAM and used Swap\nprompt_ram() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 yellow \"$_p9k_color1\" RAM_ICON 1 '$_p9k__ram_free' '$_p9k__ram_free'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\nfunction _p9k_prompt_ram_init() {\n  if [[ $_p9k_os == OSX && $+commands[vm_stat] == 0 ||\n        $_p9k_os == BSD && ! -r /var/run/dmesg.boot ||\n        $_p9k_os != (OSX|BSD) && ! -r /proc/meminfo ]]; then\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n    return\n  fi\n  typeset -g _p9k__ram_free=\n  _p9k__async_segments_compute+='_p9k_worker_invoke ram _p9k_prompt_ram_compute'\n}\n\n_p9k_prompt_ram_compute() {\n  _p9k_worker_async _p9k_prompt_ram_async _p9k_prompt_ram_sync\n}\n\n_p9k_prompt_ram_async() {\n  local -F free_bytes\n\n  case $_p9k_os in\n    OSX)\n      (( $+commands[vm_stat] )) || return\n      local stat && stat=\"$(vm_stat 2>/dev/null)\" || return\n      [[ $stat =~ 'Pages free:[[:space:]]+([0-9]+)' ]] || return\n      (( free_bytes += match[1] ))\n      [[ $stat =~ 'Pages inactive:[[:space:]]+([0-9]+)' ]] || return\n      (( free_bytes += match[1] ))\n      if (( ! $+_p9k__ram_pagesize )); then\n        local p\n        (( $+commands[pagesize] )) && p=$(pagesize 2>/dev/null) && [[ $p == <1-> ]] || p=4096\n        typeset -gi _p9k__ram_pagesize=p\n        _p9k_print_params _p9k__ram_pagesize\n      fi\n      (( free_bytes *= _p9k__ram_pagesize ))\n    ;;\n    BSD)\n      local stat && stat=\"$(grep -F 'avail memory' /var/run/dmesg.boot 2>/dev/null)\" || return\n      free_bytes=${${(A)=stat}[4]}\n    ;;\n    *)\n      [[ -r /proc/meminfo ]] || return\n      local stat && stat=\"$(</proc/meminfo)\" || return\n      [[ $stat == (#b)*(MemAvailable:|MemFree:)[[:space:]]#(<->)* ]] || return\n      free_bytes=$(( $match[2] * 1024 ))\n    ;;\n  esac\n\n  _p9k_human_readable_bytes $free_bytes\n  [[ $_p9k__ret != $_p9k__ram_free ]] || return\n  _p9k__ram_free=$_p9k__ret\n  _p9k_print_params _p9k__ram_free\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_ram_sync() {\n  eval $REPLY\n  _p9k_worker_reply $REPLY\n}\n\nfunction _p9k_rbenv_global_version() {\n  _p9k_read_word ${RBENV_ROOT:-$HOME/.rbenv}/version || _p9k__ret=system\n}\n\n################################################################\n# Segment to display rbenv information\n# https://github.com/rbenv/rbenv#choosing-the-ruby-version\nprompt_rbenv() {\n  if [[ -n $RBENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_RBENV_SOURCES[(I)shell]} )) || return\n    local v=$RBENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_RBENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $RBENV_DIR != (|.) ]]; then\n      [[ $RBENV_DIR == /* ]] && local dir=$RBENV_DIR || local dir=\"$_p9k__cwd_a/$RBENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.ruby-version; then\n            (( ${_POWERLEVEL9K_RBENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .ruby-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.ruby-version; then\n        (( ${_POWERLEVEL9K_RBENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_RBENV_SOURCES[(I)global]} )) || return\n      _p9k_rbenv_global_version\n    fi\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_rbenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_RBENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"red\" \"$_p9k_color1\" 'RUBY_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_rbenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[rbenv]:-${${+functions[rbenv]}:#0}}'\n}\n\nfunction _p9k_phpenv_global_version() {\n  _p9k_read_word ${PHPENV_ROOT:-$HOME/.phpenv}/version || _p9k__ret=system\n}\n\nfunction _p9k_scalaenv_global_version() {\n  _p9k_read_word ${SCALAENV_ROOT:-$HOME/.scalaenv}/version || _p9k__ret=system\n}\n\n# https://github.com/scalaenv/scalaenv\nprompt_scalaenv() {\n  if [[ -n $SCALAENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_SCALAENV_SOURCES[(I)shell]} )) || return\n    local v=$SCALAENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_SCALAENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $SCALAENV_DIR != (|.) ]]; then\n      [[ $SCALAENV_DIR == /* ]] && local dir=$SCALAENV_DIR || local dir=\"$_p9k__cwd_a/$SCALAENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.scala-version; then\n            (( ${_POWERLEVEL9K_SCALAENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .scala-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.scala-version; then\n        (( ${_POWERLEVEL9K_SCALAENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_SCALAENV_SOURCES[(I)global]} )) || return\n      _p9k_scalaenv_global_version\n    fi\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_scalaenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_SCALAENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"red\" \"$_p9k_color1\" 'SCALA_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_scalaenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[scalaenv]:-${${+functions[scalaenv]}:#0}}'\n}\n\nfunction _p9k_phpenv_global_version() {\n  _p9k_read_word ${PHPENV_ROOT:-$HOME/.phpenv}/version || _p9k__ret=system\n}\n\nprompt_phpenv() {\n  if [[ -n $PHPENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_PHPENV_SOURCES[(I)shell]} )) || return\n    local v=$PHPENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_PHPENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $PHPENV_DIR != (|.) ]]; then\n      [[ $PHPENV_DIR == /* ]] && local dir=$PHPENV_DIR || local dir=\"$_p9k__cwd_a/$PHPENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.php-version; then\n            (( ${_POWERLEVEL9K_PHPENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .php-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.php-version; then\n        (( ${_POWERLEVEL9K_PHPENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_PHPENV_SOURCES[(I)global]} )) || return\n      _p9k_phpenv_global_version\n    fi\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_phpenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_PHPENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"magenta\" \"$_p9k_color1\" 'PHP_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_phpenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[phpenv]:-${${+functions[phpenv]}:#0}}'\n}\n\nfunction _p9k_luaenv_global_version() {\n  _p9k_read_word ${LUAENV_ROOT:-$HOME/.luaenv}/version || _p9k__ret=system\n}\n\n################################################################\n# Segment to display luaenv information\n# https://github.com/cehoffman/luaenv\nprompt_luaenv() {\n  if [[ -n $LUAENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_LUAENV_SOURCES[(I)shell]} )) || return\n    local v=$LUAENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_LUAENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $LUAENV_DIR != (|.) ]]; then\n      [[ $LUAENV_DIR == /* ]] && local dir=$LUAENV_DIR || local dir=\"$_p9k__cwd_a/$LUAENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.lua-version; then\n            (( ${_POWERLEVEL9K_LUAENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .lua-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.lua-version; then\n        (( ${_POWERLEVEL9K_LUAENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_LUAENV_SOURCES[(I)global]} )) || return\n      _p9k_luaenv_global_version\n    fi\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_luaenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_LUAENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" blue \"$_p9k_color1\" 'LUA_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_luaenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[luaenv]:-${${+functions[luaenv]}:#0}}'\n}\n\nfunction _p9k_jenv_global_version() {\n  _p9k_read_word ${JENV_ROOT:-$HOME/.jenv}/version || _p9k__ret=system\n}\n\n################################################################\n# Segment to display jenv information\n# https://github.com/jenv/jenv\nprompt_jenv() {\n  if [[ -n $JENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_JENV_SOURCES[(I)shell]} )) || return\n    local v=$JENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_JENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $JENV_DIR != (|.) ]]; then\n      [[ $JENV_DIR == /* ]] && local dir=$JENV_DIR || local dir=\"$_p9k__cwd_a/$JENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.java-version; then\n            (( ${_POWERLEVEL9K_JENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .java-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.java-version; then\n        (( ${_POWERLEVEL9K_JENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_JENV_SOURCES[(I)global]} )) || return\n      _p9k_jenv_global_version\n    fi\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_jenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_JENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" white red 'JAVA_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_jenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[jenv]:-${${+functions[jenv]}:#0}}'\n}\n\nfunction _p9k_plenv_global_version() {\n  _p9k_read_word ${PLENV_ROOT:-$HOME/.plenv}/version || _p9k__ret=system\n}\n\n################################################################\n# Segment to display plenv information\n# https://github.com/plenv/plenv#choosing-the-perl-version\nprompt_plenv() {\n  if [[ -n $PLENV_VERSION ]]; then\n    (( ${_POWERLEVEL9K_PLENV_SOURCES[(I)shell]} )) || return\n    local v=$PLENV_VERSION\n  else\n    (( ${_POWERLEVEL9K_PLENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $PLENV_DIR != (|.) ]]; then\n      [[ $PLENV_DIR == /* ]] && local dir=$PLENV_DIR || local dir=\"$_p9k__cwd_a/$PLENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_word $dir/.perl-version; then\n            (( ${_POWERLEVEL9K_PLENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .perl-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_word $_p9k__parent_dirs[idx]/.perl-version; then\n        (( ${_POWERLEVEL9K_PLENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_PLENV_SOURCES[(I)global]} )) || return\n      _p9k_plenv_global_version\n    fi\n    local v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_plenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_PLENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PERL_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_plenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[plenv]:-${${+functions[plenv]}:#0}}'\n}\n\n################################################################\n# Segment to display perlbrew information\n# https://github.com/gugod/App-perlbrew\n\nprompt_perlbrew() {\n  if (( _POWERLEVEL9K_PERLBREW_PROJECT_ONLY )); then\n    _p9k_upglob 'cpanfile|.perltidyrc|(|MY)META.(yml|json)|(Makefile|Build).PL|*.(pl|pm|t|pod)' -. && return\n  fi\n\n  local v=$PERLBREW_PERL\n  (( _POWERLEVEL9K_PERLBREW_SHOW_PREFIX )) || v=${v#*-}\n  [[ -n $v ]] || return\n  _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PERL_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_perlbrew_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$PERLBREW_PERL'\n}\n\n################################################################\n# Segment to display chruby information\n# see https://github.com/postmodern/chruby/issues/245 for chruby_auto issue with ZSH\nprompt_chruby() {\n  local v=${(M)RUBY_ENGINE:#$~_POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN}\n  [[ $_POWERLEVEL9K_CHRUBY_SHOW_VERSION == 1 && -n $RUBY_VERSION ]] && v+=${v:+ }$RUBY_VERSION\n  _p9k_prompt_segment \"$0\" \"red\" \"$_p9k_color1\" 'RUBY_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_chruby_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$RUBY_ENGINE'\n}\n\n################################################################\n# Segment to print an icon if user is root.\nprompt_root_indicator() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment \"$0\" \"$_p9k_color1\" \"yellow\" 'ROOT_ICON' 0 '${${(%):-%#}:#\\%}' ''\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_root_indicator() { prompt_root_indicator; }\n\n################################################################\n# Segment to display Rust version number\nprompt_rust_version() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 darkorange $_p9k_color1 RUST_ICON 1 '$P9K_RUST_VERSION' '${P9K_RUST_VERSION//\\%/%%}'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\nfunction _p9k_prompt_rust_version_init() {\n  _p9k__async_segments_compute+='_p9k_rust_version_prefetch'\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[rustc]'\n}\n\n_p9k_rust_version_prefetch() {\n  local rustc=$commands[rustc]\n  if [[ -z $rustc ]] ||\n     { (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )) && _p9k_upglob Cargo.toml -. }; then\n    unset P9K_RUST_VERSION\n    return\n  fi\n  _p9k_worker_invoke rust_version \\\n    \"_p9k_prompt_rust_version_compute ${(q)P9K_RUST_VERSION} ${(q)rustc} ${(q)_p9k__cwd_a}\"\n}\n\n_p9k_prompt_rust_version_compute() {\n  _p9k_worker_async                                          \\\n    \"_p9k_prompt_rust_version_async ${(q)1} ${(q)2} ${(q)3}\" \\\n    _p9k_prompt_rust_version_sync\n}\n\n_p9k_prompt_rust_version_async() {\n  typeset -g P9K_RUST_VERSION=$1\n  local rustc=$2 cwd=$3 v\n  if pushd -q -- $cwd; then\n    {\n      v=${${\"$($rustc --version)\"#rustc }%% *} || v=\n    } always {\n      popd -q\n    }\n  fi\n\n  [[ $v != $P9K_RUST_VERSION ]] || return\n  typeset -g P9K_RUST_VERSION=$v\n  _p9k_print_params P9K_RUST_VERSION\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_rust_version_sync() {\n  if [[ -n $REPLY ]]; then\n    eval $REPLY\n    _p9k_worker_reply $REPLY\n  fi\n}\n\n# RSpec test ratio\nprompt_rspec_stats() {\n  if [[ -d app && -d spec ]]; then\n    local -a code=(app/**/*.rb(N))\n    (( $#code )) || return\n    local tests=(spec/**/*.rb(N))\n    _p9k_build_test_stats \"$0\" \"$#code\" \"$#tests\" \"RSpec\" 'TEST_ICON'\n  fi\n}\n\n################################################################\n# Segment to display Ruby Version Manager information\nprompt_rvm() {\n  [[ $GEM_HOME == *rvm* && $ruby_string != $rvm_path/bin/ruby ]] || return\n  local v=${GEM_HOME:t}\n  (( _POWERLEVEL9K_RVM_SHOW_GEMSET )) || v=${v%%${rvm_gemset_separator:-@}*}\n  (( _POWERLEVEL9K_RVM_SHOW_PREFIX )) || v=${v#*-}\n  [[ -n $v ]] || return\n  _p9k_prompt_segment \"$0\" \"240\" \"$_p9k_color1\" 'RUBY_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_rvm_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[rvm-prompt]:-${${+functions[rvm-prompt]}:#0}}'\n}\n\n################################################################\n# Segment to display SSH icon when connected\nprompt_ssh() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment \"$0\" \"$_p9k_color1\" \"yellow\" 'SSH_ICON' 0 '' ''\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_ssh_init() {\n  if (( ! P9K_SSH )); then\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n  fi\n}\n\ninstant_prompt_ssh() {\n  if (( ! P9K_SSH )); then\n    return\n  fi\n  prompt_ssh\n}\n\n################################################################\n# Status: When an error occur, return the error code, or a cross icon if option is set\n# Display an ok icon when no error occur, or hide the segment if option is set to false\nprompt_status() {\n  if ! _p9k_cache_get $0 $_p9k__status $_p9k__pipestatus; then\n    (( _p9k__status )) && local state=ERROR || local state=OK\n    if (( _POWERLEVEL9K_STATUS_EXTENDED_STATES )); then\n      if (( _p9k__status )); then\n        if (( $#_p9k__pipestatus > 1 )); then\n          state+=_PIPE\n        elif (( _p9k__status > 128 )); then\n          state+=_SIGNAL\n        fi\n      elif [[ \"$_p9k__pipestatus\" == *[1-9]* ]]; then\n        state+=_PIPE\n      fi\n    fi\n    _p9k__cache_val=(:)\n    if (( _POWERLEVEL9K_STATUS_$state )); then\n      if (( _POWERLEVEL9K_STATUS_SHOW_PIPESTATUS )); then\n        local text=${(j:|:)${(@)_p9k__pipestatus:/(#b)(*)/$_p9k_exitcode2str[$match[1]+1]}}\n      else\n        local text=$_p9k_exitcode2str[_p9k__status+1]\n      fi\n      if (( _p9k__status )); then\n        if (( !_POWERLEVEL9K_STATUS_CROSS && _POWERLEVEL9K_STATUS_VERBOSE )); then\n          _p9k__cache_val=($0_$state red yellow1 CARRIAGE_RETURN_ICON 0 '' \"$text\")\n        else\n          _p9k__cache_val=($0_$state $_p9k_color1 red FAIL_ICON 0 '' '')\n        fi\n      elif (( _POWERLEVEL9K_STATUS_VERBOSE || _POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE )); then\n        [[ $state == OK ]] && text=''\n        _p9k__cache_val=($0_$state \"$_p9k_color1\" green OK_ICON 0 '' \"$text\")\n      fi\n    fi\n    if (( $#_p9k__pipestatus < 3 )); then\n      _p9k_cache_set \"${(@)_p9k__cache_val}\"\n    fi\n  fi\n  _p9k_prompt_segment \"${(@)_p9k__cache_val}\"\n}\n\ninstant_prompt_status() {\n  if (( _POWERLEVEL9K_STATUS_OK )); then\n    _p9k_prompt_segment prompt_status_OK \"$_p9k_color1\" green OK_ICON 0 '' ''\n  fi\n}\n\nprompt_prompt_char() {\n  local saved=$_p9k__prompt_char_saved[$_p9k__prompt_side$_p9k__segment_index$((!_p9k__status))]\n  if [[ -n $saved ]]; then\n    _p9k__prompt+=$saved\n    return\n  fi\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  if (( __p9k_sh_glob )); then\n    if (( _p9k__status )); then\n      if (( _POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE )); then\n        _p9k_prompt_segment $0_ERROR_VIINS \"$_p9k_color1\" 196 '' 0 '${${${${${${:-$_p9k__keymap.$_p9k__zle_state}:#vicmd.*}:#vivis.*}:#vivli.*}:#*.*overwrite*}}' '❯'\n        _p9k_prompt_segment $0_ERROR_VIOWR \"$_p9k_color1\" 196 '' 0 '${${${${${${:-$_p9k__keymap.$_p9k__zle_state}:#vicmd.*}:#vivis.*}:#vivli.*}:#*.*insert*}}' '▶'\n      else\n        _p9k_prompt_segment $0_ERROR_VIINS \"$_p9k_color1\" 196 '' 0 '${${${${_p9k__keymap:#vicmd}:#vivis}:#vivli}}' '❯'\n      fi\n      _p9k_prompt_segment $0_ERROR_VICMD \"$_p9k_color1\" 196 '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}' '❮'\n      _p9k_prompt_segment $0_ERROR_VIVIS \"$_p9k_color1\" 196 '' 0 '${$((! ${#${${${${:-$_p9k__keymap$_p9k__region_active}:#vicmd1}:#vivis?}:#vivli?}})):#0}' 'Ⅴ'\n    else\n      if (( _POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE )); then\n        _p9k_prompt_segment $0_OK_VIINS \"$_p9k_color1\" 76 '' 0 '${${${${${${:-$_p9k__keymap.$_p9k__zle_state}:#vicmd.*}:#vivis.*}:#vivli.*}:#*.*overwrite*}}' '❯'\n        _p9k_prompt_segment $0_OK_VIOWR \"$_p9k_color1\" 76 '' 0 '${${${${${${:-$_p9k__keymap.$_p9k__zle_state}:#vicmd.*}:#vivis.*}:#vivli.*}:#*.*insert*}}' '▶'\n      else\n        _p9k_prompt_segment $0_OK_VIINS \"$_p9k_color1\" 76 '' 0 '${${${${_p9k__keymap:#vicmd}:#vivis}:#vivli}}' '❯'\n      fi\n      _p9k_prompt_segment $0_OK_VICMD \"$_p9k_color1\" 76 '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}' '❮'\n      _p9k_prompt_segment $0_OK_VIVIS \"$_p9k_color1\" 76 '' 0 '${$((! ${#${${${${:-$_p9k__keymap$_p9k__region_active}:#vicmd1}:#vivis?}:#vivli?}})):#0}' 'Ⅴ'\n    fi\n  else\n    if (( _p9k__status )); then\n      if (( _POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE )); then\n        _p9k_prompt_segment $0_ERROR_VIINS \"$_p9k_color1\" 196 '' 0 '${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*overwrite*)}' '❯'\n        _p9k_prompt_segment $0_ERROR_VIOWR \"$_p9k_color1\" 196 '' 0 '${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}' '▶'\n      else\n        _p9k_prompt_segment $0_ERROR_VIINS \"$_p9k_color1\" 196 '' 0 '${_p9k__keymap:#(vicmd|vivis|vivli)}' '❯'\n      fi\n      _p9k_prompt_segment $0_ERROR_VICMD \"$_p9k_color1\" 196 '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}' '❮'\n      _p9k_prompt_segment $0_ERROR_VIVIS \"$_p9k_color1\" 196 '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}' 'Ⅴ'\n    else\n      if (( _POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE )); then\n        _p9k_prompt_segment $0_OK_VIINS \"$_p9k_color1\" 76 '' 0 '${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*overwrite*)}' '❯'\n        _p9k_prompt_segment $0_OK_VIOWR \"$_p9k_color1\" 76 '' 0 '${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}' '▶'\n      else\n        _p9k_prompt_segment $0_OK_VIINS \"$_p9k_color1\" 76 '' 0 '${_p9k__keymap:#(vicmd|vivis|vivli)}' '❯'\n      fi\n      _p9k_prompt_segment $0_OK_VICMD \"$_p9k_color1\" 76 '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}' '❮'\n      _p9k_prompt_segment $0_OK_VIVIS \"$_p9k_color1\" 76 '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}' 'Ⅴ'\n    fi\n  fi\n  (( _p9k__has_upglob )) || _p9k__prompt_char_saved[$_p9k__prompt_side$_p9k__segment_index$((!_p9k__status))]=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_prompt_char() {\n  _p9k_prompt_segment prompt_prompt_char_OK_VIINS \"$_p9k_color1\" 76 '' 0 '' '❯'\n}\n\n################################################################\n# Segment to display Swap information\nprompt_swap() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 yellow \"$_p9k_color1\" SWAP_ICON 1 '$_p9k__swap_used' '$_p9k__swap_used'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\nfunction _p9k_prompt_swap_init() {\n  if [[ $_p9k_os == OSX && $+commands[sysctl] == 0 || $_p9k_os != OSX && ! -r /proc/meminfo ]]; then\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n    return\n  fi\n  typeset -g _p9k__swap_used=\n  _p9k__async_segments_compute+='_p9k_worker_invoke swap _p9k_prompt_swap_compute'\n}\n\n_p9k_prompt_swap_compute() {\n  _p9k_worker_async _p9k_prompt_swap_async _p9k_prompt_swap_sync\n}\n\n_p9k_prompt_swap_async() {\n  local -F used_bytes\n\n  if [[ \"$_p9k_os\" == \"OSX\" ]]; then\n    (( $+commands[sysctl] )) || return\n    [[ \"$(sysctl vm.swapusage 2>/dev/null)\" =~ \"used = ([0-9,.]+)([A-Z]+)\" ]] || return\n    used_bytes=${match[1]//,/.}\n    case ${match[2]} in\n      'K') (( used_bytes *= 1024 ));;\n      'M') (( used_bytes *= 1048576 ));;\n      'G') (( used_bytes *= 1073741824 ));;\n      'T') (( used_bytes *= 1099511627776 ));;\n      *) return 0;;\n    esac\n  else\n    local meminfo && meminfo=\"$(grep -F 'Swap' /proc/meminfo 2>/dev/null)\" || return\n    [[ $meminfo =~ 'SwapTotal:[[:space:]]+([0-9]+)' ]] || return\n    (( used_bytes+=match[1] ))\n    [[ $meminfo =~ 'SwapFree:[[:space:]]+([0-9]+)' ]] || return\n    (( used_bytes-=match[1] ))\n    (( used_bytes *= 1024 ))\n  fi\n\n  (( used_bytes >= 0 || (used_bytes = 0) ))\n\n  _p9k_human_readable_bytes $used_bytes\n  [[ $_p9k__ret != $_p9k__swap_used ]] || return\n  _p9k__swap_used=$_p9k__ret\n  _p9k_print_params _p9k__swap_used\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_swap_sync() {\n  eval $REPLY\n  _p9k_worker_reply $REPLY\n}\n\n################################################################\n# Symfony2-PHPUnit test ratio\nprompt_symfony2_tests() {\n  if [[ -d src && -d app && -f app/AppKernel.php ]]; then\n    local -a all=(src/**/*.php(N))\n    local -a code=(${(@)all##*Tests*})\n    (( $#code )) || return\n    _p9k_build_test_stats \"$0\" \"$#code\" \"$(($#all - $#code))\" \"SF2\" 'TEST_ICON'\n  fi\n}\n\n################################################################\n# Segment to display Symfony2-Version\nprompt_symfony2_version() {\n  if [[ -r app/bootstrap.php.cache ]]; then\n    local v=\"${$(grep -F \" VERSION \" app/bootstrap.php.cache 2>/dev/null)//[![:digit:].]}\"\n    _p9k_prompt_segment \"$0\" \"grey35\" \"$_p9k_color1\" 'SYMFONY_ICON' 0 '' \"${v//\\%/%%}\"\n  fi\n}\n\n################################################################\n# Show a ratio of tests vs code\n_p9k_build_test_stats() {\n  local code_amount=\"$2\"\n  local tests_amount=\"$3\"\n  local headline=\"$4\"\n\n  (( code_amount > 0 )) || return\n  local -F 2 ratio=$(( 100. * tests_amount / code_amount ))\n\n  (( ratio >= 75 )) && _p9k_prompt_segment \"${1}_GOOD\" \"cyan\" \"$_p9k_color1\" \"$5\" 0 '' \"$headline: $ratio%%\"\n  (( ratio >= 50 && ratio < 75 )) && _p9k_prompt_segment \"$1_AVG\" \"yellow\" \"$_p9k_color1\" \"$5\" 0 '' \"$headline: $ratio%%\"\n  (( ratio < 50 )) && _p9k_prompt_segment \"$1_BAD\" \"red\" \"$_p9k_color1\" \"$5\" 0 '' \"$headline: $ratio%%\"\n}\n\n################################################################\n# System time\nprompt_time() {\n  if (( _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME )); then\n    _p9k_prompt_segment \"$0\" \"$_p9k_color2\" \"$_p9k_color1\" \"TIME_ICON\" 0 '' \"$_POWERLEVEL9K_TIME_FORMAT\"\n  else\n    if [[ $_p9k__refresh_reason == precmd ]]; then\n      if [[ $+__p9k_instant_prompt_active == 1 && $__p9k_instant_prompt_time_format == $_POWERLEVEL9K_TIME_FORMAT ]]; then\n        _p9k__time=${__p9k_instant_prompt_time//\\%/%%}\n      else\n        _p9k__time=${${(%)_POWERLEVEL9K_TIME_FORMAT}//\\%/%%}\n      fi\n    fi\n    if (( _POWERLEVEL9K_TIME_UPDATE_ON_COMMAND )); then\n      _p9k_escape $_p9k__time\n      local t=$_p9k__ret\n      _p9k_escape $_POWERLEVEL9K_TIME_FORMAT\n      _p9k_prompt_segment \"$0\" \"$_p9k_color2\" \"$_p9k_color1\" \"TIME_ICON\" 1 '' \\\n          \"\\${_p9k__line_finished-$t}\\${_p9k__line_finished+$_p9k__ret}\"\n    else\n      _p9k_prompt_segment \"$0\" \"$_p9k_color2\" \"$_p9k_color1\" \"TIME_ICON\" 0 '' $_p9k__time\n    fi\n  fi\n}\n\ninstant_prompt_time() {\n  _p9k_escape $_POWERLEVEL9K_TIME_FORMAT\n  local stash='${${__p9k_instant_prompt_time::=${(%)${__p9k_instant_prompt_time_format::='$_p9k__ret'}}}+}'\n  _p9k_escape $_POWERLEVEL9K_TIME_FORMAT\n  _p9k_prompt_segment prompt_time \"$_p9k_color2\" \"$_p9k_color1\" \"TIME_ICON\" 1 '' $stash$_p9k__ret\n}\n\n_p9k_prompt_time_init() {\n  (( _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME )) || return\n  _p9k__async_segments_compute+='_p9k_worker_invoke time _p9k_prompt_time_compute'\n}\n\n_p9k_prompt_time_compute() {\n  _p9k_worker_async _p9k_prompt_time_async _p9k_prompt_time_sync\n}\n\n_p9k_prompt_time_async() {\n  zmodload zsh/mathfunc zsh/zselect || return\n  local -F t=_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC\n  zselect -t $((int(ceil(100 * (t - EPOCHREALTIME % t))))) || true\n}\n\n_p9k_prompt_time_sync() {\n  _p9k_worker_reply '_p9k_worker_invoke _p9k_prompt_time_compute _p9k_prompt_time_compute; reset=1'\n}\n\n################################################################\n# System date\nprompt_date() {\n  if [[ $_p9k__refresh_reason == precmd ]]; then\n    if [[ $+__p9k_instant_prompt_active == 1 && $__p9k_instant_prompt_date_format == $_POWERLEVEL9K_DATE_FORMAT ]]; then\n      _p9k__date=${__p9k_instant_prompt_date//\\%/%%}\n    else\n      _p9k__date=${${(%)_POWERLEVEL9K_DATE_FORMAT}//\\%/%%}\n    fi\n  fi\n  _p9k_prompt_segment \"$0\" \"$_p9k_color2\" \"$_p9k_color1\" \"DATE_ICON\" 0 '' \"$_p9k__date\"\n}\n\ninstant_prompt_date() {\n  _p9k_escape $_POWERLEVEL9K_DATE_FORMAT\n  local stash='${${__p9k_instant_prompt_date::=${(%)${__p9k_instant_prompt_date_format::='$_p9k__ret'}}}+}'\n  _p9k_escape $_POWERLEVEL9K_DATE_FORMAT\n  _p9k_prompt_segment prompt_date \"$_p9k_color2\" \"$_p9k_color1\" \"DATE_ICON\" 1 '' $stash$_p9k__ret\n}\n\n################################################################\n# todo.sh: shows the number of tasks in your todo.sh file\nprompt_todo() {\n  unset P9K_TODO_TOTAL_TASK_COUNT P9K_TODO_FILTERED_TASK_COUNT\n  [[ -r $_p9k__todo_file && -x $_p9k__todo_command ]] || return\n  if ! _p9k_cache_stat_get $0 $_p9k__todo_file; then\n    local count=\"$($_p9k__todo_command -p ls | command tail -1)\"\n    if [[ $count == (#b)'TODO: '([[:digit:]]##)' of '([[:digit:]]##)' '* ]]; then\n      _p9k_cache_stat_set 1 $match[1] $match[2]\n    else\n      _p9k_cache_stat_set 0\n    fi\n  fi\n  (( $_p9k__cache_val[1] )) || return\n  typeset -gi P9K_TODO_FILTERED_TASK_COUNT=$_p9k__cache_val[2]\n  typeset -gi P9K_TODO_TOTAL_TASK_COUNT=$_p9k__cache_val[3]\n  if (( (P9K_TODO_TOTAL_TASK_COUNT    || !_POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL) &&\n        (P9K_TODO_FILTERED_TASK_COUNT || !_POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED) )); then\n    if (( P9K_TODO_TOTAL_TASK_COUNT == P9K_TODO_FILTERED_TASK_COUNT )); then\n      local text=$P9K_TODO_TOTAL_TASK_COUNT\n    else\n      local text=\"$P9K_TODO_FILTERED_TASK_COUNT/$P9K_TODO_TOTAL_TASK_COUNT\"\n    fi\n    _p9k_prompt_segment \"$0\" \"grey50\" \"$_p9k_color1\" 'TODO_ICON' 0 '' \"$text\"\n  fi\n}\n\n_p9k_prompt_todo_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$_p9k__todo_file'\n}\n\n################################################################\n# VCS segment: shows the state of your repository, if you are in a folder under\n# version control\n\n# The vcs segment can have 4 different states - defaults to 'CLEAN'.\ntypeset -gA __p9k_vcs_states=(\n  'CLEAN'         '2'\n  'MODIFIED'      '3'\n  'UNTRACKED'     '2'\n  'LOADING'       '8'\n  'CONFLICTED'    '3'\n)\n\nfunction +vi-git-untracked() {\n  [[ -z \"${vcs_comm[gitdir]}\" || \"${vcs_comm[gitdir]}\" == \".\" ]] && return\n\n  # get the root for the current repo or submodule\n  local repoTopLevel=\"$(git rev-parse --show-toplevel 2> /dev/null)\"\n  # dump out if we're outside a git repository (which includes being in the .git folder)\n  [[ $? != 0 || -z $repoTopLevel ]] && return\n\n  local untrackedFiles=\"$(git ls-files --others --exclude-standard \"${repoTopLevel}\" 2> /dev/null)\"\n\n  if [[ -z $untrackedFiles && $_POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY == 1 ]]; then\n    untrackedFiles+=\"$(git submodule foreach --quiet --recursive 'git ls-files --others --exclude-standard' 2> /dev/null)\"\n  fi\n\n  [[ -z $untrackedFiles ]] && return\n\n  hook_com[unstaged]+=\" $(print_icon 'VCS_UNTRACKED_ICON')\"\n  VCS_WORKDIR_HALF_DIRTY=true\n}\n\nfunction +vi-git-aheadbehind() {\n  local ahead behind\n  local -a gitstatus\n\n  # for git prior to 1.7\n  # ahead=$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l)\n  ahead=\"$(git rev-list --count \"${hook_com[branch]}\"@{upstream}..HEAD 2>/dev/null)\"\n  (( ahead )) && gitstatus+=( \" $(print_icon 'VCS_OUTGOING_CHANGES_ICON')${ahead// /}\" )\n\n  # for git prior to 1.7\n  # behind=$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l)\n  behind=\"$(git rev-list --count HEAD..\"${hook_com[branch]}\"@{upstream} 2>/dev/null)\"\n  (( behind )) && gitstatus+=( \" $(print_icon 'VCS_INCOMING_CHANGES_ICON')${behind// /}\" )\n\n  hook_com[misc]+=${(j::)gitstatus}\n}\n\nfunction +vi-git-remotebranch() {\n  local remote\n  local branch_name=\"${hook_com[branch]}\"\n\n  # Are we on a remote-tracking branch?\n  remote=\"$(git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)\"\n  remote=${remote/refs\\/(remotes|heads)\\/}\n\n  if (( $+_POWERLEVEL9K_VCS_SHORTEN_LENGTH && $+_POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH )); then\n    if (( ${#hook_com[branch]} > _POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH && ${#hook_com[branch]} > _POWERLEVEL9K_VCS_SHORTEN_LENGTH )); then\n      case $_POWERLEVEL9K_VCS_SHORTEN_STRATEGY in\n        truncate_middle)\n          hook_com[branch]=\"${branch_name:0:$_POWERLEVEL9K_VCS_SHORTEN_LENGTH}${_POWERLEVEL9K_VCS_SHORTEN_DELIMITER}${branch_name: -$_POWERLEVEL9K_VCS_SHORTEN_LENGTH}\"\n        ;;\n        truncate_from_right)\n          hook_com[branch]=\"${branch_name:0:$_POWERLEVEL9K_VCS_SHORTEN_LENGTH}${_POWERLEVEL9K_VCS_SHORTEN_DELIMITER}\"\n        ;;\n      esac\n    fi\n  fi\n\n  if (( _POWERLEVEL9K_HIDE_BRANCH_ICON )); then\n    hook_com[branch]=\"${hook_com[branch]}\"\n  else\n    hook_com[branch]=\"$(print_icon 'VCS_BRANCH_ICON')${hook_com[branch]}\"\n  fi\n  # Always show the remote\n  #if [[ -n ${remote} ]] ; then\n  # Only show the remote if it differs from the local\n  if [[ -n ${remote} ]] && [[ \"${remote#*/}\" != \"${branch_name}\" ]] ; then\n     hook_com[branch]+=\"$(print_icon 'VCS_REMOTE_BRANCH_ICON')${remote// /}\"\n  fi\n}\n\nfunction +vi-git-tagname() {\n  if (( !_POWERLEVEL9K_VCS_HIDE_TAGS )); then\n    # If we are on a tag, append the tagname to the current branch string.\n    local tag\n    tag=\"$(git describe --tags --exact-match HEAD 2>/dev/null)\"\n\n    if [[ -n \"${tag}\" ]] ; then\n      # There is a tag that points to our current commit. Need to determine if we\n      # are also on a branch, or are in a DETACHED_HEAD state.\n      if [[ -z \"$(git symbolic-ref HEAD 2>/dev/null)\" ]]; then\n        # DETACHED_HEAD state. We want to append the tag name to the commit hash\n        # and print it. Unfortunately, `vcs_info` blows away the hash when a tag\n        # exists, so we have to manually retrieve it and clobber the branch\n        # string.\n        local revision\n        revision=\"$(git rev-list -n 1 --abbrev-commit --abbrev=${_POWERLEVEL9K_CHANGESET_HASH_LENGTH} HEAD)\"\n        if (( _POWERLEVEL9K_HIDE_BRANCH_ICON )); then\n          hook_com[branch]=\"${revision} $(print_icon 'VCS_TAG_ICON')${tag}\"\n        else\n          hook_com[branch]=\"$(print_icon 'VCS_BRANCH_ICON')${revision} $(print_icon 'VCS_TAG_ICON')${tag}\"\n        fi\n      else\n        # We are on both a tag and a branch; print both by appending the tag name.\n        hook_com[branch]+=\" $(print_icon 'VCS_TAG_ICON')${tag}\"\n      fi\n    fi\n  fi\n}\n\n# Show count of stashed changes\n# Port from https://github.com/whiteinge/dotfiles/blob/5dfd08d30f7f2749cfc60bc55564c6ea239624d9/.zsh_shouse_prompt#L268\nfunction +vi-git-stash() {\n  if [[ -s \"${vcs_comm[gitdir]}/logs/refs/stash\" ]] ; then\n    local -a stashes=( \"${(@f)\"$(<${vcs_comm[gitdir]}/logs/refs/stash)\"}\" )\n    hook_com[misc]+=\" $(print_icon 'VCS_STASH_ICON')${#stashes}\"\n  fi\n}\n\nfunction +vi-hg-bookmarks() {\n  if [[ -n \"${hgbmarks[@]}\" ]]; then\n    hook_com[hg-bookmark-string]=\" $(print_icon 'VCS_BOOKMARK_ICON')${hgbmarks[@]}\"\n\n    # To signal that we want to use the string we just generated, set the special\n    # variable `ret' to something other than the default zero:\n    ret=1\n    return 0\n  fi\n}\n\nfunction +vi-vcs-detect-changes() {\n  if [[ \"${hook_com[vcs]}\" == \"git\" ]]; then\n    local remote=\"$(git ls-remote --get-url 2> /dev/null)\"\n    _p9k_vcs_icon \"$remote\"\n    vcs_visual_identifier=$_p9k__ret\n  elif [[ \"${hook_com[vcs]}\" == \"hg\" ]]; then\n    vcs_visual_identifier='VCS_HG_ICON'\n  elif [[ \"${hook_com[vcs]}\" == \"svn\" ]]; then\n    vcs_visual_identifier='VCS_SVN_ICON'\n  fi\n\n  if [[ -n \"${hook_com[staged]}\" ]] || [[ -n \"${hook_com[unstaged]}\" ]]; then\n    VCS_WORKDIR_DIRTY=true\n  else\n    VCS_WORKDIR_DIRTY=false\n  fi\n}\n\nfunction +vi-svn-detect-changes() {\n  local svn_status=\"$(svn status)\"\n  if [[ -n \"$(echo \"$svn_status\" | \\grep \\^\\?)\" ]]; then\n    hook_com[unstaged]+=\" $(print_icon 'VCS_UNTRACKED_ICON')\"\n    VCS_WORKDIR_HALF_DIRTY=true\n  fi\n  if [[ -n \"$(echo \"$svn_status\" | \\grep \\^\\M)\" ]]; then\n    hook_com[unstaged]+=\" $(print_icon 'VCS_UNSTAGED_ICON')\"\n    VCS_WORKDIR_DIRTY=true\n  fi\n  if [[ -n \"$(echo \"$svn_status\" | \\grep \\^\\A)\" ]]; then\n    hook_com[staged]+=\" $(print_icon 'VCS_STAGED_ICON')\"\n    VCS_WORKDIR_DIRTY=true\n  fi\n}\n\n_p9k_vcs_info_init() {\n  autoload -Uz vcs_info\n\n  local prefix=''\n  if (( _POWERLEVEL9K_SHOW_CHANGESET )); then\n    _p9k_get_icon '' VCS_COMMIT_ICON\n    prefix=\"$_p9k__ret%0.${_POWERLEVEL9K_CHANGESET_HASH_LENGTH}i \"\n  fi\n\n  zstyle ':vcs_info:*' check-for-changes true\n\n  zstyle ':vcs_info:*' formats \"$prefix%b%c%u%m\"\n  zstyle ':vcs_info:*' actionformats \"%b %F{$_POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND}| %a%f\"\n  _p9k_get_icon '' VCS_STAGED_ICON\n  zstyle ':vcs_info:*' stagedstr \" $_p9k__ret\"\n  _p9k_get_icon '' VCS_UNSTAGED_ICON\n  zstyle ':vcs_info:*' unstagedstr \" $_p9k__ret\"\n  zstyle ':vcs_info:git*+set-message:*' hooks $_POWERLEVEL9K_VCS_GIT_HOOKS\n  zstyle ':vcs_info:hg*+set-message:*' hooks $_POWERLEVEL9K_VCS_HG_HOOKS\n  zstyle ':vcs_info:svn*+set-message:*' hooks $_POWERLEVEL9K_VCS_SVN_HOOKS\n\n  # For Hg, only show the branch name\n  if (( _POWERLEVEL9K_HIDE_BRANCH_ICON )); then\n    zstyle ':vcs_info:hg*:*' branchformat \"%b\"\n  else\n    _p9k_get_icon '' VCS_BRANCH_ICON\n    zstyle ':vcs_info:hg*:*' branchformat \"$_p9k__ret%b\"\n  fi\n  # The `get-revision` function must be turned on for dirty-check to work for Hg\n  zstyle ':vcs_info:hg*:*' get-revision true\n  zstyle ':vcs_info:hg*:*' get-bookmarks true\n  zstyle ':vcs_info:hg*+gen-hg-bookmark-string:*' hooks hg-bookmarks\n\n  # TODO: fix the %b (branch) format for svn. Using %b breaks color-encoding of the foreground\n  # for the rest of the powerline.\n  zstyle ':vcs_info:svn*:*' formats \"$prefix%c%u\"\n  zstyle ':vcs_info:svn*:*' actionformats \"$prefix%c%u %F{$_POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND}| %a%f\"\n\n  if (( _POWERLEVEL9K_SHOW_CHANGESET )); then\n    zstyle ':vcs_info:*' get-revision true\n  else\n    zstyle ':vcs_info:*' get-revision false\n  fi\n}\n\nfunction _p9k_vcs_status_save() {\n  local z=$'\\0'\n  _p9k__gitstatus_last[${${_p9k__git_dir:+GIT_DIR:$_p9k__git_dir}:-$VCS_STATUS_WORKDIR}]=\\\n$VCS_STATUS_COMMIT$z$VCS_STATUS_LOCAL_BRANCH$z$VCS_STATUS_REMOTE_BRANCH$z$VCS_STATUS_REMOTE_NAME$z\\\n$VCS_STATUS_REMOTE_URL$z$VCS_STATUS_ACTION$z$VCS_STATUS_INDEX_SIZE$z$VCS_STATUS_NUM_STAGED$z\\\n$VCS_STATUS_NUM_UNSTAGED$z$VCS_STATUS_NUM_CONFLICTED$z$VCS_STATUS_NUM_UNTRACKED$z\\\n$VCS_STATUS_HAS_STAGED$z$VCS_STATUS_HAS_UNSTAGED$z$VCS_STATUS_HAS_CONFLICTED$z\\\n$VCS_STATUS_HAS_UNTRACKED$z$VCS_STATUS_COMMITS_AHEAD$z$VCS_STATUS_COMMITS_BEHIND$z\\\n$VCS_STATUS_STASHES$z$VCS_STATUS_TAG$z$VCS_STATUS_NUM_UNSTAGED_DELETED$z\\\n$VCS_STATUS_NUM_STAGED_NEW$z$VCS_STATUS_NUM_STAGED_DELETED$z$VCS_STATUS_PUSH_REMOTE_NAME$z\\\n$VCS_STATUS_PUSH_REMOTE_URL$z$VCS_STATUS_PUSH_COMMITS_AHEAD$z$VCS_STATUS_PUSH_COMMITS_BEHIND$z\\\n$VCS_STATUS_NUM_SKIP_WORKTREE$z$VCS_STATUS_NUM_ASSUME_UNCHANGED\n}\n\nfunction _p9k_vcs_status_restore() {\n  for VCS_STATUS_COMMIT VCS_STATUS_LOCAL_BRANCH VCS_STATUS_REMOTE_BRANCH VCS_STATUS_REMOTE_NAME   \\\n      VCS_STATUS_REMOTE_URL VCS_STATUS_ACTION VCS_STATUS_INDEX_SIZE VCS_STATUS_NUM_STAGED         \\\n      VCS_STATUS_NUM_UNSTAGED VCS_STATUS_NUM_CONFLICTED VCS_STATUS_NUM_UNTRACKED                  \\\n      VCS_STATUS_HAS_STAGED VCS_STATUS_HAS_UNSTAGED VCS_STATUS_HAS_CONFLICTED                     \\\n      VCS_STATUS_HAS_UNTRACKED VCS_STATUS_COMMITS_AHEAD VCS_STATUS_COMMITS_BEHIND                 \\\n      VCS_STATUS_STASHES VCS_STATUS_TAG VCS_STATUS_NUM_UNSTAGED_DELETED VCS_STATUS_NUM_STAGED_NEW \\\n      VCS_STATUS_NUM_STAGED_DELETED VCS_STATUS_PUSH_REMOTE_NAME VCS_STATUS_PUSH_REMOTE_URL        \\\n      VCS_STATUS_PUSH_COMMITS_AHEAD VCS_STATUS_PUSH_COMMITS_BEHIND VCS_STATUS_NUM_SKIP_WORKTREE   \\\n      VCS_STATUS_NUM_ASSUME_UNCHANGED\n      in \"${(@0)1}\"; do done\n}\n\nfunction _p9k_vcs_status_for_dir() {\n  if [[ -n $GIT_DIR ]]; then\n    _p9k__ret=$_p9k__gitstatus_last[GIT_DIR:$GIT_DIR]\n    [[ -n $_p9k__ret ]]\n  else\n    local dir=$_p9k__cwd_a\n    while true; do\n      _p9k__ret=$_p9k__gitstatus_last[$dir]\n      [[ -n $_p9k__ret ]] && return 0\n      [[ $dir == (/|.) ]] && return 1\n      dir=${dir:h}\n    done\n  fi\n}\n\nfunction _p9k_vcs_status_purge() {\n  if [[ -n $_p9k__git_dir ]]; then\n    _p9k__gitstatus_last[GIT_DIR:$_p9k__git_dir]=\"\"\n  else\n    local dir=$1\n    while true; do\n      # unset doesn't work if $dir contains weird shit\n      _p9k__gitstatus_last[$dir]=\"\"\n      _p9k_git_slow[$dir]=\"\"\n      [[ $dir == (/|.) ]] && break\n      dir=${dir:h}\n    done\n  fi\n}\n\nfunction _p9k_vcs_icon() {\n  local pat icon\n  for pat icon in \"${(@)_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS}\"; do\n    if [[ $1 == $~pat ]]; then\n      _p9k__ret=$icon\n      return\n    fi\n  done\n  _p9k__ret=\n}\n\nfunction _p9k_vcs_render() {\n  local state\n\n  if (( $+_p9k__gitstatus_next_dir )); then\n    if _p9k_vcs_status_for_dir; then\n      _p9k_vcs_status_restore $_p9k__ret\n      state=LOADING\n    else\n      _p9k_prompt_segment prompt_vcs_LOADING \"${__p9k_vcs_states[LOADING]}\" \"$_p9k_color1\" VCS_LOADING_ICON 0 '' \"$_POWERLEVEL9K_VCS_LOADING_TEXT\"\n      return 0\n    fi\n  elif [[ $VCS_STATUS_RESULT != ok-* ]]; then\n    return 1\n  fi\n\n  if (( _POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING )); then\n    if [[ -z $state ]]; then\n      if [[ $VCS_STATUS_HAS_CONFLICTED == 1 && $_POWERLEVEL9K_VCS_CONFLICTED_STATE == 1 ]]; then\n        state=CONFLICTED\n      elif [[ $VCS_STATUS_HAS_STAGED != 0 || $VCS_STATUS_HAS_UNSTAGED != 0 ]]; then\n        state=MODIFIED\n      elif [[ $VCS_STATUS_HAS_UNTRACKED != 0 ]]; then\n        state=UNTRACKED\n      else\n        state=CLEAN\n      fi\n    fi\n    _p9k_vcs_icon \"$VCS_STATUS_REMOTE_URL\"\n    _p9k_prompt_segment prompt_vcs_$state \"${__p9k_vcs_states[$state]}\" \"$_p9k_color1\" \"$_p9k__ret\" 0 '' \"\"\n    return 0\n  fi\n\n  (( ${_POWERLEVEL9K_VCS_GIT_HOOKS[(I)git-untracked]} )) || VCS_STATUS_HAS_UNTRACKED=0\n  (( ${_POWERLEVEL9K_VCS_GIT_HOOKS[(I)git-aheadbehind]} )) || { VCS_STATUS_COMMITS_AHEAD=0 && VCS_STATUS_COMMITS_BEHIND=0 }\n  (( ${_POWERLEVEL9K_VCS_GIT_HOOKS[(I)git-stash]} )) || VCS_STATUS_STASHES=0\n  (( ${_POWERLEVEL9K_VCS_GIT_HOOKS[(I)git-remotebranch]} )) || VCS_STATUS_REMOTE_BRANCH=\"\"\n  (( ${_POWERLEVEL9K_VCS_GIT_HOOKS[(I)git-tagname]} )) || VCS_STATUS_TAG=\"\"\n\n  (( _POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM >= 0 && VCS_STATUS_COMMITS_AHEAD > _POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM )) &&\n    VCS_STATUS_COMMITS_AHEAD=$_POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM\n\n  (( _POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM >= 0 && VCS_STATUS_COMMITS_BEHIND > _POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM )) &&\n    VCS_STATUS_COMMITS_BEHIND=$_POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM\n\n  local -a cache_key=(\n    \"$VCS_STATUS_LOCAL_BRANCH\"\n    \"$VCS_STATUS_REMOTE_BRANCH\"\n    \"$VCS_STATUS_REMOTE_URL\"\n    \"$VCS_STATUS_ACTION\"\n    \"$VCS_STATUS_NUM_STAGED\"\n    \"$VCS_STATUS_NUM_UNSTAGED\"\n    \"$VCS_STATUS_NUM_UNTRACKED\"\n    \"$VCS_STATUS_HAS_CONFLICTED\"\n    \"$VCS_STATUS_HAS_STAGED\"\n    \"$VCS_STATUS_HAS_UNSTAGED\"\n    \"$VCS_STATUS_HAS_UNTRACKED\"\n    \"$VCS_STATUS_COMMITS_AHEAD\"\n    \"$VCS_STATUS_COMMITS_BEHIND\"\n    \"$VCS_STATUS_STASHES\"\n    \"$VCS_STATUS_TAG\"\n    \"$VCS_STATUS_NUM_UNSTAGED_DELETED\"\n  )\n  if [[ $_POWERLEVEL9K_SHOW_CHANGESET == 1 || -z $VCS_STATUS_LOCAL_BRANCH ]]; then\n    cache_key+=$VCS_STATUS_COMMIT\n  fi\n\n  if ! _p9k_cache_ephemeral_get \"$state\" \"${(@)cache_key}\"; then\n    local icon\n    local content\n\n    if (( ${_POWERLEVEL9K_VCS_GIT_HOOKS[(I)vcs-detect-changes]} )); then\n      if [[ $VCS_STATUS_HAS_CONFLICTED == 1 && $_POWERLEVEL9K_VCS_CONFLICTED_STATE == 1 ]]; then\n        : ${state:=CONFLICTED}\n      elif [[ $VCS_STATUS_HAS_STAGED != 0 || $VCS_STATUS_HAS_UNSTAGED != 0 ]]; then\n        : ${state:=MODIFIED}\n      elif [[ $VCS_STATUS_HAS_UNTRACKED != 0 ]]; then\n        : ${state:=UNTRACKED}\n      fi\n\n      # It's weird that removing vcs-detect-changes from POWERLEVEL9K_VCS_GIT_HOOKS gets rid\n      # of the GIT icon. That's what vcs_info does, so we do the same in the name of compatibility.\n      _p9k_vcs_icon \"$VCS_STATUS_REMOTE_URL\"\n      icon=$_p9k__ret\n    fi\n\n    : ${state:=CLEAN}\n\n    function _$0_fmt() {\n      _p9k_vcs_style $state $1\n      content+=\"$_p9k__ret$2\"\n    }\n\n    local ws\n    if [[ $_POWERLEVEL9K_SHOW_CHANGESET == 1 || -z $VCS_STATUS_LOCAL_BRANCH ]]; then\n      _p9k_get_icon prompt_vcs_$state VCS_COMMIT_ICON\n      _$0_fmt COMMIT \"$_p9k__ret${${VCS_STATUS_COMMIT:0:$_POWERLEVEL9K_CHANGESET_HASH_LENGTH}:-HEAD}\"\n      ws=' '\n    fi\n\n    if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n      local branch=$ws\n      if (( !_POWERLEVEL9K_HIDE_BRANCH_ICON )); then\n        _p9k_get_icon prompt_vcs_$state VCS_BRANCH_ICON\n        branch+=$_p9k__ret\n      fi\n      if (( $+_POWERLEVEL9K_VCS_SHORTEN_LENGTH && $+_POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH &&\n            $#VCS_STATUS_LOCAL_BRANCH > _POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH &&\n            $#VCS_STATUS_LOCAL_BRANCH > _POWERLEVEL9K_VCS_SHORTEN_LENGTH )) &&\n         [[ $_POWERLEVEL9K_VCS_SHORTEN_STRATEGY == (truncate_middle|truncate_from_right) ]]; then\n        branch+=${VCS_STATUS_LOCAL_BRANCH[1,_POWERLEVEL9K_VCS_SHORTEN_LENGTH]//\\%/%%}${_POWERLEVEL9K_VCS_SHORTEN_DELIMITER}\n        if [[ $_POWERLEVEL9K_VCS_SHORTEN_STRATEGY == truncate_middle ]]; then\n          _p9k_vcs_style $state BRANCH\n          branch+=${_p9k__ret}${VCS_STATUS_LOCAL_BRANCH[-_POWERLEVEL9K_VCS_SHORTEN_LENGTH,-1]//\\%/%%}\n        fi\n      else\n        branch+=${VCS_STATUS_LOCAL_BRANCH//\\%/%%}\n      fi\n      _$0_fmt BRANCH $branch\n    fi\n\n    if [[ $_POWERLEVEL9K_VCS_HIDE_TAGS == 0 && -n $VCS_STATUS_TAG ]]; then\n      _p9k_get_icon prompt_vcs_$state VCS_TAG_ICON\n      _$0_fmt TAG \" $_p9k__ret${VCS_STATUS_TAG//\\%/%%}\"\n    fi\n\n    if [[ -n $VCS_STATUS_ACTION ]]; then\n      _$0_fmt ACTION \" | ${VCS_STATUS_ACTION//\\%/%%}\"\n    else\n      if [[ -n $VCS_STATUS_REMOTE_BRANCH &&\n            $VCS_STATUS_LOCAL_BRANCH != $VCS_STATUS_REMOTE_BRANCH ]]; then\n        _p9k_get_icon prompt_vcs_$state VCS_REMOTE_BRANCH_ICON\n        _$0_fmt REMOTE_BRANCH \" $_p9k__ret${VCS_STATUS_REMOTE_BRANCH//\\%/%%}\"\n      fi\n      if [[ $VCS_STATUS_HAS_STAGED == 1 || $VCS_STATUS_HAS_UNSTAGED == 1 || $VCS_STATUS_HAS_UNTRACKED == 1 ]]; then\n        _p9k_get_icon prompt_vcs_$state VCS_DIRTY_ICON\n        _$0_fmt DIRTY \"$_p9k__ret\"\n        if [[ $VCS_STATUS_HAS_STAGED == 1 ]]; then\n          _p9k_get_icon prompt_vcs_$state VCS_STAGED_ICON\n          (( _POWERLEVEL9K_VCS_STAGED_MAX_NUM != 1 )) && _p9k__ret+=$VCS_STATUS_NUM_STAGED\n          _$0_fmt STAGED \" $_p9k__ret\"\n        fi\n        if [[ $VCS_STATUS_HAS_UNSTAGED == 1 ]]; then\n          _p9k_get_icon prompt_vcs_$state VCS_UNSTAGED_ICON\n          (( _POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM != 1 )) && _p9k__ret+=$VCS_STATUS_NUM_UNSTAGED\n          _$0_fmt UNSTAGED \" $_p9k__ret\"\n        fi\n        if [[ $VCS_STATUS_HAS_UNTRACKED == 1 ]]; then\n          _p9k_get_icon prompt_vcs_$state VCS_UNTRACKED_ICON\n          (( _POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM != 1 )) && _p9k__ret+=$VCS_STATUS_NUM_UNTRACKED\n          _$0_fmt UNTRACKED \" $_p9k__ret\"\n        fi\n      fi\n      if [[ $VCS_STATUS_COMMITS_BEHIND -gt 0 ]]; then\n        _p9k_get_icon prompt_vcs_$state VCS_INCOMING_CHANGES_ICON\n        (( _POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM != 1 )) && _p9k__ret+=$VCS_STATUS_COMMITS_BEHIND\n        _$0_fmt INCOMING_CHANGES \" $_p9k__ret\"\n      fi\n      if [[ $VCS_STATUS_COMMITS_AHEAD -gt 0 ]]; then\n        _p9k_get_icon prompt_vcs_$state VCS_OUTGOING_CHANGES_ICON\n        (( _POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM != 1 )) && _p9k__ret+=$VCS_STATUS_COMMITS_AHEAD\n        _$0_fmt OUTGOING_CHANGES \" $_p9k__ret\"\n      fi\n      if [[ $VCS_STATUS_STASHES -gt 0 ]]; then\n        _p9k_get_icon prompt_vcs_$state VCS_STASH_ICON\n        _$0_fmt STASH \" $_p9k__ret$VCS_STATUS_STASHES\"\n      fi\n    fi\n\n    _p9k_cache_ephemeral_set \"prompt_vcs_$state\" \"${__p9k_vcs_states[$state]}\" \"$_p9k_color1\" \"$icon\" 0 '' \"$content\"\n  fi\n\n  _p9k_prompt_segment \"$_p9k__cache_val[@]\"\n  return 0\n}\n\nfunction _p9k_maybe_ignore_git_repo() {\n  if [[ $VCS_STATUS_RESULT == ok-* && $VCS_STATUS_WORKDIR == $~_POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN ]]; then\n    VCS_STATUS_RESULT=norepo${VCS_STATUS_RESULT#ok}\n  fi\n}\n\nfunction _p9k_vcs_resume() {\n  eval \"$__p9k_intro\"\n\n  _p9k_maybe_ignore_git_repo\n\n  if [[ $VCS_STATUS_RESULT == ok-async ]]; then\n    local latency=$((EPOCHREALTIME - _p9k__gitstatus_start_time))\n    if (( latency > _POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS )); then\n      _p9k_git_slow[${${_p9k__git_dir:+GIT_DIR:$_p9k__git_dir}:-$VCS_STATUS_WORKDIR}]=1\n    elif (( $1 && latency < 0.8 * _POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS )); then  # 0.8 to avoid flip-flopping\n      _p9k_git_slow[${${_p9k__git_dir:+GIT_DIR:$_p9k__git_dir}:-$VCS_STATUS_WORKDIR}]=0\n    fi\n    _p9k_vcs_status_save\n  fi\n\n  if [[ -z $_p9k__gitstatus_next_dir ]]; then\n    unset _p9k__gitstatus_next_dir\n    case $VCS_STATUS_RESULT in\n      norepo-async) (( $1 )) && _p9k_vcs_status_purge $_p9k__cwd_a;;\n      ok-async) (( $1 )) || _p9k__gitstatus_next_dir=$_p9k__cwd_a;;\n    esac\n  fi\n\n  if [[ -n $_p9k__gitstatus_next_dir ]]; then\n    _p9k__git_dir=$GIT_DIR\n    if ! gitstatus_query_p9k_ -d $_p9k__gitstatus_next_dir -t 0 -c '_p9k_vcs_resume 1' POWERLEVEL9K; then\n      unset _p9k__gitstatus_next_dir\n      unset VCS_STATUS_RESULT\n    else\n      _p9k_maybe_ignore_git_repo\n      case $VCS_STATUS_RESULT in\n        tout) _p9k__gitstatus_next_dir=''; _p9k__gitstatus_start_time=$EPOCHREALTIME;;\n        norepo-sync) _p9k_vcs_status_purge $_p9k__gitstatus_next_dir; unset _p9k__gitstatus_next_dir;;\n        ok-sync) _p9k_vcs_status_save; unset _p9k__gitstatus_next_dir;;\n      esac\n    fi\n  fi\n\n  if (( _p9k_vcs_index && $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )); then\n    local _p9k__prompt _p9k__prompt_side=$_p9k_vcs_side _p9k__segment_name=vcs\n    local -i _p9k__has_upglob _p9k__segment_index=_p9k_vcs_index _p9k__line_index=_p9k_vcs_line_index\n    _p9k_vcs_render\n    typeset -g _p9k__vcs=$_p9k__prompt\n  else\n    _p9k__refresh_reason=gitstatus\n    _p9k_set_prompt\n    _p9k__refresh_reason=''\n  fi\n  _p9k_reset_prompt\n}\n\nfunction _p9k_vcs_gitstatus() {\n  if [[ $_p9k__refresh_reason == precmd ]] && (( !_p9k__vcs_called )); then\n    typeset -gi _p9k__vcs_called=1\n    if (( $+_p9k__gitstatus_next_dir )); then\n      _p9k__gitstatus_next_dir=$_p9k__cwd_a\n    else\n      local -F timeout=_POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS\n      if ! _p9k_vcs_status_for_dir; then\n        _p9k__git_dir=$GIT_DIR\n        gitstatus_query_p9k_ -d $_p9k__cwd_a -t $timeout -p -c '_p9k_vcs_resume 0' POWERLEVEL9K || return 1\n        _p9k_maybe_ignore_git_repo\n        case $VCS_STATUS_RESULT in\n          tout) _p9k__gitstatus_next_dir=''; _p9k__gitstatus_start_time=$EPOCHREALTIME; return 0;;\n          norepo-sync) return 0;;\n          ok-sync) _p9k_vcs_status_save;;\n        esac\n      else\n        if [[ -n $GIT_DIR ]]; then\n          [[ $_p9k_git_slow[GIT_DIR:$GIT_DIR] == 1 ]] && timeout=0\n        else\n          local dir=$_p9k__cwd_a\n          while true; do\n            case $_p9k_git_slow[$dir] in\n              \"\") [[ $dir == (/|.) ]] && break; dir=${dir:h};;\n              0) break;;\n              1) timeout=0; break;;\n            esac\n          done\n        fi\n      fi\n      (( _p9k__prompt_idx == 1 )) && timeout=0\n      _p9k__git_dir=$GIT_DIR\n      if (( _p9k_vcs_index && $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )); then\n        if ! gitstatus_query_p9k_ -d $_p9k__cwd_a -t 0 -c '_p9k_vcs_resume 1' POWERLEVEL9K; then\n          unset VCS_STATUS_RESULT\n          return 1\n        fi\n        typeset -gF _p9k__vcs_timeout=timeout\n        _p9k__gitstatus_next_dir=''\n        _p9k__gitstatus_start_time=$EPOCHREALTIME\n        return 0\n      fi\n      if ! gitstatus_query_p9k_ -d $_p9k__cwd_a -t $timeout -c '_p9k_vcs_resume 1' POWERLEVEL9K; then\n        unset VCS_STATUS_RESULT\n        return 1\n      fi\n      _p9k_maybe_ignore_git_repo\n      case $VCS_STATUS_RESULT in\n        tout) _p9k__gitstatus_next_dir=''; _p9k__gitstatus_start_time=$EPOCHREALTIME;;\n        norepo-sync) _p9k_vcs_status_purge $_p9k__cwd_a;;\n        ok-sync) _p9k_vcs_status_save;;\n      esac\n    fi\n  fi\n  return 0\n}\n\n################################################################\n# Segment to show VCS information\n\nprompt_vcs() {\n  if (( _p9k_vcs_index && $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )); then\n    _p9k__prompt+='${(e)_p9k__vcs}'\n    return\n  fi\n\n  local -a backends=($_POWERLEVEL9K_VCS_BACKENDS)\n  if (( ${backends[(I)git]} && $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )) && _p9k_vcs_gitstatus; then\n    _p9k_vcs_render && return\n    backends=(${backends:#git})\n  fi\n  if (( $#backends )); then\n    VCS_WORKDIR_DIRTY=false\n    VCS_WORKDIR_HALF_DIRTY=false\n    local current_state=\"\"\n    # Actually invoke vcs_info manually to gather all information.\n    zstyle ':vcs_info:*' enable ${backends}\n    vcs_info\n    local vcs_prompt=\"${vcs_info_msg_0_}\"\n    if [[ -n \"$vcs_prompt\" ]]; then\n      if [[ \"$VCS_WORKDIR_DIRTY\" == true ]]; then\n        # $vcs_visual_identifier gets set in +vi-vcs-detect-changes in functions/vcs.zsh,\n        # as we have there access to vcs_info internal hooks.\n        current_state='MODIFIED'\n      else\n        if [[ \"$VCS_WORKDIR_HALF_DIRTY\" == true ]]; then\n          current_state='UNTRACKED'\n        else\n          current_state='CLEAN'\n        fi\n      fi\n      _p9k_prompt_segment \"${0}_${${(U)current_state}//İ/I}\" \"${__p9k_vcs_states[$current_state]}\" \"$_p9k_color1\" \"$vcs_visual_identifier\" 0 '' \"$vcs_prompt\"\n    fi\n  fi\n}\n\n################################################################\n# Vi Mode: show editing mode (NORMAL|INSERT|VISUAL)\nprompt_vi_mode() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  if (( __p9k_sh_glob )); then\n    if (( $+_POWERLEVEL9K_VI_OVERWRITE_MODE_STRING )); then\n      if [[ -n $_POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then\n        _p9k_prompt_segment $0_INSERT \"$_p9k_color1\" blue '' 0 '${${${${${${:-$_p9k__keymap.$_p9k__zle_state}:#vicmd.*}:#vivis.*}:#vivli.*}:#*.*overwrite*}}' \"$_POWERLEVEL9K_VI_INSERT_MODE_STRING\"\n      fi\n      _p9k_prompt_segment $0_OVERWRITE \"$_p9k_color1\" blue '' 0 '${${${${${${:-$_p9k__keymap.$_p9k__zle_state}:#vicmd.*}:#vivis.*}:#vivli.*}:#*.*insert*}}' \"$_POWERLEVEL9K_VI_OVERWRITE_MODE_STRING\"\n    else\n      if [[ -n $_POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then\n        _p9k_prompt_segment $0_INSERT \"$_p9k_color1\" blue '' 0 '${${${${_p9k__keymap:#vicmd}:#vivis}:#vivli}}' \"$_POWERLEVEL9K_VI_INSERT_MODE_STRING\"\n      fi\n    fi\n\n    if (( $+_POWERLEVEL9K_VI_VISUAL_MODE_STRING )); then\n      _p9k_prompt_segment $0_NORMAL \"$_p9k_color1\" white '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}' \"$_POWERLEVEL9K_VI_COMMAND_MODE_STRING\"\n      _p9k_prompt_segment $0_VISUAL \"$_p9k_color1\" white '' 0 '${$((! ${#${${${${:-$_p9k__keymap$_p9k__region_active}:#vicmd1}:#vivis?}:#vivli?}})):#0}' \"$_POWERLEVEL9K_VI_VISUAL_MODE_STRING\"\n    else\n      _p9k_prompt_segment $0_NORMAL \"$_p9k_color1\" white '' 0 '${$((! ${#${${${_p9k__keymap:#vicmd}:#vivis}:#vivli}})):#0}' \"$_POWERLEVEL9K_VI_COMMAND_MODE_STRING\"\n    fi\n  else\n    if (( $+_POWERLEVEL9K_VI_OVERWRITE_MODE_STRING )); then\n      if [[ -n $_POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then\n        _p9k_prompt_segment $0_INSERT \"$_p9k_color1\" blue '' 0 '${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*overwrite*)}' \"$_POWERLEVEL9K_VI_INSERT_MODE_STRING\"\n      fi\n      _p9k_prompt_segment $0_OVERWRITE \"$_p9k_color1\" blue '' 0 '${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}' \"$_POWERLEVEL9K_VI_OVERWRITE_MODE_STRING\"\n    else\n      if [[ -n $_POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then\n        _p9k_prompt_segment $0_INSERT \"$_p9k_color1\" blue '' 0 '${_p9k__keymap:#(vicmd|vivis|vivli)}' \"$_POWERLEVEL9K_VI_INSERT_MODE_STRING\"\n      fi\n    fi\n\n    if (( $+_POWERLEVEL9K_VI_VISUAL_MODE_STRING )); then\n      _p9k_prompt_segment $0_NORMAL \"$_p9k_color1\" white '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}' \"$_POWERLEVEL9K_VI_COMMAND_MODE_STRING\"\n      _p9k_prompt_segment $0_VISUAL \"$_p9k_color1\" white '' 0 '${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}' \"$_POWERLEVEL9K_VI_VISUAL_MODE_STRING\"\n    else\n      _p9k_prompt_segment $0_NORMAL \"$_p9k_color1\" white '' 0 '${(M)_p9k__keymap:#(vicmd|vivis|vivli)}' \"$_POWERLEVEL9K_VI_COMMAND_MODE_STRING\"\n    fi\n  fi\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\ninstant_prompt_vi_mode() {\n  if [[ -n $_POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then\n    _p9k_prompt_segment prompt_vi_mode_INSERT \"$_p9k_color1\" blue '' 0 '' \"$_POWERLEVEL9K_VI_INSERT_MODE_STRING\"\n  fi\n}\n\n# Chezmoi shell indicator: https://www.chezmoi.io/\nprompt_chezmoi_shell() {\n  _p9k_prompt_segment $0 blue $_p9k_color1 CHEZMOI_ICON 0 '' ''\n}\n\n_p9k_prompt_chezmoi_shell_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$CHEZMOI'\n}\n\nfunction instant_prompt_chezmoi_shell() {\n  _p9k_prompt_segment prompt_chezmoi_shell blue $_p9k_color1 CHEZMOI_ICON 1 '$CHEZMOI_ICON' ''\n}\n\nfunction _p9k_parse_virtualenv_cfg() {\n  typeset -ga reply=(0)\n  [[ -f $1 && -r $1 ]] || return\n\n  local cfg\n  cfg=$(<$1) || return\n\n  local -a match mbegin mend\n  [[ $'\\n'$cfg$'\\n' == (#b)*$'\\n'prompt[$' \\t']#=([^$'\\n']#)$'\\n'* ]] || return\n  local res=${${match[1]##[$' \\t']#}%%[$' \\t']#}\n  if [[ $res == (\\\"*\\\"|\\'*\\') ]]; then\n    # The string is quoted in python style, which isn't the same as quoting in zsh.\n    # For example, the literal 'foo\"\\'bar' denotes foo\"'bar in python but in zsh\n    # it is malformed.\n    #\n    # We cheat a bit and impelement not exactly correct unquoting. It may produce\n    # different visual results but won't perform unintended expansions or bleed out\n    # any escape sequences.\n    #\n    # Note that venv performs unusual and obviously unintended expansions on the\n    # value of `prompt`: single-word expansions are performed twice by `activate`,\n    # and then again on every prompt if `prompt_subst` is in effect. While in general\n    # I am OK with being bug-compatible with other software, the bugs in venv are a\n    # bit too extreme for my comfort. I am going to disable all expansions and\n    # display the configured prompt literally.\n    res=${(Vg:e:)${res[2,-2]}}\n  fi\n  reply=(1 \"$res\")\n}\n\n################################################################\n# Virtualenv: current working virtualenv\n# More information on virtualenv (Python):\n# https://virtualenv.pypa.io/en/latest/\nprompt_virtualenv() {\n  local msg=''\n  if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then\n    msg=\"${_p9k__ret//\\%/%%} \"\n  fi\n  local cfg=$VIRTUAL_ENV/pyvenv.cfg\n  if ! _p9k_cache_stat_get $0 $cfg; then\n    local -a reply\n    _p9k_parse_virtualenv_cfg $cfg\n    _p9k_cache_stat_set \"${reply[@]}\"\n  fi\n  if (( _p9k__cache_val[1] )); then\n    local v=$_p9k__cache_val[2]\n  else\n    local v=${VIRTUAL_ENV:t}\n    if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != \"($v) \" ]]; then\n      v=$VIRTUAL_ENV_PROMPT[2,-3]\n    elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then\n      v=${VIRTUAL_ENV:h:t}\n    fi\n  fi\n  msg+=\"$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER\"\n  case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in\n    false)\n      _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PYTHON_ICON' 0 '${(M)${#P9K_PYENV_PYTHON_VERSION}:#0}' \"$msg\"\n    ;;\n    if-different)\n      _p9k_escape $v\n      _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PYTHON_ICON' 0 '${${:-'$_p9k__ret'}:#$_p9k__pyenv_version}' \"$msg\"\n    ;;\n    *)\n      _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PYTHON_ICON' 0 '' \"$msg\"\n    ;;\n  esac\n}\n\n_p9k_prompt_virtualenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$VIRTUAL_ENV'\n}\n\n# _p9k_read_pyenv_like_version_file <filepath> [prefix]\nfunction _p9k_read_pyenv_like_version_file() {\n  local -a stat\n  zstat -A stat +mtime -- $1 2>/dev/null || stat=(-1)\n  local cached=$_p9k__read_pyenv_like_version_file_cache[$1:$2]\n  if [[ $cached == $stat[1]:* ]]; then\n    _p9k__ret=${cached#*:}\n  else\n    local fd content\n    {\n      { sysopen -r -u fd -- $1 && sysread -i $fd -s 1024 content } 2>/dev/null\n    } always {\n      [[ -n $fd ]] && exec {fd}>&-\n    }\n    local MATCH\n    local versions=(${${${${(f)content}/(#m)*/${MATCH[(w)1]}}##\\#*}#$2})\n    _p9k__ret=${(j.:.)versions}\n    _p9k__read_pyenv_like_version_file_cache[$1:$2]=$stat[1]:$_p9k__ret\n  fi\n  [[ -n $_p9k__ret ]]\n}\n\nfunction _p9k_pyenv_global_version() {\n  _p9k_read_pyenv_like_version_file ${PYENV_ROOT:-$HOME/.pyenv}/version python- || _p9k__ret=system\n}\n\nfunction _p9k_pyenv_compute() {\n  unset P9K_PYENV_PYTHON_VERSION _p9k__pyenv_version\n\n  local v=${(j.:.)${(@)${(s.:.)PYENV_VERSION}#python-}}\n  if [[ -n $v ]]; then\n    (( ${_POWERLEVEL9K_PYENV_SOURCES[(I)shell]} )) || return\n  else\n    (( ${_POWERLEVEL9K_PYENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $PYENV_DIR != (|.) ]]; then\n      [[ $PYENV_DIR == /* ]] && local dir=$PYENV_DIR || local dir=\"$_p9k__cwd_a/$PYENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_pyenv_like_version_file $dir/.python-version python-; then\n            (( ${_POWERLEVEL9K_PYENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .python-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_pyenv_like_version_file $_p9k__parent_dirs[idx]/.python-version python-; then\n        (( ${_POWERLEVEL9K_PYENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_PYENV_SOURCES[(I)global]} )) || return\n      _p9k_pyenv_global_version\n    fi\n    v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_pyenv_global_version\n    [[ $v == $_p9k__ret ]] && return 1\n  fi\n\n  if (( !_POWERLEVEL9K_PYENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return 1\n  fi\n\n  local versions=${PYENV_ROOT:-$HOME/.pyenv}/versions\n  versions=${versions:A}\n  local name version\n  for name in ${(s.:.)v}; do\n    version=$versions/$name\n    version=${version:A}\n    if [[ $version(#qN/) == (#b)$versions/([^/]##)* ]]; then\n      typeset -g P9K_PYENV_PYTHON_VERSION=$match[1]\n      break\n    fi\n  done\n\n  typeset -g _p9k__pyenv_version=$v\n}\n\n################################################################\n# Segment to display pyenv information\n# https://github.com/pyenv/pyenv#choosing-the-python-version\nprompt_pyenv() {\n  _p9k_pyenv_compute || return\n  _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'PYTHON_ICON' 0 '' \"${_p9k__pyenv_version//\\%/%%}\"\n}\n\n_p9k_prompt_pyenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[pyenv]:-${${+functions[pyenv]}:#0}}'\n}\n\nfunction _p9k_goenv_global_version() {\n  _p9k_read_pyenv_like_version_file ${GOENV_ROOT:-$HOME/.goenv}/version go- || _p9k__ret=system\n}\n\n################################################################\n# Segment to display goenv information: https://github.com/syndbg/goenv\nprompt_goenv() {\n  local v=${(j.:.)${(@)${(s.:.)GOENV_VERSION}#go-}}\n  if [[ -n $v ]]; then\n    (( ${_POWERLEVEL9K_GOENV_SOURCES[(I)shell]} )) || return\n  else\n    (( ${_POWERLEVEL9K_GOENV_SOURCES[(I)local|global]} )) || return\n    _p9k__ret=\n    if [[ $GOENV_DIR != (|.) ]]; then\n      [[ $GOENV_DIR == /* ]] && local dir=$GOENV_DIR || local dir=\"$_p9k__cwd_a/$GOENV_DIR\"\n      dir=${dir:A}\n      if [[ $dir != $_p9k__cwd_a ]]; then\n        while true; do\n          if _p9k_read_pyenv_like_version_file $dir/.go-version go-; then\n            (( ${_POWERLEVEL9K_GOENV_SOURCES[(I)local]} )) || return\n            break\n          fi\n          [[ $dir == (/|.) ]] && break\n          dir=${dir:h}\n        done\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      _p9k_upglob .go-version -.\n      local -i idx=$?\n      if (( idx )) && _p9k_read_pyenv_like_version_file $_p9k__parent_dirs[idx]/.go-version go-; then\n        (( ${_POWERLEVEL9K_GOENV_SOURCES[(I)local]} )) || return\n      else\n        _p9k__ret=\n      fi\n    fi\n    if [[ -z $_p9k__ret ]]; then\n      (( _POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_GOENV_SOURCES[(I)global]} )) || return\n      _p9k_goenv_global_version\n    fi\n    v=$_p9k__ret\n  fi\n\n  if (( !_POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW )); then\n    _p9k_goenv_global_version\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  if (( !_POWERLEVEL9K_GOENV_SHOW_SYSTEM )); then\n    [[ $v == system ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"blue\" \"$_p9k_color1\" 'GO_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_goenv_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[goenv]:-${${+functions[goenv]}:#0}}'\n}\n\n################################################################\n# Display openfoam information\nprompt_openfoam() {\n  if [[ -z \"$WM_FORK\" ]] ; then\n    _p9k_prompt_segment \"$0\" \"yellow\" \"$_p9k_color1\" '' 0 '' \"OF: ${${WM_PROJECT_VERSION:t}//\\%/%%}\"\n  else\n    _p9k_prompt_segment \"$0\" \"yellow\" \"$_p9k_color1\" '' 0 '' \"F-X: ${${WM_PROJECT_VERSION:t}//\\%/%%}\"\n  fi\n}\n\n_p9k_prompt_openfoam_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$WM_PROJECT_VERSION'\n}\n\n################################################################\n# Segment to display Swift version\nprompt_swift_version() {\n  _p9k_cached_cmd 0 '' swift --version || return\n  [[ $_p9k__ret == (#b)[^[:digit:]]#([[:digit:].]##)* ]] || return\n  _p9k_prompt_segment \"$0\" \"magenta\" \"white\" 'SWIFT_ICON' 0 '' \"${match[1]//\\%/%%}\"\n}\n\n_p9k_prompt_swift_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[swift]'\n}\n\n################################################################\n# dir_writable: Display information about the user's permission to write in the current directory\nprompt_dir_writable() {\n  if [[ ! -w \"$_p9k__cwd_a\" ]]; then\n    _p9k_prompt_segment \"$0_FORBIDDEN\" \"red\" \"yellow1\" 'LOCK_ICON' 0 '' ''\n  fi\n}\n\ninstant_prompt_dir_writable() { prompt_dir_writable; }\n\n################################################################\n# Kubernetes Current Context/Namespace\nprompt_kubecontext() {\n  if ! _p9k_cache_stat_get $0 ${(s.:.)${KUBECONFIG:-$HOME/.kube/config}}; then\n    local name namespace cluster user cloud_name cloud_account cloud_zone cloud_cluster text state\n    () {\n      local cfg && cfg=(${(f)\"$(kubectl config view -o=yaml 2>/dev/null)\"}) || return\n      local qstr='\"*\"'\n      local str='([^\"'\\''|>]*|'$qstr')'\n      local ctx=(${(@M)cfg:#current-context: $~str})\n      (( $#ctx == 1 )) || return\n      name=${ctx[1]#current-context: }\n      local -i pos=${cfg[(i)contexts:]}\n      {\n        (( pos <= $#cfg )) || return\n        shift $pos cfg\n        pos=${cfg[(i)  name: ${(b)name}]}\n        (( pos <= $#cfg )) || return\n        (( --pos ))\n        for ((; pos > 0; --pos)); do\n          local line=$cfg[pos]\n          if [[ $line == '- context:' ]]; then\n            return 0\n          elif [[ $line == (#b)'    cluster: '($~str) ]]; then\n            cluster=$match[1]\n            [[ $cluster == $~qstr ]] && cluster=$cluster[2,-2]\n          elif [[ $line == (#b)'    namespace: '($~str) ]]; then\n            namespace=$match[1]\n            [[ $namespace == $~qstr ]] && namespace=$namespace[2,-2]\n          elif [[ $line == (#b)'    user: '($~str) ]]; then\n            user=$match[1]\n            [[ $user == $~qstr ]] && user=$user[2,-2]\n          fi\n        done\n      } always {\n        [[ $name == $~qstr ]] && name=$name[2,-2]\n      }\n    }\n    if [[ -n $name ]]; then\n      : ${namespace:=default}\n      # gke_my-account_us-east1-a_cluster-01\n      # gke_my-account_us-east1_cluster-01\n      if [[ $cluster == (#b)gke_(?*)_(asia|australia|europe|northamerica|southamerica|us)-([a-z]##<->)(-[a-z]|)_(?*) ]]; then\n        cloud_name=gke\n        cloud_account=$match[1]\n        cloud_zone=$match[2]-$match[3]$match[4]\n        cloud_cluster=$match[5]\n        if (( ${_POWERLEVEL9K_KUBECONTEXT_SHORTEN[(I)gke]} )); then\n          text=$cloud_cluster\n        fi\n      # arn:aws:eks:us-east-1:123456789012:cluster/cluster-01\n      elif [[ $cluster == (#b)arn:aws[[:alnum:]-]#:eks:([[:alnum:]-]##):([[:digit:]]##):cluster/(?*) ]]; then\n        cloud_name=eks\n        cloud_zone=$match[1]\n        cloud_account=$match[2]\n        cloud_cluster=$match[3]\n        if (( ${_POWERLEVEL9K_KUBECONTEXT_SHORTEN[(I)eks]} )); then\n          text=$cloud_cluster\n        fi\n      fi\n      if [[ -z $text ]]; then\n        text=$name\n        if [[ $_POWERLEVEL9K_KUBECONTEXT_SHOW_DEFAULT_NAMESPACE == 1 || $namespace != (default|$name) ]]; then\n          text+=\"/$namespace\"\n        fi\n      fi\n      local pat class\n      for pat class in \"${_POWERLEVEL9K_KUBECONTEXT_CLASSES[@]}\"; do\n        if [[ $text == ${~pat} ]]; then\n          [[ -n $class ]] && state=_${${(U)class}//İ/I}\n          break\n        fi\n      done\n    fi\n    _p9k_cache_stat_set \"${(g::)name}\" \"${(g::)namespace}\" \"${(g::)cluster}\" \"${(g::)user}\" \"${(g::)cloud_name}\" \"${(g::)cloud_account}\" \"${(g::)cloud_zone}\" \"${(g::)cloud_cluster}\" \"${(g::)text}\" \"$state\"\n  fi\n\n  typeset -g P9K_KUBECONTEXT_NAME=$_p9k__cache_val[1]\n  typeset -g P9K_KUBECONTEXT_NAMESPACE=$_p9k__cache_val[2]\n  typeset -g P9K_KUBECONTEXT_CLUSTER=$_p9k__cache_val[3]\n  typeset -g P9K_KUBECONTEXT_USER=$_p9k__cache_val[4]\n  typeset -g P9K_KUBECONTEXT_CLOUD_NAME=$_p9k__cache_val[5]\n  typeset -g P9K_KUBECONTEXT_CLOUD_ACCOUNT=$_p9k__cache_val[6]\n  typeset -g P9K_KUBECONTEXT_CLOUD_ZONE=$_p9k__cache_val[7]\n  typeset -g P9K_KUBECONTEXT_CLOUD_CLUSTER=$_p9k__cache_val[8]\n  [[ -n $_p9k__cache_val[9] ]] || return\n  _p9k_prompt_segment $0$_p9k__cache_val[10] magenta white KUBERNETES_ICON 0 '' \"${_p9k__cache_val[9]//\\%/%%}\"\n}\n\n_p9k_prompt_kubecontext_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[kubectl]'\n}\n\n################################################################\n# Dropbox status\nprompt_dropbox() {\n  # The first column is just the directory, so cut it\n  local dropbox_status=\"$(dropbox-cli filestatus . | cut -d\\  -f2-)\"\n\n  # Only show if the folder is tracked and dropbox is running\n  if [[ \"$dropbox_status\" != 'unwatched' && \"$dropbox_status\" != \"isn't running!\" ]]; then\n    # If \"up to date\", only show the icon\n    if [[ \"$dropbox_status\" =~ 'up to date' ]]; then\n      dropbox_status=\"\"\n    fi\n\n    _p9k_prompt_segment \"$0\" \"white\" \"blue\" \"DROPBOX_ICON\" 0 '' \"${dropbox_status//\\%/%%}\"\n  fi\n}\n\n_p9k_prompt_dropbox_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[dropbox-cli]'\n}\n\n# print Java version number\nprompt_java_version() {\n  if (( _POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY )); then\n    _p9k_upglob 'pom.xml|build.gradle.kts|build.sbt|deps.edn|project.clj|build.boot|*.(java|class|jar|gradle|clj|cljc)' -. && return\n  fi\n\n  local java=$commands[java]\n  if ! _p9k_cache_stat_get $0 $java ${JAVA_HOME:+$JAVA_HOME/release}; then\n    local v\n    v=\"$(java -fullversion 2>&1)\" || v=\n    v=${${v#*\\\"}%\\\"*}\n    (( _POWERLEVEL9K_JAVA_VERSION_FULL )) || v=${v%%-*}\n    _p9k_cache_stat_set \"${v//\\%/%%}\"\n  fi\n\n  [[ -n $_p9k__cache_val[1] ]] || return\n  _p9k_prompt_segment \"$0\" \"red\" \"white\" \"JAVA_ICON\" 0 '' $_p9k__cache_val[1]\n}\n\n_p9k_prompt_java_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[java]'\n}\n\nprompt_azure() {\n  local name cfg=${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json\n  if _p9k_cache_stat_get $0 $cfg; then\n    name=$_p9k__cache_val[1]\n  else\n    if (( $+commands[jq] )) && name=\"$(jq -r '[.subscriptions[]|select(.isDefault==true)|.name][]|strings' $cfg 2>/dev/null)\"; then\n      name=${name%%$'\\n'*}\n    elif ! name=\"$(az account show --query name --output tsv 2>/dev/null)\"; then\n      name=\n    fi\n    _p9k_cache_stat_set \"$name\"\n  fi\n  [[ -n $name ]] || return\n  local pat class state\n  for pat class in \"${_POWERLEVEL9K_AZURE_CLASSES[@]}\"; do\n    if [[ $name == ${~pat} ]]; then\n      [[ -n $class ]] && state=_${${(U)class}//İ/I}\n      break\n    fi\n  done\n  _p9k_prompt_segment \"$0$state\" \"blue\" \"white\" \"AZURE_ICON\" 0 '' \"${name//\\%/%%}\"\n}\n\n_p9k_prompt_azure_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[az]'\n}\n\nprompt_gcloud() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment                                                                    \\\n    $0_PARTIAL blue white GCLOUD_ICON 1                                                  \\\n    '${${(M)${#P9K_GCLOUD_PROJECT_NAME}:#0}:+$P9K_GCLOUD_ACCOUNT$P9K_GCLOUD_PROJECT_ID}' \\\n    '${P9K_GCLOUD_ACCOUNT//\\%/%%}:${P9K_GCLOUD_PROJECT_ID//\\%/%%}'\n  _p9k_prompt_segment                                                                    \\\n    $0_COMPLETE blue white GCLOUD_ICON 1                                                 \\\n    '$P9K_GCLOUD_PROJECT_NAME'                                                           \\\n    '${P9K_GCLOUD_ACCOUNT//\\%/%%}:${P9K_GCLOUD_PROJECT_ID//\\%/%%}'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_gcloud_prefetch() {\n  # P9K_GCLOUD_PROJECT is deprecated; it's always equal to P9K_GCLOUD_PROJECT_ID\n  unset P9K_GCLOUD_CONFIGURATION P9K_GCLOUD_ACCOUNT P9K_GCLOUD_PROJECT P9K_GCLOUD_PROJECT_ID P9K_GCLOUD_PROJECT_NAME\n  (( $+commands[gcloud] )) || return\n  _p9k_read_word ${CLOUDSDK_CONFIG:-~/.config/gcloud}/active_config || return\n  P9K_GCLOUD_CONFIGURATION=$_p9k__ret\n  if ! _p9k_cache_stat_get $0 ${CLOUDSDK_CONFIG:-~/.config/gcloud}/configurations/config_$P9K_GCLOUD_CONFIGURATION; then\n    local pair account project_id\n    pair=\"$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \\\n      --quiet \\\n      --format=$'value[separator=\"\\1\"](properties.core.account,properties.core.project)' \\\n      </dev/null)\"\n    (( ! $? )) && IFS=$'\\1' read account project_id <<<$pair\n    _p9k_cache_stat_set \"$account\" \"$project_id\"\n  fi\n  if [[ -n $_p9k__cache_val[1] ]]; then\n    P9K_GCLOUD_ACCOUNT=$_p9k__cache_val[1]\n  fi\n  if [[ -n $_p9k__cache_val[2] ]]; then\n    P9K_GCLOUD_PROJECT_ID=$_p9k__cache_val[2]\n    P9K_GCLOUD_PROJECT=$P9K_GCLOUD_PROJECT_ID  # deprecated parameter; set for backward compatibility\n  fi\n  if [[ $P9K_GCLOUD_CONFIGURATION == $_p9k_gcloud_configuration &&\n        $P9K_GCLOUD_ACCOUNT == $_p9k_gcloud_account &&\n        $P9K_GCLOUD_PROJECT_ID == $_p9k_gcloud_project_id ]]; then\n    [[ -n $_p9k_gcloud_project_name ]] && P9K_GCLOUD_PROJECT_NAME=$_p9k_gcloud_project_name\n    if (( _POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS < 0 ||\n          _p9k__gcloud_last_fetch_ts + _POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS > EPOCHREALTIME )); then\n      return\n    fi\n  else\n    _p9k_gcloud_configuration=$P9K_GCLOUD_CONFIGURATION\n    _p9k_gcloud_account=$P9K_GCLOUD_ACCOUNT\n    _p9k_gcloud_project_id=$P9K_GCLOUD_PROJECT_ID\n    _p9k_gcloud_project_name=\n    _p9k__state_dump_scheduled=1\n  fi\n  [[ -n $P9K_GCLOUD_CONFIGURATION && -n $P9K_GCLOUD_ACCOUNT && -n $P9K_GCLOUD_PROJECT_ID ]] || return\n  _p9k__gcloud_last_fetch_ts=EPOCHREALTIME\n  _p9k_worker_invoke gcloud \"_p9k_prompt_gcloud_compute ${(q)commands[gcloud]} ${(q)P9K_GCLOUD_CONFIGURATION} ${(q)P9K_GCLOUD_ACCOUNT} ${(q)P9K_GCLOUD_PROJECT_ID}\"\n}\n\n_p9k_prompt_gcloud_init() {\n  _p9k__async_segments_compute+=_p9k_gcloud_prefetch\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[gcloud]'\n}\n\n_p9k_prompt_gcloud_compute() {\n  local gcloud=$1\n  P9K_GCLOUD_CONFIGURATION=$2\n  P9K_GCLOUD_ACCOUNT=$3\n  P9K_GCLOUD_PROJECT_ID=$4\n  _p9k_worker_async \"_p9k_prompt_gcloud_async ${(q)gcloud}\" _p9k_prompt_gcloud_sync\n}\n\n_p9k_prompt_gcloud_async() {\n  local gcloud=$1\n  $gcloud projects describe $P9K_GCLOUD_PROJECT_ID --configuration=$P9K_GCLOUD_CONFIGURATION \\\n    --account=$P9K_GCLOUD_ACCOUNT --format='value(name)'\n}\n\n_p9k_prompt_gcloud_sync() {\n  _p9k_worker_reply \"_p9k_prompt_gcloud_update ${(q)P9K_GCLOUD_CONFIGURATION} ${(q)P9K_GCLOUD_ACCOUNT} ${(q)P9K_GCLOUD_PROJECT_ID} ${(q)REPLY%$'\\n'}\"\n}\n\n_p9k_prompt_gcloud_update() {\n  [[ $1 == $P9K_GCLOUD_CONFIGURATION &&\n     $2 == $P9K_GCLOUD_ACCOUNT &&\n     $3 == $P9K_GCLOUD_PROJECT_ID &&\n     $4 != $P9K_GCLOUD_PROJECT_NAME ]] || return\n  [[ -n $4 ]] && P9K_GCLOUD_PROJECT_NAME=$4 || unset P9K_GCLOUD_PROJECT_NAME\n  _p9k_gcloud_project_name=$P9K_GCLOUD_PROJECT_NAME\n  _p9k__state_dump_scheduled=1\n  reset=1\n}\n\nprompt_google_app_cred() {\n  unset P9K_GOOGLE_APP_CRED_{TYPE,PROJECT_ID,CLIENT_EMAIL}\n\n  if ! _p9k_cache_stat_get $0 $GOOGLE_APPLICATION_CREDENTIALS; then\n    local -a lines\n    local q='[.type//\"\", .project_id//\"\", .client_email//\"\", 0][]'\n    if lines=(\"${(@f)$(jq -r $q <$GOOGLE_APPLICATION_CREDENTIALS 2>/dev/null)}\") && (( $#lines == 4 )); then\n      local text=\"${(j.:.)lines[1,-2]}\"\n      local pat class state\n      for pat class in \"${_POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES[@]}\"; do\n        if [[ $text == ${~pat} ]]; then\n          [[ -n $class ]] && state=_${${(U)class}//İ/I}\n          break\n        fi\n      done\n      _p9k_cache_stat_set 1 \"${(@)lines[1,-2]}\" \"$text\" \"$state\"\n    else\n      _p9k_cache_stat_set 0\n    fi\n  fi\n\n  (( _p9k__cache_val[1] )) || return\n  P9K_GOOGLE_APP_CRED_TYPE=$_p9k__cache_val[2]\n  P9K_GOOGLE_APP_CRED_PROJECT_ID=$_p9k__cache_val[3]\n  P9K_GOOGLE_APP_CRED_CLIENT_EMAIL=$_p9k__cache_val[4]\n  _p9k_prompt_segment \"$0$_p9k__cache_val[6]\" \"blue\" \"white\" \"GCLOUD_ICON\" 0 '' \"$_p9k__cache_val[5]\"\n}\n\n_p9k_prompt_google_app_cred_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${GOOGLE_APPLICATION_CREDENTIALS:+$commands[jq]}'\n}\n\ntypeset -gra __p9k_nordvpn_tag=(\n  P9K_NORDVPN_STATUS\n  P9K_NORDVPN_TECHNOLOGY\n  P9K_NORDVPN_PROTOCOL\n  P9K_NORDVPN_IP_ADDRESS\n  P9K_NORDVPN_SERVER\n  P9K_NORDVPN_COUNTRY\n  P9K_NORDVPN_CITY\n)\n\nfunction _p9k_fetch_nordvpn_status() {\n  setopt err_return no_multi_byte\n  local REPLY\n  zsocket /run/nordvpn/nordvpnd.sock\n  local -i fd=REPLY\n  {\n    print -nu $fd 'PRI * HTTP/2.0\\r\\n\\r\\nSM\\r\\n\\r\\n\\0\\0\\0\\4\\1\\0\\0\\0\\0\\0\\0;\\1\\4\\0\\0\\0\\1\\203\\206E\\213b\\270\\327\\2762\\322z\\230\\326j\\246A\\206\\240\\344\\35\\23\\235\\t_\\213\\35u\\320b\\r&=LMedz\\212\\232\\312\\310\\264\\307`+\\262\\332\\340@\\2te\\206M\\2035\\5\\261\\37\\0\\0\\5\\0\\1\\0\\0\\0\\1\\0\\0\\0\\0\\0\\0\\0\\25\\1\\4\\0\\0\\0\\3\\203\\206E\\215b\\270\\327\\2762\\322z\\230\\334\\221\\246\\324\\177\\302\\301\\300\\277\\0\\0\\5\\0\\1\\0\\0\\0\\3\\0\\0\\0\\0\\0'\n    local val\n    local -i len n wire tag\n    {\n      IFS='' read -t 0.25 -r val\n      val=$'\\n'\n      while true; do\n        tag=$((#val))\n        wire='tag & 7'\n        (( (tag >>= 3) && tag <= $#__p9k_nordvpn_tag )) || break\n        if (( wire == 0 )); then\n          # varint\n          sysread -s 1 -t 0.25 val\n          n=$((#val))\n          (( n < 128 )) || break  # bail on multi-byte varints\n          if (( tag == 2 )); then\n            # P9K_NORDVPN_TECHNOLOGY\n            case $n in\n              1) typeset -g P9K_NORDVPN_TECHNOLOGY=OPENVPN;;\n              2) typeset -g P9K_NORDVPN_TECHNOLOGY=NORDLYNX;;\n              3) typeset -g P9K_NORDVPN_TECHNOLOGY=SKYLARK;;\n              *) typeset -g P9K_NORDVPN_TECHNOLOGY=UNKNOWN;;\n            esac\n          elif (( tag == 3 )); then\n            # P9K_NORDVPN_PROTOCOL\n            case $n in\n              1) typeset -g P9K_NORDVPN_PROTOCOL=UDP;;\n              2) typeset -g P9K_NORDVPN_PROTOCOL=TCP;;\n              *) typeset -g P9K_NORDVPN_PROTOCOL=UNKNOWN;;\n            esac\n          else\n            break\n          fi\n        else\n          # length-delimited\n          (( wire == 2 )) || break\n          (( tag != 2 && tag != 3 )) || break\n          [[ -t $fd ]] || true  # https://www.zsh.org/mla/workers/2020/msg00207.html\n          sysread -s 1 -t 0.25 val\n          len=$((#val))\n          val=\n          while (( $#val < len )); do\n            [[ -t $fd ]] || true  # https://www.zsh.org/mla/workers/2020/msg00207.html\n            sysread -s $(( len - $#val )) -t 0.25 'val[$#val+1]'\n          done\n          typeset -g $__p9k_nordvpn_tag[tag]=$val\n        fi\n        [[ -t $fd ]] || true  # https://www.zsh.org/mla/workers/2020/msg00207.html\n        sysread -s 1 -t 0.25 val\n      done\n    } <&$fd\n  } always {\n    exec {fd}>&-\n  }\n}\n\n# Shows the state of NordVPN connection. Works only on Linux. Can be in the following 5 states.\n#\n# CONNECTED: NordVPN is connected. By default shows NORDVPN_ICON as icon and country code as\n# content. In addition, the following variables are set for the use by\n# POWERLEVEL9K_NORDVPN_CONNECTED_VISUAL_IDENTIFIER_EXPANSION and\n# POWERLEVEL9K_NORDVPN_CONNECTED_CONTENT_EXPANSION:\n#\n#   - P9K_NORDVPN_STATUS\n#   - P9K_NORDVPN_PROTOCOL\n#   - P9K_NORDVPN_TECHNOLOGY\n#   - P9K_NORDVPN_IP_ADDRESS\n#   - P9K_NORDVPN_SERVER\n#   - P9K_NORDVPN_COUNTRY\n#   - P9K_NORDVPN_CITY\n#   - P9K_NORDVPN_COUNTRY_CODE\n#\n# The last variable is trivially derived from P9K_NORDVPN_SERVER. The rest correspond to the output\n# lines of `nordvpn status` command. Example of using these variables:\n#\n#   # Display the name of the city where VPN servers are located when connected to NordVPN.\n#   POWERLEVEL9K_NORDVPN_CONNECTED_CONTENT_EXPANSION='${P9K_NORDVPN_CITY}'\n#\n# DISCONNECTED, CONNECTING, DISCONNECTING: NordVPN is disconnected/connecting/disconnecting. By\n# default shows NORDVPN_ICON as icon and FAIL_ICON as content. In state CONNECTING the same\n# P9K_NORDVPN_* variables are set as in CONNECTED. In states DISCONNECTED and DISCONNECTING only\n# P9K_NORDVPN_STATUS is set. Example customizations:\n#\n#   # Hide NordVPN segment when disconnected (segments with no icon and no content are not shown).\n#   POWERLEVEL9K_NORDVPN_DISCONNECTED_CONTENT_EXPANSION=\n#   POWERLEVEL9K_NORDVPN_DISCONNECTED_VISUAL_IDENTIFIER_EXPANSION=\n#\n#   # When NordVPN is connecting, show country code on cyan background.\n#   POWERLEVEL9K_NORDVPN_CONNECTING_CONTENT_EXPANSION='${P9K_NORDVPN_COUNTRY_CODE}'\n#   POWERLEVEL9K_NORDVPN_CONNECTING_BACKGROUND=cyan\nfunction prompt_nordvpn() {\n  # This prompt segment is broken. See https://github.com/romkatv/powerlevel10k/issues/2860.\n  # It is disabled until it is fixed.\n  return\n\n  unset $__p9k_nordvpn_tag P9K_NORDVPN_COUNTRY_CODE\n  [[ -e /run/nordvpn/nordvpnd.sock ]] || return\n  _p9k_fetch_nordvpn_status 2>/dev/null || return\n  if [[ $P9K_NORDVPN_SERVER == (#b)([[:alpha:]]##)[[:digit:]]##.nordvpn.com ]]; then\n    typeset -g P9K_NORDVPN_COUNTRY_CODE=${${(U)match[1]}//İ/I}\n  fi\n  case $P9K_NORDVPN_STATUS in\n    Connected)\n      _p9k_prompt_segment $0_CONNECTED blue   white NORDVPN_ICON 0 '' \"$P9K_NORDVPN_COUNTRY_CODE\"\n    ;;\n    Disconnected|Connecting|Disconnecting)\n      local state=${${(U)P9K_NORDVPN_STATUS}//İ/I}\n      _p9k_get_icon $0_$state FAIL_ICON\n      _p9k_prompt_segment $0_$state    yellow white NORDVPN_ICON 0 '' \"$_p9k__ret\"\n    ;;\n    *)\n      return\n    ;;\n  esac\n}\n\n_p9k_prompt_nordvpn_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[nordvpn]'\n}\n\nfunction prompt_ranger() {\n  _p9k_prompt_segment $0 $_p9k_color1 yellow RANGER_ICON 0 '' $RANGER_LEVEL\n}\n\n_p9k_prompt_ranger_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$RANGER_LEVEL'\n}\n\nfunction instant_prompt_ranger() {\n  _p9k_prompt_segment prompt_ranger $_p9k_color1 yellow RANGER_ICON 1 '$RANGER_LEVEL' '$RANGER_LEVEL'\n}\n\nfunction prompt_yazi() {\n  _p9k_prompt_segment $0 $_p9k_color1 yellow YAZI_ICON 0 '' $YAZI_LEVEL\n}\n\n_p9k_prompt_yazi_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$YAZI_LEVEL'\n}\n\nfunction instant_prompt_yazi() {\n  _p9k_prompt_segment prompt_yazi $_p9k_color1 yellow YAZI_ICON 1 '$YAZI_LEVEL' '$YAZI_LEVEL'\n}\n\nfunction prompt_midnight_commander() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' ''\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_midnight_commander_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$MC_TMPDIR'\n}\n\nfunction instant_prompt_midnight_commander() {\n  _p9k_prompt_segment prompt_midnight_commander $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '$MC_TMPDIR' ''\n}\n\nfunction prompt_nnn() {\n  _p9k_prompt_segment $0 6 $_p9k_color1 NNN_ICON 0 '' $NNNLVL\n}\n\n_p9k_prompt_nnn_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${NNNLVL:#0}'\n}\n\nfunction instant_prompt_nnn() {\n  _p9k_prompt_segment prompt_nnn 6 $_p9k_color1 NNN_ICON 1 '${NNNLVL:#0}' '$NNNLVL'\n}\n\nfunction prompt_lf() {\n  _p9k_prompt_segment $0 6 $_p9k_color1 LF_ICON 0 '' $LF_LEVEL\n}\n\n_p9k_prompt_lf_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${LF_LEVEL:#0}'\n}\n\nfunction instant_prompt_lf() {\n  _p9k_prompt_segment prompt_lf 6 $_p9k_color1 LF_ICON 1 '${LF_LEVEL:#0}' '$LF_LEVEL'\n}\n\nfunction prompt_xplr() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 6 $_p9k_color1 XPLR_ICON 0 '' ''\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_xplr_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$XPLR_PID'\n}\n\nfunction instant_prompt_xplr() {\n  _p9k_prompt_segment prompt_xplr 6 $_p9k_color1 XPLR_ICON 0 '$XPLR_PID' ''\n}\n\nfunction prompt_vim_shell() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 green $_p9k_color1 VIM_ICON 0 '' ''\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_vim_shell_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$VIMRUNTIME'\n}\n\nfunction instant_prompt_vim_shell() {\n  _p9k_prompt_segment prompt_vim_shell green $_p9k_color1 VIM_ICON 0 '$VIMRUNTIME' ''\n}\n\nfunction prompt_nix_shell() {\n  _p9k_prompt_segment $0 4 $_p9k_color1 NIX_SHELL_ICON 0 '' \"${(M)IN_NIX_SHELL:#(pure|impure)}\"\n}\n\n_p9k_prompt_nix_shell_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k_nix_shell_cond\n}\n\nfunction instant_prompt_nix_shell() {\n  _p9k_prompt_segment prompt_nix_shell 4 $_p9k_color1 NIX_SHELL_ICON 1 \"$_p9k_nix_shell_cond\" '${(M)IN_NIX_SHELL:#(pure|impure)}'\n}\n\nfunction prompt_terraform() {\n  local ws=$TF_WORKSPACE\n  if [[ -z $TF_WORKSPACE ]]; then\n    _p9k_read_word ${${TF_DATA_DIR:-.terraform}:A}/environment && ws=$_p9k__ret\n  fi\n  [[ -z $ws || $ws == default && $_POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT == 0 ]] && return\n  local pat class state\n  for pat class in \"${_POWERLEVEL9K_TERRAFORM_CLASSES[@]}\"; do\n    if [[ $ws == ${~pat} ]]; then\n      [[ -n $class ]] && state=_${${(U)class}//İ/I}\n      break\n    fi\n  done\n  _p9k_prompt_segment \"$0$state\" $_p9k_color1 blue TERRAFORM_ICON 0 '' $ws\n}\n\n_p9k_prompt_terraform_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[terraform]'\n}\n\nfunction prompt_terraform_version() {\n  local v cfg terraform=${commands[terraform]}\n  _p9k_upglob .terraform-version -. || cfg=$_p9k__parent_dirs[$?]/.terraform-version\n  if _p9k_cache_stat_get $0.$TFENV_TERRAFORM_VERSION $terraform $cfg; then\n    v=$_p9k__cache_val[1]\n  else\n    v=${${\"$(terraform --version 2>/dev/null)\"#Terraform v}%%$'\\n'*} || v=\n    _p9k_cache_stat_set \"$v\"\n  fi\n  [[ -n $v ]] || return\n  _p9k_prompt_segment $0 $_p9k_color1 blue TERRAFORM_ICON 0 '' ${v//\\%/%%}\n}\n\n_p9k_prompt_terraform_version_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[terraform]'\n}\n\nfunction prompt_proxy() {\n  local -U p=(\n    $all_proxy $http_proxy $https_proxy $ftp_proxy\n    $ALL_PROXY $HTTP_PROXY $HTTPS_PROXY $FTP_PROXY)\n  p=(${(@)${(@)${(@)p#*://}##*@}%%/*})\n  (( $#p == 1 )) || p=(\"\")\n  _p9k_prompt_segment $0 $_p9k_color1 blue PROXY_ICON 0 '' \"$p[1]\"\n}\n\n_p9k_prompt_proxy_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$all_proxy$http_proxy$https_proxy$ftp_proxy$ALL_PROXY$HTTP_PROXY$HTTPS_PROXY$FTP_PROXY'\n}\n\nfunction prompt_direnv() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 $_p9k_color1 yellow DIRENV_ICON 0 '${DIRENV_DIR-}' ''\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_direnv_init() {\n  # DIRENV_DIR is set in a precmd hook. If our hook isn't the last, DIRENV_DIR might\n  # still get set before prompt is expanded.\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${DIRENV_DIR-${precmd_functions[-1]:#_p9k_precmd}}'\n}\n\nfunction instant_prompt_direnv() {\n  if [[ -n ${DIRENV_DIR:-} && $precmd_functions[-1] == _p9k_precmd ]]; then\n    _p9k_prompt_segment prompt_direnv $_p9k_color1 yellow DIRENV_ICON 0 '' ''\n  fi\n}\n\nfunction _p9k_timewarrior_clear() {\n  [[ -z $_p9k_timewarrior_dir ]] && return\n  _p9k_timewarrior_dir=\n  _p9k_timewarrior_dir_mtime=0\n  _p9k_timewarrior_file_mtime=0\n  _p9k_timewarrior_file_name=\n  unset _p9k_timewarrior_tags\n  _p9k__state_dump_scheduled=1\n}\n\nfunction prompt_timewarrior() {\n  local dir\n  [[ -n ${dir::=$TIMEWARRIORDB} || -n ${dir::=~/.timewarrior}(#q-/N) ]] ||\n    dir=${XDG_DATA_HOME:-~/.local/share}/timewarrior\n  dir+=/data\n  local -a stat\n  [[ $dir == $_p9k_timewarrior_dir ]] || _p9k_timewarrior_clear\n  if [[ -n $_p9k_timewarrior_file_name ]]; then\n    zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null || stat=()\n    if [[ $stat[1] == $_p9k_timewarrior_dir_mtime && $stat[2] == $_p9k_timewarrior_file_mtime ]]; then\n      if (( $+_p9k_timewarrior_tags )); then\n        _p9k_prompt_segment $0 grey 255 TIMEWARRIOR_ICON 0 '' \"${_p9k_timewarrior_tags//\\%/%%}\"\n      fi\n      return\n    fi\n  fi\n  if [[ ! -d $dir ]]; then\n    _p9k_timewarrior_clear\n    return\n  fi\n  _p9k_timewarrior_dir=$dir\n  if [[ $stat[1] != $_p9k_timewarrior_dir_mtime ]]; then\n    local -a files=($dir/<->-<->.data(.N))\n    if (( ! $#files )); then\n      if (( $#stat )) || zstat -A stat +mtime -- $dir 2>/dev/null; then\n        _p9k_timewarrior_dir_mtime=$stat[1]\n        _p9k_timewarrior_file_mtime=$stat[1]\n        _p9k_timewarrior_file_name=$dir  # sic\n        unset _p9k_timewarrior_tags\n        _p9k__state_dump_scheduled=1\n      else\n        _p9k_timewarrior_clear\n      fi\n      return\n    fi\n    _p9k_timewarrior_file_name=${${(AO)files}[1]}\n  fi\n  if ! zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null; then\n    _p9k_timewarrior_clear\n    return\n  fi\n  _p9k_timewarrior_dir_mtime=$stat[1]\n  _p9k_timewarrior_file_mtime=$stat[2]\n  { local tail=${${(Af)\"$(<$_p9k_timewarrior_file_name)\"}[-1]} } 2>/dev/null\n  if [[ $tail == (#b)'inc '[^\\ ]##(|\\ #\\#(*)) ]]; then\n    _p9k_timewarrior_tags=${${match[2]## #}%% #}\n    _p9k_prompt_segment $0 grey 255 TIMEWARRIOR_ICON 0 '' \"${_p9k_timewarrior_tags//\\%/%%}\"\n  else\n    unset _p9k_timewarrior_tags\n  fi\n  _p9k__state_dump_scheduled=1\n}\n\nfunction _p9k_prompt_timewarrior_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[timew]'\n}\n\nfunction _p9k_taskwarrior_check_meta() {\n  [[ -n $_p9k_taskwarrior_meta_sig ]] || return\n  [[ -z $^_p9k_taskwarrior_meta_non_files(#qN) ]] || return\n  local -a stat\n  if (( $#_p9k_taskwarrior_meta_files )); then\n    zstat -A stat +mtime -- $_p9k_taskwarrior_meta_files 2>/dev/null || return\n  fi\n  [[ $_p9k_taskwarrior_meta_sig == ${(pj:\\0:)stat}$'\\0'$TASKRC$'\\0'$TASKDATA ]] || return\n}\n\nfunction _p9k_taskwarrior_init_meta() {\n  local last_sig=$_p9k_taskwarrior_meta_sig\n  {\n    local cfg\n    cfg=\"$(command task show data.location rc.color=0 rc._forcecolor=0 </dev/null 2>/dev/null)\" || return\n    local lines=(${(@M)${(f)cfg}:#data.location[[:space:]]##[^[:space:]]*})\n    (( $#lines == 1 )) || return\n    local dir=${lines[1]##data.location[[:space:]]#}\n    : ${dir::=$~dir}  # `task` can give us path with `~`` in it; expand it\n\n    local -a stat files=(${TASKRC:-~/.taskrc})\n    _p9k_taskwarrior_meta_files=($^files(N))\n    _p9k_taskwarrior_meta_non_files=(${files:|_p9k_taskwarrior_meta_files})\n    if (( $#_p9k_taskwarrior_meta_files )); then\n      zstat -A stat +mtime -- $_p9k_taskwarrior_meta_files 2>/dev/null || stat=(-1)\n    fi\n    _p9k_taskwarrior_meta_sig=${(pj:\\0:)stat}$'\\0'$TASKRC$'\\0'$TASKDATA\n    _p9k_taskwarrior_data_dir=$dir\n  } always {\n    if (( $? == 0 )); then\n      _p9k__state_dump_scheduled=1\n      return\n    fi\n    [[ -n $last_sig ]] && _p9k__state_dump_scheduled=1\n    _p9k_taskwarrior_meta_files=()\n    _p9k_taskwarrior_meta_non_files=()\n    _p9k_taskwarrior_meta_sig=\n    _p9k_taskwarrior_data_dir=\n    _p9k__taskwarrior_functional=\n  }\n}\n\nfunction _p9k_taskwarrior_check_data() {\n  [[ -n $_p9k_taskwarrior_data_sig ]] || return\n  [[ -z $^_p9k_taskwarrior_data_non_files(#qN) ]] || return\n  local -a stat\n  if (( $#_p9k_taskwarrior_data_files )); then\n    zstat -A stat +mtime -- $_p9k_taskwarrior_data_files 2>/dev/null || return\n  fi\n  [[ $_p9k_taskwarrior_data_sig == ${(pj:\\0:)stat}$'\\0'$TASKRC$'\\0'$TASKDATA ]] || return\n  (( _p9k_taskwarrior_next_due == 0 || _p9k_taskwarrior_next_due > EPOCHSECONDS )) || return\n}\n\nfunction _p9k_taskwarrior_init_data() {\n  local -a stat files=(\n    $_p9k_taskwarrior_data_dir/{pending,completed}.data\n    $_p9k_taskwarrior_data_dir/taskchampion.sqlite3\n  )\n  _p9k_taskwarrior_data_files=($^files(N))\n  _p9k_taskwarrior_data_non_files=(${files:|_p9k_taskwarrior_data_files})\n  if (( $#_p9k_taskwarrior_data_files )); then\n    zstat -A stat +mtime -- $_p9k_taskwarrior_data_files 2>/dev/null || stat=(-1)\n    _p9k_taskwarrior_data_sig=${(pj:\\0:)stat}$'\\0'\n  else\n    _p9k_taskwarrior_data_sig=\n  fi\n\n  _p9k_taskwarrior_data_files+=($_p9k_taskwarrior_meta_files)\n  _p9k_taskwarrior_data_non_files+=($_p9k_taskwarrior_meta_non_files)\n  _p9k_taskwarrior_data_sig+=$_p9k_taskwarrior_meta_sig\n\n  local name val\n  for name in PENDING OVERDUE; do\n    val=\"$(command task +$name count rc.color=0 rc._forcecolor=0 </dev/null 2>/dev/null)\" || continue\n    [[ $val == <1-> ]] || continue\n    _p9k_taskwarrior_counters[$name]=$val\n  done\n\n  _p9k_taskwarrior_next_due=0\n\n  if (( _p9k_taskwarrior_counters[PENDING] > _p9k_taskwarrior_counters[OVERDUE] )); then\n    local -a ts\n    ts=($(command task +PENDING -OVERDUE list rc.verbose=nothing rc.color=0 rc._forcecolor=0 \\\n      rc.report.list.labels= rc.report.list.columns=due.epoch </dev/null 2>/dev/null)) || ts=()\n    # The second condition is a workaround for a bug in taskwarrior v3.0.1.\n    # https://github.com/romkatv/powerlevel10k/issues/2648.\n    if (( $#ts && ! ${#${(@)ts:#(|-)<->(|.<->)}} )); then\n      _p9k_taskwarrior_next_due=${${(on)ts}[1]}\n      (( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60))\n    fi\n  fi\n\n  _p9k__state_dump_scheduled=1\n}\n\nfunction prompt_taskwarrior() {\n  unset P9K_TASKWARRIOR_PENDING_COUNT P9K_TASKWARRIOR_OVERDUE_COUNT\n  if ! _p9k_taskwarrior_check_data; then\n    _p9k_taskwarrior_data_files=()\n    _p9k_taskwarrior_data_non_files=()\n    _p9k_taskwarrior_data_sig=\n    _p9k_taskwarrior_counters=()\n    _p9k_taskwarrior_next_due=0\n    _p9k_taskwarrior_check_meta || _p9k_taskwarrior_init_meta || return\n    _p9k_taskwarrior_init_data\n  fi\n  (( $#_p9k_taskwarrior_counters )) || return\n  local text c=$_p9k_taskwarrior_counters[OVERDUE]\n  if [[ -n $c ]]; then\n    typeset -g P9K_TASKWARRIOR_OVERDUE_COUNT=$c\n    text+=\"!$c\"\n  fi\n  c=$_p9k_taskwarrior_counters[PENDING]\n  if [[ -n $c ]]; then\n    typeset -g P9K_TASKWARRIOR_PENDING_COUNT=$c\n    [[ -n $text ]] && text+='/'\n    text+=$c\n  fi\n  [[ -n $text ]] || return\n  _p9k_prompt_segment $0 6 $_p9k_color1 TASKWARRIOR_ICON 0 '' $text\n}\n\nfunction _p9k_prompt_taskwarrior_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[task]:+$_p9k__taskwarrior_functional}'\n}\n\nprompt_wifi() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n  _p9k_prompt_segment $0 green $_p9k_color1 WIFI_ICON 1 '$_p9k__wifi_on' '$P9K_WIFI_LAST_TX_RATE Mbps'\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_wifi_init() {\n  if [[ -x /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport ||\n        -r /proc/net/wireless && -n $commands[iw] ]]; then\n    typeset -g _p9k__wifi_on=\n    typeset -g P9K_WIFI_LAST_TX_RATE=\n    typeset -g P9K_WIFI_SSID=\n    typeset -g P9K_WIFI_LINK_AUTH=\n    typeset -g P9K_WIFI_RSSI=\n    typeset -g P9K_WIFI_NOISE=\n    typeset -g P9K_WIFI_BARS=\n    _p9k__async_segments_compute+='_p9k_worker_invoke wifi _p9k_prompt_wifi_compute'\n  else\n    typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${:-}'\n  fi\n}\n\n_p9k_prompt_wifi_compute() {\n  _p9k_worker_async _p9k_prompt_wifi_async _p9k_prompt_wifi_sync\n}\n\n_p9k_prompt_wifi_async() {\n  local airport=/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport\n  local last_tx_rate ssid link_auth rssi noise bars on out line v state iface\n  {\n    if [[ -x $airport ]]; then\n      out=\"$($airport -I)\" || return 0\n      for line in ${${${(f)out}##[[:space:]]#}%%[[:space:]]#}; do\n        v=${line#*: }\n        case $line[1,-$#v-3] in\n          agrCtlRSSI)  rssi=$v;;\n          agrCtlNoise) noise=$v;;\n          state)       state=$v;;\n          lastTxRate)  last_tx_rate=$v;;\n          link\\ auth)  link_auth=$v;;\n          SSID)        ssid=$v;;\n        esac\n      done\n      [[ $state == running && $rssi == (0|-<->) && $noise == (0|-<->) ]] || return 0\n    elif [[ -r /proc/net/wireless && -n $commands[iw] ]]; then\n      # Content example (https://github.com/romkatv/powerlevel10k/pull/973#issuecomment-680251804):\n      #\n      # Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE\n      #  face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22\n      # wlp3s0: 0000   58.  -52.  -256        0      0      0      0     76        0\n      local -a lines\n      lines=(${${(f)\"$(</proc/net/wireless)\"}:#*\\|*}) || return 0\n      (( $#lines == 1 )) || return 0\n      local parts=(${=lines[1]})\n      iface=${parts[1]%:}\n      state=${parts[2]}\n      rssi=${parts[4]%.*}\n      noise=${parts[5]%.*}\n      [[ -n $iface && $state == 0## && $rssi == (0|-<->) && $noise == (0|-<->) ]] || return 0\n      # Output example (https://github.com/romkatv/powerlevel10k/pull/973#issuecomment-680251804):\n      #\n      # Connected to 74:83:c2:be:76:da (on wlp3s0)\n      # \tSSID: DailyGrindGuest1\n      # \tfreq: 5745\n      # \tRX: 35192066 bytes (27041 packets)\n      # \tTX: 4090471 bytes (24287 packets)\n      # \tsignal: -52 dBm\n      # \trx bitrate: 243.0 MBit/s VHT-MCS 6 40MHz VHT-NSS 2\n      # \ttx bitrate: 240.0 MBit/s VHT-MCS 5 40MHz short GI VHT-NSS 2\n      #\n      # \tbss flags:\tshort-slot-time\n      # \tdtim period:\t1\n      # \tbeacon int:\t100\n      lines=(${(f)\"$(command iw dev $iface link)\"}) || return 0\n      local -a match mbegin mend\n      for line in $lines; do\n        if [[ $line == (#b)[[:space:]]#SSID:[[:space:]]##(*) ]]; then\n          ssid=$match[1]\n        elif [[ $line == (#b)[[:space:]]#'tx bitrate:'[[:space:]]##([^[:space:]]##)' MBit/s'* ]]; then\n          last_tx_rate=$match[1]\n          [[ $last_tx_rate == <->.<-> ]] && last_tx_rate=${${last_tx_rate%%0#}%.}\n        fi\n      done\n      [[ -n $ssid && -n $last_tx_rate ]] || return 0\n    else\n      return 0\n    fi\n    # https://www.speedguide.net/faq/how-to-read-rssisignal-and-snrnoise-ratings-440\n    # http://www.wireless-nets.com/resources/tutorials/define_SNR_values.html\n    local -i snr_margin='rssi - noise'\n    if (( snr_margin >= 40 )); then\n      bars=4\n    elif (( snr_margin >= 25 )); then\n      bars=3\n    elif (( snr_margin >= 15 )); then\n      bars=2\n    elif (( snr_margin >= 10 )); then\n      bars=1\n    else\n      bars=0\n    fi\n    on=1\n  } always {\n    if (( ! on )); then\n      rssi=\n      noise=\n      ssid=\n      last_tx_rate=\n      bars=\n      link_auth=\n    fi\n    if [[ $_p9k__wifi_on         != $on           ||\n          $P9K_WIFI_LAST_TX_RATE != $last_tx_rate ||\n          $P9K_WIFI_SSID         != $ssid         ||\n          $P9K_WIFI_LINK_AUTH    != $link_auth    ||\n          $P9K_WIFI_RSSI         != $rssi         ||\n          $P9K_WIFI_NOISE        != $noise        ||\n          $P9K_WIFI_BARS         != $bars         ]]; then\n      _p9k__wifi_on=$on\n      P9K_WIFI_LAST_TX_RATE=$last_tx_rate\n      P9K_WIFI_SSID=$ssid\n      P9K_WIFI_LINK_AUTH=$link_auth\n      P9K_WIFI_RSSI=$rssi\n      P9K_WIFI_NOISE=$noise\n      P9K_WIFI_BARS=$bars\n      _p9k_print_params       \\\n        _p9k__wifi_on         \\\n        P9K_WIFI_LAST_TX_RATE \\\n        P9K_WIFI_SSID         \\\n        P9K_WIFI_LINK_AUTH    \\\n        P9K_WIFI_RSSI         \\\n        P9K_WIFI_NOISE        \\\n        P9K_WIFI_BARS\n      echo -E - 'reset=1'\n    fi\n  }\n}\n\n_p9k_prompt_wifi_sync() {\n  if [[ -n $REPLY ]]; then\n    eval $REPLY\n    _p9k_worker_reply $REPLY\n  fi\n}\n\nfunction _p9k_asdf_check_meta() {\n  [[ -n $_p9k_asdf_meta_sig ]] || return\n  [[ -z $^_p9k_asdf_meta_non_files(#qN) ]] || return\n  local -a stat\n  if (( $#_p9k_asdf_meta_files )); then\n    zstat -A stat +mtime -- $_p9k_asdf_meta_files 2>/dev/null || return\n  fi\n  [[ $_p9k_asdf_meta_sig == $ASDF_CONFIG_FILE$'\\0'$ASDF_DATA_DIR$'\\0'${(pj:\\0:)stat} ]] || return\n}\n\nfunction _p9k_asdf_init_meta() {\n  local last_sig=$_p9k_asdf_meta_sig\n  {\n    local -a files\n    local -i legacy_enabled\n\n    _p9k_asdf_plugins=()\n    _p9k_asdf_file_info=()\n\n    local cfg=${ASDF_CONFIG_FILE:-~/.asdfrc}\n    files+=$cfg\n    if [[ -f $cfg && -r $cfg ]]; then\n      # Config parser in adsf is very strange.\n      #\n      # This gives \"yes\":\n      #\n      #   legacy_version_file = yes = no\n      #\n      # This gives \"no\":\n      #\n      #   legacy_version_file = yes\n      #   legacy_version_file = yes\n      #\n      # We do the same.\n      local lines=(${(@M)${(@)${(f)\"$(<$cfg)\"}%$'\\r'}:#[[:space:]]#legacy_version_file[[:space:]]#=*})\n      if [[ $#lines == 1 && ${${(s:=:)lines[1]}[2]} == [[:space:]]#yes[[:space:]]# ]]; then\n        legacy_enabled=1\n      fi\n    fi\n\n    local root=${ASDF_DATA_DIR:-~/.asdf}\n    files+=$root/plugins\n    if [[ -d $root/plugins ]]; then\n      local plugin\n      for plugin in $root/plugins/[^[:space:]]##(/N); do\n        files+=$root/installs/${plugin:t}\n        local -aU installed=($root/installs/${plugin:t}/[^[:space:]]##(/N:t) system)\n        _p9k_asdf_plugins[${plugin:t}]=${(j:|:)${(@b)installed}}\n        (( legacy_enabled )) || continue\n        if [[ ! -e $plugin/bin ]]; then\n          files+=$plugin/bin\n        else\n          local list_names=$plugin/bin/list-legacy-filenames\n          files+=$list_names\n          if [[ -x $list_names ]]; then\n            local parse=$plugin/bin/parse-legacy-file\n            local -i has_parse=0\n            files+=$parse\n            [[ -x $parse ]] && has_parse=1\n            local name\n            for name in ${$($list_names 2>/dev/null)%$'\\r'}; do\n              [[ $name == (*/*|.tool-versions) ]] && continue\n              _p9k_asdf_file_info[$name]+=\"${plugin:t} $has_parse \"\n            done\n          fi\n        fi\n      done\n    fi\n\n    _p9k_asdf_meta_files=($^files(N))\n    _p9k_asdf_meta_non_files=(${files:|_p9k_asdf_meta_files})\n\n    local -a stat\n    if (( $#_p9k_asdf_meta_files )); then\n      zstat -A stat +mtime -- $_p9k_asdf_meta_files 2>/dev/null || return\n    fi\n    _p9k_asdf_meta_sig=$ASDF_CONFIG_FILE$'\\0'$ASDF_DATA_DIR$'\\0'${(pj:\\0:)stat}\n    _p9k__asdf_dir2files=()\n    _p9k_asdf_file2versions=()\n  } always {\n    if (( $? == 0 )); then\n      _p9k__state_dump_scheduled=1\n      return\n    fi\n    [[ -n $last_sig ]] && _p9k__state_dump_scheduled=1\n    _p9k_asdf_meta_files=()\n    _p9k_asdf_meta_non_files=()\n    _p9k_asdf_meta_sig=\n    _p9k_asdf_plugins=()\n    _p9k_asdf_file_info=()\n    _p9k__asdf_dir2files=()\n    _p9k_asdf_file2versions=()\n  }\n}\n\n# Usage: _p9k_asdf_parse_version_file <file> <is_legacy>\n#\n# Mutates `versions` on success.\nfunction _p9k_asdf_parse_version_file() {\n  local file=$1\n  local is_legacy=$2\n  local -a stat\n  zstat -A stat +mtime $file 2>/dev/null || return\n  if (( is_legacy )); then\n    local plugin has_parse\n    for plugin has_parse in $=_p9k_asdf_file_info[$file:t]; do\n      local cached=$_p9k_asdf_file2versions[$plugin:$file]\n      if [[ $cached == $stat[1]:* ]]; then\n        local v=${cached#*:}\n      else\n        if (( has_parse )); then\n          local v=($(${ASDF_DATA_DIR:-~/.asdf}/plugins/$plugin/bin/parse-legacy-file $file 2>/dev/null))\n        else\n          { local v=($(<$file)) } 2>/dev/null\n        fi\n        v=(${v%$'\\r'})\n        v=${v[(r)$_p9k_asdf_plugins[$plugin]]:-$v[1]}\n        _p9k_asdf_file2versions[$plugin:$file]=$stat[1]:\"$v\"\n        _p9k__state_dump_scheduled=1\n      fi\n      [[ -n $v ]] && : ${versions[$plugin]=\"$v\"}\n    done\n  else\n    local cached=$_p9k_asdf_file2versions[:$file]\n    if [[ $cached == $stat[1]:* ]]; then\n      local file_versions=(${(0)${cached#*:}})\n    else\n      local file_versions=()\n      { local lines=(${(@)${(@)${(f)\"$(<$file)\"}%$'\\r'}/\\#*}) } 2>/dev/null\n      local line\n      for line in $lines; do\n        local words=($=line)\n        (( $#words > 1 )) || continue\n        local installed=$_p9k_asdf_plugins[$words[1]]\n        [[ -n $installed ]] || continue\n        file_versions+=($words[1] ${${words:1}[(r)$installed]:-$words[2]})\n      done\n      _p9k_asdf_file2versions[:$file]=$stat[1]:${(pj:\\0:)file_versions}\n      _p9k__state_dump_scheduled=1\n    fi\n    local plugin version\n    for plugin version in $file_versions; do\n      : ${versions[$plugin]=$version}\n    done\n  fi\n  return 0\n}\n\nfunction prompt_asdf() {\n  _p9k_asdf_check_meta || _p9k_asdf_init_meta || return\n\n  local -A versions\n  local -a stat\n  local -i has_global\n  local dirs=($_p9k__parent_dirs)\n  local mtimes=($_p9k__parent_mtimes)\n  if [[ $dirs[-1] != ~ ]]; then\n    zstat -A stat +mtime ~ 2>/dev/null || return\n    dirs+=(~)\n    mtimes+=($stat[1])\n  fi\n\n  local elem\n  for elem in ${(@)${:-{1..$#dirs}}/(#m)*/${${:-$MATCH:$_p9k__asdf_dir2files[$dirs[MATCH]]}#$MATCH:$mtimes[MATCH]:}}; do\n    if [[ $elem == *:* ]]; then\n      local dir=$dirs[${elem%%:*}]\n      zstat -A stat +mtime $dir 2>/dev/null || return\n      local files=($dir/.tool-versions(N) $dir/${(k)^_p9k_asdf_file_info}(N))\n      _p9k__asdf_dir2files[$dir]=$stat[1]:${(pj:\\0:)files}\n    else\n      local files=(${(0)elem})\n    fi\n    if [[ ${files[1]:h} == ~ ]]; then\n      has_global=1\n      local -A local_versions=(${(kv)versions})\n      versions=()\n    fi\n    local file\n    for file in $files; do\n      [[ $file == */.tool-versions ]]\n      _p9k_asdf_parse_version_file $file $? || return\n    done\n  done\n\n  if (( ! has_global )); then\n    has_global=1\n    local -A local_versions=(${(kv)versions})\n    versions=()\n  fi\n\n  if [[ -r $ASDF_DEFAULT_TOOL_VERSIONS_FILENAME ]]; then\n    _p9k_asdf_parse_version_file $ASDF_DEFAULT_TOOL_VERSIONS_FILENAME 0 || return\n  fi\n\n  local plugin\n  for plugin in ${(k)_p9k_asdf_plugins}; do\n    local upper=${${(U)plugin//-/_}//İ/I}\n    if (( $+parameters[_POWERLEVEL9K_ASDF_${upper}_SOURCES] )); then\n      local sources=(${(P)${:-_POWERLEVEL9K_ASDF_${upper}_SOURCES}})\n    else\n      local sources=($_POWERLEVEL9K_ASDF_SOURCES)\n    fi\n\n    local version=\"${(P)${:-ASDF_${upper}_VERSION}}\"\n    if [[ -n $version ]]; then\n      (( $sources[(I)shell] )) || continue\n    else\n      version=$local_versions[$plugin]\n      if [[ -n $version ]]; then\n        (( $sources[(I)local] )) || continue\n      else\n        version=$versions[$plugin]\n        [[ -n $version ]] || continue\n        (( $sources[(I)global] )) || continue\n      fi\n    fi\n\n    if [[ $version == $versions[$plugin] ]]; then\n      if (( $+parameters[_POWERLEVEL9K_ASDF_${upper}_PROMPT_ALWAYS_SHOW] )); then\n        (( _POWERLEVEL9K_ASDF_${upper}_PROMPT_ALWAYS_SHOW )) || continue\n      else\n        (( _POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW )) || continue\n      fi\n    fi\n\n    if [[ $version == system ]]; then\n      if (( $+parameters[_POWERLEVEL9K_ASDF_${upper}_SHOW_SYSTEM] )); then\n        (( _POWERLEVEL9K_ASDF_${upper}_SHOW_SYSTEM )) || continue\n      else\n        (( _POWERLEVEL9K_ASDF_SHOW_SYSTEM )) || continue\n      fi\n    fi\n\n    _p9k_get_icon $0_$upper ${upper}_ICON $plugin\n    _p9k_prompt_segment $0_$upper green $_p9k_color1 $'\\1'$_p9k__ret 0 '' ${version//\\%/%%}\n  done\n}\n\n_p9k_prompt_asdf_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='${commands[asdf]:-${${+functions[asdf]}:#0}}'\n}\n\n_p9k_haskell_stack_version() {\n  if ! _p9k_cache_stat_get $0 $1 ${STACK_ROOT:-~/.stack}/{pantry/pantry.sqlite3,stack.sqlite3}; then\n    local v\n    v=\"$(STACK_YAML=$1 stack \\\n      --silent                 \\\n      --no-install-ghc         \\\n      --skip-ghc-check         \\\n      --no-terminal            \\\n      --color=never            \\\n      --lock-file=read-only    \\\n      query compiler actual)\" || v=\n    _p9k_cache_stat_set \"$v\"\n  fi\n  _p9k__ret=$_p9k__cache_val[1]\n}\n\nprompt_haskell_stack() {\n  if [[ -n $STACK_YAML ]]; then\n    (( ${_POWERLEVEL9K_HASKELL_STACK_SOURCES[(I)shell]} )) || return\n    _p9k_haskell_stack_version $STACK_YAML\n  else\n    (( ${_POWERLEVEL9K_HASKELL_STACK_SOURCES[(I)local|global]} )) || return\n    if _p9k_upglob stack.yaml -.; then\n      (( _POWERLEVEL9K_HASKELL_STACK_PROMPT_ALWAYS_SHOW )) || return\n      (( ${_POWERLEVEL9K_HASKELL_STACK_SOURCES[(I)global]} )) || return\n      _p9k_haskell_stack_version ${STACK_ROOT:-~/.stack}/global-project/stack.yaml\n    else\n      local -i idx=$?\n      (( ${_POWERLEVEL9K_HASKELL_STACK_SOURCES[(I)local]} )) || return\n      _p9k_haskell_stack_version $_p9k__parent_dirs[idx]/stack.yaml\n    fi\n  fi\n\n  [[ -n $_p9k__ret ]] || return\n\n  local v=$_p9k__ret\n\n  if (( !_POWERLEVEL9K_HASKELL_STACK_PROMPT_ALWAYS_SHOW )); then\n    _p9k_haskell_stack_version ${STACK_ROOT:-~/.stack}/global-project/stack.yaml\n    [[ $v == $_p9k__ret ]] && return\n  fi\n\n  _p9k_prompt_segment \"$0\" \"yellow\" \"$_p9k_color1\" 'HASKELL_ICON' 0 '' \"${v//\\%/%%}\"\n}\n\n_p9k_prompt_haskell_stack_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[stack]'\n}\n\n################################################################\n# CPU Architecture\nprompt_cpu_arch() {\n  local -i len=$#_p9k__prompt _p9k__has_upglob\n\n  local state text\n  if _p9k_cache_ephemeral_get $0; then\n    state=$_p9k__cache_val[1]\n    text=$_p9k__cache_val[2]\n  else\n    if [[ -r /proc/sys/kernel/arch ]]; then\n      text=$(</proc/sys/kernel/arch)\n    else\n      local cmd\n      for cmd in machine arch; do\n        (( $+commands[$cmd] )) || continue\n        if text=$(command -- $cmd) 2>/dev/null && [[ $text == [a-zA-Z][a-zA-Z0-9_]# ]]; then\n          break\n        else\n          text=\n        fi\n      done\n    fi\n    state=_${${(U)text}//İ/I}\n    _p9k_cache_ephemeral_set \"$state\" \"$text\"\n  fi\n  if [[ -n $text ]]; then\n    _p9k_prompt_segment \"$0$state\" \"yellow\" \"$_p9k_color1\" 'ARCH_ICON' 0 '' \"$text\"\n  fi\n\n  (( _p9k__has_upglob )) || typeset -g \"_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]\"=$_p9k__prompt[len+1,-1]\n}\n\n_p9k_prompt_cpu_arch_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$commands[machine]$commands[arch]'\n}\n\n################################################################\n# Oh My Zsh per-directory-history local/global indicator\nprompt_per_directory_history() {\n  if [[ $_per_directory_history_is_global == true ]]; then\n    _p9k_prompt_segment ${0}_GLOBAL 3 $_p9k_color1 HISTORY_ICON 0 '' global\n  else\n    _p9k_prompt_segment ${0}_LOCAL 5 $_p9k_color1 HISTORY_ICON 0 '' local\n  fi\n}\n\ninstant_prompt_per_directory_history() {\n  case $HISTORY_START_WITH_GLOBAL in\n    true)\n      _p9k_prompt_segment prompt_per_directory_history_GLOBAL 3 $_p9k_color1 HISTORY_ICON 0 '' global\n    ;;\n    ?*)\n      _p9k_prompt_segment prompt_per_directory_history_LOCAL 5 $_p9k_color1 HISTORY_ICON 0 '' local\n    ;;\n  esac\n}\n\n_p9k_prompt_per_directory_history_init() {\n  typeset -g \"_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]\"='$PER_DIRECTORY_HISTORY_TOGGLE'\n}\n\n# Use two preexec hooks to survive https://github.com/MichaelAquilina/zsh-you-should-use with\n# YSU_HARDCORE=1. See https://github.com/romkatv/powerlevel10k/issues/427.\n_p9k_preexec1() {\n  _p9k_restore_special_params\n  unset __p9k_trapint\n  trap - INT\n}\n\n_p9k_preexec2() {\n  typeset -g _p9k__preexec_cmd=$2\n  _p9k__timer_start=EPOCHREALTIME\n  P9K_TTY=old\n  (( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec \"$1\"\n}\n\nfunction _p9k_prompt_net_iface_init() {\n  typeset -g _p9k__public_ip_vpn=\n  typeset -g _p9k__public_ip_not_vpn=\n  typeset -g P9K_IP_IP=\n  typeset -g P9K_IP_INTERFACE=\n  typeset -g P9K_IP_TX_BYTES=\n  typeset -g P9K_IP_RX_BYTES=\n  typeset -g P9K_IP_TX_BYTES_DELTA=\n  typeset -g P9K_IP_RX_BYTES_DELTA=\n  typeset -g P9K_IP_TX_RATE=\n  typeset -g P9K_IP_RX_RATE=\n  typeset -g _p9__ip_timestamp=\n  typeset -g _p9k__vpn_ip_ips=()\n  [[ -z $_POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE ]] && _p9k__public_ip_not_vpn=1\n  _p9k__async_segments_compute+='_p9k_worker_invoke net_iface _p9k_prompt_net_iface_compute'\n}\n\n# reads `iface2ip` and sets `ifaces` and `ips`\nfunction _p9k_prompt_net_iface_match() {\n  local iface_regex=\"^($1)\\$\" iface ip\n  ips=()\n  ifaces=()\n  for iface ip in \"${(@)iface2ip}\"; do\n    [[ $iface =~ $iface_regex ]] || continue\n    ifaces+=$iface\n    ips+=$ip\n  done\n  return $(($#ips == 0))\n}\n\nfunction _p9k_prompt_net_iface_compute() {\n  _p9k_worker_async _p9k_prompt_net_iface_async _p9k_prompt_net_iface_sync\n}\n\nfunction _p9k_prompt_net_iface_async() {\n  # netstat -inbI en0\n  local iface ip line var\n  typeset -a iface2ip ips ifaces\n  if (( $+commands[ip] )) && [[ $+commands[ifconfig] == 0 || $OSTYPE == linux* ]]; then\n    for line in ${(f)\"$(command ip -4 a show 2>/dev/null)\"}; do\n      if [[ $line == (#b)<->:[[:space:]]##([^:]##):[[:space:]]##\\<([^\\>]#)\\>* ]]; then\n        [[ ,$match[2], == *,UP,* ]] && iface=$match[1] || iface=\n      elif [[ -n $iface && $line == (#b)[[:space:]]##inet[[:space:]]##([0-9.]##)* ]]; then\n        iface2ip+=($iface $match[1])\n        iface=\n      fi\n    done\n  elif (( $+commands[ifconfig] )); then\n    for line in ${(f)\"$(command ifconfig 2>/dev/null)\"}; do\n      if [[ $line == (#b)([^[:space:]]##):[[:space:]]##flags=([[:xdigit:]]##)'<'* ]]; then\n        [[ $match[2] == *[13579bdfBDF] ]] && iface=$match[1] || iface=\n      elif [[ -n $iface && $line == (#b)[[:space:]]##inet[[:space:]]##([0-9.]##)* ]]; then\n        iface2ip+=($iface $match[1])\n        iface=\n      fi\n    done\n  fi\n\n  if _p9k_prompt_net_iface_match $_POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE; then\n    local public_ip_vpn=1\n    local public_ip_not_vpn=\n  else\n    local public_ip_vpn=\n    local public_ip_not_vpn=1\n  fi\n  if _p9k_prompt_net_iface_match $_POWERLEVEL9K_IP_INTERFACE; then\n    local ip_ip=$ips[1] ip_interface=$ifaces[1] ip_timestamp=$EPOCHREALTIME\n    local ip_tx_bytes ip_rx_bytes ip_tx_rate ip_rx_rate\n    if [[ $_p9k_os == (Linux|Android) ]]; then\n      if [[ -r /sys/class/net/$ifaces[1]/statistics/tx_bytes &&\n            -r /sys/class/net/$ifaces[1]/statistics/rx_bytes ]]; then\n        _p9k_read_file /sys/class/net/$ifaces[1]/statistics/tx_bytes &&\n          [[ $_p9k__ret == <-> ]] && ip_tx_bytes=$_p9k__ret &&\n        _p9k_read_file /sys/class/net/$ifaces[1]/statistics/rx_bytes &&\n          [[ $_p9k__ret == <-> ]] && ip_rx_bytes=$_p9k__ret || { ip_tx_bytes=; ip_rx_bytes=; }\n      fi\n    elif [[ $_p9k_os == (BSD|OSX) && $+commands[netstat] == 1 ]]; then\n      local -a lines\n      if lines=(${(f)\"$(netstat -inbI $ifaces[1])\"}); then\n        local header=($=lines[1])\n        local -i rx_idx=$header[(Ie)Ibytes]\n        local -i tx_idx=$header[(Ie)Obytes]\n        if (( rx_idx && tx_idx )); then\n          ip_tx_bytes=0\n          ip_rx_bytes=0\n          for line in ${lines:1}; do\n            (( ip_rx_bytes += ${line[(w)rx_idx]} ))\n            (( ip_tx_bytes += ${line[(w)tx_idx]} ))\n          done\n        fi\n      fi\n    fi\n    if [[ -n $ip_rx_bytes ]]; then\n      if [[ $ip_ip == $P9K_IP_IP && $ifaces[1] == $P9K_IP_INTERFACE ]]; then\n        local -F t='ip_timestamp - _p9__ip_timestamp'\n        if (( t <= 0 )); then\n          ip_tx_rate=${P9K_IP_TX_RATE:-0 B/s}\n          ip_rx_rate=${P9K_IP_RX_RATE:-0 B/s}\n        else\n          _p9k_human_readable_bytes $(((ip_tx_bytes - P9K_IP_TX_BYTES) / t))\n          [[ $_p9k__ret == *B ]] && ip_tx_rate=\"$_p9k__ret[1,-2] B/s\" || ip_tx_rate=\"$_p9k__ret[1,-2] $_p9k__ret[-1]iB/s\"\n          _p9k_human_readable_bytes $(((ip_rx_bytes - P9K_IP_RX_BYTES) / t))\n          [[ $_p9k__ret == *B ]] && ip_rx_rate=\"$_p9k__ret[1,-2] B/s\" || ip_rx_rate=\"$_p9k__ret[1,-2] $_p9k__ret[-1]iB/s\"\n        fi\n      else\n        ip_tx_rate='0 B/s'\n        ip_rx_rate='0 B/s'\n      fi\n    fi\n  else\n    local ip_ip= ip_interface= ip_tx_bytes= ip_rx_bytes= ip_tx_rate= ip_rx_rate= ip_timestamp=\n  fi\n  if _p9k_prompt_net_iface_match $_POWERLEVEL9K_VPN_IP_INTERFACE; then\n    if (( _POWERLEVEL9K_VPN_IP_SHOW_ALL )); then\n      local vpn_ip_ips=($ips)\n    else\n      local vpn_ip_ips=($ips[1])\n    fi\n  else\n    local vpn_ip_ips=()\n  fi\n  [[ $_p9k__public_ip_vpn == $public_ip_vpn &&\n     $_p9k__public_ip_not_vpn == $public_ip_not_vpn &&\n     $P9K_IP_IP == $ip_ip &&\n     $P9K_IP_INTERFACE == $ip_interface &&\n     $P9K_IP_TX_BYTES == $ip_tx_bytes &&\n     $P9K_IP_RX_BYTES == $ip_rx_bytes &&\n     $P9K_IP_TX_RATE == $ip_tx_rate &&\n     $P9K_IP_RX_RATE == $ip_rx_rate &&\n     \"$_p9k__vpn_ip_ips\" == \"$vpn_ip_ips\" ]] && return 1\n  if [[ \"$_p9k__vpn_ip_ips\" == \"$vpn_ip_ips\" ]]; then\n    echo -n 0\n  else\n    echo -n 1\n  fi\n  _p9k__public_ip_vpn=$public_ip_vpn\n  _p9k__public_ip_not_vpn=$public_ip_not_vpn\n  P9K_IP_IP=$ip_ip\n  P9K_IP_INTERFACE=$ip_interface\n  if [[ -n $ip_tx_bytes && -n $P9K_IP_TX_BYTES ]]; then\n    P9K_IP_TX_BYTES_DELTA=$((ip_tx_bytes - P9K_IP_TX_BYTES))\n  else\n    P9K_IP_TX_BYTES_DELTA=\n  fi\n  if [[ -n $ip_rx_bytes && -n $P9K_IP_RX_BYTES ]]; then\n    P9K_IP_RX_BYTES_DELTA=$((ip_rx_bytes - P9K_IP_RX_BYTES))\n  else\n    P9K_IP_RX_BYTES_DELTA=\n  fi\n  P9K_IP_TX_BYTES=$ip_tx_bytes\n  P9K_IP_RX_BYTES=$ip_rx_bytes\n  P9K_IP_TX_RATE=$ip_tx_rate\n  P9K_IP_RX_RATE=$ip_rx_rate\n  _p9__ip_timestamp=$ip_timestamp\n  _p9k__vpn_ip_ips=($vpn_ip_ips)\n  _p9k_print_params         \\\n    _p9k__public_ip_vpn     \\\n    _p9k__public_ip_not_vpn \\\n    P9K_IP_IP               \\\n    P9K_IP_INTERFACE        \\\n    P9K_IP_TX_BYTES         \\\n    P9K_IP_RX_BYTES         \\\n    P9K_IP_TX_BYTES_DELTA   \\\n    P9K_IP_RX_BYTES_DELTA   \\\n    P9K_IP_TX_RATE          \\\n    P9K_IP_RX_RATE          \\\n    _p9__ip_timestamp       \\\n    _p9k__vpn_ip_ips\n  echo -E - 'reset=1'\n}\n\n_p9k_prompt_net_iface_sync() {\n  local -i vpn_ip_changed=$REPLY[1]\n  REPLY[1]=\"\"\n  eval $REPLY\n  (( vpn_ip_changed )) && REPLY+='; _p9k_vpn_ip_render'\n  _p9k_worker_reply $REPLY\n}\n\nfunction _p9k_set_prompt() {\n  local -i _p9k__vcs_called\n\n  PROMPT=\n  RPROMPT=\n  [[ $1 == instant_ ]] || PROMPT+='${$((_p9k_on_expand()))+}%{${_p9k__raw_msg-}${_p9k__raw_msg::=}%}'\n  PROMPT+=$_p9k_prompt_prefix_left\n\n  local -i _p9k__has_upglob\n\n  local -i left_idx=1 right_idx=1 num_lines=$#_p9k_line_segments_left\n  for _p9k__line_index in {1..$num_lines}; do\n    local right=\n    if (( !_POWERLEVEL9K_DISABLE_RPROMPT )); then\n      _p9k__dir=\n      _p9k__prompt=\n      _p9k__segment_index=right_idx\n      _p9k__prompt_side=right\n      if [[ $1 == instant_ ]]; then\n        for _p9k__segment_name in ${${(0)_p9k_line_segments_right[_p9k__line_index]}%_joined}; do\n          if (( $+functions[instant_prompt_$_p9k__segment_name] )); then\n            local disabled=_POWERLEVEL9K_${${(U)_p9k__segment_name}//İ/I}_DISABLED_DIR_PATTERN\n            if [[ $_p9k__cwd != ${(P)~disabled} ]]; then\n              local -i len=$#_p9k__prompt\n              _p9k__non_hermetic_expansion=0\n              instant_prompt_$_p9k__segment_name\n              if (( _p9k__non_hermetic_expansion )); then\n                _p9k__prompt[len+1,-1]=\n              fi\n            fi\n          fi\n          ((++_p9k__segment_index))\n        done\n      else\n        for _p9k__segment_name in ${${(0)_p9k_line_segments_right[_p9k__line_index]}%_joined}; do\n          local cond=$_p9k__segment_cond_right[_p9k__segment_index]\n          if [[ -z $cond || -n ${(e)cond} ]]; then\n            local disabled=_POWERLEVEL9K_${${(U)_p9k__segment_name}//İ/I}_DISABLED_DIR_PATTERN\n            if [[ $_p9k__cwd != ${(P)~disabled} ]]; then\n              local val=$_p9k__segment_val_right[_p9k__segment_index]\n              if [[ -n $val ]]; then\n                _p9k__prompt+=$val\n              else\n                if [[ $_p9k__segment_name == custom_* ]]; then\n                  _p9k_custom_prompt $_p9k__segment_name[8,-1]\n                elif (( $+functions[prompt_$_p9k__segment_name] )); then\n                  prompt_$_p9k__segment_name\n                fi\n              fi\n            fi\n          fi\n          ((++_p9k__segment_index))\n        done\n      fi\n      _p9k__prompt=${${_p9k__prompt//$' %{\\b'/'%{%G'}//$' \\b'}\n      right_idx=_p9k__segment_index\n      if [[ -n $_p9k__prompt || $_p9k_line_never_empty_right[_p9k__line_index] == 1 ]]; then\n        right=$_p9k_line_prefix_right[_p9k__line_index]$_p9k__prompt$_p9k_line_suffix_right[_p9k__line_index]\n      fi\n    fi\n    unset _p9k__dir\n    _p9k__prompt=$_p9k_line_prefix_left[_p9k__line_index]\n    _p9k__segment_index=left_idx\n    _p9k__prompt_side=left\n    if [[ $1 == instant_ ]]; then\n      for _p9k__segment_name in ${${(0)_p9k_line_segments_left[_p9k__line_index]}%_joined}; do\n        if (( $+functions[instant_prompt_$_p9k__segment_name] )); then\n          local disabled=_POWERLEVEL9K_${${(U)_p9k__segment_name}//İ/I}_DISABLED_DIR_PATTERN\n          if [[ $_p9k__cwd != ${(P)~disabled} ]]; then\n            local -i len=$#_p9k__prompt\n            _p9k__non_hermetic_expansion=0\n            instant_prompt_$_p9k__segment_name\n            if (( _p9k__non_hermetic_expansion )); then\n              _p9k__prompt[len+1,-1]=\n            fi\n          fi\n        fi\n        ((++_p9k__segment_index))\n      done\n    else\n      for _p9k__segment_name in ${${(0)_p9k_line_segments_left[_p9k__line_index]}%_joined}; do\n        local cond=$_p9k__segment_cond_left[_p9k__segment_index]\n        if [[ -z $cond || -n ${(e)cond} ]]; then\n          local disabled=_POWERLEVEL9K_${${(U)_p9k__segment_name}//İ/I}_DISABLED_DIR_PATTERN\n          if [[ $_p9k__cwd != ${(P)~disabled} ]]; then\n            local val=$_p9k__segment_val_left[_p9k__segment_index]\n            if [[ -n $val ]]; then\n              _p9k__prompt+=$val\n            else\n              if [[ $_p9k__segment_name == custom_* ]]; then\n                _p9k_custom_prompt $_p9k__segment_name[8,-1]\n              elif (( $+functions[prompt_$_p9k__segment_name] )); then\n                prompt_$_p9k__segment_name\n              fi\n            fi\n          fi\n        fi\n        ((++_p9k__segment_index))\n      done\n    fi\n    _p9k__prompt=${${_p9k__prompt//$' %{\\b'/'%{%G'}//$' \\b'}\n    left_idx=_p9k__segment_index\n    _p9k__prompt+=$_p9k_line_suffix_left[_p9k__line_index]\n    if (( $+_p9k__dir || (_p9k__line_index != num_lines && $#right) )); then\n      _p9k__prompt='${${:-${_p9k__d::=0}${_p9k__rprompt::='$right'}${_p9k__lprompt::='$_p9k__prompt'}}+}'\n      _p9k__prompt+=$_p9k_gap_pre\n      if (( $+_p9k__dir )); then\n        if (( _p9k__line_index == num_lines && (_POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS > 0 || _POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT > 0) )); then\n          local a=$_POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS\n          local f=$((0.01*_POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT))'*_p9k__clm'\n          _p9k__prompt+=\"\\${\\${_p9k__h::=$((($a<$f)*$f+($a>=$f)*$a))}+}\"\n        else\n          _p9k__prompt+='${${_p9k__h::=0}+}'\n        fi\n        if [[ $_POWERLEVEL9K_DIR_MAX_LENGTH == <->('%'|) ]]; then\n          local lim=\n          if [[ $_POWERLEVEL9K_DIR_MAX_LENGTH[-1] == '%' ]]; then\n            lim=\"$_p9k__dir_len-$((0.01*$_POWERLEVEL9K_DIR_MAX_LENGTH[1,-2]))*_p9k__clm\"\n          else\n            lim=$((_p9k__dir_len-_POWERLEVEL9K_DIR_MAX_LENGTH))\n            ((lim <= 0)) && lim=\n          fi\n          if [[ -n $lim ]]; then\n            _p9k__prompt+='${${${$((_p9k__h<_p9k__m+'$lim')):#1}:-${_p9k__h::=$((_p9k__m+'$lim'))}}+}'\n          fi\n        fi\n        _p9k__prompt+='${${_p9k__d::=$((_p9k__m-_p9k__h))}+}'\n        _p9k__prompt+='${_p9k__lprompt/\\%\\{d\\%\\}*\\%\\{d\\%\\}/${_p9k__'$_p9k__line_index'ldir-'$_p9k__dir'}}'\n        _p9k__prompt+='${${_p9k__m::=$((_p9k__d+_p9k__h))}+}'\n      else\n        _p9k__prompt+='${_p9k__lprompt}'\n      fi\n      ((_p9k__line_index != num_lines && $#right)) && _p9k__prompt+=$_p9k_line_gap_post[_p9k__line_index]\n    fi\n    if (( _p9k__line_index == num_lines )); then\n      [[ -n $right ]] && RPROMPT=$_p9k_prompt_prefix_right$right$_p9k_prompt_suffix_right\n      _p9k__prompt='${_p9k__'$_p9k__line_index'-'$_p9k__prompt'}'$_p9k_prompt_suffix_left\n      [[ $1 == instant_ ]] || PROMPT+=$_p9k__prompt\n    else\n      [[ -n $right ]] || _p9k__prompt+=$'\\n'\n      PROMPT+='${_p9k__'$_p9k__line_index'-'$_p9k__prompt'}'\n    fi\n  done\n\n  _p9k__prompt_side=\n  (( $#_p9k_cache < _POWERLEVEL9K_MAX_CACHE_SIZE )) || _p9k_cache=()\n  (( $#_p9k__cache_ephemeral < _POWERLEVEL9K_MAX_CACHE_SIZE )) || _p9k__cache_ephemeral=()\n\n  [[ -n $RPROMPT ]] || unset RPROMPT\n}\n\n_p9k_set_instant_prompt() {\n  local saved_prompt=$PROMPT\n  local saved_rprompt=$RPROMPT\n  _p9k_set_prompt instant_\n  typeset -g _p9k__instant_prompt=$PROMPT$'\\x1f'$_p9k__prompt$'\\x1f'$RPROMPT\n  PROMPT=$saved_prompt\n  RPROMPT=$saved_rprompt\n  [[ -n $RPROMPT ]] || unset RPROMPT\n}\n\ntypeset -gri __p9k_instant_prompt_version=47\n\n_p9k_dump_instant_prompt() {\n  local user=${(%):-%n}\n  local root_dir=${__p9k_dump_file:h}\n  local prompt_dir=${root_dir}/p10k-$user\n  local root_file=$root_dir/p10k-instant-prompt-$user.zsh\n  local prompt_file=$prompt_dir/prompt-${#_p9k__cwd}\n  [[ -d $prompt_dir ]] || mkdir -p $prompt_dir || return\n  [[ -w $root_dir && -w $prompt_dir ]] || return\n\n  if [[ ! -e $root_file  ]]; then\n    local tmp=$root_file.tmp.$$\n    local -i fd\n    sysopen -a -m 600 -o creat,trunc -u fd -- $tmp || return\n    {\n      [[ $TERM == (screen*|tmux*) ]] && local screen='-n' || local screen='-z'\n      local -a display_v=(\"${_p9k__display_v[@]}\")\n      local -i i\n      for ((i = 6; i <= $#display_v; i+=2)); do display_v[i]=show; done\n      display_v[2]=hide\n      display_v[4]=hide\n      local gitstatus_dir=${${_POWERLEVEL9K_GITSTATUS_DIR:A}:-${__p9k_root_dir}/gitstatus}\n      local gitstatus_header\n      if [[ -r $gitstatus_dir/install.info ]]; then\n        IFS= read -r gitstatus_header <$gitstatus_dir/install.info || return\n      fi\n      >&$fd print -r -- '[[ -t 0 && -t 1 && -t 2 && -o interactive && -o zle && -o no_xtrace ]] &&\n  ! (( ${+__p9k_instant_prompt_disabled} || ZSH_SUBSHELL || ${+ZSH_SCRIPT} || ${+ZSH_EXECUTION_STRING} )) || return 0'\n      >&$fd print -r -- \"() {\n  $__p9k_intro_no_locale\n  typeset -gi __p9k_instant_prompt_disabled=1\n  [[ \\$ZSH_VERSION == ${(q)ZSH_VERSION} && \\$ZSH_PATCHLEVEL == ${(q)ZSH_PATCHLEVEL} &&\n     $screen \\${(M)TERM:#(screen*|tmux*)} &&\n     \\${#\\${(M)VTE_VERSION:#(<1-4602>|4801)}} == \"${#${(M)VTE_VERSION:#(<1-4602>|4801)}}\" &&\n     \\$POWERLEVEL9K_DISABLE_INSTANT_PROMPT != 'true' &&\n     \\$POWERLEVEL9K_INSTANT_PROMPT != 'off' ]] || return\n  typeset -g __p9k_instant_prompt_param_sig=${(q+)_p9k__param_sig}\n  local gitstatus_dir=${(q)gitstatus_dir}\n  local gitstatus_header=${(q)gitstatus_header}\n  local -i ZLE_RPROMPT_INDENT=${ZLE_RPROMPT_INDENT:-1}\n  local PROMPT_EOL_MARK=${(q)PROMPT_EOL_MARK-%B%S%#%s%b}\n  [[ -n \\$SSH_CLIENT || -n \\$SSH_TTY || -n \\$SSH_CONNECTION ]] && local ssh=1 || local ssh=0\n  local cr=\\$'\\r' lf=\\$'\\n' esc=\\$'\\e[' rs=$'\\x1e' us=$'\\x1f'\n  local -i height=${_POWERLEVEL9K_INSTANT_PROMPT_COMMAND_LINES-1}\n  local prompt_dir=${(q)prompt_dir}\"\n      if (( ! ${+_POWERLEVEL9K_INSTANT_PROMPT_COMMAND_LINES} )); then\n        >&$fd print -r -- '\n  (( _z4h_can_save_restore_screen == 1 )) && height=0'\n      fi\n      >&$fd print -r -- '\n  local real_gitstatus_header\n  if [[ -r $gitstatus_dir/install.info ]]; then\n    IFS= read -r real_gitstatus_header <$gitstatus_dir/install.info || real_gitstatus_header=borked\n  fi\n  [[ $real_gitstatus_header == $gitstatus_header ]] || return\n  zmodload zsh/langinfo zsh/terminfo zsh/system || return\n  if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]]; then\n    local loc_cmd=$commands[locale]\n    [[ -z $loc_cmd ]] && loc_cmd='${(q)commands[locale]}'\n    if [[ -x $loc_cmd ]]; then\n      local -a locs\n      if locs=(${(@M)$(locale -a 2>/dev/null):#*.(utf|UTF)(-|)8}) && (( $#locs )); then\n        local loc=${locs[(r)(#i)C.UTF(-|)8]:-${locs[(r)(#i)en_US.UTF(-|)8]:-$locs[1]}}\n        [[ -n $LC_ALL ]] && local LC_ALL=$loc || local LC_CTYPE=$loc\n      fi\n    fi\n  fi\n  (( terminfo[colors] == '${terminfo[colors]:-0}' )) || return\n  (( $+terminfo[cuu] && $+terminfo[cuf] && $+terminfo[ed] && $+terminfo[sc] && $+terminfo[rc] )) || return\n  local pwd=${(%):-%/}\n  [[ $pwd == /* ]] || return\n  local prompt_file=$prompt_dir/prompt-${#pwd}\n  local key=$pwd:$ssh:${(%):-%#}\n  local content\n  if [[ ! -e $prompt_file ]]; then\n    typeset -gi __p9k_instant_prompt_sourced='$__p9k_instant_prompt_version'\n    return 1\n  fi\n  { content=\"$(<$prompt_file)\" } 2>/dev/null || return\n  local tail=${content##*$rs$key$us}\n  if (( ${#tail} == ${#content} )); then\n    typeset -gi __p9k_instant_prompt_sourced='$__p9k_instant_prompt_version'\n    return 1\n  fi\n  local _p9k__ipe\n  local P9K_PROMPT=instant\n  if [[ -z $P9K_TTY || $P9K_TTY == old && -n ${_P9K_TTY:#$TTY} ]]; then'\n      if (( _POWERLEVEL9K_NEW_TTY_MAX_AGE_SECONDS < 0 )); then\n        >&$fd print -r -- '    typeset -gx P9K_TTY=new'\n      else\n        >&$fd print -r -- '\n    typeset -gx P9K_TTY=old\n    zmodload -F zsh/stat b:zstat || return\n    zmodload zsh/datetime || return\n    local -a stat\n    if zstat -A stat +ctime -- $TTY 2>/dev/null &&\n      (( EPOCHREALTIME - stat[1] < '$_POWERLEVEL9K_NEW_TTY_MAX_AGE_SECONDS' )); then\n      P9K_TTY=new\n    fi'\n      fi\n      >&$fd print -r -- '  fi\n  typeset -gx _P9K_TTY=$TTY\n  local -i _p9k__empty_line_i=3 _p9k__ruler_i=3\n  local -A _p9k_display_k=('${(j: :)${(@q)${(kv)_p9k_display_k}}}')\n  local -a _p9k__display_v=('${(j: :)${(@q)display_v}}')\n  function p10k() {\n    '$__p9k_intro'\n    [[ $1 == display ]] || return\n    shift\n    local -i k dump\n    local opt prev new pair list name var\n    while getopts \":ha\" opt; do\n      case $opt in\n        a) dump=1;;\n        h) return 0;;\n        ?) return 1;;\n      esac\n    done\n    if (( dump )); then\n      reply=()\n      shift $((OPTIND-1))\n      (( ARGC )) || set -- \"*\"\n      for opt; do\n        for k in ${(u@)_p9k_display_k[(I)$opt]:/(#m)*/$_p9k_display_k[$MATCH]}; do\n          reply+=($_p9k__display_v[k,k+1])\n        done\n      done\n      return 0\n    fi\n    for opt in \"${@:$OPTIND}\"; do\n      pair=(${(s:=:)opt})\n      list=(${(s:,:)${pair[2]}})\n      if [[ ${(b)pair[1]} == $pair[1] ]]; then\n        local ks=($_p9k_display_k[$pair[1]])\n      else\n        local ks=(${(u@)_p9k_display_k[(I)$pair[1]]:/(#m)*/$_p9k_display_k[$MATCH]})\n      fi\n      for k in $ks; do\n        if (( $#list == 1 )); then\n          [[ $_p9k__display_v[k+1] == $list[1] ]] && continue\n          new=$list[1]\n        else\n          new=${list[list[(I)$_p9k__display_v[k+1]]+1]:-$list[1]}\n          [[ $_p9k__display_v[k+1] == $new ]] && continue\n        fi\n        _p9k__display_v[k+1]=$new\n        name=$_p9k__display_v[k]\n        if [[ $name == (empty_line|ruler) ]]; then\n          var=_p9k__${name}_i\n          [[ $new == hide ]] && typeset -gi $var=3 || unset $var\n        elif [[ $name == (#b)(<->)(*) ]]; then\n          var=_p9k__${match[1]}${${${${match[2]//\\/}/#left/l}/#right/r}/#gap/g}\n          [[ $new == hide ]] && typeset -g $var= || unset $var\n        fi\n      done\n    done\n  }'\n      if (( _POWERLEVEL9K_PROMPT_ADD_NEWLINE )); then\n        >&$fd print -r -- '  [[ $P9K_TTY == old ]] && { unset _p9k__empty_line_i; _p9k__display_v[2]=print }'\n      fi\n      if (( _POWERLEVEL9K_SHOW_RULER )); then\n        >&$fd print -r -- '[[ $P9K_TTY == old ]] && { unset _p9k__ruler_i; _p9k__display_v[4]=print }'\n      fi\n      if (( $+functions[p10k-on-init] )); then\n        >&$fd print -r -- '\n  p10k-on-init() { '$functions[p10k-on-init]' }'\n      fi\n      if (( $+functions[p10k-on-pre-prompt] )); then\n        >&$fd print -r -- '\n  p10k-on-pre-prompt() { '$functions[p10k-on-pre-prompt]' }'\n      fi\n      if (( $+functions[p10k-on-post-prompt] )); then\n        >&$fd print -r -- '\n  p10k-on-post-prompt() { '$functions[p10k-on-post-prompt]' }'\n      fi\n      if (( $+functions[p10k-on-post-widget] )); then\n        >&$fd print -r -- '\n  p10k-on-post-widget() { '$functions[p10k-on-post-widget]' }'\n      fi\n      if (( $+functions[p10k-on-init] )); then\n        >&$fd print -r -- '\n  p10k-on-init'\n      fi\n      local pat idx var\n      for pat idx var in $_p9k_show_on_command; do\n        >&$fd print -r -- \"\n  local $var=\n  _p9k__display_v[$idx]=hide\"\n      done\n      if (( $+functions[p10k-on-pre-prompt] )); then\n        >&$fd print -r -- '\n  p10k-on-pre-prompt'\n      fi\n      if (( $+functions[p10k-on-init] )); then\n        >&$fd print -r -- '\n  unfunction p10k-on-init'\n      fi\n      if (( $+functions[p10k-on-pre-prompt] )); then\n        >&$fd print -r -- '\n  unfunction p10k-on-pre-prompt'\n      fi\n      if (( $+functions[p10k-on-post-prompt] )); then\n        >&$fd print -r -- '\n  unfunction p10k-on-post-prompt'\n      fi\n      if (( $+functions[p10k-on-post-widget] )); then\n        >&$fd print -r -- '\n  unfunction p10k-on-post-widget'\n      fi\n      >&$fd print -r -- '\n  () {\n'$functions[_p9k_init_toolbox]'\n  }\n  trap \"unset -m _p9k__\\*; unfunction p10k\" EXIT\n  local -a _p9k_t=(\"${(@ps:$us:)${tail%%$rs*}}\")\n  if [[ $+VTE_VERSION == 1 || $TERM_PROGRAM == Hyper ]] && (( $+commands[stty] )); then\n    if [[ $TERM_PROGRAM == Hyper ]]; then\n      local bad_lines=40 bad_columns=100\n    else\n      local bad_lines=24 bad_columns=80\n    fi\n    if (( LINES == bad_lines && COLUMNS == bad_columns )); then\n      zmodload -F zsh/stat b:zstat || return\n      zmodload zsh/datetime || return\n      local -a tty_ctime\n      if ! zstat -A tty_ctime +ctime -- $TTY 2>/dev/null || (( tty_ctime[1] + 2 > EPOCHREALTIME )); then\n        local -F deadline=$((EPOCHREALTIME+0.025))\n        local tty_size\n        while true; do\n          if (( EPOCHREALTIME > deadline )) || ! tty_size=\"$(command stty size 2>/dev/null)\" || [[ $tty_size != <->\" \"<-> ]]; then\n            (( $+_p9k__ruler_i )) || local -i _p9k__ruler_i=1\n            local _p9k__g= _p9k__'$#_p9k_line_segments_right'r= _p9k__'$#_p9k_line_segments_right'r_frame=\n            break\n          fi\n          if [[ $tty_size != \"$bad_lines $bad_columns\" ]]; then\n            local lines_columns=(${=tty_size})\n            local LINES=$lines_columns[1]\n            local COLUMNS=$lines_columns[2]\n            break\n          fi\n        done\n      fi\n    fi\n  fi'\n      (( __p9k_ksh_arrays )) && >&$fd print -r -- '  setopt ksh_arrays'\n      (( __p9k_sh_glob )) && >&$fd print -r -- '  setopt sh_glob'\n      >&$fd print -r -- '  typeset -ga __p9k_used_instant_prompt=(\"${(@e)_p9k_t[-3,-1]}\")'\n      (( __p9k_ksh_arrays )) && >&$fd print -r -- '  unsetopt ksh_arrays'\n      (( __p9k_sh_glob )) && >&$fd print -r -- '  unsetopt sh_glob'\n      >&$fd print -r -- '\n  local -i prompt_height=${#${__p9k_used_instant_prompt[1]//[^$lf]}}\n  (( height += prompt_height ))\n  local _p9k__ret\n  function _p9k_prompt_length() {\n    local -i COLUMNS=1024\n    local -i x y=${#1} m\n    if (( y )); then\n      while (( ${${(%):-$1%$y(l.1.0)}[-1]} )); do\n        x=y\n        (( y *= 2 ))\n      done\n      while (( y > x + 1 )); do\n        (( m = x + (y - x) / 2 ))\n        (( ${${(%):-$1%$m(l.x.y)}[-1]} = m ))\n      done\n    fi\n    typeset -g _p9k__ret=$x\n  }\n  local out=${(%):-%b%k%f%s%u}\n  if [[ $P9K_TTY == old && ( $+VTE_VERSION == 0 && $TERM_PROGRAM != Hyper || $+_p9k__g == 0 ) ]]; then\n    local mark=${(e)PROMPT_EOL_MARK}\n    [[ $mark == \"%B%S%#%s%b\" ]] && _p9k__ret=1 || _p9k_prompt_length $mark\n    local -i fill=$((COLUMNS > _p9k__ret ? COLUMNS - _p9k__ret : 0))\n    out+=\"${(%):-$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}\"\n  else\n    out+=\"${(%):-$cr%E}\"\n  fi\n  if (( _z4h_can_save_restore_screen != 1 )); then\n    (( height )) && out+=\"${(pl.$height..$lf.)}$esc${height}A\"\n    out+=\"$terminfo[sc]\"\n  fi\n  out+=${(%):-\"$__p9k_used_instant_prompt[1]$__p9k_used_instant_prompt[2]\"}\n  if [[ -n $__p9k_used_instant_prompt[3] ]]; then\n    _p9k_prompt_length \"$__p9k_used_instant_prompt[2]\"\n    local -i left_len=_p9k__ret\n    _p9k_prompt_length \"$__p9k_used_instant_prompt[3]\"\n    if (( _p9k__ret )); then\n      local -i gap=$((COLUMNS - left_len - _p9k__ret - ZLE_RPROMPT_INDENT))\n      if (( gap >= 40 )); then\n        out+=\"${(pl.$gap.. .)}${(%):-${__p9k_used_instant_prompt[3]}%b%k%f%s%u}$cr$esc${left_len}C\"\n      fi\n    fi\n  fi\n  if (( _z4h_can_save_restore_screen == 1 )); then\n    if (( height )); then\n      out+=\"$cr${(pl:$((height-prompt_height))::\\n:)}$esc${height}A$terminfo[sc]$out\"\n    else\n      out+=\"$cr${(pl:$((height-prompt_height))::\\n:)}$terminfo[sc]$out\"\n    fi\n  fi\n  if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n    local tmpdir=$TMPDIR\n  else\n    local tmpdir=/tmp\n  fi\n  typeset -g __p9k_instant_prompt_output=$tmpdir/p10k-instant-prompt-output-${(%):-%n}-$$\n  { : > $__p9k_instant_prompt_output } || return\n  print -rn -- \"${out}${esc}?2004h\" || return\n  if (( $+commands[stty] )); then\n    command stty -icanon 2>/dev/null\n  fi\n  local fd_null\n  sysopen -ru fd_null /dev/null || return\n  exec {__p9k_fd_0}<&0 {__p9k_fd_1}>&1 {__p9k_fd_2}>&2 0<&$fd_null 1>$__p9k_instant_prompt_output\n  exec 2>&1 {fd_null}>&-\n  typeset -gi __p9k_instant_prompt_active=1\n  if (( _z4h_can_save_restore_screen == 1 )); then\n    typeset -g _z4h_saved_screen\n    -z4h-save-screen\n  fi\n  typeset -g __p9k_instant_prompt_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh\n  if builtin source $__p9k_instant_prompt_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then\n    _p9k_preinit\n  fi\n  function _p9k_instant_prompt_cleanup() {\n    (( ZSH_SUBSHELL == 0 && ${+__p9k_instant_prompt_active} )) || return 0\n    '$__p9k_intro_no_locale'\n    unset __p9k_instant_prompt_active\n    exec 0<&$__p9k_fd_0 1>&$__p9k_fd_1 2>&$__p9k_fd_2 {__p9k_fd_0}>&- {__p9k_fd_1}>&- {__p9k_fd_2}>&-\n    unset __p9k_fd_0 __p9k_fd_1 __p9k_fd_2\n    typeset -gi __p9k_instant_prompt_erased=1\n    if (( _z4h_can_save_restore_screen == 1 && __p9k_instant_prompt_sourced >= 35 )); then\n      -z4h-restore-screen\n      unset _z4h_saved_screen\n    fi\n    print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]\n    if [[ -s $__p9k_instant_prompt_output ]]; then\n      command cat $__p9k_instant_prompt_output 2>/dev/null\n      if (( $1 )); then\n        local _p9k__ret mark=\"${(e)${PROMPT_EOL_MARK-%B%S%#%s%b}}\"\n        _p9k_prompt_length $mark\n        local -i fill=$((COLUMNS > _p9k__ret ? COLUMNS - _p9k__ret : 0))\n        echo -nE - \"${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}\"\n      fi\n    fi\n    zshexit_functions=(${zshexit_functions:#_p9k_instant_prompt_cleanup})\n    zmodload -F zsh/files b:zf_rm || return\n    local user=${(%):-%n}\n    local root_dir=${__p9k_instant_prompt_dump_file:h}\n    zf_rm -f -- $__p9k_instant_prompt_output $__p9k_instant_prompt_dump_file{,.zwc} $root_dir/p10k-instant-prompt-$user.zsh{,.zwc} $root_dir/p10k-$user/prompt-*(N) 2>/dev/null\n  }\n  function _p9k_instant_prompt_precmd_first() {\n    '$__p9k_intro'\n    function _p9k_instant_prompt_sched_last() {\n      (( ${+__p9k_instant_prompt_active} )) || return 0\n      _p9k_instant_prompt_cleanup 1\n      setopt no_local_options prompt_cr prompt_sp\n    }\n    zmodload zsh/sched\n    sched +0 _p9k_instant_prompt_sched_last\n    precmd_functions=(${(@)precmd_functions:#_p9k_instant_prompt_precmd_first})\n  }\n  zshexit_functions=(_p9k_instant_prompt_cleanup $zshexit_functions)\n  precmd_functions=(_p9k_instant_prompt_precmd_first $precmd_functions)\n  DISABLE_UPDATE_PROMPT=true\n} && unsetopt prompt_cr prompt_sp && typeset -gi __p9k_instant_prompt_sourced='$__p9k_instant_prompt_version' ||\n  typeset -gi __p9k_instant_prompt_sourced=${__p9k_instant_prompt_sourced:-0}'\n    } always {\n      exec {fd}>&-\n    }\n    {\n      (( ! $? ))                          || return\n      # `zf_mv -f src dst` fails on NTFS if `dst` is not writable, hence `zf_rm`.\n      zf_rm -f -- $root_file.zwc          || return\n      zf_mv -f -- $tmp $root_file         || return\n      zcompile -R -- $tmp.zwc $root_file  || return\n      zf_mv -f -- $tmp.zwc $root_file.zwc || return\n    } always {\n      (( $? )) && zf_rm -f -- $tmp $tmp.zwc 2>/dev/null\n    }\n  fi\n\n  local tmp=$prompt_file.tmp.$$\n  zf_mv -f -- $prompt_file $tmp 2>/dev/null\n  if [[ \"$(<$tmp)\" == *$'\\x1e'$_p9k__instant_prompt_sig$'\\x1f'* ]] 2>/dev/null; then\n    echo -n >$tmp || return\n  fi\n\n  local -i fd\n  sysopen -a -m 600 -o creat -u fd -- $tmp || return\n  {\n    {\n      print -rnu $fd -- $'\\x1e'$_p9k__instant_prompt_sig$'\\x1f'${(pj:\\x1f:)_p9k_t}$'\\x1f'$_p9k__instant_prompt || return\n    } always {\n      exec {fd}>&-\n    }\n    zf_mv -f -- $tmp $prompt_file || return\n  } always {\n    (( $? )) && zf_rm -f -- $tmp 2>/dev/null\n  }\n}\n\ntypeset -gi __p9k_sh_glob\ntypeset -gi __p9k_ksh_arrays\ntypeset -gi __p9k_new_status\ntypeset -ga __p9k_new_pipestatus\n\n_p9k_save_status() {\n  local -i pipe\n  if (( !$+_p9k__line_finished )); then\n    :  # SIGINT\n  elif (( !$+_p9k__preexec_cmd )); then\n    # Empty line, comment or parse error.\n    #\n    # This case is handled incorrectly:\n    #\n    #   true | false\n    #   |\n    #\n    # Here status=1 and pipestatus=(0 1). Ideally we should ignore pipestatus but we won't.\n    #\n    # This works though (unless pipefail is set):\n    #\n    #   false | true\n    #   |\n    #\n    # We get status=1 and pipestatus=(1 0) and correctly ignore pipestatus.\n    (( _p9k__status == __p9k_new_status )) && return\n  elif (( $__p9k_new_pipestatus[(I)$__p9k_new_status] )); then  # just in case\n    local cmd=(${(z)_p9k__preexec_cmd})\n    if [[ $#cmd != 0 && $cmd[1] != '!' && ${(Q)cmd[1]} != coproc ]]; then\n      local arg\n      for arg in ${(z)_p9k__preexec_cmd}; do\n        # '()' is for functions, *';' is for complex commands.\n        if [[ $arg == ('()'|'&&'|'||'|'&'|'&|'|'&!'|*';') ]]; then\n          pipe=0\n          break\n        elif [[ $arg == *('|'|'|&')* ]]; then\n          pipe=1\n        fi\n      done\n    fi\n  fi\n  _p9k__status=$__p9k_new_status\n  if (( pipe )); then\n    _p9k__pipestatus=($__p9k_new_pipestatus)\n  else\n    _p9k__pipestatus=($_p9k__status)\n  fi\n}\n\nfunction _p9k_dump_state() {\n  local dir=${__p9k_dump_file:h}\n  [[ -d $dir ]] || mkdir -p -- $dir || return\n  [[ -w $dir ]] || return\n  local tmp=$__p9k_dump_file.tmp.$$\n  local -i fd\n  sysopen -a -m 600 -o creat,trunc -u fd -- $tmp || return\n  {\n    {\n      typeset -g __p9k_cached_param_pat=$_p9k__param_pat\n      typeset -g __p9k_cached_param_sig=$_p9k__param_sig\n      typeset -pm __p9k_cached_param_pat __p9k_cached_param_sig >&$fd || return\n      unset __p9k_cached_param_pat __p9k_cached_param_sig\n      (( $+_p9k_preinit )) && { print -r -- $_p9k_preinit >&$fd || return }\n      print -r -- '_p9k_restore_state_impl() {' >&$fd || return\n      typeset -pm '_POWERLEVEL9K_*|_p9k_[^_]*|icons' >&$fd || return\n      print -r -- '}' >&$fd || return\n    } always {\n      exec {fd}>&-\n    }\n    # `zf_mv -f src dst` fails on NTFS if `dst` is not writable, hence `zf_rm`.\n    zf_rm -f -- $__p9k_dump_file.zwc          || return\n    zf_mv -f -- $tmp $__p9k_dump_file         || return\n    zcompile -R -- $tmp.zwc $__p9k_dump_file  || return\n    zf_mv -f -- $tmp.zwc $__p9k_dump_file.zwc || return\n  } always {\n    (( $? )) && zf_rm -f -- $tmp $tmp.zwc 2>/dev/null\n  }\n}\n\nfunction _p9k_delete_instant_prompt() {\n  local user=${(%):-%n}\n  local root_dir=${__p9k_dump_file:h}\n  zf_rm -f -- $root_dir/p10k-instant-prompt-$user.zsh{,.zwc} ${root_dir}/p10k-$user/prompt-*(N) 2>/dev/null\n}\n\nfunction _p9k_restore_state() {\n  {\n    [[ $__p9k_cached_param_pat == $_p9k__param_pat && $__p9k_cached_param_sig == $_p9k__param_sig ]] || return\n    (( $+functions[_p9k_restore_state_impl] )) || return\n    _p9k_restore_state_impl\n    return 0\n  } always {\n    if (( $? )); then\n      if (( $+functions[_p9k_preinit] )); then\n        unfunction _p9k_preinit\n        (( $+functions[gitstatus_stop_p9k_] )) && gitstatus_stop_p9k_ POWERLEVEL9K\n      fi\n      _p9k_delete_instant_prompt\n      zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null\n    elif [[ $__p9k_instant_prompt_param_sig != $_p9k__param_sig ]]; then\n      _p9k_delete_instant_prompt\n      _p9k_dumped_instant_prompt_sigs=()\n    fi\n    unset __p9k_cached_param_sig\n  }\n}\n\nfunction _p9k_clear_instant_prompt() {\n  if (( $+__p9k_fd_0 )); then\n    exec 0<&$__p9k_fd_0 {__p9k_fd_0}>&-\n    unset __p9k_fd_0\n  fi\n  exec 1>&$__p9k_fd_1 2>&$__p9k_fd_2 {__p9k_fd_1}>&- {__p9k_fd_2}>&-\n  unset __p9k_fd_1 __p9k_fd_2\n  zshexit_functions=(${zshexit_functions:#_p9k_instant_prompt_cleanup})\n  if (( _p9k__can_hide_cursor )); then\n    echoti civis\n    _p9k__cursor_hidden=1\n  fi\n  if [[ -s $__p9k_instant_prompt_output ]]; then\n    {\n      local content\n      [[ $_POWERLEVEL9K_INSTANT_PROMPT == verbose ]] && content=\"$(<$__p9k_instant_prompt_output)\"\n      local mark=\"${(e)${PROMPT_EOL_MARK-%B%S%#%s%b}}\"\n      _p9k_prompt_length $mark\n      local -i fill=$((COLUMNS > _p9k__ret ? COLUMNS - _p9k__ret : 0))\n      local cr=$'\\r'\n      local sp=\"${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}\"\n      if (( _z4h_can_save_restore_screen == 1 && __p9k_instant_prompt_sourced >= 35 )); then\n        -z4h-restore-screen\n        unset _z4h_saved_screen\n      fi\n      print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]\n      local unexpected=${${content//$'\\e[?'<->'c'}//$'\\e['<->' q'}\n      unexpected=${(S)unexpected//$'\\eP'(|*[^$'\\e'])($'\\e\\e')#$'\\e\\\\'}\n      unexpected=${(S)unexpected//$'\\e'[^$'\\a\\e']#($'\\a'|$'\\e\\\\')}\n      # Visual Studio Code prints this garbage.\n      unexpected=${${unexpected//$'\\033[1;32mShell integration activated\\033[0m\\n'}//$'\\r'}\n      typeset -g P9K_STARTUP_CONSOLE_OUTPUT=(\"$content\" \"$unexpected\")\n      if [[ -n $unexpected ]]; then\n        local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '\n        local omz2='Updating Oh My Zsh'\n        local omz3='https://shop.planetargon.com/collections/oh-my-zsh'\n        local omz4='There was an error updating. Try again later?'\n        if [[ $unexpected != ($omz1|)$omz2*($omz3|$omz4)[^$'\\n']#($'\\n'|) ]]; then\n          echo -E - \"\"\n          echo -E - \"${(%):-[%3FWARNING%f]: Console output during zsh initialization detected.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-When using Powerlevel10k with instant prompt, console output during zsh}\"\n          echo -E - \"${(%):-initialization may indicate issues.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-You can:}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-  - %BRecommended%b: Change %B$__p9k_zshrc_u%b so that it does not perform console I/O}\"\n          echo -E - \"${(%):-    after the instant prompt preamble. See the link below for details.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n          echo -E - \"${(%):-    * Zsh will start %Bquickly%b and prompt will update %Bsmoothly%b.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-  - Suppress this warning either by running %Bp10k configure%b or by manually}\"\n          echo -E - \"${(%):-    defining the following parameter:}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-      %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=quiet}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n          echo -E - \"${(%):-    * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-  - Disable instant prompt either by running %Bp10k configure%b or by manually}\"\n          echo -E - \"${(%):-    defining the following parameter:}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-      %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=off}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n          echo -E - \"${(%):-    * Zsh will start %Bslowly%b.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-  - Do nothing.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-    * You %Bwill%b see this error message every time you start zsh.}\"\n          echo -E - \"${(%):-    * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}\"\n          echo -E - \"\"\n          echo -E - \"${(%):-For details, see:}\"\n          if (( _p9k_term_has_href )); then\n            echo    - \"${(%):-\\e]8;;https://github.com/romkatv/powerlevel10k#instant-prompt\\ahttps://github.com/romkatv/powerlevel10k#instant-prompt\\e]8;;\\a}\"\n          else\n            echo    - \"${(%):-https://github.com/romkatv/powerlevel10k#instant-prompt}\"\n          fi\n          echo -E - \"\"\n          echo    - \"${(%):-%3F-- console output produced during zsh initialization follows --%f}\"\n          echo -E - \"\"\n        fi\n      fi\n      command cat -- $__p9k_instant_prompt_output\n      echo -nE - $sp\n      zf_rm -f -- $__p9k_instant_prompt_output\n    } 2>/dev/null\n  else\n    zf_rm -f -- $__p9k_instant_prompt_output 2>/dev/null\n    if (( _z4h_can_save_restore_screen == 1 && __p9k_instant_prompt_sourced >= 35 )); then\n      -z4h-restore-screen\n      unset _z4h_saved_screen\n    fi\n    print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]\n  fi\n  prompt_opts=(percent subst sp cr)\n  if [[ $_POWERLEVEL9K_DISABLE_INSTANT_PROMPT == 0 && $__p9k_instant_prompt_active == 2 ]]; then\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-[%1FERROR%f]: When using Powerlevel10k with instant prompt, %Bprompt_cr%b must be unset.}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-You can:}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-  - %BRecommended%b: call %Bp10k finalize%b at the end of %B$__p9k_zshrc_u%b.}\"\n    >&2 echo -E - \"${(%):-    You can do this by running the following command:}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-      %2Fecho%f %3F'(( ! \\${+functions[p10k]\\} )) || p10k finalize'%f >>! $__p9k_zshrc_u}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n    >&2 echo -E - \"${(%):-    * Zsh will start %Bquickly%b and %Bwithout%b prompt flickering.}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-  - Find where %Bprompt_cr%b option gets sets in your zsh configs and stop setting it.}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n    >&2 echo -E - \"${(%):-    * Zsh will start %Bquickly%b and %Bwithout%b prompt flickering.}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-  - Disable instant prompt either by running %Bp10k configure%b or by manually}\"\n    >&2 echo -E - \"${(%):-    defining the following parameter:}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-      %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=off}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n    >&2 echo -E - \"${(%):-    * Zsh will start %Bslowly%b.}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-  - Do nothing.}\"\n    >&2 echo -E - \"\"\n    >&2 echo -E - \"${(%):-    * You %Bwill%b see this error message every time you start zsh.}\"\n    >&2 echo -E - \"${(%):-    * Zsh will start %Bquckly%b but %Bwith%b prompt flickering.}\"\n    >&2 echo -E - \"\"\n  fi\n}\n\nfunction _p9k_do_dump() {\n  eval \"$__p9k_intro\"\n  zle -F $1\n  exec {1}>&-\n  (( _p9k__state_dump_fd )) || return\n  if (( ! _p9k__instant_prompt_disabled )); then\n    _p9k__instant_prompt_sig=$_p9k__cwd:$P9K_SSH:${(%):-%#}\n    _p9k_set_instant_prompt\n    _p9k_dump_instant_prompt\n    _p9k_dumped_instant_prompt_sigs[$_p9k__instant_prompt_sig]=1\n  fi\n  _p9k_dump_state\n  _p9k__state_dump_scheduled=0\n  _p9k__state_dump_fd=0\n}\n\nfunction _p9k_should_dump() {\n  (( __p9k_dumps_enabled && ! _p9k__state_dump_fd )) || return\n  (( _p9k__state_dump_scheduled || _p9k__prompt_idx == 1 )) && return\n  _p9k__instant_prompt_sig=$_p9k__cwd:$P9K_SSH:${(%):-%#}\n  (( ! $+_p9k_dumped_instant_prompt_sigs[$_p9k__instant_prompt_sig] ))\n}\n\n# Must not run under `eval \"$__p9k_intro_locale\"`. Safe to run with any options.\nfunction _p9k_restore_special_params() {\n  (( ! ${+_p9k__real_zle_rprompt_indent} )) || {\n    [[ -n \"$_p9k__real_zle_rprompt_indent\" ]]             &&\n      ZLE_RPROMPT_INDENT=\"$_p9k__real_zle_rprompt_indent\" ||\n      unset ZLE_RPROMPT_INDENT\n    unset _p9k__real_zle_rprompt_indent\n  }\n  (( ! ${+_p9k__real_lc_ctype} )) || {\n    LC_CTYPE=\"$_p9k__real_lc_ctype\"\n    unset _p9k__real_lc_ctype\n  }\n  (( ! ${+_p9k__real_lc_all} )) || {\n    LC_ALL=\"$_p9k__real_lc_all\"\n    unset _p9k__real_lc_all\n  }\n}\n\nfunction _p9k_on_expand() {\n  (( _p9k__expanded && ! ${+__p9k_instant_prompt_active} )) && [[ \"${langinfo[CODESET]}\" == (utf|UTF)(-|)8 ]] && return\n\n  eval \"$__p9k_intro_no_locale\"\n\n  if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]]; then\n    _p9k_restore_special_params\n    if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale; then\n      if [[ -n $LC_ALL ]]; then\n        _p9k__real_lc_all=$LC_ALL\n        LC_ALL=$__p9k_locale\n      else\n        _p9k__real_lc_ctype=$LC_CTYPE\n        LC_CTYPE=$__p9k_locale\n      fi\n    fi\n  fi\n\n  (( _p9k__expanded && ! $+__p9k_instant_prompt_active )) && return\n\n  eval \"$__p9k_intro_locale\"\n\n  if (( ! _p9k__expanded )); then\n    if _p9k_should_dump; then\n      sysopen -o cloexec -ru _p9k__state_dump_fd /dev/null\n      zle -F $_p9k__state_dump_fd _p9k_do_dump\n    fi\n\n    if [[ -z $P9K_TTY || $P9K_TTY == old && -n ${_P9K_TTY:#$TTY} ]]; then\n      typeset -gx P9K_TTY=old\n      if (( _POWERLEVEL9K_NEW_TTY_MAX_AGE_SECONDS < 0 )); then\n        P9K_TTY=new\n      else\n        local -a stat\n        if zstat -A stat +ctime -- $TTY 2>/dev/null &&\n          (( EPOCHREALTIME - stat[1] < _POWERLEVEL9K_NEW_TTY_MAX_AGE_SECONDS )); then\n          P9K_TTY=new\n        fi\n      fi\n    fi\n\n    typeset -gx _P9K_TTY=$TTY\n\n    __p9k_reset_state=1\n\n    if (( _POWERLEVEL9K_PROMPT_ADD_NEWLINE )); then\n      if [[ $P9K_TTY == new ]]; then\n        _p9k__empty_line_i=3\n        _p9k__display_v[2]=hide\n      elif [[ -z $_p9k_transient_prompt && $+functions[p10k-on-post-prompt] == 0 ]]; then\n        _p9k__empty_line_i=3\n        _p9k__display_v[2]=print\n      else\n        unset _p9k__empty_line_i\n        _p9k__display_v[2]=show\n      fi\n    fi\n\n    if (( _POWERLEVEL9K_SHOW_RULER )); then\n      if [[ $P9K_TTY == new ]]; then\n        _p9k__ruler_i=3\n        _p9k__display_v[4]=hide\n      elif [[ -z $_p9k_transient_prompt && $+functions[p10k-on-post-prompt] == 0 ]]; then\n        _p9k__ruler_i=3\n        _p9k__display_v[4]=print\n      else\n        unset _p9k__ruler_i\n        _p9k__display_v[4]=show\n      fi\n    fi\n\n    (( _p9k__fully_initialized )) || _p9k_wrap_widgets\n  fi\n\n  if (( $+__p9k_instant_prompt_active )); then\n    _p9k_clear_instant_prompt\n    unset __p9k_instant_prompt_active\n  fi\n\n  if (( ! _p9k__expanded )); then\n    _p9k__expanded=1\n\n    (( _p9k__fully_initialized || ! $+functions[p10k-on-init] )) || p10k-on-init\n\n    local pat idx var\n    for pat idx var in $_p9k_show_on_command; do\n      _p9k_display_segment $idx $var hide\n    done\n\n    (( $+functions[p10k-on-pre-prompt] )) && p10k-on-pre-prompt\n\n    if zle; then\n      local -a P9K_COMMANDS=($_p9k__last_commands)\n      local pat idx var\n      for pat idx var in $_p9k_show_on_command; do\n        if (( $P9K_COMMANDS[(I)$pat] )); then\n          _p9k_display_segment $idx $var show\n        else\n          _p9k_display_segment $idx $var hide\n        fi\n      done\n      if (( $+functions[p10k-on-post-widget] )); then\n        local -h WIDGET\n        unset WIDGET\n        p10k-on-post-widget\n      fi\n    else\n      if [[ $_p9k__display_v[2] == print && -n $_p9k_t[_p9k_empty_line_idx] ]]; then\n        print -rnP -- '%b%k%f%E'$_p9k_t[_p9k_empty_line_idx]\n      fi\n      if [[ $_p9k__display_v[4] == print ]]; then\n        () {\n          local ruler=$_p9k_t[_p9k_ruler_idx]\n          local -i _p9k__clm=COLUMNS _p9k__ind=${ZLE_RPROMPT_INDENT:-1}\n          (( __p9k_ksh_arrays )) && setopt ksh_arrays\n          (( __p9k_sh_glob )) && setopt sh_glob\n          setopt prompt_subst\n          print -rnP -- '%b%k%f%E'$ruler\n        }\n      fi\n    fi\n\n    __p9k_reset_state=0\n    _p9k__fully_initialized=1\n  fi\n}\nfunctions -M _p9k_on_expand\n\n_p9k_precmd_impl() {\n  eval \"$__p9k_intro\"\n\n  (( __p9k_enabled )) || return\n\n  if ! zle || [[ -z $_p9k__param_sig ]]; then\n    if zle; then\n      __p9k_new_status=0\n      __p9k_new_pipestatus=(0)\n    else\n      _p9k__must_restore_prompt=0\n    fi\n\n    if _p9k_must_init; then\n      local -i instant_prompt_disabled\n      if (( !__p9k_configured )); then\n        __p9k_configured=1\n        if [[ -z \"${parameters[(I)POWERLEVEL9K_*~POWERLEVEL9K_(MODE|CONFIG_FILE|GITSTATUS_DIR)]}\" ]]; then\n          _p9k_can_configure -q\n          local -i ret=$?\n          if (( ret == 2 && $+__p9k_instant_prompt_active )); then\n            _p9k_clear_instant_prompt\n            unset __p9k_instant_prompt_active\n            _p9k_delete_instant_prompt\n            zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null\n            () {\n              local key\n              while true; do\n                [[ -t 2 ]]\n                read -t0 -k key || break\n              done 2>/dev/null\n            }\n            _p9k_can_configure -q\n            ret=$?\n          fi\n          if (( ret == 0 )); then\n            if (( $+commands[git] )); then\n              (\n                local -i pid\n                {\n                  { /bin/sh \"$__p9k_root_dir\"/gitstatus/install </dev/null &>/dev/null & } && pid=$!\n                  ( builtin source \"$__p9k_root_dir\"/internal/wizard.zsh )\n                } always {\n                  if (( pid )); then\n                    kill -- $pid 2>/dev/null\n                    wait -- $pid 2>/dev/null\n                  fi\n                }\n              )\n            else\n              ( builtin source \"$__p9k_root_dir\"/internal/wizard.zsh )\n            fi\n            if (( $? )); then\n              instant_prompt_disabled=1\n            else\n              builtin source \"$__p9k_cfg_path\"\n              _p9k__force_must_init=1\n              _p9k_must_init\n            fi\n          fi\n        fi\n      fi\n      typeset -gi _p9k__instant_prompt_disabled=instant_prompt_disabled\n      _p9k_init\n    fi\n\n    if (( _p9k__timer_start )); then\n      typeset -gF P9K_COMMAND_DURATION_SECONDS=$((EPOCHREALTIME - _p9k__timer_start))\n    else\n      unset P9K_COMMAND_DURATION_SECONDS\n    fi\n    _p9k_save_status\n\n    if [[ $_p9k__preexec_cmd == [[:space:]]#(clear([[:space:]]##-(|x)(|T[a-zA-Z0-9-_\\'\\\"]#))#|reset)[[:space:]]# &&\n          $_p9k__status == 0 ]]; then\n      P9K_TTY=new\n    elif [[ $P9K_TTY == new && $_p9k__fully_initialized == 1 ]] && ! zle; then\n      P9K_TTY=old\n    fi\n\n    _p9k__timer_start=0\n    _p9k__region_active=0\n\n    unset _p9k__line_finished _p9k__preexec_cmd\n    _p9k__keymap=main\n    _p9k__zle_state=insert\n\n    (( ++_p9k__prompt_idx ))\n\n    if (( $+_p9k__iterm_cmd )); then\n      _p9k_iterm2_precmd $__p9k_new_status\n    fi\n  fi\n\n  _p9k_fetch_cwd\n\n  _p9k__refresh_reason=precmd\n  __p9k_reset_state=1\n\n  local -i fast_vcs\n  if (( _p9k_vcs_index && $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )); then\n    if [[ $_p9k__cwd != $~_POWERLEVEL9K_VCS_DISABLED_DIR_PATTERN ]]; then\n      local -F start_time=EPOCHREALTIME\n      unset _p9k__vcs\n      unset _p9k__vcs_timeout\n      local -i _p9k__vcs_called\n      _p9k_vcs_gitstatus\n      local -i fast_vcs=1\n    fi\n  fi\n\n  (( $+functions[_p9k_async_segments_compute] )) && _p9k_async_segments_compute\n\n  _p9k__expanded=0\n\n  _p9k_set_prompt\n\n  _p9k__refresh_reason=''\n\n  if [[ $precmd_functions[1] != _p9k_do_nothing && $precmd_functions[(I)_p9k_do_nothing] != 0 ]]; then\n    precmd_functions=(_p9k_do_nothing ${(@)precmd_functions:#_p9k_do_nothing})\n  fi\n  if [[ $precmd_functions[-1] != _p9k_precmd && $precmd_functions[(I)_p9k_precmd] != 0 ]]; then\n    precmd_functions=(${(@)precmd_functions:#_p9k_precmd} _p9k_precmd)\n  fi\n  if [[ $preexec_functions[1] != _p9k_preexec1 && $preexec_functions[(I)_p9k_preexec1] != 0 ]]; then\n    preexec_functions=(_p9k_preexec1 ${(@)preexec_functions:#_p9k_preexec1})\n  fi\n  if [[ $preexec_functions[-1] != _p9k_preexec2 && $preexec_functions[(I)_p9k_preexec2] != 0 ]]; then\n    preexec_functions=(${(@)preexec_functions:#_p9k_preexec2} _p9k_preexec2)\n  fi\n\n  if (( fast_vcs && _p9k_vcs_index && $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )); then\n    if (( $+_p9k__vcs_timeout )); then\n      (( _p9k__vcs_timeout = _POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS + start_time - EPOCHREALTIME ))\n      (( _p9k__vcs_timeout >= 0 )) || (( _p9k__vcs_timeout = 0 ))\n      gitstatus_process_results_p9k_ -t $_p9k__vcs_timeout POWERLEVEL9K\n    fi\n    if (( ! $+_p9k__vcs )); then\n      local _p9k__prompt _p9k__prompt_side=$_p9k_vcs_side _p9k__segment_name=vcs\n      local -i _p9k__has_upglob _p9k__segment_index=_p9k_vcs_index _p9k__line_index=_p9k_vcs_line_index\n      _p9k_vcs_render\n      typeset -g _p9k__vcs=$_p9k__prompt\n    fi\n  fi\n\n  _p9k_worker_receive\n  __p9k_reset_state=0\n}\n\n_p9k_trapint() {\n  if (( __p9k_enabled )); then\n    eval \"$__p9k_intro\"\n    _p9k_deschedule_redraw\n    zle && _p9k_on_widget_zle-line-finish int\n  fi\n  return 0\n}\n\n_p9k_precmd() {\n  __p9k_new_status=$?\n  __p9k_new_pipestatus=($pipestatus)\n\n  trap \":\" INT\n\n  [[ -o ksh_arrays ]] && __p9k_ksh_arrays=1 || __p9k_ksh_arrays=0\n  [[ -o sh_glob ]] && __p9k_sh_glob=1 || __p9k_sh_glob=0\n  _p9k_restore_special_params\n\n  _p9k_precmd_impl\n\n  [[ ${+__p9k_instant_prompt_active} == 0 || -o no_prompt_cr ]] || __p9k_instant_prompt_active=2\n  setopt no_local_options no_prompt_bang prompt_percent prompt_subst prompt_cr prompt_sp\n\n  # See https://www.zsh.org/mla/workers/2020/msg00612.html for the reason behind __p9k_trapint.\n  typeset -g __p9k_trapint='_p9k_trapint; return 130'\n  trap \"$__p9k_trapint\" INT\n\n  : ${(%):-%b%k%s%u}\n}\n\nfunction _p9k_reset_prompt() {\n  if (( __p9k_reset_state != 1 )) && zle && [[ -z $_p9k__line_finished ]]; then\n    __p9k_reset_state=0\n    setopt prompt_subst\n    (( __p9k_ksh_arrays )) && setopt ksh_arrays\n    (( __p9k_sh_glob )) && setopt sh_glob\n    {\n      (( _p9k__can_hide_cursor )) && echoti civis\n      zle .reset-prompt\n      (( ${+functions[z4h]} )) || zle -R\n    } always {\n      (( _p9k__can_hide_cursor )) && print -rn -- $_p9k__cnorm\n      _p9k__cursor_hidden=0\n    }\n  fi\n}\n\n# Does ZSH have a certain off-by-one bug that triggers when PROMPT overflows to a new line?\n#\n# Bug: https://github.com/zsh-users/zsh/commit/d8d9fee137a5aa2cf9bf8314b06895bfc2a05518.\n# ZSH_PATCHLEVEL=zsh-5.4.2-159-gd8d9fee13. Released in 5.5.\n#\n# Fix: https://github.com/zsh-users/zsh/commit/64d13738357c9b9c212adbe17f271716abbcf6ea.\n# ZSH_PATCHLEVEL=zsh-5.7.1-50-g64d137383. Released in 5.7.2.\n#\n# Test: PROMPT=\"${(pl:$((COLUMNS))::-:)}<%1(l.%2(l.FAIL.PASS).FAIL)> \" zsh -dfis <<<exit\n# Workaround: PROMPT=\"${(pl:$((COLUMNS))::-:)}%{%G%}<%1(l.%2(l.FAIL.PASS).FAIL)> \" zsh -dfis <<<exit\nfunction _p9k_prompt_overflow_bug() {\n  [[ $ZSH_PATCHLEVEL =~ '^zsh-5\\.4\\.2-([0-9]+)-' ]] && return $(( match[1] < 159 ))\n  [[ $ZSH_PATCHLEVEL =~ '^zsh-5\\.7\\.1-([0-9]+)-' ]] && return $(( match[1] >= 50 ))\n  [[ $ZSH_VERSION == 5.<5-7>* && $ZSH_VERSION != 5.7.<2->* ]]\n}\n\ntypeset -g  _p9k__param_pat\ntypeset -g  _p9k__param_sig\n\n_p9k_init_vars() {\n  typeset -gF _p9k__gcloud_last_fetch_ts\n  typeset -g  _p9k_gcloud_configuration\n  typeset -g  _p9k_gcloud_account\n  typeset -g  _p9k_gcloud_project_id\n  typeset -g  _p9k_gcloud_project_name\n\n  typeset -gi _p9k_term_has_href\n\n  typeset -gi _p9k_vcs_index\n  typeset -gi _p9k_vcs_line_index\n  typeset -g  _p9k_vcs_side\n\n  typeset -ga _p9k_taskwarrior_meta_files\n  typeset -ga _p9k_taskwarrior_meta_non_files\n  typeset -g  _p9k_taskwarrior_meta_sig\n  typeset -g  _p9k_taskwarrior_data_dir\n  typeset -g  _p9k__taskwarrior_functional=1\n  typeset -ga _p9k_taskwarrior_data_files\n  typeset -ga _p9k_taskwarrior_data_non_files\n  typeset -g  _p9k_taskwarrior_data_sig\n  typeset -gA _p9k_taskwarrior_counters\n  typeset -gF _p9k_taskwarrior_next_due\n\n  typeset -ga _p9k_asdf_meta_files\n  typeset -ga _p9k_asdf_meta_non_files\n  typeset -g  _p9k_asdf_meta_sig\n\n  # plugin => installed_version_pattern\n  # example: (ruby '2.7.0|2.6.3|system' lua 'system' chubaka '1.0.0|system')\n  typeset -gA _p9k_asdf_plugins\n\n  # example: (.ruby-version \"ruby 1 chubaka 0\")\n  #\n  # - \"1\" means parse-legacy-file is present\n  # - \"chubaka\" is another plugin that claims to be able to parse .ruby-version\n  typeset -gA _p9k_asdf_file_info\n\n  # dir => mtime ':' ${(pj:\\0:)files}\n  typeset -gA _p9k__asdf_dir2files\n\n  # :file       => mtime ':' ${(pj:\\0:)tool_versions}\n  # plugin:file => mtime ':' version\n  typeset -gA _p9k_asdf_file2versions\n\n  # filepath => mtime ':' word\n  typeset -gA _p9k__read_word_cache\n  # filepath:prefix => mtime ':' versions\n  typeset -gA _p9k__read_pyenv_like_version_file_cache\n\n  # _p9k__parent_dirs and _p9k__parent_mtimes are parallel arrays. They are updated\n  # together with _p9k__cwd. _p9k__parent_mtimes[i] is mtime for _p9k__parent_dirs[i].\n  #\n  # When _p9k__cwd is / or ~, both arrays are empty. When _p9k__cwd is ~/foo/bar,\n  # _p9k__parent_dirs is (/home/user/foo/bar /home/user/foo). When _p9k__cwd is\n  # /foo/bar, it's (/foo/bar /foo).\n  #\n  # $_p9k__parent_mtimes_i[i] == \"$i:$_p9k__parent_mtimes[i]\"\n  # $_p9k__parent_mtimes_s == \"$_p9k__parent_mtimes_i\".\n  typeset -ga _p9k__parent_dirs\n  typeset -ga _p9k__parent_mtimes\n  typeset -ga _p9k__parent_mtimes_i\n  typeset -g  _p9k__parent_mtimes_s\n\n  typeset -g  _p9k__cwd\n  typeset -g  _p9k__cwd_a\n\n  # dir/pattern => dir mtime ':' num_matches\n  typeset -gA _p9k__glob_cache\n\n  # dir/pattern => space-separated parent dir mtimes ' :' the first matching parent dir\n  # Note: ' :' is indeed the delimiter.\n  typeset -gA _p9k__upsearch_cache\n\n  typeset -g  _p9k_timewarrior_dir\n  typeset -gi _p9k_timewarrior_dir_mtime\n  typeset -gi _p9k_timewarrior_file_mtime\n  typeset -g  _p9k_timewarrior_file_name\n  typeset -gA _p9k__prompt_char_saved\n  typeset -g  _p9k__worker_pid\n  typeset -g  _p9k__worker_req_fd\n  typeset -g  _p9k__worker_resp_fd\n  typeset -g  _p9k__worker_shell_pid\n  typeset -g  _p9k__worker_file_prefix\n  typeset -gA _p9k__worker_request_map\n  typeset -ga _p9k__segment_cond_left\n  typeset -ga _p9k__segment_cond_right\n  typeset -ga _p9k__segment_val_left\n  typeset -ga _p9k__segment_val_right\n  typeset -ga _p9k_show_on_command\n  typeset -g  _p9k__last_buffer\n  typeset -ga _p9k__last_commands\n  typeset -gi  _p9k__fully_initialized\n  typeset -gi _p9k__must_restore_prompt\n  typeset -gi _p9k__restore_prompt_fd\n  typeset -gi _p9k__redraw_fd\n  typeset -gi _p9k__can_hide_cursor=$(( $+terminfo[civis] && $+terminfo[cnorm] ))\n  if (( _p9k__can_hide_cursor )); then\n    # See https://github.com/romkatv/powerlevel10k/issues/1699\n    if [[ $terminfo[cnorm] == *$'\\e[?25h'(|'\\e'*) ]]; then\n      typeset -g _p9k__cnorm=$'\\e[?25h'\n    else\n      typeset -g _p9k__cnorm=$terminfo[cnorm]\n    fi\n  fi\n  typeset -gi _p9k__cursor_hidden\n  typeset -gi _p9k__non_hermetic_expansion\n  typeset -g  _p9k__time\n  typeset -g  _p9k__date\n  typeset -gA _p9k_dumped_instant_prompt_sigs\n  typeset -g  _p9k__instant_prompt_sig\n  typeset -g  _p9k__instant_prompt\n  typeset -gi _p9k__state_dump_scheduled\n  typeset -gi _p9k__state_dump_fd\n  typeset -gi _p9k__prompt_idx\n  typeset -gi _p9k_reset_on_line_finish\n  typeset -gF _p9k__timer_start\n  typeset -gi _p9k__status\n  typeset -ga _p9k__pipestatus\n  typeset -g  _p9k__ret\n  typeset -g  _p9k__cache_key\n  typeset -ga _p9k__cache_val\n  typeset -g  _p9k__cache_stat_meta\n  typeset -g  _p9k__cache_stat_fprint\n  typeset -g  _p9k__cache_fprint_key\n  typeset -gA _p9k_cache\n  typeset -gA _p9k__cache_ephemeral\n  typeset -ga _p9k_t\n  typeset -g  _p9k__n\n  typeset -gi _p9k__i\n  typeset -g  _p9k__bg\n  typeset -ga _p9k_left_join\n  typeset -ga _p9k_right_join\n  typeset -g  _p9k__public_ip\n  typeset -g  _p9k__todo_command\n  typeset -g  _p9k__todo_file\n  typeset -g  _p9k__git_dir\n  # git workdir => 1 if gitstatus is slow on it, 0 if it's fast.\n  typeset -gA _p9k_git_slow\n  # git workdir => the last state we've seen for it\n  typeset -gA _p9k__gitstatus_last\n  typeset -gF _p9k__gitstatus_start_time\n  typeset -g  _p9k__prompt\n  typeset -g  _p9k__rprompt\n  typeset -g  _p9k__lprompt\n  typeset -g  _p9k__prompt_side\n  typeset -g  _p9k__segment_name\n  typeset -gi _p9k__segment_index\n  typeset -gi _p9k__line_index\n  typeset -g  _p9k__refresh_reason\n  typeset -gi _p9k__region_active\n  typeset -ga _p9k_line_segments_left\n  typeset -ga _p9k_line_segments_right\n  typeset -ga _p9k_line_prefix_left\n  typeset -ga _p9k_line_prefix_right\n  typeset -ga _p9k_line_suffix_left\n  typeset -ga _p9k_line_suffix_right\n  typeset -ga _p9k_line_never_empty_right\n  typeset -ga _p9k_line_gap_post\n  typeset -g  _p9k__xy\n  typeset -g  _p9k__clm\n  typeset -g  _p9k__p\n  typeset -gi _p9k__x\n  typeset -gi _p9k__y\n  typeset -gi _p9k__m\n  typeset -gi _p9k__d\n  typeset -gi _p9k__h\n  typeset -gi _p9k__ind\n  typeset -g  _p9k_gap_pre\n  typeset -gi _p9k__ruler_i=3\n  typeset -gi _p9k_ruler_idx\n  typeset -gi _p9k__empty_line_i=3\n  typeset -gi _p9k_empty_line_idx\n  typeset -g  _p9k_prompt_prefix_left\n  typeset -g  _p9k_prompt_prefix_right\n  typeset -g  _p9k_prompt_suffix_left\n  typeset -g  _p9k_prompt_suffix_right\n  typeset -gi _p9k_emulate_zero_rprompt_indent\n  typeset -gA _p9k_battery_states\n  typeset -g  _p9k_os\n  typeset -g  _p9k_os_icon\n  typeset -g  _p9k_color1\n  typeset -g  _p9k_color2\n  typeset -g  _p9k__s\n  typeset -g  _p9k__ss\n  typeset -g  _p9k__sss\n  typeset -g  _p9k__v\n  typeset -g  _p9k__c\n  typeset -g  _p9k__e\n  typeset -g  _p9k__w\n  typeset -gi _p9k__dir_len\n  typeset -gi _p9k_num_cpus\n  typeset -g  _p9k__keymap\n  typeset -g  _p9k__zle_state\n  typeset -g  _p9k_uname\n  typeset -g  _p9k_uname_o\n  typeset -g  _p9k_uname_m\n  typeset -g  _p9k_transient_prompt\n  typeset -g  _p9k__last_prompt_pwd\n  typeset -gA _p9k_display_k\n  typeset -ga _p9k__display_v\n\n  typeset -gA _p9k__dotnet_stat_cache\n  typeset -gA _p9k__dir_stat_cache\n  typeset -gi _p9k__expanded\n  typeset -gi _p9k__force_must_init\n\n  typeset -g  P9K_VISUAL_IDENTIFIER\n  typeset -g  P9K_CONTENT\n  typeset -g  P9K_GAP\n  typeset -g  P9K_PROMPT=regular\n}\n\n_p9k_init_params() {\n  _p9k_declare -F POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS 60\n\n  # invarint:  _POWERLEVEL9K_INSTANT_PROMPT == (verbose|quiet|off)\n  # invariant: [[ ($_POWERLEVEL9K_INSTANT_PROMPT == off) == $_POWERLEVEL9K_DISABLE_INSTANT_PROMPT ]]\n  _p9k_declare -s POWERLEVEL9K_INSTANT_PROMPT  # verbose, quiet, off\n  if [[ $_POWERLEVEL9K_INSTANT_PROMPT == off ]]; then\n    typeset -gi _POWERLEVEL9K_DISABLE_INSTANT_PROMPT=1\n  else\n    _p9k_declare -b POWERLEVEL9K_DISABLE_INSTANT_PROMPT 0\n    if (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT )); then\n      _POWERLEVEL9K_INSTANT_PROMPT=off\n    elif [[ $_POWERLEVEL9K_INSTANT_PROMPT != quiet ]]; then\n      _POWERLEVEL9K_INSTANT_PROMPT=verbose\n    fi\n  fi\n\n  (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT )) && _p9k__instant_prompt_disabled=1\n\n  _p9k_declare -s POWERLEVEL9K_TRANSIENT_PROMPT off\n  [[ $_POWERLEVEL9K_TRANSIENT_PROMPT == (off|always|same-dir) ]] || _POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n  _p9k_declare -b POWERLEVEL9K_TERM_SHELL_INTEGRATION 0\n  if [[ __p9k_force_term_shell_integration -eq 1 || $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then\n    _POWERLEVEL9K_TERM_SHELL_INTEGRATION=1\n  fi\n\n  _p9k_declare -s POWERLEVEL9K_WORKER_LOG_LEVEL\n  _p9k_declare -i POWERLEVEL9K_COMMANDS_MAX_TOKEN_COUNT 64\n  _p9k_declare -a POWERLEVEL9K_HOOK_WIDGETS --\n  _p9k_declare -b POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL 0\n  _p9k_declare -b POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED 0\n  _p9k_declare -b POWERLEVEL9K_DISABLE_HOT_RELOAD 0\n  _p9k_declare -F POWERLEVEL9K_NEW_TTY_MAX_AGE_SECONDS 5\n  _p9k_declare -i POWERLEVEL9K_INSTANT_PROMPT_COMMAND_LINES\n  _p9k_declare -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS -- context dir vcs\n  _p9k_declare -a POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS -- status root_indicator background_jobs history time\n  _p9k_declare -b POWERLEVEL9K_DISABLE_RPROMPT 0\n  _p9k_declare -b POWERLEVEL9K_PROMPT_ADD_NEWLINE 0\n  _p9k_declare -b POWERLEVEL9K_PROMPT_ON_NEWLINE 0\n  _p9k_declare -b POWERLEVEL9K_RPROMPT_ON_NEWLINE 0\n  _p9k_declare -b POWERLEVEL9K_SHOW_RULER 0\n  _p9k_declare -i POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT 1\n  _p9k_declare -s POWERLEVEL9K_COLOR_SCHEME dark\n  _p9k_declare -s POWERLEVEL9K_GITSTATUS_DIR \"\"\n  _p9k_declare -s POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN\n  _p9k_declare -b POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY 0\n  _p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_LENGTH\n  _p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH\n  _p9k_declare -s POWERLEVEL9K_VCS_SHORTEN_STRATEGY\n  if [[ $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then\n    _p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '\\u2026'\n  else\n    _p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '..'\n  fi\n  _p9k_declare -b POWERLEVEL9K_VCS_CONFLICTED_STATE 0\n  _p9k_declare -b POWERLEVEL9K_HIDE_BRANCH_ICON 0\n  _p9k_declare -b POWERLEVEL9K_VCS_HIDE_TAGS 0\n  _p9k_declare -a POWERLEVEL9K_VCS_GIT_REMOTE_ICONS\n  if (( $+_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS )); then\n    (( $#_POWERLEVEL9K_VCS_GIT_REMOTE_ICONS & 1 )) && _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=('')\n  else\n    local domain= icon= domain2icon=(\n      'archlinux.org'                  VCS_GIT_ARCHLINUX_ICON\n      'dev.azure.com|visualstudio.com' VCS_GIT_AZURE_ICON\n      'bitbucket.org'                  VCS_GIT_BITBUCKET_ICON\n      'codeberg.org'                   VCS_GIT_CODEBERG_ICON\n      'debian.org'                     VCS_GIT_DEBIAN_ICON\n      'freebsd.org'                    VCS_GIT_FREEBSD_ICON\n      'freedesktop.org'                VCS_GIT_FREEDESKTOP_ICON\n      'gitea.com|gitea.io'             VCS_GIT_GITEA_ICON\n      'github.com'                     VCS_GIT_GITHUB_ICON\n      'gitlab.com'                     VCS_GIT_GITLAB_ICON\n      'gnome.org'                      VCS_GIT_GNOME_ICON\n      'gnu.org'                        VCS_GIT_GNU_ICON\n      'kde.org'                        VCS_GIT_KDE_ICON\n      'kernel.org'                     VCS_GIT_LINUX_ICON\n      'sr.ht'                          VCS_GIT_SOURCEHUT_ICON\n    )\n    typeset -ga _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS\n    for domain icon in \"${domain2icon[@]}\"; do\n      _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=(\n        '(|[A-Za-z0-9][A-Za-z0-9+.-]#://)(|[^:/?#]#[.@])((#i)'$domain')(|[/:?#]*)'\n        $icon\n      )\n    done\n    _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS+=('*' VCS_GIT_ICON)\n  fi\n  _p9k_declare -i POWERLEVEL9K_CHANGESET_HASH_LENGTH 8\n  # Specifies the maximum number of elements in the cache. When the cache grows over this limit,\n  # it gets cleared. This is meant to avoid memory leaks when a rogue prompt is filling the cache\n  # with data.\n  _p9k_declare -i POWERLEVEL9K_MAX_CACHE_SIZE 10000\n  _p9k_declare -e POWERLEVEL9K_ANACONDA_LEFT_DELIMITER \"(\"\n  _p9k_declare -e POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER \")\"\n  _p9k_declare -b POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION 1\n  _p9k_declare -b POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE 1\n  _p9k_declare -b POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS 0\n  _p9k_declare -b POWERLEVEL9K_DISK_USAGE_ONLY_WARNING 0\n  _p9k_declare -i POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL 90\n  _p9k_declare -i POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL 95\n  _p9k_declare -i POWERLEVEL9K_BATTERY_LOW_THRESHOLD 10\n  _p9k_declare -i POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD 999\n  _p9k_declare -b POWERLEVEL9K_BATTERY_VERBOSE 1\n  _p9k_declare -a POWERLEVEL9K_BATTERY_LEVEL_BACKGROUND --\n  _p9k_declare -a POWERLEVEL9K_BATTERY_LEVEL_FOREGROUND --\n  case $parameters[POWERLEVEL9K_BATTERY_STAGES] in\n    scalar*) typeset -ga _POWERLEVEL9K_BATTERY_STAGES=(\"${(@s::)${(g::)POWERLEVEL9K_BATTERY_STAGES}}\");;\n    array*)  typeset -ga _POWERLEVEL9K_BATTERY_STAGES=(\"${(@g::)POWERLEVEL9K_BATTERY_STAGES}\");;\n    *)       typeset -ga _POWERLEVEL9K_BATTERY_STAGES=();;\n  esac\n  local state\n  for state in CHARGED CHARGING LOW DISCONNECTED; do\n    _p9k_declare -i POWERLEVEL9K_BATTERY_${state}_HIDE_ABOVE_THRESHOLD $_POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD\n    local var=POWERLEVEL9K_BATTERY_${state}_STAGES\n    case $parameters[$var] in\n      scalar*) eval \"typeset -ga _$var=(${(@qq)${(@s::)${(g::)${(P)var}}}})\";;\n      array*)  eval \"typeset -ga _$var=(${(@qq)${(@g::)${(@P)var}}})\";;\n      *)       eval \"typeset -ga _$var=(${(@qq)_POWERLEVEL9K_BATTERY_STAGES})\";;\n    esac\n    local var=POWERLEVEL9K_BATTERY_${state}_LEVEL_BACKGROUND\n    case $parameters[$var] in\n      array*)  eval \"typeset -ga _$var=(${(@qq)${(@P)var}})\";;\n      *)       eval \"typeset -ga _$var=(${(@qq)_POWERLEVEL9K_BATTERY_LEVEL_BACKGROUND})\";;\n    esac\n    local var=POWERLEVEL9K_BATTERY_${state}_LEVEL_FOREGROUND\n    case $parameters[$var] in\n      array*)  eval \"typeset -ga _$var=(${(@qq)${(@P)var}})\";;\n      *)       eval \"typeset -ga _$var=(${(@qq)_POWERLEVEL9K_BATTERY_LEVEL_FOREGROUND})\";;\n    esac\n  done\n  _p9k_declare -F POWERLEVEL9K_PUBLIC_IP_TIMEOUT 300\n  _p9k_declare -a POWERLEVEL9K_PUBLIC_IP_METHODS -- dig curl wget\n  _p9k_declare -e POWERLEVEL9K_PUBLIC_IP_NONE \"\"\n  _p9k_declare -s POWERLEVEL9K_PUBLIC_IP_HOST \"https://v4.ident.me/\"\n  _p9k_declare -s POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE \"\"\n  _p9k_segment_in_use public_ip || _POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE=\n  _p9k_declare -b POWERLEVEL9K_ALWAYS_SHOW_CONTEXT 0\n  _p9k_declare -b POWERLEVEL9K_ALWAYS_SHOW_USER 0\n  _p9k_declare -e POWERLEVEL9K_CONTEXT_TEMPLATE \"%n@%m\"\n  _p9k_declare -e POWERLEVEL9K_USER_TEMPLATE \"%n\"\n  _p9k_declare -e POWERLEVEL9K_HOST_TEMPLATE \"%m\"\n  _p9k_declare -F POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD 3\n  _p9k_declare -i POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION 2\n  # Other options: \"d h m s\".\n  _p9k_declare -s POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT \"H:M:S\"\n  _p9k_declare -e POWERLEVEL9K_HOME_FOLDER_ABBREVIATION \"~\"\n  _p9k_declare -b POWERLEVEL9K_DIR_PATH_ABSOLUTE 0\n  _p9k_declare -s POWERLEVEL9K_DIR_SHOW_WRITABLE ''\n  case $_POWERLEVEL9K_DIR_SHOW_WRITABLE in\n    true) _POWERLEVEL9K_DIR_SHOW_WRITABLE=1;;\n    v2)   _POWERLEVEL9K_DIR_SHOW_WRITABLE=2;;\n    v3)   _POWERLEVEL9K_DIR_SHOW_WRITABLE=3;;\n    *)    _POWERLEVEL9K_DIR_SHOW_WRITABLE=0;;\n  esac\n  typeset -gi _POWERLEVEL9K_DIR_SHOW_WRITABLE\n  _p9k_declare -b POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER 0\n  _p9k_declare -b POWERLEVEL9K_DIR_HYPERLINK 0\n  _p9k_declare -s POWERLEVEL9K_SHORTEN_STRATEGY \"\"\n  local markers=(\n    .bzr\n    .citc\n    .git\n    .hg\n    .node-version\n    .python-version\n    .ruby-version\n    .shorten_folder_marker\n    .svn\n    .terraform\n    CVS\n    Cargo.toml\n    composer.json\n    go.mod\n    package.json\n  )\n  _p9k_declare -s POWERLEVEL9K_SHORTEN_FOLDER_MARKER \"(${(j:|:)markers})\"\n  # Shorten directory if it's longer than this even if there is space for it.\n  # The value can be either absolute (e.g., '80') or a percentage of terminal\n  # width (e.g, '50%'). If empty, directory will be shortened only when prompt\n  # doesn't fit. Applies only when POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique.\n  _p9k_declare -s POWERLEVEL9K_DIR_MAX_LENGTH 0\n  # Individual elements are patterns. They are expanded with the options set\n  # by `emulate zsh && setopt extended_glob`.\n  _p9k_declare -a POWERLEVEL9K_DIR_PACKAGE_FILES -- package.json composer.json\n  # When dir is on the last prompt line, try to shorten it enough to leave at least this many\n  # columns for typing commands. Applies only when POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique.\n  _p9k_declare -i POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS 40\n  # When dir is on the last prompt line, try to shorten it enough to leave at least\n  # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. Applies\n  # only when POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique.\n  _p9k_declare -F POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT 50\n  # POWERLEVEL9K_DIR_CLASSES allow you to specify custom styling and icons for different\n  # directories.\n  #\n  # POWERLEVEL9K_DIR_CLASSES must be an array with 3 * N elements. Each triplet consists of:\n  #\n  #   1. A pattern against which the current directory is matched. Matching is done with\n  #      extended_glob option enabled.\n  #   2. Directory class for the purpose of styling.\n  #   3. Icon.\n  #\n  # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there are no\n  # matches, there will be no icon and the styling is done according to POWERLEVEL9K_DIR_BACKGROUND,\n  # POWERLEVEL9K_DIR_FOREGROUND, etc.\n  #\n  # Example:\n  #\n  #   POWERLEVEL9K_DIR_CLASSES=(\n  #       '~/work(/*)#'  WORK     '(╯°□°）╯︵ ┻━┻'\n  #       '~(/*)#'       HOME     '⌂'\n  #       '*'            DEFAULT  '')\n  #\n  #   POWERLEVEL9K_DIR_WORK_BACKGROUND=red\n  #   POWERLEVEL9K_DIR_HOME_BACKGROUND=blue\n  #   POWERLEVEL9K_DIR_DEFAULT_BACKGROUND=yellow\n  #\n  # With these settings, the current directory in the prompt may look like this:\n  #\n  #   (╯°□°）╯︵ ┻━┻ ~/work/projects/important/urgent\n  #\n  #   ⌂ ~/best/powerlevel10k\n  _p9k_declare -a POWERLEVEL9K_DIR_CLASSES\n  _p9k_declare -i POWERLEVEL9K_SHORTEN_DELIMITER_LENGTH\n  _p9k_declare -e POWERLEVEL9K_SHORTEN_DELIMITER\n  _p9k_declare -s POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER ''\n  case $_POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER in\n    first|last) _POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER+=:0;;\n    (first|last):(|-)<->);;\n    *)     _POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=;;\n  esac\n  [[ -z $_POWERLEVEL9K_SHORTEN_FOLDER_MARKER ]] && _POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=\n  _p9k_declare -i POWERLEVEL9K_SHORTEN_DIR_LENGTH\n  _p9k_declare -s POWERLEVEL9K_IP_INTERFACE \"\"\n  : ${_POWERLEVEL9K_IP_INTERFACE:='.*'}\n  _p9k_segment_in_use ip || _POWERLEVEL9K_IP_INTERFACE=\n  _p9k_declare -s POWERLEVEL9K_VPN_IP_INTERFACE \"(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)\"\n  : ${_POWERLEVEL9K_VPN_IP_INTERFACE:='.*'}\n  _p9k_segment_in_use vpn_ip || _POWERLEVEL9K_VPN_IP_INTERFACE=\n  _p9k_declare -b POWERLEVEL9K_VPN_IP_SHOW_ALL 0\n  _p9k_declare -i POWERLEVEL9K_LOAD_WHICH 5\n  case $_POWERLEVEL9K_LOAD_WHICH in\n    1) _POWERLEVEL9K_LOAD_WHICH=1;;\n    15) _POWERLEVEL9K_LOAD_WHICH=3;;\n    *) _POWERLEVEL9K_LOAD_WHICH=2;;\n  esac\n  _p9k_declare -F POWERLEVEL9K_LOAD_WARNING_PCT 50\n  _p9k_declare -F POWERLEVEL9K_LOAD_CRITICAL_PCT 70\n  _p9k_declare -b POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY 0\n  _p9k_declare -b POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY 0\n  _p9k_declare -b POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY 1\n  _p9k_declare -b POWERLEVEL9K_GO_VERSION_PROJECT_ONLY 1\n  _p9k_declare -b POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY 1\n  _p9k_declare -b POWERLEVEL9K_PERLBREW_PROJECT_ONLY 1\n  _p9k_declare -b POWERLEVEL9K_PERLBREW_SHOW_PREFIX 0\n  _p9k_declare -b POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY 0\n  _p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_RBENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_SCALAENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_SCALAENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_PHPENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_PHPENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_LUAENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_LUAENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_JENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_JENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_PLENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_PLENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -b POWERLEVEL9K_PYENV_SHOW_SYSTEM 1\n  _p9k_declare -a POWERLEVEL9K_PYENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -a POWERLEVEL9K_GOENV_SOURCES -- shell local global\n  _p9k_declare -b POWERLEVEL9K_GOENV_SHOW_SYSTEM 1\n  _p9k_declare -b POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW 0\n  _p9k_declare -b POWERLEVEL9K_ASDF_SHOW_SYSTEM 1\n  _p9k_declare -a POWERLEVEL9K_ASDF_SOURCES -- shell local global\n  local var\n  for var in ${parameters[(I)POWERLEVEL9K_ASDF_*_PROMPT_ALWAYS_SHOW]}; do\n    _p9k_declare -b $var $_POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW\n  done\n  for var in ${parameters[(I)POWERLEVEL9K_ASDF_*_SHOW_SYSTEM]}; do\n    _p9k_declare -b $var $_POWERLEVEL9K_ASDF_SHOW_SYSTEM\n  done\n  for var in ${parameters[(I)POWERLEVEL9K_ASDF_*_SOURCES]}; do\n    _p9k_declare -a $var -- $_POWERLEVEL9K_ASDF_SOURCES\n  done\n  _p9k_declare -b POWERLEVEL9K_HASKELL_STACK_PROMPT_ALWAYS_SHOW 1\n  _p9k_declare -a POWERLEVEL9K_HASKELL_STACK_SOURCES -- shell local\n  _p9k_declare -b POWERLEVEL9K_RVM_SHOW_GEMSET 0\n  _p9k_declare -b POWERLEVEL9K_RVM_SHOW_PREFIX 0\n  _p9k_declare -b POWERLEVEL9K_CHRUBY_SHOW_VERSION 1\n  _p9k_declare -b POWERLEVEL9K_CHRUBY_SHOW_ENGINE 1\n  _p9k_declare -s POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN\n  if (( _POWERLEVEL9K_CHRUBY_SHOW_ENGINE )); then\n    : ${_POWERLEVEL9K_CHRUBY_SHOW_ENGINE_PATTERN=*}\n  fi\n  _p9k_declare -b POWERLEVEL9K_STATUS_CROSS 0\n  _p9k_declare -b POWERLEVEL9K_STATUS_OK 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_OK_PIPE 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_ERROR 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_ERROR_PIPE 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_ERROR_SIGNAL 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_SHOW_PIPESTATUS 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_HIDE_SIGNAME 0\n  _p9k_declare -b POWERLEVEL9K_STATUS_VERBOSE_SIGNAME 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_EXTENDED_STATES 0\n  _p9k_declare -b POWERLEVEL9K_STATUS_VERBOSE 1\n  _p9k_declare -b POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE 0\n  _p9k_declare -e POWERLEVEL9K_DATE_FORMAT \"%D{%d.%m.%y}\"\n  _p9k_declare -s POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND 1\n  _p9k_declare -b POWERLEVEL9K_SHOW_CHANGESET 0\n  _p9k_declare -e POWERLEVEL9K_VCS_LOADING_TEXT loading\n  _p9k_declare -a POWERLEVEL9K_VCS_GIT_HOOKS -- vcs-detect-changes git-untracked git-aheadbehind git-stash git-remotebranch git-tagname\n  _p9k_declare -a POWERLEVEL9K_VCS_HG_HOOKS -- vcs-detect-changes\n  _p9k_declare -a POWERLEVEL9K_VCS_SVN_HOOKS -- vcs-detect-changes svn-detect-changes\n  # If it takes longer than this to fetch git repo status, display the prompt with a greyed out\n  # vcs segment and fix it asynchronously when the results come it.\n  _p9k_declare -F POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS 0.01\n  (( POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS >= 0 )) || (( POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS = 0 ))\n  _p9k_declare -a POWERLEVEL9K_VCS_BACKENDS -- git\n  (( $+commands[git] )) || _POWERLEVEL9K_VCS_BACKENDS=(${_POWERLEVEL9K_VCS_BACKENDS:#git})\n  _p9k_declare -b POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING 0\n  _p9k_declare -i POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY -1\n  _p9k_declare -i POWERLEVEL9K_VCS_STAGED_MAX_NUM 1\n  _p9k_declare -i POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM 1\n  _p9k_declare -i POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM 1\n  _p9k_declare -i POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM 1\n  _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM -1\n  _p9k_declare -i POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM -1\n  _p9k_declare -b POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS 0\n  _p9k_declare -F POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC 10\n  _p9k_declare -b POWERLEVEL9K_DISABLE_GITSTATUS 0\n  _p9k_declare -e POWERLEVEL9K_VI_INSERT_MODE_STRING \"INSERT\"\n  _p9k_declare -e POWERLEVEL9K_VI_COMMAND_MODE_STRING \"NORMAL\"\n  # VISUAL mode is shown as NORMAL unless POWERLEVEL9K_VI_VISUAL_MODE_STRING is explicitly set.\n  _p9k_declare -e POWERLEVEL9K_VI_VISUAL_MODE_STRING\n  # OVERWRITE mode is shown as INSERT unless POWERLEVEL9K_VI_OVERWRITE_MODE_STRING is explicitly set.\n  _p9k_declare -e POWERLEVEL9K_VI_OVERWRITE_MODE_STRING\n  _p9k_declare -s POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV true\n  _p9k_declare -b POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION 1\n  _p9k_declare -e POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER \"(\"\n  _p9k_declare -e POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER \")\"\n  _p9k_declare -a POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES -- virtualenv venv .venv env\n  _POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES=\"${(j.|.)_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES}\"\n  _p9k_declare -b POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION 1\n  _p9k_declare -e POWERLEVEL9K_NODEENV_LEFT_DELIMITER \"[\"\n  _p9k_declare -e POWERLEVEL9K_NODEENV_RIGHT_DELIMITER \"]\"\n  _p9k_declare -b POWERLEVEL9K_KUBECONTEXT_SHOW_DEFAULT_NAMESPACE 1\n  _p9k_declare -a POWERLEVEL9K_KUBECONTEXT_SHORTEN --\n  # Defines context classes for the purpose of applying different styling to different contexts.\n  #\n  # POWERLEVEL9K_KUBECONTEXT_CLASSES must be an array with even number of elements. The first\n  # element in each pair defines a pattern against which the current context (in the format it is\n  # displayed in the prompt) gets matched. The second element defines context class. Patterns are\n  # tried in order. The first match wins.\n  #\n  # If a non-empty class <C> is assigned to a context, the segment is styled with\n  # POWERLEVEL9K_KUBECONTEXT_<U>_BACKGROUND and POWERLEVEL9K_KUBECONTEXT_<U>_FOREGROUND where <U> is\n  # uppercased <C>. Otherwise with POWERLEVEL9K_KUBECONTEXT_BACKGROUND and\n  # POWERLEVEL9K_KUBECONTEXT_FOREGROUND.\n  #\n  # Example: Use red background for contexts containing \"prod\", green for \"testing\" and yellow for\n  # everything else.\n  #\n  #   POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n  #       '*prod*'    prod\n  #       '*testing*' testing\n  #       '*'         other)\n  #\n  #   POWERLEVEL9K_KUBECONTEXT_PROD_BACKGROUND=red\n  #   POWERLEVEL9K_KUBECONTEXT_TESTING_BACKGROUND=green\n  #   POWERLEVEL9K_KUBECONTEXT_OTHER_BACKGROUND=yellow\n  _p9k_declare -a POWERLEVEL9K_KUBECONTEXT_CLASSES --\n  _p9k_declare -a POWERLEVEL9K_AWS_CLASSES --\n  _p9k_declare -a POWERLEVEL9K_AZURE_CLASSES --\n  _p9k_declare -a POWERLEVEL9K_TERRAFORM_CLASSES --\n  _p9k_declare -b POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT 0\n  _p9k_declare -a POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES -- 'service_account:*' SERVICE_ACCOUNT\n  # Specifies the format of java version.\n  #\n  #   POWERLEVEL9K_JAVA_VERSION_FULL=true  => 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03\n  #   POWERLEVEL9K_JAVA_VERSION_FULL=false => 1.8.0_212\n  #\n  # These correspond to `java -fullversion` and `java -version` respectively.\n  _p9k_declare -b POWERLEVEL9K_JAVA_VERSION_FULL 1\n  _p9k_declare -b POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE 0\n\n  # Format for the current time: 09:51:02. See `man 3 strftime`.\n  _p9k_declare -e POWERLEVEL9K_TIME_FORMAT \"%D{%H:%M:%S}\"\n  # If set to true, time will update when you hit enter. This way prompts for the past\n  # commands will contain the start times of their commands as opposed to the default\n  # behavior where they contain the end times of their preceding commands.\n  _p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0\n  # If set to true, time will update every\n  # POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC seconds.\n  _p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0\n  _p9k_declare -F POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC 1\n  if (( _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC <= 0 )); then\n    _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC=1\n  fi\n\n  _p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0\n  typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}'\n  if (( _POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH )); then\n    _p9k_nix_shell_cond+='${path[(r)/nix/store/*]}'\n  fi\n\n  local -i i=1\n  while (( i <= $#_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS )); do\n    local segment=${${(U)_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[i]}//İ/I}\n    local var=POWERLEVEL9K_${segment}_LEFT_DISABLED\n    (( $+parameters[$var] )) || var=POWERLEVEL9K_${segment}_DISABLED\n    if [[ ${(P)var} == true ]]; then\n      _POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[i,i]=()\n    else\n      (( ++i ))\n    fi\n  done\n\n  local -i i=1\n  while (( i <= $#_POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS )); do\n    local segment=${${(U)_POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[i]}//İ/I}\n    local var=POWERLEVEL9K_${segment}_RIGHT_DISABLED\n    (( $+parameters[$var] )) || var=POWERLEVEL9K_${segment}_DISABLED\n    if [[ ${(P)var} == true ]]; then\n      _POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[i,i]=()\n    else\n      (( ++i ))\n    fi\n  done\n\n  local var\n  for var in ${(@)${parameters[(I)POWERLEVEL9K_*]}/(#m)*/${(M)${parameters[_$MATCH]-$MATCH}:#$MATCH}}; do\n    case $parameters[$var] in\n      (scalar|integer|float)*) typeset -g _$var=${(P)var};;\n      array*)                  eval 'typeset -ga '_$var'=(\"${'$var'[@]}\")';;\n    esac\n  done\n}\n\nfunction _p9k_on_widget_zle-keymap-select() { _p9k_check_visual_mode; __p9k_reset_state=2; }\nfunction _p9k_on_widget_overwrite-mode()    { _p9k_check_visual_mode; __p9k_reset_state=2; }\nfunction _p9k_on_widget_vi-replace()        { _p9k_check_visual_mode; __p9k_reset_state=2; }\n\nif [[ $ZSH_VERSION == (5.<3->*|<6->.*) ]]; then\n  function _p9k_check_visual_mode() {\n    [[ ${KEYMAP:-} == vicmd ]] || return 0\n    local region=${${REGION_ACTIVE:-0}/2/1}\n    [[ $region != $_p9k__region_active ]] || return 0\n    _p9k__region_active=$region\n    __p9k_reset_state=2\n  }\nelse\n  function _p9k_check_visual_mode() {}\nfi\n\nfunction _p9k_on_widget_visual-mode()       { _p9k_check_visual_mode; }\nfunction _p9k_on_widget_visual-line-mode()  { _p9k_check_visual_mode; }\nfunction _p9k_on_widget_deactivate-region() { _p9k_check_visual_mode; }\n\nfunction _p9k_on_widget_zle-line-init() {\n  (( _p9k__cursor_hidden )) || return 0\n  _p9k__cursor_hidden=0\n  print -rn -- $_p9k__cnorm\n}\n\nfunction _p9k_on_widget_zle-line-finish() {\n  (( $+_p9k__line_finished )) && return\n\n  local P9K_PROMPT=transient\n\n  _p9k__line_finished=\n  (( _p9k_reset_on_line_finish )) && __p9k_reset_state=2\n  (( $+functions[p10k-on-post-prompt] )) && p10k-on-post-prompt\n\n  local -i optimized\n\n  if [[ -n $_p9k_transient_prompt ]]; then\n    if [[ $_POWERLEVEL9K_TRANSIENT_PROMPT == always || $_p9k__cwd == $_p9k__last_prompt_pwd ]]; then\n      optimized=1\n      __p9k_reset_state=2\n    else\n      _p9k__last_prompt_pwd=$_p9k__cwd\n    fi\n  fi\n\n  if [[ $1 == int ]]; then\n    _p9k__must_restore_prompt=1\n    if (( !_p9k__restore_prompt_fd )); then\n      sysopen -o cloexec -ru _p9k__restore_prompt_fd /dev/null\n      zle -F $_p9k__restore_prompt_fd _p9k_restore_prompt\n    fi\n  fi\n\n  if (( __p9k_reset_state == 2 )); then\n    if (( optimized )); then\n      RPROMPT= PROMPT=$_p9k_transient_prompt _p9k_reset_prompt\n    else\n      _p9k_reset_prompt\n    fi\n  fi\n\n  _p9k__line_finished='%{%}'\n}\n\nfunction _p9k_on_widget_send-break() {\n  _p9k_on_widget_zle-line-finish int\n}\n\n# Usage example: _p9k_display_segment 58 _p9k__1rkubecontext hide\nfunction _p9k_display_segment() {\n  [[ $_p9k__display_v[$1] == $3 ]] && return\n  _p9k__display_v[$1]=$3\n  [[ $3 == hide ]] && typeset -g $2= || unset $2\n  __p9k_reset_state=2\n}\n\nfunction _p9k_redraw() {\n  zle -F $1\n  exec {1}>&-\n  _p9k__redraw_fd=0\n\n  () {\n    local -h WIDGET=zle-line-pre-redraw\n    _p9k_widget_hook ''\n  }\n}\n\nfunction _p9k_deschedule_redraw() {\n  (( _p9k__redraw_fd )) || return\n  zle -F $_p9k__redraw_fd\n  exec {_p9k__redraw_fd}>&-\n  _p9k__redraw_fd=0\n}\n\nfunction _p9k_widget_hook() {\n  _p9k_deschedule_redraw\n\n  if (( ${+functions[p10k-on-post-widget]} || ${#_p9k_show_on_command} )); then\n    local -a P9K_COMMANDS\n    if [[ \"$_p9k__last_buffer\" == \"$PREBUFFER$BUFFER\" ]]; then\n      P9K_COMMANDS=(${_p9k__last_commands[@]})\n    else\n      _p9k__last_buffer=\"$PREBUFFER$BUFFER\"\n      if [[ -n \"$_p9k__last_buffer\" ]]; then\n        # this must run with user options\n        _p9k_parse_buffer \"$_p9k__last_buffer\" $_POWERLEVEL9K_COMMANDS_MAX_TOKEN_COUNT\n      fi\n      _p9k__last_commands=(${P9K_COMMANDS[@]})\n    fi\n  fi\n\n  eval \"$__p9k_intro\"\n  (( _p9k__restore_prompt_fd )) && _p9k_restore_prompt $_p9k__restore_prompt_fd\n  if [[ $1 == (clear-screen|z4h-clear-screen-*-top) ]]; then\n    P9K_TTY=new\n    _p9k__expanded=0\n    _p9k_reset_prompt\n  fi\n  __p9k_reset_state=1\n  _p9k_check_visual_mode\n  local pat idx var\n  for pat idx var in $_p9k_show_on_command; do\n    if (( $P9K_COMMANDS[(I)$pat] )); then\n      _p9k_display_segment $idx $var show\n    else\n      _p9k_display_segment $idx $var hide\n    fi\n  done\n  (( $+functions[p10k-on-post-widget] )) && p10k-on-post-widget \"${@:2}\"\n  (( $+functions[_p9k_on_widget_$1] )) && _p9k_on_widget_$1\n  (( __p9k_reset_state == 2 )) && _p9k_reset_prompt\n  __p9k_reset_state=0\n}\n\nfunction _p9k_widget() {\n  local f=${widgets[._p9k_orig_$1]:-}\n  local -i res\n  [[ -z $f ]] || {\n    [[ $f == user:-z4h-* ]] && {\n      \"${f#user:}\" \"${@:2}\"\n      res=$?\n    } || {\n      zle ._p9k_orig_$1 -- \"${@:2}\"\n      res=$?\n    }\n  }\n  (( ! __p9k_enabled )) || [[ $CONTEXT != start ]] || _p9k_widget_hook \"$@\"\n  return res\n}\n\nfunction _p9k_widget_zle-line-pre-redraw-impl() {\n  (( __p9k_enabled )) && [[ $CONTEXT == start ]] || return 0\n  ! (( ${+functions[p10k-on-post-widget]} || ${#_p9k_show_on_command} || _p9k__restore_prompt_fd || _p9k__redraw_fd )) &&\n      [[ ${KEYMAP:-} != vicmd ]] &&\n      return\n  (( PENDING || KEYS_QUEUED_COUNT )) && {\n    (( _p9k__redraw_fd )) || {\n      sysopen -o cloexec -ru _p9k__redraw_fd /dev/null\n      zle -F $_p9k__redraw_fd _p9k_redraw\n    }\n    return\n  }\n  _p9k_widget_hook zle-line-pre-redraw\n}\n\nfunction _p9k_widget_send-break() {\n  (( ! __p9k_enabled )) || [[ $CONTEXT != start ]] || {\n    _p9k_widget_hook send-break \"$@\"\n  }\n  local f=${widgets[._p9k_orig_send-break]:-}\n  [[ -z $f ]] || zle ._p9k_orig_send-break -- \"$@\"\n}\n\ntypeset -gi __p9k_widgets_wrapped=0\n\nfunction _p9k_wrap_widgets() {\n  (( __p9k_widgets_wrapped )) && return\n\n  typeset -gir __p9k_widgets_wrapped=1\n  local -a widget_list\n  if [[ $ZSH_VERSION == (5.<3->*|<6->.*) ]]; then\n    local -aU widget_list=(\n      zle-line-pre-redraw\n      zle-line-init\n      zle-line-finish\n      zle-keymap-select\n      overwrite-mode\n      vi-replace\n      visual-mode\n      visual-line-mode\n      deactivate-region\n      clear-screen\n      z4h-clear-screen-soft-top\n      z4h-clear-screen-hard-top\n      send-break\n      $_POWERLEVEL9K_HOOK_WIDGETS\n    )\n  else\n    # There is no zle-line-pre-redraw in zsh < 5.3, so we have to wrap all widgets\n    # with key bindings. This costs extra 3ms: 1.5ms to fetch the list of widgets and\n    # another 1.5ms to wrap them.\n    if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n      local tmpdir=$TMPDIR\n    else\n      local tmpdir=/tmp\n    fi\n    local keymap tmp=$tmpdir/p10k.bindings.$sysparams[pid]\n    {\n      for keymap in $keymaps; do bindkey -M $keymap; done >$tmp\n      local -aU widget_list=(\n        zle-isearch-exit\n        zle-isearch-update\n        zle-line-init\n        zle-line-finish\n        zle-history-line-set\n        zle-keymap-select\n        send-break\n        $_POWERLEVEL9K_HOOK_WIDGETS\n        ${${${(f)\"$(<$tmp)\"}##* }:#(*\\\"|.*)}\n      )\n    } always {\n      zf_rm -f -- $tmp\n    }\n  fi\n\n  local widget\n  for widget in $widget_list; do\n    if (( ! $+functions[_p9k_widget_$widget] )); then\n      functions[_p9k_widget_$widget]='_p9k_widget '${(q)widget}' \"$@\"'\n    fi\n    if [[ $widget == zle-* &&\n          $widgets[$widget] == user:azhw:* &&\n          $functions[add-zle-hook-widget] ]]; then\n      add-zle-hook-widget $widget _p9k_widget_$widget\n    else\n      # The leading dot is to work around bugs in zsh-syntax-highlighting.\n      zle -A $widget ._p9k_orig_$widget\n      zle -N $widget _p9k_widget_$widget\n    fi\n  done 2>/dev/null  # `zle -A` fails for inexisting widgets and complains to stderr\n\n  case ${widgets[._p9k_orig_zle-line-pre-redraw]:-} in\n    user:-z4h-zle-line-pre-redraw)\n      function _p9k_widget_zle-line-pre-redraw() {\n        -z4h-zle-line-pre-redraw \"$@\"\n        _p9k_widget_zle-line-pre-redraw-impl\n      }\n    ;;\n    ?*)\n      function _p9k_widget_zle-line-pre-redraw() {\n        zle ._p9k_orig_zle-line-pre-redraw -- \"$@\"\n        local -i res=$?\n        _p9k_widget_zle-line-pre-redraw-impl\n        return res\n      }\n    ;;\n    '')\n      function _p9k_widget_zle-line-pre-redraw() {\n        _p9k_widget_zle-line-pre-redraw-impl\n      }\n    ;;\n  esac\n}\n\nfunction _p9k_restore_prompt() {\n  eval \"$__p9k_intro\"\n  zle -F $1\n  exec {1}>&-\n  _p9k__restore_prompt_fd=0\n\n  (( _p9k__must_restore_prompt )) || return 0\n  _p9k__must_restore_prompt=0\n\n  unset _p9k__line_finished\n  _p9k__refresh_reason=restore\n  _p9k_set_prompt\n  _p9k__refresh_reason=\n\n  _p9k__expanded=0\n  _p9k_reset_prompt\n}\n\nprompt__p9k_internal_nothing() { _p9k__prompt+='${_p9k__sss::=}'; }\ninstant_prompt__p9k_internal_nothing() { prompt__p9k_internal_nothing; }\n\n# _p9k_build_gap_post line_number\n_p9k_build_gap_post() {\n  if [[ $1 == 1 ]]; then\n    local kind_l=first kind_u=FIRST\n  else\n    local kind_l=newline kind_u=NEWLINE\n  fi\n  _p9k_get_icon '' MULTILINE_${kind_u}_PROMPT_GAP_CHAR\n  local char=${_p9k__ret:- }\n  _p9k_prompt_length $char\n  if (( _p9k__ret != 1 || $#char != 1 )); then\n    >&2 print -rP -- \"%F{red}WARNING!%f %BMULTILINE_${kind_u}_PROMPT_GAP_CHAR%b is not one character long. Will use ' '.\"\n    >&2 print -rP -- \"Either change the value of %BPOWERLEVEL9K_MULTILINE_${kind_u}_PROMPT_GAP_CHAR%b or remove it.\"\n    char=' '\n  fi\n  local style\n  _p9k_color prompt_multiline_${kind_l}_prompt_gap BACKGROUND \"\"\n  [[ -n $_p9k__ret ]] && _p9k_background $_p9k__ret\n  style+=$_p9k__ret\n  _p9k_color prompt_multiline_${kind_l}_prompt_gap FOREGROUND \"\"\n  [[ -n $_p9k__ret ]] && _p9k_foreground $_p9k__ret\n  style+=$_p9k__ret\n  _p9k_escape_style $style\n  style=$_p9k__ret\n  local exp=_POWERLEVEL9K_MULTILINE_${kind_u}_PROMPT_GAP_EXPANSION\n  (( $+parameters[$exp] )) && exp=${(P)exp} || exp='${P9K_GAP}'\n  [[ $char == '.' ]] && local s=',' || local s='.'\n  _p9k__ret=$'${${_p9k__g+\\n}:-'$style'${${${_p9k__m:#-*}:+'\n  _p9k__ret+='${${_p9k__'$1'g+${(pl.$((_p9k__m+1)).. .)}}:-'\n  if [[ $exp == '${P9K_GAP}' ]]; then\n    _p9k__ret+='${(pl'$s'$((_p9k__m+1))'$s$s$char$s')}'\n  else\n    _p9k__ret+='${${P9K_GAP::=${(pl'$s'$((_p9k__m+1))'$s$s$char$s')}}+}'\n    _p9k__ret+='${:-\"'$exp'\"}'\n    style=1\n  fi\n  _p9k__ret+='}'\n  if (( __p9k_ksh_arrays )); then\n    _p9k__ret+=$'$_p9k__rprompt${_p9k_t[$((!_p9k__ind))]}}:-\\n}'\n  else\n    _p9k__ret+=$'$_p9k__rprompt${_p9k_t[$((1+!_p9k__ind))]}}:-\\n}'\n  fi\n  [[ -n $style ]] && _p9k__ret+='%b%k%f'\n  _p9k__ret+='}'\n}\n\n_p9k_init_lines() {\n  local -a left_segments=($_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS)\n  local -a right_segments=($_POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS)\n\n  if (( _POWERLEVEL9K_PROMPT_ON_NEWLINE )); then\n    left_segments+=(newline _p9k_internal_nothing)\n  fi\n\n  local -i num_left_lines=$((1 + ${#${(@M)left_segments:#newline}}))\n  local -i num_right_lines=$((1 + ${#${(@M)right_segments:#newline}}))\n  if (( num_right_lines > num_left_lines )); then\n    repeat $((num_right_lines - num_left_lines)) left_segments=(newline $left_segments)\n    local -i num_lines=num_right_lines\n  else\n    if (( _POWERLEVEL9K_RPROMPT_ON_NEWLINE )); then\n      repeat $((num_left_lines - num_right_lines)) right_segments=(newline $right_segments)\n    else\n      repeat $((num_left_lines - num_right_lines)) right_segments+=newline\n    fi\n    local -i num_lines=num_left_lines\n  fi\n\n  local -i i\n  for i in {1..$num_lines}; do\n    local -i left_end=${left_segments[(i)newline]}\n    local -i right_end=${right_segments[(i)newline]}\n    _p9k_line_segments_left+=\"${(pj:\\0:)left_segments[1,left_end-1]}\"\n    _p9k_line_segments_right+=\"${(pj:\\0:)right_segments[1,right_end-1]}\"\n    (( left_end > $#left_segments )) && left_segments=() || shift left_end left_segments\n    (( right_end > $#right_segments )) && right_segments=() || shift right_end right_segments\n\n    _p9k_get_icon '' LEFT_SEGMENT_SEPARATOR\n    _p9k_get_icon 'prompt_empty_line' LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL $_p9k__ret\n    _p9k_escape $_p9k__ret\n    _p9k_line_prefix_left+='${_p9k__'$i'l-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=%f'$_p9k__ret'}}+}'\n    _p9k_line_suffix_left+='%b%k$_p9k__sss%b%k%f'\n\n    _p9k_escape ${(g::)_POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL}\n    [[ -n $_p9k__ret ]] && _p9k_line_never_empty_right+=1 || _p9k_line_never_empty_right+=0\n    _p9k_line_prefix_right+='${_p9k__'$i'r-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::='$_p9k__ret'}}+}'\n    _p9k_line_suffix_right+='$_p9k__sss%b%k%f}'  # gets overridden for _p9k_emulate_zero_rprompt_indent\n    if (( i == num_lines )); then\n      # it's safe to use _p9k_prompt_length on the last line because it cannot have prompt connection\n      _p9k_prompt_length ${(e)_p9k__ret}\n      (( _p9k__ret )) || _p9k_line_never_empty_right[-1]=0\n    fi\n  done\n\n  _p9k_get_icon '' LEFT_SEGMENT_END_SEPARATOR\n  if [[ -n $_p9k__ret ]]; then\n    _p9k__ret+=%b%k%f\n    # Not escaped for historical reasons.\n    _p9k__ret='${:-\"'$_p9k__ret'\"}'\n    if (( _POWERLEVEL9K_PROMPT_ON_NEWLINE )); then\n      _p9k_line_suffix_left[-2]+=$_p9k__ret\n    else\n      _p9k_line_suffix_left[-1]+=$_p9k__ret\n    fi\n  fi\n\n  for i in {1..$num_lines}; do _p9k_line_suffix_left[i]+='}'; done\n\n  if (( num_lines > 1 )); then\n    for i in {1..$((num_lines-1))}; do\n      _p9k_build_gap_post $i\n      _p9k_line_gap_post+=$_p9k__ret\n    done\n\n    if [[ $+_POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX == 1 || $_POWERLEVEL9K_PROMPT_ON_NEWLINE == 1 ]]; then\n      _p9k_get_icon '' MULTILINE_FIRST_PROMPT_PREFIX\n      if [[ -n $_p9k__ret ]]; then\n        [[ _p9k__ret == *%* ]] && _p9k__ret+=%b%k%f\n        # Not escaped for historical reasons.\n        _p9k__ret='${_p9k__1l_frame-\"'$_p9k__ret'\"}'\n        _p9k_line_prefix_left[1]=$_p9k__ret$_p9k_line_prefix_left[1]\n      fi\n    fi\n\n    if [[ $+_POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX == 1 || $_POWERLEVEL9K_PROMPT_ON_NEWLINE == 1 ]]; then\n      _p9k_get_icon '' MULTILINE_LAST_PROMPT_PREFIX\n      if [[ -n $_p9k__ret ]]; then\n        [[ _p9k__ret == *%* ]] && _p9k__ret+=%b%k%f\n        # Not escaped for historical reasons.\n        _p9k__ret='${_p9k__'$num_lines'l_frame-\"'$_p9k__ret'\"}'\n        _p9k_line_prefix_left[-1]=$_p9k__ret$_p9k_line_prefix_left[-1]\n      fi\n    fi\n\n    _p9k_get_icon '' MULTILINE_FIRST_PROMPT_SUFFIX\n    if [[ -n $_p9k__ret ]]; then\n      [[ _p9k__ret == *%* ]] && _p9k__ret+=%b%k%f\n      _p9k_line_suffix_right[1]+='${_p9k__1r_frame-'${(qqq)_p9k__ret}'}'\n      _p9k_line_never_empty_right[1]=1\n    fi\n\n    _p9k_get_icon '' MULTILINE_LAST_PROMPT_SUFFIX\n    if [[ -n $_p9k__ret ]]; then\n      [[ _p9k__ret == *%* ]] && _p9k__ret+=%b%k%f\n      _p9k_line_suffix_right[-1]+='${_p9k__'$num_lines'r_frame-'${(qqq)_p9k__ret}'}'\n      # it's safe to use _p9k_prompt_length on the last line because it cannot have prompt connection\n      _p9k_prompt_length $_p9k__ret\n      (( _p9k__ret )) && _p9k_line_never_empty_right[-1]=1\n    fi\n\n    if (( num_lines > 2 )); then\n      if [[ $+_POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX == 1 || $_POWERLEVEL9K_PROMPT_ON_NEWLINE == 1 ]]; then\n        _p9k_get_icon '' MULTILINE_NEWLINE_PROMPT_PREFIX\n        if [[ -n $_p9k__ret ]]; then\n          [[ _p9k__ret == *%* ]] && _p9k__ret+=%b%k%f\n          for i in {2..$((num_lines-1))}; do\n            # Not escaped for historical reasons.\n            _p9k_line_prefix_left[i]='${_p9k__'$i'l_frame-\"'$_p9k__ret'\"}'$_p9k_line_prefix_left[i]\n          done\n        fi\n      fi\n\n      _p9k_get_icon '' MULTILINE_NEWLINE_PROMPT_SUFFIX\n      if [[ -n $_p9k__ret ]]; then\n        [[ _p9k__ret == *%* ]] && _p9k__ret+=%b%k%f\n        for i in {2..$((num_lines-1))}; do\n          _p9k_line_suffix_right[i]+='${_p9k__'$i'r_frame-'${(qqq)_p9k__ret}'}'\n        done\n        _p9k_line_never_empty_right[2,-2]=${(@)_p9k_line_never_empty_right[2,-2]/0/1}\n      fi\n    fi\n  fi\n}\n\n_p9k_all_params_eq() {\n  local key\n  for key in ${parameters[(I)${~1}]}; do\n    [[ ${(P)key} == $2 ]] || return\n  done\n}\n\n_p9k_init_display() {\n  _p9k_display_k=(empty_line 1 ruler 3)\n  local -i n=3 i\n  local name\n  for i in {1..$#_p9k_line_segments_left}; do\n    local -i j=$((-$#_p9k_line_segments_left+i-1))\n    _p9k_display_k+=(\n      $i              $((n+=2)) $j             $n\n      $i/left_frame   $((n+=2)) $j/left_frame  $n\n      $i/right_frame  $((n+=2)) $j/right_frame $n\n      $i/left         $((n+=2)) $j/left        $n\n      $i/right        $((n+=2)) $j/right       $n\n      $i/gap          $((n+=2)) $j/gap         $n)\n    for name in ${${(@0)_p9k_line_segments_left[i]}%_joined}; do\n      _p9k_display_k+=($i/left/$name $((n+=2)) $j/left/$name $n)\n    done\n    for name in ${${(@0)_p9k_line_segments_right[i]}%_joined}; do\n      _p9k_display_k+=($i/right/$name $((n+=2)) $j/right/$name $n)\n    done\n  done\n}\n\n_p9k_init_prompt() {\n  _p9k_t=($'\\n' $'%{\\n%}' '')\n  _p9k_prompt_overflow_bug && _p9k_t[2]=$'%{%G\\n%}'\n\n  _p9k_init_lines\n\n  _p9k_gap_pre='${${:-${_p9k__x::=0}${_p9k__y::=1024}${_p9k__p::=$_p9k__lprompt$_p9k__rprompt}'\n  repeat 10; do\n    _p9k_gap_pre+='${_p9k__m::=$(((_p9k__x+_p9k__y)/2))}'\n    _p9k_gap_pre+='${_p9k__xy::=${${(%):-$_p9k__p%$_p9k__m(l./$_p9k__m;$_p9k__y./$_p9k__x;$_p9k__m)}##*/}}'\n    _p9k_gap_pre+='${_p9k__x::=${_p9k__xy%;*}}'\n    _p9k_gap_pre+='${_p9k__y::=${_p9k__xy#*;}}'\n  done\n  _p9k_gap_pre+='${_p9k__m::=$((_p9k__clm-_p9k__x-_p9k__ind-1))}'\n  _p9k_gap_pre+='}+}'\n\n  _p9k_prompt_prefix_left='${${_p9k__clm::=$COLUMNS}+}${${COLUMNS::=1024}+}'\n  _p9k_prompt_prefix_right='${_p9k__'$#_p9k_line_segments_left'-${${_p9k__clm::=$COLUMNS}+}${${COLUMNS::=1024}+}'\n  _p9k_prompt_suffix_left='${${COLUMNS::=$_p9k__clm}+}'\n  _p9k_prompt_suffix_right='${${COLUMNS::=$_p9k__clm}+}}'\n\n  if _p9k_segment_in_use vi_mode || _p9k_segment_in_use prompt_char; then\n    _p9k_prompt_prefix_left+='${${_p9k__keymap::=${KEYMAP:-$_p9k__keymap}}+}'\n  fi\n  if { _p9k_segment_in_use vi_mode && (( $+_POWERLEVEL9K_VI_OVERWRITE_MODE_STRING )) } ||\n     { _p9k_segment_in_use prompt_char && (( _POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE )) }; then\n    _p9k_prompt_prefix_left+='${${_p9k__zle_state::=${ZLE_STATE:-$_p9k__zle_state}}+}'\n  fi\n  _p9k_prompt_prefix_left+='%b%k%f'\n\n  # Bug fixed in: https://github.com/zsh-users/zsh/commit/3eea35d0853bddae13fa6f122669935a01618bf9.\n  # If affects most terminals when RPROMPT is non-empty and ZLE_RPROMPT_INDENT is zero.\n  # We can work around it as long as RPROMPT ends with a space.\n  if [[ -n $_p9k_line_segments_right[-1] && $_p9k_line_never_empty_right[-1] == 0 &&\n        $ZLE_RPROMPT_INDENT == 0 ]] &&\n       _p9k_all_params_eq '_POWERLEVEL9K_*WHITESPACE_BETWEEN_RIGHT_SEGMENTS' ' ' &&\n       _p9k_all_params_eq '_POWERLEVEL9K_*RIGHT_RIGHT_WHITESPACE' ' ' &&\n       _p9k_all_params_eq '_POWERLEVEL9K_*RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL' '' &&\n       [[ $ZSH_VERSION != (5.7.<2->*|5.<8->*|<6->.*) ]]; then\n    _p9k_emulate_zero_rprompt_indent=1\n    _p9k_prompt_prefix_left+='${${:-${_p9k__real_zle_rprompt_indent:=$ZLE_RPROMPT_INDENT}${ZLE_RPROMPT_INDENT::=1}${_p9k__ind::=0}}+}'\n    _p9k_line_suffix_right[-1]='${_p9k__sss:+${_p9k__sss% }%E}}'\n  else\n    _p9k_emulate_zero_rprompt_indent=0\n    _p9k_prompt_prefix_left+='${${_p9k__ind::=${${ZLE_RPROMPT_INDENT:-1}/#-*/0}}+}'\n  fi\n\n  if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then\n    _p9k_prompt_prefix_left+=$'%{\\e]133;A\\a%}'\n    _p9k_prompt_suffix_left+=$'%{\\e]133;B\\a%}'\n    if [[ $TERM_PROGRAM == WarpTerminal ]]; then\n      _p9k_prompt_prefix_right=$'%{\\e]133;P;k=r\\a%}'$_p9k_prompt_prefix_right\n      _p9k_prompt_suffix_right+=$'%{\\e]133;B\\a%}'\n    fi\n    if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then\n      _p9k_prompt_prefix_left+=$'%{\\ePtmux;\\e\\e]133;A\\a\\e\\\\%}'\n      _p9k_prompt_suffix_left+=$'%{\\ePtmux;\\e\\e]133;B\\a\\e\\\\%}'\n      if [[ $TERM_PROGRAM == WarpTerminal ]]; then\n        _p9k_prompt_prefix_right=$'%{\\ePtmux;\\e\\e]133;P;k=r\\a\\e\\\\%}'$_p9k_prompt_prefix_right\n        _p9k_prompt_suffix_right+=$'%{\\ePtmux;\\e\\e]133;B\\a\\e\\\\%}'\n      fi\n    fi\n  fi\n\n  if (( _POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT > 0 )); then\n    _p9k_t+=${(pl.$_POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT..\\n.)}\n  else\n    _p9k_t+=''\n  fi\n  _p9k_empty_line_idx=$#_p9k_t\n  if (( __p9k_ksh_arrays )); then\n    _p9k_prompt_prefix_left+='${_p9k_t[${_p9k__empty_line_i:-'$#_p9k_t'}-1]}'\n  else\n    _p9k_prompt_prefix_left+='${_p9k_t[${_p9k__empty_line_i:-'$#_p9k_t'}]}'\n  fi\n\n  local -i num_lines=$#_p9k_line_segments_left\n  if (( $+terminfo[cuu1] )); then\n    _p9k_escape $terminfo[cuu1]\n    if (( __p9k_ksh_arrays )); then\n      local scroll=$'${_p9k_t[${_p9k__ruler_i:-1}-1]:+\\n'$_p9k__ret'}'\n    else\n      local scroll=$'${_p9k_t[${_p9k__ruler_i:-1}]:+\\n'$_p9k__ret'}'\n    fi\n    if (( num_lines > 1 )); then\n      local -i line_index=\n      for line_index in {1..$((num_lines-1))}; do\n        scroll='${_p9k__'$line_index-$'\\n}'$scroll'${_p9k__'$line_index-$_p9k__ret'}'\n      done\n    fi\n    _p9k_prompt_prefix_left+='%{${_p9k__ipe-'$scroll'}%}'\n  fi\n\n  _p9k_get_icon '' RULER_CHAR\n  local ruler_char=$_p9k__ret\n  _p9k_prompt_length $ruler_char\n  (( _p9k__ret == 1 && $#ruler_char == 1 )) || ruler_char=' '\n  _p9k_color prompt_ruler BACKGROUND \"\"\n  if [[ -z $_p9k__ret && $ruler_char == ' ' ]]; then\n    local ruler=$'\\n'\n  else\n    _p9k_background $_p9k__ret\n    local ruler=%b$_p9k__ret\n    _p9k_color prompt_ruler FOREGROUND \"\"\n    _p9k_foreground $_p9k__ret\n    ruler+=$_p9k__ret\n    [[ $ruler_char == '.' ]] && local sep=',' || local sep='.'\n    ruler+='${(pl'$sep'${$((_p9k__clm-_p9k__ind))/#-*/0}'$sep$sep$ruler_char$sep')}%k%f'\n    if (( __p9k_ksh_arrays )); then\n      ruler+='${_p9k_t[$((!_p9k__ind))]}'\n    else\n      ruler+='${_p9k_t[$((1+!_p9k__ind))]}'\n    fi\n  fi\n  _p9k_t+=$ruler\n  _p9k_ruler_idx=$#_p9k_t\n  if (( __p9k_ksh_arrays )); then\n    _p9k_prompt_prefix_left+='${(e)_p9k_t[${_p9k__ruler_i:-'$#_p9k_t'}-1]}'\n  else\n    _p9k_prompt_prefix_left+='${(e)_p9k_t[${_p9k__ruler_i:-'$#_p9k_t'}]}'\n  fi\n\n  ( _p9k_segment_in_use time && (( _POWERLEVEL9K_TIME_UPDATE_ON_COMMAND )) )\n  _p9k_reset_on_line_finish=$((!$?))\n\n  _p9k_t+=$_p9k_gap_pre\n  _p9k_gap_pre='${(e)_p9k_t['$(($#_p9k_t - __p9k_ksh_arrays))']}'\n  _p9k_t+=$_p9k_prompt_prefix_left\n  _p9k_prompt_prefix_left='${(e)_p9k_t['$(($#_p9k_t - __p9k_ksh_arrays))']}'\n}\n\n_p9k_init_ssh() {\n  # The following code is based on Pure:\n  # https://github.com/sindresorhus/pure/blob/e8abf9d37185ec9b7b4398ca9c5eba555a1028eb/pure.zsh.\n  #\n  # License: https://github.com/sindresorhus/pure/blob/e8abf9d37185ec9b7b4398ca9c5eba555a1028eb/license.\n\n  [[ -n $P9K_SSH && $_P9K_SSH_TTY == $TTY ]] && return\n  typeset -gix P9K_SSH=0\n  typeset -gx _P9K_SSH_TTY=$TTY\n  if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then\n    P9K_SSH=1\n    return 0\n  fi\n\n  # When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost.\n  # Attempt detection via `who`.\n  (( $+commands[who] )) || return\n\n  local ipv6='(([0-9a-fA-F]+:)|:){2,}[0-9a-fA-F]+'  # Simplified, only checks partial pattern.\n  local ipv4='([0-9]{1,3}\\.){3}[0-9]+'              # Simplified, allows invalid ranges.\n  # Assume two non-consecutive periods represents a hostname. Matches `x.y.z`, but not `x.y`.\n  local hostname='([.][^. ]+){2}'\n\n  local w\n  w=\"$(who -m 2>/dev/null)\" || w=${(@M)${(f)\"$(who 2>/dev/null)\"}:#*[[:space:]]${TTY#/dev/}[[:space:]]*}\n\n  # Usually the remote address is surrounded by parenthesis but not on all systems (e.g., Busybox).\n  [[ $w =~ \"\\(?($ipv4|$ipv6|$hostname)\\)?\\$\" ]] && P9K_SSH=1\n}\n\n_p9k_init_toolbox() {\n  [[ -z $P9K_TOOLBOX_NAME ]] || return 0\n  if [[ -f /run/.containerenv && -r /run/.containerenv ]]; then\n    local name=(${(Q)${${(@M)${(f)\"$(</run/.containerenv)\"}:#name=*}#name=}})\n    [[ ${#name} -eq 1 && -n ${name[1]} ]] || return 0\n    typeset -g P9K_TOOLBOX_NAME=${name[1]}\n  elif [[ -n $DISTROBOX_ENTER_PATH ]]; then\n    local name=${(%):-%m}\n    # $NAME can be empty, see https://github.com/romkatv/powerlevel10k/pull/1916.\n    if [[ -n $name && $name == $NAME* ]]; then\n      typeset -g P9K_TOOLBOX_NAME=$name\n    fi\n  fi\n}\n\n_p9k_must_init() {\n  (( _POWERLEVEL9K_DISABLE_HOT_RELOAD && !_p9k__force_must_init )) && return 1\n  _p9k__force_must_init=0\n  local IFS sig\n  if [[ -n $_p9k__param_sig ]]; then\n    IFS=$'\\2' sig=\"${(e)_p9k__param_pat}\"\n    [[ $sig == $_p9k__param_sig ]] && return 1\n    _p9k_deinit\n  fi\n  _p9k__param_pat=${(q)P9K_VERSION}$'\\1'${(q)ZSH_VERSION}$'\\1'${(q)ZSH_PATCHLEVEL}$'\\1'\n  _p9k__param_pat+=$__p9k_force_term_shell_integration$'\\1'${(q)TERM_PROGRAM}$'\\1'\n  _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\\1${(%):-%n%#}\\1$GITSTATUS_LOG_LEVEL\\1'\n  _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\\1$GITSTATUS_DAEMON\\1$GITSTATUS_NUM_THREADS\\1'\n  _p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\\1$GITSTATUS_AUTO_INSTALL\\1${ZLE_RPROMPT_INDENT:-1}\\1'\n  _p9k__param_pat+=$'$__p9k_sh_glob\\1$__p9k_ksh_arrays\\1$ITERM_SHELL_INTEGRATION_INSTALLED\\1'\n  _p9k__param_pat+=$'${PROMPT_EOL_MARK-%B%S%#%s%b}\\1$+commands[locale]\\1$langinfo[CODESET]\\1'\n  _p9k__param_pat+=$'${(M)VTE_VERSION:#(<1-4602>|4801)}\\1$DEFAULT_USER\\1$P9K_SSH\\1$+commands[uname]\\1'\n  _p9k__param_pat+=$'$__p9k_root_dir\\1$functions[p10k-on-init]\\1$functions[p10k-on-pre-prompt]\\1'\n  _p9k__param_pat+=$'$functions[p10k-on-post-widget]\\1$functions[p10k-on-post-prompt]\\1'\n  _p9k__param_pat+=$'$+commands[git]\\1$terminfo[colors]\\1${+_z4h_iterm_cmd}\\1'\n  _p9k__param_pat+=$'$_z4h_can_save_restore_screen'\n  local MATCH\n  IFS=$'\\1' _p9k__param_pat+=\"${(@)${(@o)parameters[(I)POWERLEVEL9K_*]}:/(#m)*/\\${${(q)MATCH}-$IFS\\}}\"\n  IFS=$'\\2' _p9k__param_sig=\"${(e)_p9k__param_pat}\"\n}\n\nfunction _p9k_set_os() {\n  _p9k_os=$1\n  _p9k_get_icon prompt_os_icon $2\n  _p9k_os_icon=$_p9k__ret\n}\n\nfunction _p9k_init_cacheable() {\n  _p9k_init_icons\n  _p9k_init_params\n  _p9k_init_prompt\n  _p9k_init_display\n\n  # https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#backward-compatibility\n  if [[ $VTE_VERSION != (<1-4602>|4801) ]]; then\n    _p9k_term_has_href=1\n  fi\n\n  local elem func\n  local -i i=0\n\n  for i in {1..$#_p9k_line_segments_left}; do\n    for elem in ${${${(@0)_p9k_line_segments_left[i]}%_joined}//-/_}; do\n      local var=POWERLEVEL9K_${${(U)elem}//İ/I}_SHOW_ON_COMMAND\n      (( $+parameters[$var] )) || continue\n      _p9k_show_on_command+=(\n        $'(|*[/\\0])('${(j.|.)${(P)var}}')'\n        $((1+_p9k_display_k[$i/left/$elem]))\n        _p9k__${i}l$elem)\n    done\n    for elem in ${${${(@0)_p9k_line_segments_right[i]}%_joined}//-/_}; do\n      local var=POWERLEVEL9K_${${(U)elem}//İ/I}_SHOW_ON_COMMAND\n      (( $+parameters[$var] )) || continue\n      local cmds=(${(P)var})\n      _p9k_show_on_command+=(\n        $'(|*[/\\0])('${(j.|.)${(P)var}}')'\n        $((1+$_p9k_display_k[$i/right/$elem]))\n        _p9k__${i}r$elem)\n    done\n  done\n\n  if [[ $_POWERLEVEL9K_TRANSIENT_PROMPT != off ]]; then\n    local sep=$'\\1'\n    _p9k_transient_prompt='%b%k%s%u%(?'$sep\n    _p9k_color prompt_prompt_char_OK_VIINS FOREGROUND 76\n    _p9k_foreground $_p9k__ret\n    _p9k_transient_prompt+=$_p9k__ret\n    _p9k_transient_prompt+='${${P9K_CONTENT::=\"❯\"}+}'\n    _p9k_param prompt_prompt_char_OK_VIINS CONTENT_EXPANSION '${P9K_CONTENT}'\n    _p9k_transient_prompt+='${:-\"'$_p9k__ret'\"}'\n    _p9k_transient_prompt+=$sep\n    _p9k_color prompt_prompt_char_ERROR_VIINS FOREGROUND 196\n    _p9k_foreground $_p9k__ret\n    _p9k_transient_prompt+=$_p9k__ret\n    _p9k_transient_prompt+='${${P9K_CONTENT::=\"❯\"}+}'\n    _p9k_param prompt_prompt_char_ERROR_VIINS CONTENT_EXPANSION '${P9K_CONTENT}'\n    _p9k_transient_prompt+='${:-\"'$_p9k__ret'\"}'\n    _p9k_transient_prompt+=')%b%k%f%s%u'\n    _p9k_get_icon '' LEFT_SEGMENT_END_SEPARATOR\n    if [[ $_p9k__ret != (| ) ]]; then\n      _p9k__ret+=%b%k%f\n      # Not escaped for historical reasons.\n      _p9k__ret='${:-\"'$_p9k__ret'\"}'\n    fi\n    _p9k_transient_prompt+=$_p9k__ret\n    if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then\n      _p9k_transient_prompt=$'%{\\e]133;A\\a%}'$_p9k_transient_prompt$'%{\\e]133;B\\a%}'\n      if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then\n        _p9k_transient_prompt=$'%{\\ePtmux;\\e\\e]133;A\\a\\e\\\\%}'$_p9k_transient_prompt$'%{\\ePtmux;\\e\\e]133;B\\a\\e\\\\%}'\n      fi\n    fi\n  fi\n\n  _p9k_uname=\"$(uname)\"\n  [[ $_p9k_uname == Linux ]] && _p9k_uname_o=\"$(uname -o 2>/dev/null)\"\n  _p9k_uname_m=\"$(uname -m)\"\n\n  if [[ $_p9k_uname == Linux && $_p9k_uname_o == Android ]]; then\n    _p9k_set_os Android ANDROID_ICON\n  else\n    case $_p9k_uname in\n      SunOS)                     _p9k_set_os Solaris SUNOS_ICON;;\n      Darwin)                    _p9k_set_os OSX     APPLE_ICON;;\n      CYGWIN*|MSYS*|MINGW*)      _p9k_set_os Windows WINDOWS_ICON;;\n      FreeBSD|OpenBSD|DragonFly) _p9k_set_os BSD     FREEBSD_ICON;;\n      Linux)\n        _p9k_os='Linux'\n        local os_release_id\n        if [[ -r /etc/os-release ]]; then\n          local lines=(${(f)\"$(</etc/os-release)\"})\n          lines=(${(@M)lines:#ID=*})\n          (( $#lines == 1 )) && os_release_id=${(Q)${lines[1]#ID=}}\n        elif [[ -e /etc/artix-release ]]; then\n          os_release_id=artix\n        fi\n        case $os_release_id in\n          *arch*)                  _p9k_set_os Linux LINUX_ARCH_ICON;;\n          *raspbian*)              _p9k_set_os Linux LINUX_RASPBIAN_ICON;;\n          *debian*)\n            if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then\n              _p9k_set_os Linux LINUX_RASPBIAN_ICON\n            else\n              _p9k_set_os Linux LINUX_DEBIAN_ICON\n            fi\n          ;;\n          *ubuntu*)                _p9k_set_os Linux LINUX_UBUNTU_ICON;;\n          *elementary*)            _p9k_set_os Linux LINUX_ELEMENTARY_ICON;;\n          *fedora*)                _p9k_set_os Linux LINUX_FEDORA_ICON;;\n          *coreos*)                _p9k_set_os Linux LINUX_COREOS_ICON;;\n          *kali*)                  _p9k_set_os Linux LINUX_KALI_ICON;;\n          *gentoo*)                _p9k_set_os Linux LINUX_GENTOO_ICON;;\n          *mageia*)                _p9k_set_os Linux LINUX_MAGEIA_ICON;;\n          *centos*)                _p9k_set_os Linux LINUX_CENTOS_ICON;;\n          *opensuse*|*tumbleweed*) _p9k_set_os Linux LINUX_OPENSUSE_ICON;;\n          *sabayon*)               _p9k_set_os Linux LINUX_SABAYON_ICON;;\n          *slackware*)             _p9k_set_os Linux LINUX_SLACKWARE_ICON;;\n          *linuxmint*)             _p9k_set_os Linux LINUX_MINT_ICON;;\n          *alpine*)                _p9k_set_os Linux LINUX_ALPINE_ICON;;\n          *aosc*)                  _p9k_set_os Linux LINUX_AOSC_ICON;;\n          *nixos*)                 _p9k_set_os Linux LINUX_NIXOS_ICON;;\n          *devuan*)                _p9k_set_os Linux LINUX_DEVUAN_ICON;;\n          *manjaro*)               _p9k_set_os Linux LINUX_MANJARO_ICON;;\n          *void*)                  _p9k_set_os Linux LINUX_VOID_ICON;;\n          *artix*)                 _p9k_set_os Linux LINUX_ARTIX_ICON;;\n          *rhel*)                  _p9k_set_os Linux LINUX_RHEL_ICON;;\n          amzn)                    _p9k_set_os Linux LINUX_AMZN_ICON;;\n          endeavouros)             _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;;\n          rocky)                   _p9k_set_os Linux LINUX_ROCKY_ICON;;\n          almalinux)               _p9k_set_os Linux LINUX_ALMALINUX_ICON;;\n          guix)                    _p9k_set_os Linux LINUX_GUIX_ICON;;\n          neon)                    _p9k_set_os Linux LINUX_NEON_ICON;;\n          *)                       _p9k_set_os Linux LINUX_ICON;;\n        esac\n        ;;\n    esac\n  fi\n\n  if [[ $_POWERLEVEL9K_COLOR_SCHEME == light ]]; then\n    _p9k_color1=7\n    _p9k_color2=0\n  else\n    _p9k_color1=0\n    _p9k_color2=7\n  fi\n\n  _p9k_battery_states=(\n    'LOW'           'red'\n    'CHARGING'      'yellow'\n    'CHARGED'       'green'\n    'DISCONNECTED'  \"$_p9k_color2\"\n  )\n\n  # This simpler construct doesn't work on zsh-5.1 with multi-line prompt:\n  #\n  #   ${(@0)_p9k_line_segments_left[@]}\n  local -a left_segments=(${(@0)${(pj:\\0:)_p9k_line_segments_left}})\n  _p9k_left_join=(1)\n  for ((i = 2; i <= $#left_segments; ++i)); do\n    elem=$left_segments[i]\n    if [[ $elem == *_joined ]]; then\n      _p9k_left_join+=$_p9k_left_join[((i-1))]\n    else\n      _p9k_left_join+=$i\n    fi\n  done\n\n  local -a right_segments=(${(@0)${(pj:\\0:)_p9k_line_segments_right}})\n  _p9k_right_join=(1)\n  for ((i = 2; i <= $#right_segments; ++i)); do\n    elem=$right_segments[i]\n    if [[ $elem == *_joined ]]; then\n      _p9k_right_join+=$_p9k_right_join[((i-1))]\n    else\n      _p9k_right_join+=$i\n    fi\n  done\n\n  case $_p9k_os in\n    OSX) (( $+commands[sysctl] )) && _p9k_num_cpus=\"$(sysctl -n hw.logicalcpu 2>/dev/null)\";;\n    BSD) (( $+commands[sysctl] )) && _p9k_num_cpus=\"$(sysctl -n hw.ncpu 2>/dev/null)\";;\n    *)   (( $+commands[nproc]  )) && _p9k_num_cpus=\"$(nproc 2>/dev/null)\";;\n  esac\n  (( _p9k_num_cpus )) || _p9k_num_cpus=1\n\n  if _p9k_segment_in_use dir; then\n    if (( $+_POWERLEVEL9K_DIR_CLASSES )); then\n      local -i i=3\n      for ((; i <= $#_POWERLEVEL9K_DIR_CLASSES; i+=3)); do\n        _POWERLEVEL9K_DIR_CLASSES[i]=${(g::)_POWERLEVEL9K_DIR_CLASSES[i]}\n      done\n    else\n      typeset -ga _POWERLEVEL9K_DIR_CLASSES=()\n      _p9k_get_icon prompt_dir_ETC ETC_ICON\n      _POWERLEVEL9K_DIR_CLASSES+=('/etc|/etc/*' ETC \"$_p9k__ret\")\n      _p9k_get_icon prompt_dir_HOME HOME_ICON\n      _POWERLEVEL9K_DIR_CLASSES+=('~' HOME \"$_p9k__ret\")\n      _p9k_get_icon prompt_dir_HOME_SUBFOLDER HOME_SUB_ICON\n      _POWERLEVEL9K_DIR_CLASSES+=('~/*' HOME_SUBFOLDER \"$_p9k__ret\")\n      _p9k_get_icon prompt_dir_DEFAULT FOLDER_ICON\n      _POWERLEVEL9K_DIR_CLASSES+=('*' DEFAULT \"$_p9k__ret\")\n    fi\n  fi\n\n  if _p9k_segment_in_use status; then\n    typeset -g _p9k_exitcode2str=({0..255})\n    local -i i=2\n    if (( !_POWERLEVEL9K_STATUS_HIDE_SIGNAME )); then\n      for ((; i <= $#signals; ++i)); do\n        local sig=$signals[i]\n        (( _POWERLEVEL9K_STATUS_VERBOSE_SIGNAME )) && sig=\"SIG${sig}($((i-1)))\"\n        _p9k_exitcode2str[$((128+i))]=$sig\n      done\n    fi\n  fi\n\n  if [[ $#_POWERLEVEL9K_VCS_BACKENDS == 1 && $_POWERLEVEL9K_VCS_BACKENDS[1] == git ]]; then\n    local elem line\n    local -i i=0 line_idx=0\n    for line in $_p9k_line_segments_left; do\n      (( ++line_idx ))\n      for elem in ${${(0)line}%_joined}; do\n        (( ++i ))\n        if [[ $elem == vcs ]]; then\n          if (( _p9k_vcs_index )); then\n            _p9k_vcs_index=-1\n          else\n            _p9k_vcs_index=i\n            _p9k_vcs_line_index=line_idx\n            _p9k_vcs_side=left\n          fi\n        fi\n      done\n    done\n    i=0\n    line_idx=0\n    for line in $_p9k_line_segments_right; do\n      (( ++line_idx ))\n      for elem in ${${(0)line}%_joined}; do\n        (( ++i ))\n        if [[ $elem == vcs ]]; then\n          if (( _p9k_vcs_index )); then\n            _p9k_vcs_index=-1\n          else\n            _p9k_vcs_index=i\n            _p9k_vcs_line_index=line_idx\n            _p9k_vcs_side=right\n          fi\n        fi\n      done\n    done\n    if (( _p9k_vcs_index > 0 )); then\n      local state\n      for state in ${(k)__p9k_vcs_states}; do\n        _p9k_param prompt_vcs_$state CONTENT_EXPANSION x\n        if [[ -z $_p9k__ret ]]; then\n          _p9k_vcs_index=-1\n          break\n        fi\n      done\n    fi\n    if (( _p9k_vcs_index == -1 )); then\n      _p9k_vcs_index=0\n      _p9k_vcs_line_index=0\n      _p9k_vcs_side=\n    fi\n  fi\n}\n\n_p9k_init_vcs() {\n  if ! _p9k_segment_in_use vcs || (( ! $#_POWERLEVEL9K_VCS_BACKENDS )); then\n    (( $+functions[gitstatus_stop_p9k_] )) && gitstatus_stop_p9k_ POWERLEVEL9K\n    unset _p9k_preinit\n    return\n  fi\n\n  _p9k_vcs_info_init\n  if (( $+functions[_p9k_preinit] )); then\n    if (( $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )); then\n      () {\n        trap 'return 130' INT\n        {\n          gitstatus_start_p9k_ -t $_POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC POWERLEVEL9K\n        } always {\n          trap ':' INT\n        }\n      }\n    fi\n    (( $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )) || _p9k__instant_prompt_disabled=1\n    return 0\n  fi\n  (( _POWERLEVEL9K_DISABLE_GITSTATUS )) && return\n  (( $_POWERLEVEL9K_VCS_BACKENDS[(I)git] )) || return\n\n  local gitstatus_dir=${_POWERLEVEL9K_GITSTATUS_DIR:-${__p9k_root_dir}/gitstatus}\n\n  typeset -g _p9k_preinit=\"function _p9k_preinit() {\n    (( $+commands[git] )) || { unfunction _p9k_preinit; return 1 }\n    [[ \\$ZSH_VERSION == ${(q)ZSH_VERSION} ]]                      || return\n    [[ -r ${(q)gitstatus_dir}/gitstatus.plugin.zsh ]]             || return\n    builtin source ${(q)gitstatus_dir}/gitstatus.plugin.zsh _p9k_ || return\n    GITSTATUS_AUTO_INSTALL=${(q)GITSTATUS_AUTO_INSTALL}         \\\n      GITSTATUS_DAEMON=${(q)GITSTATUS_DAEMON}                   \\\n      GITSTATUS_CACHE_DIR=${(q)GITSTATUS_CACHE_DIR}             \\\n      GITSTATUS_NUM_THREADS=${(q)GITSTATUS_NUM_THREADS}         \\\n      GITSTATUS_LOG_LEVEL=${(q)GITSTATUS_LOG_LEVEL}             \\\n      GITSTATUS_ENABLE_LOGGING=${(q)GITSTATUS_ENABLE_LOGGING}   \\\n        gitstatus_start_p9k_                                    \\\n          -s $_POWERLEVEL9K_VCS_STAGED_MAX_NUM                  \\\n          -u $_POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM                \\\n          -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM               \\\n          -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM              \\\n          -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY            \\\n          ${${_POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS:#0}:+-e} \\\n          -a POWERLEVEL9K\n  }\"\n  builtin source $gitstatus_dir/gitstatus.plugin.zsh _p9k_ || return\n  () {\n    trap 'return 130' INT\n    {\n      gitstatus_start_p9k_                                    \\\n        -s $_POWERLEVEL9K_VCS_STAGED_MAX_NUM                  \\\n        -u $_POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM                \\\n        -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM               \\\n        -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM              \\\n        -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY            \\\n        -t $_POWERLEVEL9K_GITSTATUS_INIT_TIMEOUT_SEC          \\\n        ${${_POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS:#0}:+-e} \\\n        POWERLEVEL9K\n    } always {\n      trap ':' INT\n    }\n  }\n  (( $+GITSTATUS_DAEMON_PID_POWERLEVEL9K )) || _p9k__instant_prompt_disabled=1\n}\n\nfunction _p9k_iterm2_precmd() {\n  builtin zle && return\n  if (( _p9k__iterm_cmd )) && [[ -t 1 ]]; then\n    (( _p9k__iterm_cmd == 1 )) && builtin print -n '\\e]133;C;\\a'\n    builtin printf '\\e]133;D;%s\\a' $1\n  fi\n  typeset -gi _p9k__iterm_cmd=1\n}\n\nfunction _p9k_iterm2_preexec() {\n  if [[ -t 1 ]]; then\n    if (( ${+__p9k_use_osc133_c_cmdline} )); then\n      () {\n        emulate -L zsh -o extended_glob -o no_multibyte\n        local MATCH MBEGIN MEND\n        builtin printf '\\e]133;C;cmdline_url=%s\\a' \"${1//(#m)[^a-zA-Z0-9\"\\/:_.-!'()~\"]/%${(l:2::0:)$(([##16]#MATCH))}}\"\n      } \"$1\"\n    else\n      builtin print -n '\\e]133;C;\\a'\n    fi\n  fi\n  typeset -gi _p9k__iterm_cmd=2\n}\n\n_p9k_init() {\n  _p9k_init_vars\n  _p9k_restore_state || _p9k_init_cacheable\n\n  typeset -g P9K_OS_ICON=$_p9k_os_icon\n\n  local -a _p9k__async_segments_compute\n\n  local -i i\n  local elem\n\n  _p9k__prompt_side=left\n  _p9k__segment_index=1\n  for i in {1..$#_p9k_line_segments_left}; do\n    for elem in ${${(@0)_p9k_line_segments_left[i]}%_joined}; do\n      local f_init=_p9k_prompt_${elem}_init\n      (( $+functions[$f_init] )) && $f_init\n      (( ++_p9k__segment_index ))\n    done\n  done\n\n  _p9k__prompt_side=right\n  _p9k__segment_index=1\n  for i in {1..$#_p9k_line_segments_right}; do\n    for elem in ${${(@0)_p9k_line_segments_right[i]}%_joined}; do\n      local f_init=_p9k_prompt_${elem}_init\n      (( $+functions[$f_init] )) && $f_init\n      (( ++_p9k__segment_index ))\n    done\n  done\n\n  if [[ -n $_POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE ||\n        -n $_POWERLEVEL9K_IP_INTERFACE ||\n        -n $_POWERLEVEL9K_VPN_IP_INTERFACE ]]; then\n     _p9k_prompt_net_iface_init\n  fi\n\n  if [[ -n $_p9k__async_segments_compute ]]; then\n    functions[_p9k_async_segments_compute]=${(pj:\\n:)_p9k__async_segments_compute}\n    _p9k_worker_start\n  fi\n\n  local k v\n  for k v in ${(kv)_p9k_display_k}; do\n    [[ $k == -* ]] && continue\n    _p9k__display_v[v]=$k\n    _p9k__display_v[v+1]=show\n  done\n  _p9k__display_v[2]=hide\n  _p9k__display_v[4]=hide\n\n  if (( $+functions[iterm2_decorate_prompt] )); then\n    _p9k__iterm2_decorate_prompt=$functions[iterm2_decorate_prompt]\n    function iterm2_decorate_prompt() {\n      typeset -g ITERM2_PRECMD_PS1=$PROMPT\n      typeset -g ITERM2_SHOULD_DECORATE_PROMPT=\n    }\n  fi\n  if (( $+functions[iterm2_precmd] )); then\n    _p9k__iterm2_precmd=$functions[iterm2_precmd]\n    functions[iterm2_precmd]='local _p9k_status=$?; zle && return; () { return $_p9k_status; }; '$_p9k__iterm2_precmd\n  fi\n\n  if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION  &&\n        ! $+_z4h_iterm_cmd                    &&\n        ! $+functions[iterm2_decorate_prompt] &&\n        ! $+functions[iterm2_precmd] )); then\n    typeset -gi _p9k__iterm_cmd=0\n  fi\n\n  if _p9k_segment_in_use todo; then\n    if [[ -n ${_p9k__todo_command::=${commands[todo.sh]}} ]]; then\n      local todo_global=/etc/todo/config\n    elif [[ -n ${_p9k__todo_command::=${commands[todo-txt]}} ]]; then\n      local todo_global=/etc/todo-txt/config\n    fi\n    if [[ -n $_p9k__todo_command ]]; then\n      _p9k__todo_file=\"$(exec -a $_p9k__todo_command ${commands[bash]:-:} 3>&1 &>/dev/null -c \"\n        [ -e \\\"\\$TODOTXT_CFG_FILE\\\" ] || TODOTXT_CFG_FILE=\\$HOME/.todo/config\n        [ -e \\\"\\$TODOTXT_CFG_FILE\\\" ] || TODOTXT_CFG_FILE=\\$HOME/todo.cfg\n        [ -e \\\"\\$TODOTXT_CFG_FILE\\\" ] || TODOTXT_CFG_FILE=\\$HOME/.todo.cfg\n        [ -e \\\"\\$TODOTXT_CFG_FILE\\\" ] || TODOTXT_CFG_FILE=\\${XDG_CONFIG_HOME:-\\$HOME/.config}/todo/config\n        [ -e \\\"\\$TODOTXT_CFG_FILE\\\" ] || TODOTXT_CFG_FILE=${(qqq)_p9k__todo_command:h}/todo.cfg\n        [ -e \\\"\\$TODOTXT_CFG_FILE\\\" ] || TODOTXT_CFG_FILE=\\${TODOTXT_GLOBAL_CFG_FILE:-${(qqq)todo_global}}\n        [ -r \\\"\\$TODOTXT_CFG_FILE\\\" ] || exit\n        source \\\"\\$TODOTXT_CFG_FILE\\\"\n        printf \"%s\" \\\"\\$TODO_FILE\\\" >&3\")\"\n    fi\n  fi\n\n  if _p9k_segment_in_use dir &&\n     [[ $_POWERLEVEL9K_SHORTEN_STRATEGY == truncate_with_package_name && $+commands[jq] == 0 ]]; then\n    print -rP -- '%F{yellow}WARNING!%f %BPOWERLEVEL9K_SHORTEN_STRATEGY=truncate_with_package_name%b requires %F{green}jq%f.'\n    print -rP -- 'Either install %F{green}jq%f or change the value of %BPOWERLEVEL9K_SHORTEN_STRATEGY%b.'\n  fi\n\n  _p9k_init_vcs\n\n  if (( _p9k__instant_prompt_disabled )); then\n    (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT )) && unset __p9k_instant_prompt_erased\n    _p9k_delete_instant_prompt\n    _p9k_dumped_instant_prompt_sigs=()\n  fi\n\n  if (( $+__p9k_instant_prompt_sourced && __p9k_instant_prompt_sourced != __p9k_instant_prompt_version )); then\n    _p9k_delete_instant_prompt\n    _p9k_dumped_instant_prompt_sigs=()\n  fi\n\n  if (( $+__p9k_instant_prompt_erased )); then\n    unset __p9k_instant_prompt_erased\n    if [[ -w $TTY ]]; then\n      local tty=$TTY\n    elif [[ -w /dev/tty ]]; then\n      local tty=/dev/tty\n    else\n      local tty=/dev/null\n    fi\n    {\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-[%1FERROR%f]: When using instant prompt, Powerlevel10k must be loaded before the first prompt.}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-You can:}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-  - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}\"\n      if (( _p9k_term_has_href )); then\n        >&2 echo    - \"${(%):-    See \\e]8;;https://github.com/romkatv/powerlevel10k#installation\\ahttps://github.com/romkatv/powerlevel10k#installation\\e]8;;\\a.}\"\n      else\n        >&2 echo    - \"${(%):-    See https://github.com/romkatv/powerlevel10k#installation.}\"\n      fi\n      if (( $+zsh_defer_options )); then\n        >&2 echo -E - \"\"\n        >&2 echo -E - \"${(%):-    NOTE: Do not use %1Fzsh-defer%f to load %Upowerlevel10k.zsh-theme%u.}\"\n      elif (( $+functions[zinit] )); then\n        >&2 echo -E - \"\"\n        >&2 echo -E - \"${(%):-    NOTE: If using %2Fzinit%f to load %3F'romkatv/powerlevel10k'%f, %Bdo not apply%b %1Fice wait%f.}\"\n      elif (( $+functions[zplugin] )); then\n        >&2 echo -E - \"\"\n        >&2 echo -E - \"${(%):-    NOTE: If using %2Fzplugin%f to load %3F'romkatv/powerlevel10k'%f, %Bdo not apply%b %1Fice wait%f.}\"\n      fi\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n      >&2 echo -E - \"${(%):-    * Zsh will start %Bquickly%b.}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-  - Disable instant prompt either by running %Bp10k configure%b or by manually}\"\n      >&2 echo -E - \"${(%):-    defining the following parameter:}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-      %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=off}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-    * You %Bwill not%b see this error message again.}\"\n      >&2 echo -E - \"${(%):-    * Zsh will start %Bslowly%b.}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-  - Do nothing.}\"\n      >&2 echo -E - \"\"\n      >&2 echo -E - \"${(%):-    * You %Bwill%b see this error message every time you start zsh.}\"\n      >&2 echo -E - \"${(%):-    * Zsh will start %Bslowly%b.}\"\n      >&2 echo -E - \"\"\n    } 2>>$tty\n  fi\n}\n\n_p9k_deinit() {\n  (( $+functions[_p9k_preinit] )) && unfunction _p9k_preinit\n  (( $+functions[gitstatus_stop_p9k_] )) && gitstatus_stop_p9k_ POWERLEVEL9K\n  _p9k_worker_stop\n  if (( _p9k__state_dump_fd )); then\n    zle -F $_p9k__state_dump_fd\n    exec {_p9k__state_dump_fd}>&-\n  fi\n  if (( _p9k__restore_prompt_fd )); then\n    zle -F $_p9k__restore_prompt_fd\n    exec {_p9k__restore_prompt_fd}>&-\n  fi\n  if (( _p9k__redraw_fd )); then\n    zle -F $_p9k__redraw_fd\n    exec {_p9k__redraw_fd}>&-\n  fi\n  (( $+_p9k__iterm2_precmd )) && functions[iterm2_precmd]=$_p9k__iterm2_precmd\n  (( $+_p9k__iterm2_decorate_prompt )) && functions[iterm2_decorate_prompt]=$_p9k__iterm2_decorate_prompt\n  unset -m '(_POWERLEVEL9K_|P9K_|_p9k_)*~(P9K_SSH|_P9K_SSH_TTY|P9K_TOOLBOX_NAME|P9K_TTY|_P9K_TTY)'\n  [[ -n $__p9k_locale ]] || unset __p9k_locale\n}\n\ntypeset -gi __p9k_enabled=0\ntypeset -gi __p9k_configured=0\ntypeset -gri __p9k_instant_prompt_disabled=1\n\n# `typeset -g` doesn't roundtrip in zsh prior to 5.4.\nif [[ $ZSH_VERSION == (5.<4->*|<6->.*) ]]; then\n  typeset -gri __p9k_dumps_enabled=1\nelse\n  typeset -gri __p9k_dumps_enabled=0\nfi\n\n_p9k_do_nothing() { true; }\n\n_p9k_precmd_first() {\n  eval \"$__p9k_intro\"\n  if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then\n    KITTY_SHELL_INTEGRATION+=' no-prompt-mark'\n    (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1\n    (( $+__p9k_use_osc133_c_cmdline         )) || typeset -gri __p9k_use_osc133_c_cmdline=1\n  elif [[ $TERM_PROGRAM == WarpTerminal ]]; then\n    (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1\n  fi\n  typeset -ga precmd_functions=(${precmd_functions:#_p9k_precmd_first})\n}\n\n_p9k_setup() {\n  (( __p9k_enabled )) && return\n\n  prompt_opts=(percent subst)\n  if (( ! $+__p9k_instant_prompt_active )); then\n    prompt_opts+=sp\n    prompt_opts+=cr\n  fi\n\n  prompt_powerlevel9k_teardown\n  __p9k_enabled=1\n  typeset -ga preexec_functions=(_p9k_preexec1 $preexec_functions _p9k_preexec2)\n  typeset -ga precmd_functions=(_p9k_do_nothing _p9k_precmd_first $precmd_functions _p9k_precmd)\n}\n\nprompt_powerlevel9k_setup() {\n  _p9k_restore_special_params\n  eval \"$__p9k_intro\"\n  _p9k_setup\n}\n\nprompt_powerlevel9k_teardown() {\n  _p9k_restore_special_params\n  eval \"$__p9k_intro\"\n  add-zsh-hook -D precmd '(_p9k_|powerlevel9k_)*'\n  add-zsh-hook -D preexec '(_p9k_|powerlevel9k_)*'\n  PROMPT='%m%# '\n  RPROMPT=\n  if (( __p9k_enabled )); then\n    _p9k_deinit\n    __p9k_enabled=0\n  fi\n}\n\ntypeset -gr __p9k_p10k_usage=\"Usage: %2Fp10k%f %Bcommand%b [options]\n\nCommands:\n\n  %Bconfigure%b  run interactive configuration wizard\n  %Breload%b     reload configuration\n  %Bsegment%b    print a user-defined prompt segment\n  %Bdisplay%b    show, hide or toggle prompt parts\n  %Bhelp%b       print this help message\n\nPrint help for a specific command:\n\n  %2Fp10k%f %Bhelp%b command\"\n\ntypeset -gr __p9k_p10k_segment_usage=\"Usage: %2Fp10k%f %Bsegment%b [-h] [{+|-}re] [-s state] [-b bg] [-f fg] [-i icon] [-c cond] [-t text]\n\nPrint a user-defined prompt segment. Can be called only during prompt rendering.\n\nOptions:\n  -t text   segment's main content; will undergo prompt expansion: '%%F{blue}%%*%%f' will\n            show as %F{blue}%*%f; default is empty\n  -i icon   segment's icon; default is empty\n  -r        icon is a symbolic reference that needs to be resolved; for example, 'LOCK_ICON'\n  +r        icon is already resolved and should be printed literally; for example, '⭐';\n            this is the default; you can also use \\$'\\u2B50' if you don't want to have\n            non-ascii characters in source code\n  -b bg     background color; for example, 'blue', '4', or '#0000ff'; empty value means\n            transparent background, as in '%%k'; default is black\n  -f fg     foreground color; for example, 'blue', '4', or '#0000ff'; empty value means\n            default foreground color, as in '%%f'; default is empty\n  -s state  segment's state for the purpose of applying styling options; if you want to\n            to be able to use POWERLEVEL9K parameters to specify different colors or icons\n            depending on some property, use different states for different values of that\n            property\n  -c        condition; if empty after parameter expansion and process substitution, the\n            segment is hidden; this is an advanced feature, use with caution; default is '1'\n  -e        segment's main content will undergo parameter expansion and process\n            substitution; the content will be surrounded with double quotes and thus\n            should quote its own double quotes; this is an advanced feature, use with\n            caution\n  +e        segment's main content should not undergo parameter expansion and process\n            substitution; this is the default\n  -h        print this help message\n\nExample: 'core' segment tells you if there is a file name 'core' in the current directory.\n\n- Segment's icon is '⭐'.\n- Segment's text is the file's size in bytes.\n- If you have permissions to delete the file, state is DELETABLE. If not, it's PROTECTED.\n\n  zmodload -F zsh/stat b:zstat\n\n  function prompt_core() {\n    local size=()\n    if ! zstat -A size +size core 2>/dev/null; then\n      # No 'core' file in the current directory.\n      return\n    fi\n    if [[ -w . ]]; then\n      local state=DELETABLE\n    else\n      local state=PROTECTED\n    fi\n    p10k segment -s \\$state -i '⭐' -f blue -t \\${size[1]}b\n  }\n\nTo enable this segment, add 'core' to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or\nPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTS.\n\nExample customizations:\n\n  # Override default foreground.\n  POWERLEVEL9K_CORE_FOREGROUND=red\n\n  # Override foreground when DELETABLE.\n  POWERLEVEL9K_CORE_DELETABLE_BACKGROUND=green\n\n  # Override icon when PROTECTED.\n  POWERLEVEL9K_CORE_PROTECTED_VISUAL_IDENTIFIER_EXPANSION='❎'\n\n  # Don't show file size when PROTECTED.\n  POWERLEVEL9K_CORE_PROTECTED_CONTENT_EXPANSION=''\"\n\ntypeset -gr __p9k_p10k_configure_usage=\"Usage: %2Fp10k%f %Bconfigure%b\n\nRun interactive configuration wizard.\"\n\ntypeset -gr __p9k_p10k_reload_usage=\"Usage: %2Fp10k%f %Breload%b\n\nReload configuration.\"\n\ntypeset -gr __p9k_p10k_finalize_usage=\"Usage: %2Fp10k%f %Bfinalize%b\n\nPerform the final stage of initialization. Must be called at the very end of zshrc.\"\n\ntypeset -gr __p9k_p10k_display_usage=\"Usage: %2Fp10k%f %Bdisplay%b part-pattern=state-list...\n\n  Show, hide or toggle prompt parts. If called from zle, the current\n  prompt is refreshed.\n\nUsage: %2Fp10k%f %Bdisplay%b -a [part-pattern]...\n\n  Populate array \\`reply\\` with states of prompt parts matching the patterns.\n  If no patterns are supplied, assume \\`*\\`.\n\nUsage: %2Fp10k%f %Bdisplay%b -r\n\n  Redisplay prompt.\n\nParts:\n  empty_line    empty line (duh)\n  ruler         ruler; if POWERLEVEL9K_RULER_CHAR=' ', it's essentially another\n                new_line\n  N             prompt line number N, 1-based; counting from the top if positive,\n                from the bottom if negative\n  N/left_frame  left frame on the Nth line\n  N/left        left prompt on the Nth line\n  N/gap         gap between left and right prompts on the Nth line\n  N/right       right prompt on the Nth line\n  N/right_frame right frame on the Nth line\n  N/left/S      segment S within N/left (dir, time, etc.)\n  N/right/S     segment S within N/right (dir, time, etc.)\n\nPart States:\n  show          the part is displayed\n  hide          the part is not displayed\n  print         the part is printed in precmd; only applicable to empty_line and\n                ruler; unlike show, the effects of print cannot be undone with hide;\n                print used to look better after \\`clear\\` but this is no longer the\n                case; it's best to avoid it unless you know what you are doing\n\npart-pattern is a glob pattern for parts. Examples:\n\n  */kubecontext         all kubecontext prompt segments, regardless of where\n                        they are\n  1/(right|right_frame) all prompt segments and frame from the right side of\n                        the first line\n\nstate-list is a comma-separated list of states. Must have at least one element.\nIf more than one, states will rotate.\n\nExample: Bind Ctrl+P to toggle right prompt.\n\n  function toggle-right-prompt() { p10k display '*/right'=hide,show; }\n  zle -N toggle-right-prompt\n  bindkey '^P' toggle-right-prompt\n\nExample: Print the current state of all prompt parts:\n\n  typeset -A reply\n  p10k display -a '*'\n  printf '%%-32s = %%q\\n' \\${(@kv)reply} | sort\n\"\n\n# 0  -- reset-prompt not blocked\n# 1  -- reset-prompt blocked and not needed\n# 2  -- reset-prompt blocked and needed\ntypeset -gi __p9k_reset_state\n\nfunction p10k() {\n  [[ $# != 1 || $1 != finalize ]] || { p10k-instant-prompt-finalize; return 0 }\n\n  eval \"$__p9k_intro_no_reply\"\n\n  if (( !ARGC )); then\n    print -rP -- $__p9k_p10k_usage >&2\n    return 1\n  fi\n\n  case $1 in\n    segment)\n      local REPLY\n      local -a reply\n      shift\n      local -i OPTIND\n      local OPTARG opt state bg=0 fg icon cond text ref=0 expand=0\n      while getopts ':s:b:f:i:c:t:reh' opt; do\n        case $opt in\n          s) state=$OPTARG;;\n          b) bg=$OPTARG;;\n          f) fg=$OPTARG;;\n          i) icon=$OPTARG;;\n          c) cond=${OPTARG:-'${:-}'};;\n          t) text=$OPTARG;;\n          r) ref=1;;\n          e) expand=1;;\n          +r) ref=0;;\n          +e) expand=0;;\n          h) print -rP -- $__p9k_p10k_segment_usage; return 0;;\n          ?) print -rP -- $__p9k_p10k_segment_usage >&2; return 1;;\n        esac\n      done\n      if (( OPTIND <= ARGC )); then\n        print -rP -- $__p9k_p10k_segment_usage >&2\n        return 1\n      fi\n      if [[ -z $_p9k__prompt_side ]]; then\n        print -rP -- \"%1F[ERROR]%f %Bp10k segment%b: can be called only during prompt rendering.\" >&2\n        if (( !ARGC )); then\n          print -rP -- \"\"\n          print -rP -- \"For help, type:\" >&2\n          print -rP -- \"\"\n          print -rP -- \"  %2Fp10k%f %Bhelp%b %Bsegment%b\" >&2\n        fi\n        return 1\n      fi\n      (( ref )) || icon=$'\\1'$icon\n      typeset -i _p9k__has_upglob\n      \"_p9k_${_p9k__prompt_side}_prompt_segment\" \"prompt_${_p9k__segment_name}${state:+_${${(U)state}//İ/I}}\" \\\n          \"$bg\" \"${fg:-$_p9k_color1}\" \"$icon\" \"$expand\" \"$cond\" \"$text\"\n      return 0\n      ;;\n    display)\n      if (( ARGC == 1 )); then\n        print -rP -- $__p9k_p10k_display_usage >&2\n        return 1\n      fi\n      shift\n      local -i k dump\n      local opt prev new pair list name var\n      while getopts ':har' opt; do\n        case $opt in\n          r)\n            if (( __p9k_reset_state > 0 )); then\n              __p9k_reset_state=2\n            else\n              __p9k_reset_state=-1\n            fi\n          ;;\n          a) dump=1;;\n          h) print -rP -- $__p9k_p10k_display_usage; return 0;;\n          ?) print -rP -- $__p9k_p10k_display_usage >&2; return 1;;\n        esac\n      done\n      if (( dump )); then\n        reply=()\n        shift $((OPTIND-1))\n        (( ARGC )) || set -- '*'\n        for opt; do\n          for k in ${(u@)_p9k_display_k[(I)$opt]:/(#m)*/$_p9k_display_k[$MATCH]}; do\n            reply+=($_p9k__display_v[k,k+1])\n          done\n        done\n        if (( __p9k_reset_state == -1 )); then\n          _p9k_reset_prompt\n        fi\n        return 0\n      fi\n      local REPLY\n      local -a reply\n      for opt in \"${@:$OPTIND}\"; do\n        pair=(${(s:=:)opt})\n        list=(${(s:,:)${pair[2]}})\n        if [[ ${(b)pair[1]} == $pair[1] ]]; then # this branch is purely for optimization\n          local ks=($_p9k_display_k[$pair[1]])\n        else\n          local ks=(${(u@)_p9k_display_k[(I)$pair[1]]:/(#m)*/$_p9k_display_k[$MATCH]})\n        fi\n        for k in $ks; do\n          if (( $#list == 1 )); then  # this branch is purely for optimization\n            [[ $_p9k__display_v[k+1] == $list[1] ]] && continue\n            new=$list[1]\n          else\n            new=${list[list[(I)$_p9k__display_v[k+1]]+1]:-$list[1]}\n            [[ $_p9k__display_v[k+1] == $new ]] && continue\n          fi\n          _p9k__display_v[k+1]=$new\n          name=$_p9k__display_v[k]\n          if [[ $name == (empty_line|ruler) ]]; then\n            var=_p9k__${name}_i\n            [[ $new == show ]] && unset $var || typeset -gi $var=3\n          elif [[ $name == (#b)(<->)(*) ]]; then\n            var=_p9k__${match[1]}${${${${match[2]//\\/}/#left/l}/#right/r}/#gap/g}\n            [[ $new == hide ]] && typeset -g $var= || unset $var\n          fi\n          if (( __p9k_reset_state > 0 )); then\n            __p9k_reset_state=2\n          else\n            __p9k_reset_state=-1\n          fi\n        done\n      done\n      if (( __p9k_reset_state == -1 )); then\n        _p9k_reset_prompt\n      fi\n      ;;\n    configure)\n      if (( ARGC > 1 )); then\n        print -rP -- $__p9k_p10k_configure_usage >&2\n        return 1\n      fi\n      local REPLY\n      local -a reply\n      p9k_configure \"$@\" || return\n      ;;\n    reload)\n      if (( ARGC > 1 )); then\n        print -rP -- $__p9k_p10k_reload_usage >&2\n        return 1\n      fi\n      (( $+_p9k__force_must_init )) || return 0\n      _p9k__force_must_init=1\n      ;;\n    help)\n      local var=__p9k_p10k_$2_usage\n      if (( $+parameters[$var] )); then\n        print -rP -- ${(P)var}\n        return 0\n      elif (( ARGC == 1 )); then\n        print -rP -- $__p9k_p10k_usage\n        return 0\n      else\n        print -rP -- $__p9k_p10k_usage >&2\n        return 1\n      fi\n      ;;\n    finalize)\n      print -rP -- $__p9k_p10k_finalize_usage >&2\n      return 1\n      ;;\n    clear-instant-prompt)\n      if (( $+__p9k_instant_prompt_active )); then\n        _p9k_clear_instant_prompt\n        unset __p9k_instant_prompt_active\n      fi\n      return 0\n      ;;\n    *)\n      print -rP -- $__p9k_p10k_usage >&2\n      return 1\n      ;;\n  esac\n}\n\n# Hook for zplugin.\npowerlevel10k_plugin_unload() { prompt_powerlevel9k_teardown; }\n\nfunction p10k-instant-prompt-finalize() {\n  unsetopt local_options\n  (( ${+__p9k_instant_prompt_active} )) && unsetopt prompt_cr prompt_sp || setopt prompt_cr prompt_sp\n}\n\nautoload -Uz add-zsh-hook\n\nzmodload zsh/datetime\nzmodload zsh/mathfunc\nzmodload zsh/parameter 2>/dev/null  # https://github.com/romkatv/gitstatus/issues/58#issuecomment-553407177\nzmodload zsh/system\nzmodload zsh/termcap\nzmodload zsh/terminfo\nzmodload zsh/zleparameter\nzmodload -F zsh/stat b:zstat\nzmodload -F zsh/net/socket b:zsocket\nzmodload -F zsh/files b:zf_mv b:zf_rm\n\nif [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_prompt_dump_file ]]; then\n  _p9k_delete_instant_prompt\n  zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null\n  zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null\nfi\n\ntypeset -g P9K_VERSION=1.20.15\n\nif [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then\n  typeset -gri __p9k_force_term_shell_integration=1\nfi\nunset VSCODE_SHELL_INTEGRATION\n\n_p9k_init_ssh\n_p9k_init_toolbox\nprompt_powerlevel9k_setup\n"
  },
  {
    "path": "internal/parser.zsh",
    "content": "typeset -grA __p9k_pb_cmd_skip=(\n  '}'         'always'  # handled specially\n  '{'         ''\n  '{'         ''\n  '|'         ''\n  '||'        ''\n  '&'         ''\n  '&&'        ''\n  '|&'        ''\n  '&!'        ''\n  '&|'        ''\n  ')'         ''\n  '('         ''\n  '()'        ''\n  '!'         ''\n  ';'         ''\n  'if'        ''\n  'fi'        ''\n  'elif'      ''\n  'else'      ''\n  'then'      ''\n  'while'     ''\n  'until'     ''\n  'do'        ''\n  'done'      ''\n  'esac'      ''\n  'end'       ''\n  'coproc'    ''\n  'nocorrect' ''\n  'noglob'    ''\n  'time'      ''\n  '[['        '\\]\\]'\n  '(('        '\\)\\)'\n  'case'      '\\)|esac'\n  ';;'        '\\)|esac'\n  ';&'        '\\)|esac'\n  ';|'        '\\)|esac'\n  'foreach'   '\\(*\\)'\n)\n\ntypeset -grA __p9k_pb_precommand=(\n  '-'         ''\n  'builtin'   ''\n  'command'   ''\n  'exec'      '-[^a]#[a]'\n  'nohup'     ''\n  'setsid'    ''\n  'eatmydata' ''\n  'catchsegv' ''\n  'pkexec'    '--user'\n  'doas'      '-[^aCu]#[acU]'\n  'nice'      '-[^n]#[n]|--adjustment'\n  'stdbuf'    '-[^ioe]#[ioe]|--(input|output|error)'\n  'sudo'      '-[^aghpuUCcrtT]#[aghpuUCcrtT]|--(close-from|group|host|prompt|role|type|other-user|command-timeout|user)'\n  'ssh-agent' '-[^aEPt]#[aEPt]'\n  'tabbed'    '-[^gnprtTuU]#[gnprtTuU]'\n  'chronic'   ''\n  'ifne'      ''\n)\n\ntypeset -grA __p9k_pb_redirect=(\n  '&>'   ''\n  '>'    ''\n  '>&'   ''\n  '<'    ''\n  '<&'   ''\n  '<>'   ''\n  '&>|'  ''\n  '>|'   ''\n  '&>>'  ''\n  '>>'   ''\n  '>>&'  ''\n  '&>>|' ''\n  '>>|'  ''\n  '<<<'  ''\n)\n\ntypeset -grA __p9k_pb_term=(\n  '|'  ''\n  '||' ''\n  ';'  ''\n  '&'  ''\n  '&&' ''\n  '|&' ''\n  '&!' ''\n  '&|' ''\n  ';;' ''\n  ';&' ''\n  ';|' ''\n  '('  ''\n  ')'  ''\n  '()' ''  # handled specially\n  '}'  ''  # handled specially\n)\n\ntypeset -grA __p9k_pb_term_skip=(\n  '('  '\\)'\n  ';;' '\\)|esac'\n  ';&' '\\)|esac'\n  ';|' '\\)|esac'\n)\n\n# Usage: _p9k_parse_buffer <buffer> [token-limit]\n#\n# Parses the specified command line buffer and populates array P9K_COMMANDS\n# with commands from it. Terminates early and returns 1 if there are more\n# tokens than the specified limit.\n#\n# Broken:\n#\n#   ---------------\n#   : $(x)\n#   ---------------\n#   : `x`\n#   ---------------\n#   ${x/}\n#   ---------------\n#   - -- x\n#   ---------------\n#   command -p -p x\n#   ---------------\n#   *\n#   ---------------\n#   x=$y; $x\n#   ---------------\n#   alias x=y; y\n#   ---------------\n#   x <<END\n#   ; END\n#   END\n#   ---------------\n#   Setup:\n#     setopt interactive_comments\n#     alias x='#'\n#   Punchline:\n#     x; y\n#   ---------------\n#\n# More brokenness with non-standard options (ignore_braces, ignore_close_braces, etc.).\nfunction _p9k_parse_buffer() {\n  [[ ${2:-0} == <-> ]] || return 2\n\n  local rcquotes\n  [[ -o rcquotes ]] && rcquotes=rcquotes\n\n  eval \"$__p9k_intro\"\n  setopt no_nomatch $rcquotes\n\n  typeset -ga P9K_COMMANDS=()\n\n  local -r id='(<->|[[:alpha:]_][[:IDENT:]]#)'\n  local -r var=\"\\$$id|\\${$id}|\\\"\\$$id\\\"|\\\"\\${$id}\\\"\"\n\n  local -i e ic c=${2:-'1 << 62'}\n  local skip n s r state token cmd prev\n  local -a aln alp alf v\n\n  if [[ -o interactive_comments ]]; then\n    ic=1\n    local tokens=(${(Z+C+)1})\n  else\n    local tokens=(${(z)1})\n  fi\n\n  {\n    while (( $#tokens )); do\n      (( e = $#state ))\n\n      while (( $#tokens == alp[-1] )); do\n        aln[-1]=()\n        alp[-1]=()\n        if (( $#tokens == alf[-1] )); then\n          alf[-1]=()\n          (( e = 0 ))\n        fi\n      done\n\n      while (( c-- > 0 )) || return; do\n        token=$tokens[1]\n        tokens[1]=()\n        if (( $+galiases[$token] )); then\n          (( $aln[(eI)p$token] )) && break\n          s=$galiases[$token]\n          n=p$token\n        elif (( e )); then\n          break\n        elif (( $+aliases[$token] )); then\n          (( $aln[(eI)p$token] )) && break\n          s=$aliases[$token]\n          n=p$token\n        elif [[ $token == ?*.?* ]] && (( $+saliases[${token##*.}] )); then\n          r=${token##*.}\n          (( $aln[(eI)s$r] )) && break\n          s=${saliases[$r]%% #}\n          n=s$r\n        else\n          break\n        fi\n        aln+=$n\n        alp+=$#tokens\n        [[ $s == *' ' ]] && alf+=$#tokens\n        (( ic )) && tokens[1,0]=(${(Z+C+)s}) || tokens[1,0]=(${(z)s})\n      done\n\n      case $token in\n        '<<'(|-))\n          state=h\n          continue\n          ;;\n        *('`'|['<>=$']'(')*)\n          if [[ $token == ('`'[^'`']##'`'|'\"`'[^'`']##'`\"'|'$('[^')']##')'|'\"$('[^')']##')\"'|['<>=']'('[^')']##')') ]]; then\n            s=${${token##('\"'|)(['$<>']|)?}%%?('\"'|)}\n            (( ic )) && tokens+=(';' ${(Z+C+)s}) || tokens+=(';' ${(z)s})\n          fi\n          ;;\n      esac\n\n      case $state in\n        *r)\n          state[-1]=\n          continue\n          ;;\n        a)\n          if [[ $token == $skip ]]; then\n            if [[ $token == '{' ]]; then\n              P9K_COMMANDS+=$cmd\n              cmd=\n              state=\n            else\n              skip='{'\n            fi\n            continue\n          else\n            state=t\n          fi\n          ;&  # fall through\n        t|p*)\n          if (( $+__p9k_pb_term[$token] )); then\n            if [[ $token == '()' ]]; then\n              state=\n            else\n              P9K_COMMANDS+=$cmd\n              if [[ $token == '}' ]]; then\n                state=a\n                skip=always\n              else\n                skip=$__p9k_pb_term_skip[$token]\n                state=${skip:+s}\n              fi\n            fi\n            cmd=\n            continue\n          elif [[ $state == t ]]; then\n            continue\n          elif [[ $state == *x ]]; then\n            if (( $+__p9k_pb_redirect[$token] )); then\n              prev=\n              state[-1]=r\n              continue\n            else\n              state[-1]=\n            fi\n          fi\n          ;;\n        s)\n          if [[ $token == $~skip ]]; then\n            state=\n          fi\n          continue\n          ;;\n        h)\n          while (( $#tokens )); do\n            (( e = ${tokens[(i)${(Q)token}]} ))\n            if [[ $tokens[e-1] == ';' && $tokens[e+1] == ';' ]]; then\n              tokens[1,e]=()\n              break\n            else\n              tokens[1,e]=()\n            fi\n          done\n          while (( $#alp && alp[-1] >= $#tokens )); do\n            aln[-1]=()\n            alp[-1]=()\n          done\n          state=t\n          continue\n          ;;\n      esac\n\n      if (( $+__p9k_pb_redirect[${token#<0-255>}] )); then\n        state+=r\n        continue\n      fi\n\n      if [[ $token == *'$'* ]]; then\n        if [[ $token == $~var ]]; then\n          n=${${token##[^[:IDENT:]]}%%[^[:IDENT:]]}\n          [[ $token == *'\"' ]] && v=(\"${(P)n}\") || v=(${(P)n})\n          tokens[1,0]=(${(@qq)v})\n          continue\n        fi\n      fi\n\n      case $state in\n        '')\n          if (( $+__p9k_pb_cmd_skip[$token] )); then\n            skip=$__p9k_pb_cmd_skip[$token]\n            [[ $token == '}' ]] && state=a || state=${skip:+s}\n            continue\n          fi\n          if [[ $token == *=* ]]; then\n            v=${(S)token/#(<->|([[:alpha:]_][[:IDENT:]]#(|'['*[^\\\\](\\\\\\\\)#']')))(|'+')=}\n            if (( $#v < $#token )); then\n              if [[ $v == '(' ]]; then\n                state=s\n                skip='\\)'\n              fi\n              continue\n            fi\n          fi\n          : ${token::=${(Q)${~token}}}\n          ;;\n        p2)\n          if [[ -n $prev ]]; then\n            prev=\n          else\n            : ${token::=${(Q)${~token}}}\n            if [[ $token == '{'$~id'}' ]]; then\n              state=p2x\n              prev=$token\n            else\n              state=p\n            fi\n            continue\n          fi\n          ;&  # fall through\n        p)\n          if [[ -n $prev ]]; then\n            token=$prev\n            prev=\n          else\n            : ${token::=${(Q)${~token}}}\n            case $token in\n              '{'$~id'}') prev=$token; state=px; continue;;\n              [^-]*)                                     ;;\n              --)                      state=p1; continue;;\n              $~skip)                  state=p2; continue;;\n              *)                                 continue;;\n            esac\n          fi\n          ;;\n        p1)\n          if [[ -n $prev ]]; then\n            token=$prev\n            prev=\n          else\n            : ${token::=${(Q)${~token}}}\n            if [[ $token == '{'$~id'}' ]]; then\n              state=p1x\n              prev=$token\n              continue\n            fi\n          fi\n          ;;\n      esac\n\n      if (( $+__p9k_pb_precommand[$token] )); then\n        prev=\n        state=p\n        skip=$__p9k_pb_precommand[$token]\n        cmd+=$token$'\\0'\n      else\n        state=t\n        [[ $token == ('(('*'))'|'`'*'`'|'$'*|['<>=']'('*')'|*$'\\0'*) ]] || cmd+=$token$'\\0'\n      fi\n    done\n  } always {\n    [[ $state == (px|p1x) ]] && cmd+=$prev\n    P9K_COMMANDS+=$cmd\n    P9K_COMMANDS=(${(u)P9K_COMMANDS%$'\\0'})\n  }\n}\n"
  },
  {
    "path": "internal/wizard.zsh",
    "content": "local -i force=0\n\nlocal opt\nwhile getopts 'f' opt; do\n  case $opt in\n    f)  force=1;;\n    +f) force=0;;\n    \\?) return 1;;\n  esac\ndone\n\nif (( OPTIND <= ARGC )); then\n  print -lr -- \"wizard.zsh: invalid arguments: $@\" >&2\n  return 1\nfi\n\nlocal -i in_z4h_wizard=0\n[[ $force == 0 && $+functions[z4h] == 1 && -n $Z4H && -e $Z4H/welcome ]] && in_z4h_wizard=1\n\nlocal -i success=0\n\nlocal -ri force\n\nlocal -r font_base_url='https://github.com/romkatv/powerlevel10k-media/raw/master'\n\nlocal -ri prompt_indent=2\n\nlocal -rA pure_original=(grey 242 red 1 yellow 3 blue 4 magenta 5 cyan 6 white 7)\nlocal -rA pure_snazzy=(grey 242 red '#FF5C57' yellow '#F3F99D' blue '#57C7FF' magenta '#FF6AC1' cyan '#9AEDFE' white '#F1F1F0')\nlocal -ra bg_color=(240 238 236 234)\nlocal -ra sep_color=(248 246 244 242)\nlocal -ra prefix_color=(250 248 246 244)\n\nlocal -r left_circle='\\uE0B6'\nlocal -r right_circle='\\uE0B4'\nlocal -r left_arc='\\uE0B7'\nlocal -r right_arc='\\uE0B5'\nlocal -r left_triangle='\\uE0B2'\nlocal -r right_triangle='\\uE0B0'\nlocal -r left_angle='\\uE0B3'\nlocal -r right_angle='\\uE0B1'\nlocal -r fade_in='░▒▓'\nlocal -r fade_out='▓▒░'\nlocal -r vertical_bar='\\u2502'\n\nlocal -r cursor='%1{\\e[07m \\e[27m%}'\n\nlocal -r time_24h='16:23:42'\nlocal -r time_12h='04:23:42 PM'\n\nlocal -ra lean_left=(\n  '%$frame_color[$color]F╭─ ' '${extra_icons[1]:+%f$extra_icons[1] }%31F$extra_icons[2]%B%39F~%b%31F/%B%39Fsrc%b%f $prefixes[1]%76F$extra_icons[3]master%f '\n  '%$frame_color[$color]F╰─' '%76F$prompt_char%f ${buffer:-$cursor}'\n)\n\nlocal -ra lean_right=(\n  ' $prefixes[2]%101F$extra_icons[4]5s%f${time:+ $prefixes[3]%66F$extra_icons[5]$time%f}' ' %$frame_color[$color]F─╮%f'\n  '' ' %$frame_color[$color]F─╯%f'\n)\n\nlocal -ra lean_8colors_left=(\n  '%$frame_color[$color]F╭─ ' '${extra_icons[1]:+%f$extra_icons[1] }%4F$extra_icons[2]%4F~/src%f $prefixes[1]%2F$extra_icons[3]master%f '\n  '%$frame_color[$color]F╰─' '%2F$prompt_char%f ${buffer:-$cursor}'\n)\n\nlocal -ra lean_8colors_right=(\n  ' $prefixes[2]%3F$extra_icons[4]5s%f${time:+ $prefixes[3]%6F$extra_icons[5]$time%f}' ' %$frame_color[$color]F─╮%f'\n  '' ' %$frame_color[$color]F─╯%f'\n)\n\nlocal -ra classic_left=(\n  '%$frame_color[$color]F╭─' '%F{$bg_color[$color]}$left_tail%K{$bg_color[$color]} ${extra_icons[1]:+%255F$extra_icons[1] %$sep_color[$color]F$left_subsep%f }%31F$extra_icons[2]%B%39F~%b%K{$bg_color[$color]}%31F/%B%39Fsrc%b%K{$bg_color[$color]} %$sep_color[$color]F$left_subsep%f %$prefix_color[$color]F$prefixes[1]%76F$extra_icons[3]master %k%$bg_color[$color]F$left_head%f'\n  '%$frame_color[$color]F╰─' '%f ${buffer:-$cursor}'\n)\n\nlocal -ra classic_right=(\n  '%$bg_color[$color]F$right_head%K{$bg_color[$color]}%f %$prefix_color[$color]F$prefixes[2]%101F5s $extra_icons[4]${time:+%$sep_color[$color]F$right_subsep %$prefix_color[$color]F$prefixes[3]%66F$time $extra_icons[5]}%k%F{$bg_color[$color]}$right_tail%f' '%$frame_color[$color]F─╮%f'\n  '' '%$frame_color[$color]F─╯%f'\n)\n\nlocal -ra pure_left=(\n  '' '%F{$pure_color[blue]}~/src%f %F{$pure_color[grey]}master%f ${pure_use_rprompt-%F{$pure_color[yellow]\\}5s%f }'\n  '' '%F{$pure_color[magenta]}$prompt_char%f ${buffer:-$cursor}'\n)\n\nlocal -ra pure_right=(\n  '${pure_use_rprompt+%F{$pure_color[yellow]\\}5s%f${time:+ }}${time:+%F{$pure_color[grey]\\}$time%f}' ''\n  '' ''\n)\n\nlocal -ra rainbow_left=(\n  '%$frame_color[$color]F╭─' '%F{${${extra_icons[1]:+7}:-4}}$left_tail${extra_icons[1]:+%K{7\\}%232F $extra_icons[1] %K{4\\}%7F$left_sep}%K{4}%254F $extra_icons[2]%B%255F~%b%K{4}%254F/%B%255Fsrc%b%K{4} %K{2}%4F$left_sep %0F$prefixes[1]$extra_icons[3]master %k%2F$left_head%f'\n  '%$frame_color[$color]F╰─' '%f ${buffer:-$cursor}'\n)\n\nlocal -ra rainbow_right=(\n  '%3F$right_head%K{3} %0F$prefixes[2]5s $extra_icons[4]%3F${time:+%7F$right_sep%K{7\\} %0F$prefixes[3]$time $extra_icons[5]%7F}%k$right_tail%f' '%$frame_color[$color]F─╮%f'\n  '' '%$frame_color[$color]F─╯%f'\n)\n\nfunction prompt_length() {\n  local -i COLUMNS=1024\n  local -i x y=$#1 m\n  if (( y )); then\n    while (( ${${(%):-$1%$y(l.1.0)}[-1]} )); do\n      x=y\n      (( y *= 2 ))\n    done\n    while (( y > x + 1 )); do\n      (( m = x + (y - x) / 2 ))\n      (( ${${(%):-$1%$m(l.x.y)}[-1]} = m ))\n    done\n  fi\n  typeset -g REPLY=$x\n}\n\nfunction print_prompt() {\n  [[ $parameters[extra_icons] == scalar* ]] && eval \"local -a extra_icons=$extra_icons\"\n  [[ $parameters[pure_color] == scalar* ]] && eval \"local -A pure_color=$pure_color\"\n  [[ $parameters[prefixes] == scalar* ]] && eval \"local -a prefixes=$prefixes\"\n\n  local left=${style}_left\n  local right=${style}_right\n  left=(\"${(@P)left}\")\n  right=(\"${(@P)right}\")\n  (( disable_rprompt )) && right=()\n  eval \"left=(${(@)left:/(#b)(*)/\\\"$match[1]\\\"})\"\n  eval \"right=(${(@)right:/(#b)(*)/\\\"$match[1]\\\"})\"\n  if (( num_lines == 1)); then\n    left=($left[2] $left[4])\n    right=($right[1] $right[3])\n  else\n    local c=76\n    [[ $style == pure ]] && c=$pure_color[magenta]\n    [[ $style == lean_8colors ]] && c=2\n    (( left_frame )) || left=('' $left[2] '' \"%F{$c}$prompt_char%f ${buffer:-$cursor}\")\n    (( right_frame )) || right=($right[1] '' '' '')\n  fi\n  local -i left_indent=prompt_indent\n  local -i right_indent=prompt_indent\n  prompt_length ${(g::):-$left[1]$left[2]$right[1]$right[2]}\n  local -i width=REPLY\n  while (( wizard_columns - width <= left_indent + right_indent )); do\n    if (( right_indent )); then\n      (( --right_indent ))\n    elif (( left_indent )); then\n      (( --left_indent ))\n    else\n      print -P '  [%3Fnot enough horizontal space to display this%f]'\n      return 0\n    fi\n  done\n  local -i i\n  for ((i = 1; i < $#left; i+=2)); do\n    local l=${(g::):-$left[i]$left[i+1]}\n    local r=${(g::):-$right[i]$right[i+1]}\n    prompt_length $l$r\n    local -i gap=$((wizard_columns - left_indent - right_indent - REPLY))\n    (( num_lines == 2 && i == 1 )) && local fill=$gap_char || local fill=' '\n    print -n  -- ${(pl:$left_indent:: :)}\n    print -nP -- $l\n    print -nP -- \"%$frame_color[$color]F${(pl:$gap::$fill:)}%f\"\n    print -P  -- $r\n  done\n}\n\nfunction href() {\n  local url=${${1//\\%/%%}//\\\\/\\\\\\\\}\n  if (( _p9k_term_has_href )); then\n    print -r -- '%{\\e]8;;'$url'\\a%}'$url'%{\\e]8;;\\a%}'\n  else\n    print -r -- $url\n  fi\n}\n\nfunction flowing() {\n  (( ${wizard_columns:-0} )) || local -i wizard_columns=COLUMNS\n  local opt\n  local -i centered indentation\n  while getopts 'ci:' opt; do\n    case $opt in\n      i)  indentation=$OPTARG;;\n      c)  centered=1;;\n      +c) centered=0;;\n      \\?) exit 1;;\n    esac\n  done\n  shift $((OPTIND-1))\n  local line word lines=()\n  for word in \"$@\"; do\n    prompt_length ${(g::):-\"$line $word\"}\n    if (( REPLY > wizard_columns )); then\n      [[ -z $line ]] || lines+=$line\n      line=\n    fi\n    if [[ -n $line ]]; then\n      line+=' '\n    elif (( $#lines )); then\n      line=${(pl:$indentation:: :)}\n    fi\n    line+=$word\n  done\n  [[ -z $line ]] || lines+=$line\n  for line in $lines; do\n    prompt_length ${(g::)line}\n    (( centered && REPLY < wizard_columns )) && print -n -- ${(pl:$(((wizard_columns - REPLY) / 2)):: :)}\n    print -P -- $line\n  done\n}\n\nfunction clear() {\n  if (( $+commands[clear] )) && command clear 2>/dev/null; then\n    return\n  fi\n  echoti clear 2>/dev/null\n  print -n -- \"\\e[H\\e[2J\\e[3J\"\n}\n\nfunction hide_cursor() {\n  (( $+terminfo[cnorm] )) || return\n  echoti civis 2>/dev/null\n}\n\nfunction show_cursor() {\n  local cnorm=${terminfo[cnorm]-}\n  if [[ $cnorm == *$'\\e[?25h'(|'\\e'*) ]]; then\n    print -n '\\e[?25h'\n  else\n    print -n $cnorm\n  fi\n}\n\nfunction consume_input() {\n  local key\n  while true; do\n    [[ -t 2 ]]\n    read -t0 -k key || break\n  done 2>/dev/null\n}\n\nfunction quit() {\n  consume_input\n  if [[ $1 == '-c' ]]; then\n    print -Pr -- ''\n    print -Pr -- '%b%k%f%u%s'\n    print -Pr -- '%F{3}--- stack trace (most recent call first) ---%f'\n    print -lr -- $funcfiletrace\n    print -Pr -- '%F{3}--- end of stack trace ---%f'\n    print -Pr -- ''\n    print -Pr -- 'Press %BENTER%b to continue.'\n    hide_cursor\n    read -s\n  fi\n  restore_screen\n  print\n  if (( force )); then\n    flowing Powerlevel10k configuration wizard has been aborted. To run it again, type:\n    print -P \"\"\n    print -P \"  %2Fp10k%f %Bconfigure%b\"\n    print -P \"\"\n  else\n    flowing                                                                        \\\n      Powerlevel10k configuration wizard has been aborted. It will run again       \\\n      next time unless you define at least one Powerlevel10k configuration option. \\\n      To define an option that does nothing except for disabling Powerlevel10k     \\\n      configuration wizard, type the following command:\n    print -P \"\"\n    print -P \"  %2Fecho%f %3F'POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true'%f >>! $__p9k_zshrc_u\"\n    print -P \"\"\n    flowing To run Powerlevel10k configuration wizard right now, type:\n    print -P \"\"\n    print -P \"  %2Fp10k%f %Bconfigure%b\"\n    print -P \"\"\n  fi\n  function quit() {}\n  stty echo 2>/dev/null\n  show_cursor\n  exit 1\n}\n\nlocal screen_widgets=()\nlocal -i max_priority\nlocal -i prompt_idx\nlocal choice\n\nfunction add_widget() {\n  local priority=$1\n  shift\n  local render=\"${(j: :)${(@q)*}}\"\n  screen_widgets+=(\"$priority\" \"$render\")\n  (( priority <= max_priority )) || max_priority=priority\n}\n\nfunction render_screen_pass() {\n  local -i pass=$1\n  local -i prev_pass cur_pass\n  local prev_render cur_render\n  for cur_pass cur_render in \"${(@)screen_widgets}\" 0 ''; do\n    if (( prev_pass <= pass && (cur_pass == 0 || cur_pass > pass) )); then\n      eval $prev_render\n    fi\n    prev_pass=cur_pass\n    prev_render=$cur_render\n  done\n}\n\nfunction get_columns() { return 'COLUMNS > 88 ? 88 : COLUMNS' }\nfunctions -M get_columns 0 0\n\nfunction render_screen() {\n  {\n    hide_cursor\n    while true; do\n      while true; do\n        typeset -gi wizard_columns='get_columns()'\n        typeset -gi wizard_lines=LINES\n        if (( wizard_columns < __p9k_wizard_columns )); then\n          clear\n          flowing -c %1FNot enough horizontal space.%f\n          print\n          flowing Make terminal window %Bwider%b or press %BCtrl-C%b to abort Powerlevel10k configuration wizard.\n        elif (( wizard_lines < __p9k_wizard_lines )); then\n          clear\n          flowing -c %1FNot enough vertical space.%f\n          print\n          flowing Make terminal window %Btaller%b or press %BCtrl-C%b to abort Powerlevel10k configuration wizard.\n        else\n          break\n        fi\n        while (( get_columns() == wizard_columns && LINES == wizard_lines )); do\n          sleep 1\n        done\n      done\n\n      local -a passes\n      () {\n        local -i pass\n        local render\n        for pass render in \"${(@)screen_widgets}\"; do\n          passes+=$pass\n        done\n        passes=(${(onu)passes})\n      }\n\n      local -i pass\n      for pass in $passes; do\n        local content=\"$(render_screen_pass $pass)\"\n        local lines=(\"${(@f)content}\")\n        (( $#lines > wizard_lines )) && continue\n        clear\n        print -rn -- $content\n        return 0\n      done\n\n      clear\n      flowing -c %1FNot enough vertical space.%f\n      print\n      flowing Make terminal window %Btaller%b or press %BCtrl-C%b to abort Powerlevel10k configuration wizard.\n      while (( get_columns() == wizard_columns && LINES == wizard_lines )); do\n        sleep 1\n      done\n    done\n  } always {\n    show_cursor\n  }\n}\n\nfunction add_prompt_n() {\n  add_widget 0 \"$@\" print_prompt\n  local var\n  for var; do\n    eval \"local ${(q)var}\"\n  done\n  if (( num_lines == 2 )); then\n    add_widget $(( 100 - ++prompt_idx )) print -P '  [%3Fnot enough vertical space to display this%f]'\n  fi\n}\n\nfunction add_prompt() {\n  add_widget 0 print\n  add_widget 1\n  add_prompt_n \"$@\"\n  add_widget 0 print\n  add_widget 2\n}\n\nfunction ask() {\n  local choices=$1\n  local -i lines columns wizard_lines wizard_columns\n  add_widget 0 print -P \"(q)  Quit and do nothing.\"\n  add_widget 0 print\n  add_widget $((max_priority + 1))\n  add_widget 0 print -P \"%BChoice [${choices}q]: %b\"\n  while true; do\n    =true\n    if (( LINES != lines || get_columns() != columns )); then\n      render_screen\n      lines=wizard_lines\n      columns=wizard_columns\n    fi\n    typeset -g choice=\n    if read -t1 -k choice; then\n      choice=${(L)choice}\n      if [[ $choice == q ]]; then\n        quit\n      fi\n      if [[ $choices == *$choice* ]]; then\n        screen_widgets=()\n        max_priority=0\n        prompt_idx=0\n        return\n      fi\n    fi\n  done\n}\n\nlocal -i greeting_printed=0\n\nfunction print_greeting() {\n  (( greeting_printed )) && return\n  if (( in_z4h_wizard )); then\n    flowing -c %3FZsh for Humans%f uses %4FPowerlevel10k%f to print command        \\\n               line prompt. This wizard will ask you a few questions and configure \\\n               prompt for you.\n  elif (( force )); then\n    flowing -c This is %4FPowerlevel10k configuration wizard%f. \\\n               It will ask you a few questions and configure your prompt.\n  else\n    flowing -c This is %4FPowerlevel10k configuration wizard%f.   \\\n               You are seeing it because you haven\\'t defined any \\\n               Powerlevel10k configuration options. It will ask   \\\n               you a few questions and configure your prompt.\n  fi\n  print -P \"\"\n}\n\nfunction iterm_get() {\n  /usr/libexec/PlistBuddy -c \"Print :$1\" ~/Library/Preferences/com.googlecode.iterm2.plist\n}\n\nlocal terminal iterm2_font_size iterm2_old_font=0 can_install_font=0\n\n() {\n  [[ $P9K_SSH == 0 ]] || return\n  if [[ \"$(uname)\" == Linux && \"$(uname -o)\" == Android ]]; then\n    (( $+commands[termux-reload-settings] )) || return\n    (( $+commands[curl] )) || return\n    if [[ -f ~/.termux/font.ttf ]]; then\n      [[ -r ~/.termux/font.ttf ]] || return\n      [[ -w ~/.termux/font.ttf ]] || return\n      ! grep -q 'MesloLGS NF' ~/.termux/font.ttf 2>/dev/null || return\n    fi\n    if [[ -f ~/.termux ]]; then\n      [[ -d ~/.termux && -w ~/.termux ]] || return\n    else\n      [[ -w ~ ]] || return\n    fi\n    terminal=Termux\n    return 0\n  fi\n  if [[ \"$(uname)\" == Darwin && $TERM_PROGRAM == iTerm.app ]]; then\n    (( $+commands[curl] )) || return\n    [[ $TERM_PROGRAM_VERSION == [2-9]* ]] || return\n    if [[ -f ~/Library/Fonts ]]; then\n      [[ -d ~/Library/Fonts && -w ~/Library/Fonts ]] || return\n    else\n      [[ -d ~/Library && -w ~/Library ]] || return\n    fi\n    [[ -x /usr/libexec/PlistBuddy ]] || return\n    [[ -x /usr/bin/plutil ]] || return\n    [[ -x /usr/bin/defaults ]] || return\n    [[ -f ~/Library/Preferences/com.googlecode.iterm2.plist ]] || return\n    [[ -r ~/Library/Preferences/com.googlecode.iterm2.plist ]] || return\n    [[ -w ~/Library/Preferences/com.googlecode.iterm2.plist ]] || return\n    local guid1 && guid1=\"$(iterm_get '\"Default Bookmark Guid\"' 2>/dev/null)\" || return\n    local guid2 && guid2=\"$(iterm_get '\"New Bookmarks\":0:\"Guid\"' 2>/dev/null)\" || return\n    local font && font=\"$(iterm_get '\"New Bookmarks\":0:\"Normal Font\"' 2>/dev/null)\" || return\n    [[ $guid1 == $guid2 ]] || return\n    [[ $font != 'MesloLGS-NF-Regular '<-> ]] || return\n    [[ $font == (#b)*' '(<->) ]] || return\n    [[ $font == 'MesloLGSNer-Regular '<-> ]] && iterm2_old_font=1\n    iterm2_font_size=$match[1]\n    terminal=iTerm2\n    return 0\n  fi\n  return 1\n} && can_install_font=1\n\nfunction run_command() {\n  local msg=$1\n  shift\n  [[ -n $msg ]] && print -nP -- \"$msg ...\"\n  local err && err=\"$(\"$@\" 2>&1)\" || {\n    print -P \" %1FERROR%f\"\n    print -P \"\"\n    print -nP \"%BCommand:%b \"\n    print -r -- \"${(@q)*}\"\n    if [[ -n $err ]]; then\n      print -P \"\"\n      print -r -- $err\n    fi\n    quit -c\n  }\n  [[ -n $msg ]] && print -P \" %2FOK%f\"\n}\n\nfunction install_font() {\n  clear\n  case $terminal in\n    Termux)\n      command mkdir -p -- ~/.termux || quit -c\n      run_command \"Downloading %BMesloLGS NF Regular.ttf%b\" \\\n        curl -fsSL -o ~/.termux/font.ttf \"$font_base_url/MesloLGS%20NF%20Regular.ttf\"\n      run_command \"Reloading %BTermux%b settings\" termux-reload-settings\n    ;;\n    iTerm2)\n      command mkdir -p -- ~/Library/Fonts || quit -c\n      local style\n      for style in Regular Bold Italic 'Bold Italic'; do\n        local file=\"MesloLGS NF ${style}.ttf\"\n        run_command \"Downloading %B$file%b\" \\\n          curl -fsSL -o ~/Library/Fonts/$file.tmp \"$font_base_url/${file// /%20}\"\n        command mv -f -- ~/Library/Fonts/$file{.tmp,} || quit -c\n      done\n      print -nP -- \"Changing %BiTerm2%b settings ...\"\n      local size=$iterm2_font_size\n      [[ $size == 12 ]] && size=13\n      local k t v settings=(\n        '\"Normal Font\"'                                 string '\"MesloLGS-NF-Regular '$size'\"'\n        '\"Terminal Type\"'                               string '\"xterm-256color\"'\n        '\"Horizontal Spacing\"'                          real   1\n        '\"Vertical Spacing\"'                            real   1\n        '\"Minimum Contrast\"'                            real   0\n        '\"Use Bold Font\"'                               bool   1\n        '\"Use Bright Bold\"'                             bool   1\n        '\"Use Italic Font\"'                             bool   1\n        '\"ASCII Anti Aliased\"'                          bool   1\n        '\"Non-ASCII Anti Aliased\"'                      bool   1\n        '\"Use Non-ASCII Font\"'                          bool   0\n        '\"Ambiguous Double Width\"'                      bool   0\n        '\"Draw Powerline Glyphs\"'                       bool   1\n        '\"Only The Default BG Color Uses Transparency\"' bool   1\n      )\n      for k t v in $settings; do\n        /usr/libexec/PlistBuddy -c \"Set :\\\"New Bookmarks\\\":0:$k $v\" \\\n          ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null && continue\n        run_command \"\" /usr/libexec/PlistBuddy -c \\\n          \"Add :\\\"New Bookmarks\\\":0:$k $t $v\" ~/Library/Preferences/com.googlecode.iterm2.plist\n      done\n      print -P \" %2FOK%f\"\n      print -nP \"Updating %BiTerm2%b settings cache ...\"\n      run_command \"\" /usr/bin/defaults read com.googlecode.iterm2\n      sleep 3\n      print -P \" %2FOK%f\"\n      sleep 1\n      clear\n      hide_cursor\n      print\n      flowing +c \"%2FMeslo Nerd Font%f\" successfully installed.\n      print -P \"\"\n      () {\n        local out\n        out=$(/usr/bin/defaults read 'Apple Global Domain' NSQuitAlwaysKeepsWindows 2>/dev/null) || return\n        [[ $out == 1 ]] || return\n        out=\"$(iterm_get OpenNoWindowsAtStartup 2>/dev/null)\" || return\n        [[ $out == false ]]\n      }\n      if (( $? )); then\n        flowing +c Please \"%Brestart iTerm2%b\" for the changes to take effect.\n        print -P \"\"\n        flowing +c -i 5 \"  1. Click\" \"%BiTerm2 → Quit iTerm2%b\" or press \"%B⌘ Q%b.\"\n        flowing +c -i 5 \"  2. Open %BiTerm2%b.\"\n        print -P \"\"\n        flowing +c \"It's\" important to \"%Brestart iTerm2%b\" by following the instructions above.   \\\n                   \"It's\" \"%Bnot enough%b\" to close iTerm2 by clicking on the red circle. You must \\\n                   click \"%BiTerm2 → Quit iTerm2%b\" or press \"%B⌘ Q%b.\"\n      else\n        flowing +c Please \"%Brestart your computer%b\" for the changes to take effect.\n      fi\n      while true; do sleep 60 2>/dev/null; done\n    ;;\n  esac\n\n  return 0\n}\n\nfunction ask_font() {\n  (( can_install_font )) || return 0\n  add_widget 0 print_greeting\n  if (( iterm2_old_font )); then\n    add_widget 0 flowing -c A new version of '%2FMeslo Nerd Font%f' is available. '%BInstall?%b'\n  else\n    add_widget 0 flowing -c %BInstall '%b%2FMeslo Nerd Font%f%B?%b'\n  fi\n  add_widget 0 print\n  add_widget 0 print -P \"%B(y)  Yes (recommended).%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No. Use the current font.%b\"\n  add_widget 0 print\n  add_widget 1\n  ask yn\n  greeting_printed=1\n  case $choice in\n    y)\n      ask_remove_font || return\n      install_font\n    ;;\n    n) ;;\n  esac\n  return 0\n}\n\nfunction print_file_path() {\n  local file=$1\n  if (( ${(m)#file} > wizard_columns - 2 )); then\n    file[wizard_columns-4,-1]='...'\n  fi\n  add_widget 0 print -P \"  %B${file//\\%/%%}%b\"\n}\n\nfunction ask_remove_font() {\n  local font\n  local -a fonts\n  local -i protected\n  for font in {,/System,~}/Library/Fonts/**/*[Mm]eslo*.(ttf|otf)(N:A); do\n    [[ -f $font && -r $font ]] || continue\n    [[ $font == ~/Library/Fonts/'MesloLGS NF '(Regular|Bold|Italic|Bold\\ Italic).ttf ]] && continue\n    [[ \"$(<$font)\" == *\"MesloLGS NF\"$'\\0'* ]] || continue\n    fonts+=$font\n    [[ -w ${font:h} ]] || protected=1\n  done\n  (( $#fonts )) || return 0\n  add_widget 0 flowing -c A variant of \"%2FMeslo Nerd Font%f\" is already installed.\n  add_widget 0 print -P \"\"\n  for font in $fonts; do\n    add_widget 0 print_file_path $font\n  done\n  add_widget 0 print -P \"\"\n  if (( protected )); then\n    if (( $#fonts == 1 )); then\n      add_widget 0 flowing Please %Bdelete%b this file and run '%2Fp10k%f %Bconfigure%b.'\n    else\n      add_widget 0 flowing Please %Bdelete%b these files and run '%2Fp10k%f %Bconfigure%b.'\n    fi\n    add_widget 0 print\n    restore_screen\n    local pass render\n    for pass render in \"${(@)screen_widgets}\"; do\n      (( pass == 0 )) && eval $render\n    done\n    exit 1\n  fi\n  if (( $#fonts == 1 )); then\n    add_widget 0 flowing -c \"%BDelete this file?%b\"\n  else\n    add_widget 0 flowing -c \"%BDelete these files?%b\"\n  fi\n  add_widget 0 print -P \"\"\n  add_widget 0 print -P \"%B(y)  Yes (recommended).%b\"\n  add_widget 0 print -P \"\"\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask yr\n  case $choice in\n    r) return 1;;\n    y) zf_rm -f -- $fonts || quit -c;;\n  esac\n  return 0\n}\n\nfunction ask_diamond() {\n  local extra\n  add_widget 0 print_greeting\n  add_widget 0 flowing -c %BDoes this look like a%b %2Fdiamond%f '%B(rotated square)?%b'\n  add_widget 0 flowing -c reference: \"$(href https://graphemica.com/%E2%97%86)\"\n  add_widget 0 print\n  add_widget 0 flowing -c -- \"--->  \\uE0B2\\uE0B0  <---\"\n  add_widget 0 print\n  add_widget 3\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_widget 0 print\n  add_widget 2\n  if (( can_install_font )); then\n    extra+=r\n    add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  fi\n  ask yn$extra\n  greeting_printed=1\n  case $choice in\n    r) return 1;;\n    y) cap_diamond=1;;\n    n) cap_diamond=0;;\n  esac\n  return 0\n}\n\nfunction ask_lock() {\n  [[ -n $2 ]] && add_widget 0 flowing -c \"$2\"\n  add_widget 0 flowing -c \"%BDoes this look like a %b%2Flock%f%B?%b\"\n  add_widget 0 flowing -c \"reference: $(href https://fontawesome.com/icons/lock)\"\n  add_widget 0 print\n  add_widget 0 flowing -c -- \"--->  $1  <---\"\n  add_widget 0 print\n  add_widget 3\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ynr\n  case $choice in\n    r) return 1;;\n    y) cap_lock=1;;\n    n) cap_lock=0;;\n  esac\n  return 0\n}\n\nfunction ask_python() {\n  add_widget 0 flowing -c %BDoes this look like a \"%b%2FPython logo%f%B?%b\"\n  add_widget 0 flowing -c reference: \"$(href https://fontawesome.com/icons/python)\"\n  add_widget 0 print -P \"\"\n  add_widget 0 flowing -c -- \"--->  \\uE63C  <---\"\n  add_widget 0 print -P \"\"\n  add_widget 3\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ynr\n  case $choice in\n    r) return 1;;\n    y) cap_python=1;;\n    n) cap_python=0;;\n  esac\n  return 0\n}\n\nfunction ask_quotes() {\n  add_widget 0 flowing -c %BDoes this look like%b \"%2F><%f\" %Bbut taller and \"fatter?%b\"\n  add_widget 0 print -P \"\"\n  add_widget 0 flowing -c -- \"--->  \\u276F\\u276E  <---\"\n  add_widget 0 print -P \"\"\n  add_widget 3\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ynr\n  case $choice in\n    r) return 1;;\n    y) cap_quotes=1;;\n    n) cap_quotes=0;;\n  esac\n  return 0\n}\n\nfunction ask_arrow() {\n  # This condition holds as long as zsh is compiled with unicode 9 support.\n  if (( ${(m)#${(g::)1}} != 1 )); then\n    cap_arrow=0\n    return\n  fi\n  [[ -n $2 ]] && add_widget 0 flowing -c \"$2\"\n  add_widget 0 flowing -c %BDoes this look like an%b \"%2Fupwards arrow%f%B?%b\"\n  add_widget 0 flowing -c reference: \"$(href https://graphemica.com/%F0%9F%A0%89)\"\n  add_widget 0 print -P \"\"\n  add_widget 0 flowing -c -- \"--->  $1  <---\"\n  add_widget 0 print -P \"\"\n  add_widget 3\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ynr\n  case $choice in\n    r) return 1;;\n    y) cap_arrow=1;;\n    n) cap_arrow=0;;\n  esac\n  return 0\n}\n\nfunction print_indented() {\n  local -i max_width=$1\n  local text=$2\n  local -i indent='(wizard_columns - max_width) / 2'\n  print -P \"${(l:$indent:: :)}$text\"\n}\n\nfunction ask_width() {\n  add_widget 0 flowing -c %BWhat digit is the%b \"%2Fdownwards arrow%f\" %Bpointing \"at?%b\"\n  add_widget 0 print -P \"\"\n  add_widget 0 print_indented 11 '%3F\\UF0734%f %3F\\UF0734%f %3F\\UF0734%f %2F\\UF072E%f'\n  add_widget 0 print_indented 11 '     111222'\n  add_widget 0 print -P \"\"\n  add_widget 3\n  add_widget 0 print -P \"%B(1)  It is pointing at '1'.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 print -P \"%B(2)  It is pointing at '2'.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 print -P \"%B(3)  Something else.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 123r\n  case $choice in\n    r) return 1;;\n    1) cap_arrow=1;;\n    2|3) cap_arrow=0;;\n  esac\n  return 0\n}\n\nfunction ask_icon_padding() {\n  if [[ $POWERLEVEL9K_MODE == (powerline|compatible|ascii) ]]; then\n    POWERLEVEL9K_ICON_PADDING=none\n    return 0\n  fi\n\n  local text=\"X\"\n  text+=\"%1F${icons[VCS_GIT_ICON]// }%fX\"\n  text+=\"%2F${icons[VCS_GIT_GITHUB_ICON]// }%fX\"\n  text+=\"%3F${icons[TIME_ICON]// }%fX\"\n  text+=\"%4F${icons[RUBY_ICON]// }%fX\"\n  text+=\"%5F${icons[HOME_ICON]// }%fX\"\n  text+=\"%6F${icons[HOME_SUB_ICON]// }%fX\"\n  text+=\"%1F${icons[FOLDER_ICON]// }%fX\"\n  text+=\"%2F${icons[RAM_ICON]// }%fX\"\n\n  add_widget 0 flowing -c %BDo all these icons \"%b%2Ffit between the crosses%f%B?%b\"\n  add_widget 0 print -P \"\"\n  add_widget 0 flowing -c -- \"--->  $text  <---\"\n  add_widget 0 print -P \"\"\n  add_widget 3\n  add_widget 0 flowing +c -i 5 \"%B(y)  Yes.\" Icons are very close to the crosses but there is \"%b%2Fno overlap%f%B.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 flowing +c -i 5 \"%B(n)  No.\" Some icons \"%b%2Foverlap%f%B\" neighbouring crosses.%b\n  add_widget 0 print -P \"\"\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ynr\n  case $choice in\n    r) return 1;;\n    y)\n      POWERLEVEL9K_ICON_PADDING=none\n      options+='small icons'\n    ;;\n    n)\n      POWERLEVEL9K_ICON_PADDING=moderate\n      options+='large icons'\n      up_triangle+=' '\n      down_triangle+=' '\n      slanted_bar='\\uE0BD '\n    ;;\n  esac\n  return 0\n}\n\nfunction ask_style() {\n  if (( terminfo[colors] < 256 )); then\n    style=lean_8colors\n    left_frame=0\n    right_frame=0\n    frame_color=(0 7 2 4)\n    color_name=(Black White Green Blue)\n    options+=lean_8colors\n    return 0\n  fi\n  local extra\n  add_widget 0 flowing -c \"%BPrompt Style%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Lean.%b\"\n  add_prompt style=lean left_frame=0 right_frame=0\n  add_widget 0 print -P \"%B(2)  Classic.%b\"\n  add_prompt style=classic\n  add_widget 0 print -P \"%B(3)  Rainbow.%b\"\n  add_prompt style=rainbow\n  if [[ $POWERLEVEL9K_MODE != ascii ]]; then\n    extra+=4\n    add_widget 0 print -P \"%B(4)  Pure.%b\"\n    add_prompt style=pure\n  fi\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 123${extra}r\n  case $choice in\n    r) return 1;;\n    1) style=lean; left_frame=0; right_frame=0; options+=lean;;\n    2) style=classic; options+=classic;;\n    3) style=rainbow; options+=rainbow;;\n    4) style=pure; empty_line=1; options+=pure;;\n  esac\n  return 0\n}\n\nfunction ask_charset() {\n  [[ $style == (lean*|classic|rainbow) && $POWERLEVEL9K_MODE != ascii ]] || return 0\n  add_widget 0 flowing -c \"%BCharacter Set%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Unicode.%b\"\n  add_prompt\n  add_widget 0 print -P \"%B(2)  ASCII.%b\"\n  add_prompt         \\\n    left_sep=        \\\n    right_sep=       \\\n    left_subsep='|'  \\\n    right_subsep='|' \\\n    left_head=       \\\n    right_head=      \\\n    prompt_char='>'  \\\n    left_frame=0     \\\n    right_frame=0\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12r\n  case $choice in\n    r) return 1;;\n    1) options+=unicode;;\n    2)\n      options+=ascii\n      left_sep=\n      right_sep=\n      left_subsep='|'\n      right_subsep='|'\n      left_head=\n      right_head=\n      prompt_char='>'\n      left_frame=0\n      right_frame=0\n      POWERLEVEL9K_MODE=ascii\n      POWERLEVEL9K_ICON_PADDING=none\n      cap_diamond=0\n      cap_python=0\n      cap_arrow=0\n      cap_lock=0\n      cap_quotes=0\n    ;;\n  esac\n  return 0\n}\n\nfunction ask_color_scheme() {\n  (( terminfo[colors] < 256 )) && return\n  if [[ $style == lean ]]; then\n    add_widget 0 flowing -c \"%BPrompt Colors%b\"\n    add_widget 0 print -P \"\"\n    add_widget 1\n    add_widget 0 print -P \"%B(1)  256 colors.%b\"\n    add_prompt style=lean\n    add_widget 0 print -P \"%B(2)  8 colors.%b\"\n    add_prompt style=lean_8colors\n    add_widget 0 print -P \"(r)  Restart from the beginning.\"\n    ask 12r\n    case $choice in\n      r) return 1;;\n      1) style=lean;;\n      2)\n        style=lean_8colors\n        frame_color=(0 7 2 4)\n        color_name=(Black White Green Blue)\n      ;;\n    esac\n    options=(${options:#lean} $style)\n  elif [[ $style == pure && $has_truecolor == 1 ]]; then\n    add_widget 0 flowing -c \"%BPrompt Colors%b\"\n    add_widget 0 print -P \"\"\n    add_widget 1\n    add_widget 0 print -P \"%B(1)  Original.%b\"\n    add_prompt \"pure_color=(${(j: :)${(@q)${(@kv)pure_original}}})\"\n    add_widget 0 print -P \"%B(2)  Snazzy.%b\"\n    add_prompt \"pure_color=(${(j: :)${(@q)${(@kv)pure_snazzy}}})\"\n    add_widget 0 print -P \"(r)  Restart from the beginning.\"\n    ask 12r\n    case $choice in\n      r) return 1;;\n      1)\n        pure_color=(${(kv)pure_original})\n        options+=original\n      ;;\n      2)\n        pure_color=(${(kv)pure_snazzy})\n        options+=snazzy\n      ;;\n    esac\n  fi\n  return 0\n}\n\nfunction ask_color() {\n  [[ $style != classic ]] && return\n  add_widget 0 flowing -c \"%BPrompt Color%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  $color_name[1].%b\"\n  add_prompt color=1\n  add_widget 0 print -P \"%B(2)  $color_name[2].%b\"\n  add_prompt color=2\n  add_widget 0 print -P \"%B(3)  $color_name[3].%b\"\n  add_prompt color=3\n  add_widget 0 print -P \"%B(4)  $color_name[4].%b\"\n  add_prompt color=4\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 1234r\n  case $choice in\n    r) return 1;;\n    [1-4]) color=$choice;;\n  esac\n  options+=${${(L)color_name[color]}//ı/i}\n  return 0\n}\n\nfunction print_frame_marker() {\n  local label=\"(1)  $color_name[1].\"\n  local -i n='wizard_columns - 7'\n  local -i m=$((n - $#label))\n  print -P \"${(l:$n:: :)}frame\"\n  print -P \"%B$label%b${(l:$m:: :)}    |\"\n  print -P \"${(l:$n:: :)}    v\"\n}\n\nfunction ask_ornaments_color() {\n  [[ $style != (rainbow|lean*) || $num_lines == 1 ]] && return\n  [[ $gap_char == ' ' && $left_frame == 0 && $right_frame == 0 ]] && return\n  local ornaments=()\n  [[ $gap_char != ' ' ]]          && ornaments+=Connection\n  (( left_frame || right_frame )) && ornaments+=Frame\n  add_widget 0 flowing -c \"%B${(j: & :)ornaments} Color%b\"\n  if (( left_frame || right_frame )); then\n    add_widget 0 print_frame_marker\n    add_widget 3 print -P \"%B(1)  $color_name[1].%b\"\n    add_prompt_n color=1\n    add_widget 0 print\n    add_widget 2\n  else\n    add_widget 1\n    add_widget 0 print -P \"%B(1)  $color_name[1].%b\"\n    add_prompt color=1\n  fi\n  add_widget 0 print -P \"%B(2)  $color_name[2].%b\"\n  add_prompt color=2\n  add_widget 0 print -P \"%B(3)  $color_name[3].%b\"\n  add_prompt color=3\n  add_widget 0 print -P \"%B(4)  $color_name[4].%b\"\n  add_prompt color=4\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 1234r\n  case $choice in\n    r) return 1;;\n    [1-4]) color=$choice;;\n  esac\n  options+=${${(L)color_name[color]}//ı/i}-ornaments\n  return 0\n}\n\nfunction ask_time() {\n  local extra\n  add_widget 0 flowing -c \"%BShow current time?%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_prompt time=\n  add_widget 0 print -P \"%B(1)  12-hour format.%b\"\n  add_prompt time=$time_12h\n  add_widget 0 print -P \"%B(2)  24-hour format.%b\"\n  add_prompt time=$time_24h\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask n12r\n  case $choice in\n    r) return 1;;\n    n) time=;;\n    1) time=$time_12h; options+='12h time';;\n    2) time=$time_24h; options+='24h time';;\n  esac\n  return 0\n}\n\nfunction ask_use_rprompt() {\n  [[ $style != pure ]] && return\n  add_widget 0 flowing -c \"%BNon-permanent content location%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Left.%b\"\n  add_prompt\n  add_widget 0 print -P \"%B(2)  Right.%b\"\n  add_prompt pure_use_rprompt=\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12r\n  case $choice in\n    r) return 1;;\n    1) ;;\n    2) pure_use_rprompt=; options+=rprompt;;\n  esac\n  return 0\n}\n\nfunction os_icon_name() {\n  local uname=\"$(uname)\"\n  if [[ $uname == Linux && \"$(uname -o 2>/dev/null)\" == Android ]]; then\n    echo ANDROID_ICON\n  else\n    case $uname in\n      SunOS)                     echo SUNOS_ICON;;\n      Darwin)                    echo APPLE_ICON;;\n      CYGWIN_NT-*|MSYS_NT-*|MINGW64_NT-*|MINGW32_NT-*)   echo WINDOWS_ICON;;\n      FreeBSD|OpenBSD|DragonFly) echo FREEBSD_ICON;;\n      Linux)\n        local os_release_id\n        if [[ -r /etc/os-release ]]; then\n          local lines=(${(f)\"$(</etc/os-release)\"})\n          lines=(${(@M)lines:#ID=*})\n          (( $#lines == 1 )) && os_release_id=${(Q)${lines[1]#ID=}}\n        elif [[ -e /etc/artix-release ]]; then\n          os_release_id=artix\n        fi\n        case $os_release_id in\n          *arch*)                  echo LINUX_ARCH_ICON;;\n          *raspbian*)              echo LINUX_RASPBIAN_ICON;;\n          *debian*)\n            if [[ -f /etc/apt/sources.list.d/raspi.list ]]; then\n              echo LINUX_RASPBIAN_ICON\n            else\n              echo LINUX_DEBIAN_ICON\n            fi\n          ;;\n          *raspbian*)              echo LINUX_RASPBIAN_ICON;;\n          *ubuntu*)                echo LINUX_UBUNTU_ICON;;\n          *elementary*)            echo LINUX_ELEMENTARY_ICON;;\n          *fedora*)                echo LINUX_FEDORA_ICON;;\n          *coreos*)                echo LINUX_COREOS_ICON;;\n          *kali*)                  echo LINUX_KALI_ICON;;\n          *gentoo*)                echo LINUX_GENTOO_ICON;;\n          *mageia*)                echo LINUX_MAGEIA_ICON;;\n          *centos*)                echo LINUX_CENTOS_ICON;;\n          *opensuse*|*tumbleweed*) echo LINUX_OPENSUSE_ICON;;\n          *sabayon*)               echo LINUX_SABAYON_ICON;;\n          *slackware*)             echo LINUX_SLACKWARE_ICON;;\n          *linuxmint*)             echo LINUX_MINT_ICON;;\n          *alpine*)                echo LINUX_ALPINE_ICON;;\n          *aosc*)                  echo LINUX_AOSC_ICON;;\n          *nixos*)                 echo LINUX_NIXOS_ICON;;\n          *devuan*)                echo LINUX_DEVUAN_ICON;;\n          *manjaro*)               echo LINUX_MANJARO_ICON;;\n          *void*)                  echo LINUX_VOID_ICON;;\n          *artix*)                 echo LINUX_ARTIX_ICON;;\n          *rhel*)                  echo LINUX_RHEL_ICON;;\n          amzn)                    echo LINUX_AMZN_ICON;;\n          endeavouros)             echo LINUX_ENDEAVOUROS_ICON;;\n          rocky)                   echo LINUX_ROCKY_ICON;;\n          almalinux)               echo LINUX_ALMALINUX_ICON;;\n          guix)                    echo LINUX_GUIX_ICON;;\n          neon)                    echo LINUX_NEON_ICON;;\n          *)                       echo LINUX_ICON;;\n        esac\n        ;;\n    esac\n  fi\n}\n\nfunction ask_extra_icons() {\n  if [[ $style == pure || $POWERLEVEL9K_MODE == (powerline|compatible|ascii) ]]; then\n    return 0\n  fi\n  local os_icon=${(g::)icons[$(os_icon_name)]}\n  local dir_icon=${(g::)icons[HOME_SUB_ICON]}\n  local vcs_icon=${(g::)icons[VCS_GIT_GITHUB_ICON]}\n  local branch_icon=${(g::)icons[VCS_BRANCH_ICON]}\n  local duration_icon=${(g::)icons[EXECUTION_TIME_ICON]}\n  local time_icon=${(g::)icons[TIME_ICON]}\n  branch_icon=${branch_icon// }\n  local few=('' '' '' '' '')\n  local many=(\"$os_icon\" \"$dir_icon \" \"$vcs_icon $branch_icon \" \"$duration_icon \" \"$time_icon \")\n  add_widget 0 flowing -c \"%BIcons%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Few icons.%b\"\n  add_prompt \"extra_icons=(${(j: :)${(@q)few}})\"\n  add_widget 0 print -P \"%B(2)  Many icons.%b\"\n  add_prompt \"extra_icons=(${(j: :)${(@q)many}})\"\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12r\n  case $choice in\n    r) return 1;;\n    1) extra_icons=(\"$few[@]\"); options+='few icons';;\n    2) extra_icons=(\"$many[@]\"); options+='many icons';;\n  esac\n  return 0\n}\n\nfunction ask_prefixes() {\n  if [[ $style == pure ]]; then\n    return 0\n  fi\n  local concise=('' '' '')\n  local fluent=('on ' 'took ' 'at ')\n  add_widget 0 flowing -c \"%BPrompt Flow%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Concise.%b\"\n  add_prompt \"prefixes=(${(j: :)${(@q)concise}})\"\n  add_widget 0 print -P \"%B(2)  Fluent.%b\"\n  add_prompt \"prefixes=(${(j: :)${(@q)fluent}})\"\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12r\n  case $choice in\n    r) return 1;;\n    1) prefixes=(\"$concise[@]\"); options+=concise;;\n    2) prefixes=(\"$fluent[@]\"); options+=fluent;;\n  esac\n  return 0\n}\n\nfunction ask_separators() {\n  if [[ $style != (classic|rainbow) || $cap_diamond != 1 ]]; then\n    return 0\n  fi\n  local extra\n  add_widget 0 flowing -c \"%BPrompt Separators%b\"\n  add_widget 0 print -Pl \"              separator\" \"%B(1)  Angled.%b /\" \"            /\"\n  add_widget 3 print -P \"%B(1)  Angled.%b\"\n  add_prompt_n left_sep=$right_triangle right_sep=$left_triangle left_subsep=$right_angle right_subsep=$left_angle\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"%B(2)  Vertical.%b\"\n  add_prompt left_sep='' right_sep='' left_subsep=$vertical_bar right_subsep=$vertical_bar\n  if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then\n    extra+=3\n    add_widget 0 print -P \"%B(3)  Slanted.%b\"\n    add_prompt left_sep=$down_triangle right_sep=$up_triangle left_subsep=$slanted_bar right_subsep=$slanted_bar\n    extra+=4\n    add_widget 0 print -P \"%B(4)  Round.%b\"\n    add_prompt left_sep=$right_circle right_sep=$left_circle left_subsep=$right_arc right_subsep=$left_arc\n  fi\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12${extra}r\n  case $choice in\n    r) return 1;;\n    1)\n      left_sep=$right_triangle\n      right_sep=$left_triangle\n      left_subsep=$right_angle\n      right_subsep=$left_angle\n      options+='angled separators'\n    ;;\n    2)\n      left_sep=''\n      right_sep=''\n      left_subsep=$vertical_bar\n      right_subsep=$vertical_bar\n      options+='vertical separators'\n    ;;\n    3)\n      left_sep=$down_triangle\n      right_sep=$up_triangle\n      left_subsep=$slanted_bar\n      right_subsep=$slanted_bar\n      options+='slanted separators'\n    ;;\n    4)\n      left_sep=$right_circle\n      right_sep=$left_circle\n      left_subsep=$right_arc\n      right_subsep=$left_arc\n      options+='round separators'\n    ;;\n  esac\n  return 0\n}\n\nfunction ask_heads() {\n  if [[ $style != (classic|rainbow) || $POWERLEVEL9K_MODE == ascii ]]; then\n    return 0\n  fi\n  local extra\n  add_widget 0 flowing -c \"%BPrompt Heads%b\"\n  add_widget 0 print -Pl \"                  head\" \"%B(1)  Flat.%b         |\" \"                   v\"\n  add_widget 3 print -P \"%B(1)  Flat.%b\"\n  add_prompt_n left_head= right_head=\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"%B(2)  Blurred.%b\"\n  add_prompt left_head=$fade_out right_head=$fade_in\n  if (( cap_diamond )); then\n    extra+=3\n    add_widget 0 print -P \"%B(3)  Sharp.%b\"\n    add_prompt left_head=$right_triangle right_head=$left_triangle\n    if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then\n      extra+=4\n      add_widget 0 print -P \"%B(4)  Slanted.%b\"\n      add_prompt left_head=$down_triangle right_head=$up_triangle\n      extra+=5\n      add_widget 0 print -P \"%B(5)  Round.%b\"\n      add_prompt left_head=$right_circle right_head=$left_circle\n    fi\n  fi\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12${extra}r\n  case $choice in\n    r) return 1;;\n    1)\n      left_head=\n      right_head=\n      options+='flat heads'\n    ;;\n    2)\n      left_head=$fade_out\n      right_head=$fade_in\n      options+='blurred heads'\n    ;;\n    3)\n      left_head=$right_triangle\n      right_head=$left_triangle\n      options+='sharp heads'\n    ;;\n    4)\n      left_head=$down_triangle\n      right_head=$up_triangle\n      options+='slanted heads'\n    ;;\n    5)\n      left_head=$right_circle\n      right_head=$left_circle\n      options+='round heads'\n    ;;\n  esac\n  return 0\n}\n\nfunction print_tail_marker() {\n  local label='(1)  Flat.'\n  local -i n='wizard_columns - 7'\n  local -i m=$((n - $#label))\n  print -P \"${(l:$n:: :)}tail\"\n  print -P \"%B$label%b${(l:$m:: :)}  |\"\n  print -P \"${(l:$n:: :)}  v\"\n}\n\nfunction ask_tails() {\n  if [[ $style != (classic|rainbow) || $POWERLEVEL9K_MODE == ascii ]]; then\n    return 0\n  fi\n  local extra\n  add_widget 0 flowing -c \"%BPrompt Tails%b\"\n  add_widget 0 print_tail_marker\n  add_widget 3 print -P \"%B(1)  Flat.%b\"\n  add_prompt_n left_tail='' right_tail=''\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"%B(2)  Blurred.%b\"\n  add_prompt left_tail=$fade_in right_tail=$fade_out\n  if (( cap_diamond )); then\n    extra+=3\n    add_widget 0 print -P \"%B(3)  Sharp.%b\"\n    add_prompt left_tail=$left_triangle right_tail=$right_triangle\n    if [[ $POWERLEVEL9K_MODE == nerdfont-* ]]; then\n      extra+=4\n      add_widget 0 print -P \"%B(4)  Slanted.%b\"\n      add_prompt left_tail=$up_triangle right_tail=$down_triangle\n      extra+=5\n      add_widget 0 print -P \"%B(5)  Round.%b\"\n      add_prompt left_tail=$left_circle right_tail=$right_circle\n    fi\n  fi\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12${extra}r\n  case $choice in\n    r) return 1;;\n    1) left_tail='';       right_tail='';        options+='flat tails';;\n    2) left_tail=$fade_in; right_tail=$fade_out; options+='blurred tails';;\n    3)\n      left_tail=$left_triangle\n      right_tail=$right_triangle\n      options+='sharp tails'\n    ;;\n    4)\n      left_tail=$up_triangle\n      right_tail=$down_triangle\n      options+='slanted tails'\n    ;;\n    5)\n      left_tail=$left_circle\n      right_tail=$right_circle\n      options+='round tails'\n    ;;\n  esac\n  return 0\n}\n\nfunction ask_num_lines() {\n  add_widget 0 flowing -c \"%BPrompt Height%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  One line.%b\"\n  add_prompt num_lines=1\n  add_widget 0 print -P \"%B(2)  Two lines.%b\"\n  add_prompt num_lines=2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12r\n  case $choice in\n    r) return 1;;\n    1) num_lines=1; options+='1 line';;\n    2) num_lines=2; options+='2 lines';;\n  esac\n  return 0\n}\n\nfunction ask_gap_char() {\n  [[ $num_lines != 2 || $style == pure ]] && return\n  if [[ $POWERLEVEL9K_MODE == ascii ]]; then\n    local dot='.'\n    local dash='-'\n  else\n    local dot='·'\n    local dash='─'\n  fi\n  add_widget 0 flowing -c \"%BPrompt Connection%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Disconnected.%b\"\n  add_prompt gap_char=\" \"\n  add_widget 0 print -P \"%B(2)  Dotted.%b\"\n  add_prompt gap_char=$dot\n  add_widget 0 print -P \"%B(3)  Solid.%b\"\n  add_prompt gap_char=$dash\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 123r\n  case $choice in\n    r) return 1;;\n    1) gap_char=\" \"; options+=disconnected;;\n    2) gap_char=$dot; options+=dotted;;\n    3) gap_char=$dash; options+=solid;;\n  esac\n  return 0\n}\n\nfunction ask_frame() {\n  if [[ $style != (classic|rainbow|lean*) || $num_lines != 2 || $POWERLEVEL9K_MODE == ascii ]]; then\n    return 0\n  fi\n  add_widget 0 flowing -c \"%BPrompt Frame%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  No frame.%b\"\n  add_prompt left_frame=0 right_frame=0\n  add_widget 0 print -P \"%B(2)  Left.%b\"\n  add_prompt left_frame=1 right_frame=0\n  add_widget 0 print -P \"%B(3)  Right.%b\"\n  add_prompt left_frame=0 right_frame=1\n  add_widget 0 print -P \"%B(4)  Full.%b\"\n  add_prompt left_frame=1 right_frame=1\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 1234r\n  case $choice in\n    r) return 1;;\n    1) left_frame=0; right_frame=0; options+='no frame';;\n    2) left_frame=1; right_frame=0; options+='left frame';;\n    3) left_frame=0; right_frame=1; options+='right frame';;\n    4) left_frame=1; right_frame=1; options+='full frame';;\n  esac\n  return 0\n}\n\nfunction ask_empty_line() {\n  add_widget 0 flowing -c \"%BPrompt Spacing%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(1)  Compact.%b\"\n  add_widget 0 print\n  add_widget 1\n  add_prompt_n\n  add_prompt_n\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"%B(2)  Sparse.%b\"\n  add_widget 0 print\n  add_widget 1\n  add_prompt_n\n  add_widget 0 print\n  add_prompt_n\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 12r\n  case $choice in\n    r) return 1;;\n    1) empty_line=0; options+='compact';;\n    2) empty_line=1; options+='sparse';;\n  esac\n  return 0\n}\n\nfunction print_instant_prompt_link() {\n  local link='https://github.com/romkatv/powerlevel10k#instant-prompt'\n  (( wizard_columns < $#link )) && return\n  print\n  flowing -c \"$(href $link)\"\n}\n\nfunction ask_instant_prompt() {\n  if [[ $ZSH_VERSION != (5.<4->*|<6->.*) ]]; then\n    instant_prompt=off\n    options+=instant_prompt=auto-off\n    return 0\n  fi\n  if (( $+functions[z4h] )); then\n    instant_prompt=quiet\n    options+=instant_prompt=auto-quiet\n    return\n  fi\n  add_widget 0 flowing -c \"%BInstant Prompt Mode%b\"\n  add_widget 0 print_instant_prompt_link\n  add_widget 1\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 flowing +c -i 5 \"%B(1)  Verbose (recommended).%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 flowing +c -i 5 \"%B(2)  Quiet.%b\" Choose this if you\\'ve read and understood \\\n    instant prompt documentation.\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 flowing +c -i 5 \"%B(3)  Off.%b\" Choose this if you\\'ve tried instant prompt \\\n    and found it incompatible with your zsh configuration files.\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask 123r\n  case $choice in\n    r) return 1;;\n    1) instant_prompt=verbose; options+=instant_prompt=verbose;;\n    2) instant_prompt=quiet; options+=instant_prompt=quiet;;\n    3) instant_prompt=off; options+=instant_prompt=off;;\n  esac\n  return 0\n}\n\nfunction ask_transient_prompt() {\n  local disable_rprompt=$((num_lines == 1))\n  local p=76\n  [[ $style == pure ]] && p=$pure_color[magenta]\n  [[ $style == lean_8colors ]] && p=2\n  p=\"%F{$p}$prompt_char%f\"\n  add_widget 0 flowing -c \"%BEnable Transient Prompt?%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 print -P \"${(pl:$prompt_indent:: :)}$p %2Fgit%f pull\"\n  add_widget 3\n  add_widget 0 print -P \"${(pl:$prompt_indent:: :)}$p %2Fgit%f branch x\"\n  (( empty_line )) && add_widget 0 print\n  add_prompt_n buffer=\"%2Fgit%f checkout x$cursor\"\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"%B(n)  No.%b\"\n  add_widget 0 print\n  add_widget 1\n  add_widget 0 buffer=\"%2Fgit%f pull\" print_prompt\n  add_widget 3\n  (( empty_line )) && { add_widget 0 print; add_widget 3 }\n  add_prompt_n buffer=\"%2Fgit%f branch x\"\n  (( empty_line )) && add_widget 0 print\n  add_prompt_n buffer=\"%2Fgit%f checkout x$cursor\"\n  add_widget 0 print\n  add_widget 2\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ynr\n  case $choice in\n    r) return 1;;\n    y) transient_prompt=1; options+=transient_prompt;;\n    n) transient_prompt=0;;\n  esac\n  return 0\n}\n\nfunction ask_config_overwrite() {\n  config_backup=\n  config_backup_u=0\n  if [[ ! -e $__p9k_cfg_path ]]; then\n    return 0\n  fi\n  add_widget 0 flowing -c Powerlevel10k config file already exists.\n  add_widget 0 flowing -c \"%BOverwrite\" \"%b%2F${__p9k_cfg_path_u//\\\\/\\\\\\\\}%f%B?%b\"\n  add_widget 0 print -P \"\"\n  add_widget 0 print -P \"%B(y)  Yes.%b\"\n  add_widget 0 print -P \"\"\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask yr\n  case $choice in\n    r) return 1;;\n    y)\n      if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n        local tmpdir=$TMPDIR\n        local tmpdir_u='$TMPDIR'\n      else\n        local tmpdir=/tmp\n        local tmpdir_u=/tmp\n      fi\n      if (( ! $+commands[mktemp] )) ||\n         ! config_backup=$(mktemp $tmpdir/$__p9k_cfg_basename.XXXXXXXXXX 2>/dev/null); then\n        config_backup=$tmpdir/$__p9k_cfg_basename.$EPOCHREALTIME\n      fi\n      cp $__p9k_cfg_path $config_backup || quit -c\n      config_backup_u=$tmpdir_u/${(q-)config_backup:t}\n    ;;\n  esac\n  return 0\n}\n\nfunction ask_zshrc_edit() {\n  zshrc_content=\n  zshrc_backup=\n  zshrc_backup_u=\n  zshrc_has_cfg=0\n  zshrc_has_instant_prompt=0\n  write_zshrc=0\n\n  if (( $+functions[z4h] )); then\n    zshrc_has_cfg=1\n    zshrc_has_instant_prompt=1\n    return\n  fi\n\n  check_zshrc_integration || quit -c\n  [[ $instant_prompt == off ]] && zshrc_has_instant_prompt=1\n  (( zshrc_has_cfg && zshrc_has_instant_prompt )) && return\n\n  add_widget 0 flowing -c %BApply changes to \"%b%2F${__p9k_zshrc_u//\\\\/\\\\\\\\}%f%B?%b\"\n  add_widget 0 print -P \"\"\n  add_widget 1\n  local modifiable=y\n  if [[ ! -w $__p9k_zd ]]; then\n    modifiable=\n    add_widget 0 flowing -c %3FWARNING:%f %2F${__p9k_zd_u//\\\\/\\\\\\\\}%f %3Fis readonly.%f\n    add_widget 0 print -P \"\"\n  elif [[ -e $__p9k_zshrc && ! -w $__p9k_zshrc ]]; then\n    local -a stat\n    zstat -A stat +uid -- $__p9k_zshrc || quit -c\n    if (( stat[1] == EUID )); then\n      add_widget 0 flowing -c %3FNOTE:%f %2F${__p9k_zshrc_u//\\\\/\\\\\\\\}%f %3Fis readonly.%f\n    else\n      modifiable=\n      add_widget 0 flowing -c                                           \\\n        %3FWARNING:%f %2F${__p9k_zshrc_u//\\\\/\\\\\\\\}%f %3Fis readonly and \\\n        not owned by the user. Cannot modify it.%f\n    fi\n    add_widget 0 print -P \"\"\n  fi\n  if [[ $modifiable == y ]]; then\n    add_widget 0 print -P \"%B(y)  Yes (recommended).%b\"\n  else\n    add_widget 0 print -P \"%1F(y)  Yes (disabled).%f\"\n  fi\n  add_widget 0 print -P \"\"\n  add_widget 0 flowing +c -i 5 \"%B(n)  No.\" I know which changes to apply and will do it myself.%b\n  add_widget 0 print -P \"\"\n  add_widget 0 print -P \"(r)  Restart from the beginning.\"\n  ask ${modifiable}nr\n  case $choice in\n    r) return 1;;\n    n) return 0;;\n    y)\n      write_zshrc=1\n      if [[ -n $zshrc_content ]]; then\n        if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n          local tmpdir=$TMPDIR\n          local tmpdir_u='$TMPDIR'\n        else\n          local tmpdir=/tmp\n          local tmpdir_u=/tmp\n        fi\n        if (( ! $+commands[mktemp] )) ||\n           ! zshrc_backup=\"$(mktemp $tmpdir/.zshrc.XXXXXXXXXX 2>/dev/null)\"; then\n          zshrc_backup=$tmpdir/.zshrc.$EPOCHREALTIME\n        fi\n        cp -p $__p9k_zshrc $zshrc_backup                   || quit -c\n        local -i writable=1\n        if [[ ! -w $zshrc_backup ]]; then\n          chmod u+w -- $zshrc_backup                       || quit -c\n          writable=0\n        fi\n        print -r -- $zshrc_content >$zshrc_backup          || quit -c\n        (( writable )) || chmod u-w -- $zshrc_backup       || quit -c\n        zshrc_backup_u=$tmpdir_u/${(q-)zshrc_backup:t}\n      fi\n    ;;\n  esac\n  return 0\n}\n\nfunction generate_config() {\n  local base && base=\"$(<$__p9k_root_dir/config/p10k-${style//_/-}.zsh)\" || return\n  local lines=(\"${(@f)base}\")\n\n  function sub() {\n    lines=(\"${(@)lines/#(#b)([[:space:]]#)typeset -g POWERLEVEL9K_$1=*/$match[1]typeset -g POWERLEVEL9K_$1=$2}\")\n  }\n\n  function uncomment() {\n    lines=(\"${(@)lines/#(#b)([[:space:]]#)\\# $1(  |)/$match[1]$1$match[2]$match[2]}\")\n  }\n\n  function rep() {\n    lines=(\"${(@)lines//$1/$2}\")\n  }\n\n  if [[ $style == pure ]]; then\n    rep \"local grey=242\" \"local grey='$pure_color[grey]'\"\n    rep \"local red=1\" \"local red='$pure_color[red]'\"\n    rep \"local yellow=3\" \"local yellow='$pure_color[yellow]'\"\n    rep \"local blue=4\" \"local blue='$pure_color[blue]'\"\n    rep \"local magenta=5\" \"local magenta='$pure_color[magenta]'\"\n    rep \"local cyan=6\" \"local cyan='$pure_color[cyan]'\"\n    rep \"local white=7\" \"local white='$pure_color[white]'\"\n  else\n    sub MODE $POWERLEVEL9K_MODE\n\n    sub ICON_PADDING $POWERLEVEL9K_ICON_PADDING\n\n    if [[ $POWERLEVEL9K_MODE == compatible ]]; then\n      sub STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION \"'х'\"\n      sub STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION \"'х'\"\n      sub STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION \"'х'\"\n    fi\n\n    if [[ $POWERLEVEL9K_MODE == (compatible|powerline) ]]; then\n      uncomment 'typeset -g POWERLEVEL9K_LOCK_ICON'\n      sub LOCK_ICON \"'∅'\"\n      uncomment 'typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION'\n      sub NORDVPN_VISUAL_IDENTIFIER_EXPANSION \"'nord'\"\n      uncomment 'typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION'\n      sub RANGER_VISUAL_IDENTIFIER_EXPANSION \"'▲'\"\n      uncomment 'typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION'\n      sub YAZI_VISUAL_IDENTIFIER_EXPANSION \"'▲'\"\n      uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION'\n      sub KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION \"'○'\"\n      uncomment 'typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION'\n      sub AZURE_VISUAL_IDENTIFIER_EXPANSION \"'az'\"\n      uncomment 'typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION'\n      sub AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION \"'eb'\"\n      uncomment 'typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION'\n      sub BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION \"'≡'\"\n    fi\n\n    if [[ $POWERLEVEL9K_MODE == (awesome-patched|awesome-fontconfig) && $cap_python == 0 ]]; then\n      uncomment 'typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION'\n      uncomment 'typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION'\n      uncomment 'typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION'\n      uncomment 'typeset -g POWERLEVEL9K_PYTHON_ICON'\n      sub VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION \"'🐍'\"\n      sub ANACONDA_VISUAL_IDENTIFIER_EXPANSION \"'🐍'\"\n      sub PYENV_VISUAL_IDENTIFIER_EXPANSION \"'🐍'\"\n      sub PYTHON_ICON \"'🐍'\"\n    fi\n\n    case $POWERLEVEL9K_MODE in\n      nerdfont-complete)\n        sub BATTERY_STAGES \"'\\uf58d\\uf579\\uf57a\\uf57b\\uf57c\\uf57d\\uf57e\\uf57f\\uf580\\uf581\\uf578'\"\n      ;;\n      nerdfont-v3)\n        sub BATTERY_STAGES \"'\\UF008E\\UF007A\\UF007B\\UF007C\\UF007D\\UF007E\\UF007F\\UF0080\\UF0081\\UF0082\\UF0079'\"\n      ;;\n    esac\n\n    if [[ $style == (classic|rainbow) ]]; then\n      if [[ $style == classic ]]; then\n        sub BACKGROUND $bg_color[$color]\n        sub LEFT_SUBSEGMENT_SEPARATOR \"'%$sep_color[$color]F$left_subsep'\"\n        sub RIGHT_SUBSEGMENT_SEPARATOR \"'%$sep_color[$color]F$right_subsep'\"\n        sub VCS_LOADING_FOREGROUND $sep_color[$color]\n        rep '%248F' \"%$prefix_color[$color]F\"\n      else\n        sub LEFT_SUBSEGMENT_SEPARATOR \"'$left_subsep'\"\n        sub RIGHT_SUBSEGMENT_SEPARATOR \"'$right_subsep'\"\n      fi\n      sub RULER_FOREGROUND $frame_color[$color]\n      sub MULTILINE_FIRST_PROMPT_GAP_FOREGROUND $frame_color[$color]\n      sub MULTILINE_FIRST_PROMPT_PREFIX \"'%$frame_color[$color]F╭─'\"\n      sub MULTILINE_NEWLINE_PROMPT_PREFIX \"'%$frame_color[$color]F├─'\"\n      sub MULTILINE_LAST_PROMPT_PREFIX \"'%$frame_color[$color]F╰─'\"\n      sub MULTILINE_FIRST_PROMPT_SUFFIX \"'%$frame_color[$color]F─╮'\"\n      sub MULTILINE_NEWLINE_PROMPT_SUFFIX \"'%$frame_color[$color]F─┤'\"\n      sub MULTILINE_LAST_PROMPT_SUFFIX \"'%$frame_color[$color]F─╯'\"\n      sub LEFT_SEGMENT_SEPARATOR \"'$left_sep'\"\n      sub RIGHT_SEGMENT_SEPARATOR \"'$right_sep'\"\n      sub LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL \"'$left_tail'\"\n      sub LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL \"'$left_head'\"\n      sub RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL \"'$right_head'\"\n      sub RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL \"'$right_tail'\"\n    fi\n\n    if [[ -n ${(j::)extra_icons} ]]; then\n      local branch_icon=${icons[VCS_BRANCH_ICON]// }\n      sub VCS_BRANCH_ICON \"'$branch_icon '\"\n      uncomment os_icon\n    else\n      uncomment 'typeset -g POWERLEVEL9K_DIR_CLASSES'\n      uncomment 'typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION'\n      uncomment 'typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION'\n      uncomment 'typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION'\n      sub VCS_VISUAL_IDENTIFIER_EXPANSION ''\n      sub COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION ''\n      sub TIME_VISUAL_IDENTIFIER_EXPANSION ''\n    fi\n\n    if [[ -n ${(j::)prefixes} ]]; then\n      uncomment 'typeset -g POWERLEVEL9K_VCS_PREFIX'\n      uncomment 'typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX'\n      uncomment 'typeset -g POWERLEVEL9K_CONTEXT_PREFIX'\n      uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX'\n      uncomment 'typeset -g POWERLEVEL9K_TIME_PREFIX'\n      uncomment 'typeset -g POWERLEVEL9K_TOOLBOX_PREFIX'\n      if [[ $style == (lean|classic) ]]; then\n        [[ $style == classic ]] && local fg=\"%$prefix_color[$color]F\" || local fg=\"%f\"\n        sub VCS_PREFIX \"'${fg}on '\"\n        sub COMMAND_EXECUTION_TIME_PREFIX \"'${fg}took '\"\n        sub CONTEXT_PREFIX \"'${fg}with '\"\n        sub KUBECONTEXT_PREFIX \"'${fg}at '\"\n        sub TIME_PREFIX \"'${fg}at '\"\n        sub TOOLBOX_PREFIX \"'${fg}in '\"\n      fi\n    fi\n\n    sub MULTILINE_FIRST_PROMPT_GAP_CHAR \"'$gap_char'\"\n\n    if [[ $style == (classic|rainbow) && $num_lines == 2 ]]; then\n      if (( ! right_frame )); then\n        sub MULTILINE_FIRST_PROMPT_SUFFIX ''\n        sub MULTILINE_NEWLINE_PROMPT_SUFFIX ''\n        sub MULTILINE_LAST_PROMPT_SUFFIX ''\n      fi\n      if (( ! left_frame )); then\n        sub MULTILINE_FIRST_PROMPT_PREFIX ''\n        sub MULTILINE_NEWLINE_PROMPT_PREFIX ''\n        sub MULTILINE_LAST_PROMPT_PREFIX ''\n        sub STATUS_OK false\n        sub STATUS_ERROR false\n      fi\n    fi\n\n    if [[ $style == lean* ]]; then\n      sub RULER_FOREGROUND $frame_color[$color]\n      sub MULTILINE_FIRST_PROMPT_GAP_FOREGROUND $frame_color[$color]\n      if (( right_frame )); then\n        sub MULTILINE_FIRST_PROMPT_SUFFIX \"'%$frame_color[$color]F─╮'\"\n        sub MULTILINE_NEWLINE_PROMPT_SUFFIX \"'%$frame_color[$color]F─┤'\"\n        sub MULTILINE_LAST_PROMPT_SUFFIX \"'%$frame_color[$color]F─╯'\"\n        sub RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL \"' '\"\n      fi\n      if (( left_frame )); then\n        sub MULTILINE_FIRST_PROMPT_PREFIX \"'%$frame_color[$color]F╭─'\"\n        sub MULTILINE_NEWLINE_PROMPT_PREFIX \"'%$frame_color[$color]F├─'\"\n        sub MULTILINE_LAST_PROMPT_PREFIX \"'%$frame_color[$color]F╰─'\"\n        sub LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL \"' '\"\n      fi\n    fi\n\n    if [[ $style == (classic|rainbow) ]]; then\n      if (( num_lines == 2 && ! left_frame )); then\n        uncomment prompt_char\n      else\n        uncomment vi_mode\n      fi\n    fi\n\n    if [[ $POWERLEVEL9K_MODE == ascii ]]; then\n      sub 'STATUS_OK_VISUAL_IDENTIFIER_EXPANSION' \"'ok'\"\n      sub 'STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION' \"'ok'\"\n      sub 'STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION' \"'err'\"\n      sub 'STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION' \"\"\n      sub 'STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION' \"'err'\"\n      sub 'BATTERY_STAGES' \"('battery')\"\n      sub 'PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION' \"'>'\"\n      sub 'PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION' \"'<'\"\n      sub 'PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION' \"'V'\"\n      sub 'PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION' \"'^'\"\n      rep \"-i '⭐'\" \"-i '*'\"\n      rep '…' '..'\n      rep '⇣' '<'\n      rep '⇡' '>'\n      rep '⇠' '<-'\n      rep '⇢' '->'\n      rep '─' '-'\n    fi\n  fi\n\n  if (( $+pure_use_rprompt )); then\n    local segment\n    for segment in command_execution_time virtualenv context; do\n      rep \"    $segment\" \"    tmp_$segment\"\n      uncomment $segment\n      rep \"    tmp_$segment  \" \"    # $segment\"\n    done\n  fi\n\n  if [[ -n $time ]]; then\n    uncomment time\n    if [[ $time == $time_12h ]]; then\n      sub TIME_FORMAT \"'%D{%I:%M:%S %p}'\"\n    fi\n  fi\n\n  if (( num_lines == 1 )); then\n    local -a tmp\n    local line\n    for line in \"$lines[@]\"; do\n      [[ $line == ('    newline'*|*'===[ Line #'*) ]] || tmp+=$line\n    done\n    lines=(\"$tmp[@]\")\n  fi\n\n  (( empty_line )) && sub PROMPT_ADD_NEWLINE true || sub PROMPT_ADD_NEWLINE false\n\n  sub INSTANT_PROMPT $instant_prompt\n  (( transient_prompt )) && sub TRANSIENT_PROMPT always\n\n  local header=${(%):-\"# Generated by Powerlevel10k configuration wizard on %D{%Y-%m-%d at %H:%M %Z}.\"}$'\\n'\n  header+=\"# Based on romkatv/powerlevel10k/config/p10k-${style//_/-}.zsh\"\n  if [[ $commands[sum] == ('/bin'|'/usr/bin'|'/usr/local/bin')'/sum' ]]; then\n    local -a sum\n    if sum=($(sum <<<${base//$'\\r\\n'/$'\\n'} 2>/dev/null)) && (( $#sum == 2 )); then\n      header+=\", checksum $sum[1]\"\n    fi\n  fi\n  header+=$'.\\n'\n  local line=\"# Wizard options: $options[1]\"\n  local opt\n  for opt in $options[2,-1]; do\n    if (( $#line + $#opt > 85 )); then\n      header+=$line\n      header+=$',\\n'\n      line=\"# $opt\"\n    else\n      line+=\", $opt\"\n    fi\n  done\n  header+=$line\n  header+=$'.\\n# Type `p10k configure` to generate another config.\\n#'\n\n  command mkdir -p -- ${__p9k_cfg_path:h} || return\n\n  if [[ -e $__p9k_cfg_path ]]; then\n    zf_rm -f -- $__p9k_cfg_path || return\n  fi\n  print -lr -- \"$header\" \"$lines[@]\" >$__p9k_cfg_path\n}\n\nfunction change_zshrc() {\n  (( write_zshrc )) || return 0\n\n  local tmp=$__p9k_zshrc.${(%):-%n}.tmp.$$\n  [[ ! -e $__p9k_zshrc ]] || cp -p $__p9k_zshrc $tmp || return\n\n  {\n    local -i writable=1\n    if [[ -e $tmp && ! -w $tmp ]]; then\n      chmod u+w -- $tmp || return\n      writable=0\n    fi\n\n    print -n >$tmp || return\n\n    if (( !zshrc_has_instant_prompt )); then\n      >>$tmp print -r -- \"# Enable Powerlevel10k instant prompt. Should stay close to the top of ${(%)__p9k_zshrc_u}.\n# Initialization code that may require console input (password prompts, [y/n]\n# confirmations, etc.) must go above this block; everything else may go below.\nif [[ -r \\\"\\${XDG_CACHE_HOME:-\\$HOME/.cache}/p10k-instant-prompt-\\${(%):-%n}.zsh\\\" ]]; then\n  source \\\"\\${XDG_CACHE_HOME:-\\$HOME/.cache}/p10k-instant-prompt-\\${(%):-%n}.zsh\\\"\nfi\" || return\n    fi\n    if [[ -n $zshrc_content ]]; then\n      (( zshrc_has_instant_prompt )) || print >>$tmp || return\n      >>$tmp print -r -- $zshrc_content || return\n    fi\n    if (( !zshrc_has_cfg )); then\n      >>$tmp print -r -- \"\n# To customize prompt, run \\`p10k configure\\` or edit ${(%)__p9k_cfg_path_u}.\n[[ ! -f ${(%)__p9k_cfg_path_u} ]] || source ${(%)__p9k_cfg_path_u}\" || return\n    fi\n    (( writable )) || chmod u-w -- $tmp || return\n    command mv -f -- $tmp $__p9k_zshrc || return\n  } always {\n    zf_rm -f -- $tmp\n  }\n\n  if [[ -n $zshrc_backup_u ]]; then\n    print -rP \"\"\n    flowing +c See \"%B${__p9k_zshrc_u//\\\\/\\\\\\\\}%b\" changes:\n    print -rP  \"\n  %2Fdiff%f %B$zshrc_backup_u%b %B$__p9k_zshrc_u%b\"\n  fi\n  return 0\n}\n\nfunction check_zshrc_integration() {\n  typeset -g zshrc_content=\n  typeset -gi zshrc_has_cfg=0 zshrc_has_instant_prompt=0\n  [[ -e $__p9k_zshrc ]] || return 0\n  zshrc_content=\"$(<$__p9k_zshrc)\" || return\n  local lines=(${(f)zshrc_content})\n  local f0=$__p9k_cfg_path_o\n  local f1=${(q)f0}\n  local f2=${(q-)f0}\n  local f3=${(qq)f0}\n  local f4=${(qqq)f0}\n  local g1=${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}\\//'~/'}\n  local h0='${ZDOTDIR:-~}/.p10k.zsh'\n  local h1='${ZDOTDIR:-$HOME}/.p10k.zsh'\n  local h2='\"${ZDOTDIR:-$HOME}/.p10k.zsh\"'\n  local h3='\"${ZDOTDIR:-$HOME}\"/.p10k.zsh'\n  local h4='${ZDOTDIR}/.p10k.zsh'\n  local h5='\"${ZDOTDIR}/.p10k.zsh\"'\n  local h6='\"${ZDOTDIR}\"/.p10k.zsh'\n  local h7='$ZDOTDIR/.p10k.zsh'\n  local h8='\"$ZDOTDIR/.p10k.zsh\"'\n  local h9='\"$ZDOTDIR\"/.p10k.zsh'\n  local h10='$POWERLEVEL9K_CONFIG_FILE'\n  local h11='\"$POWERLEVEL9K_CONFIG_FILE\"'\n  if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##(|--[[:space:]]##)($f1|$f2|$f3|$f4|$g1|$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|$h8|$h9|$h10|$h11)(|[[:space:]]*|'#'*)} ]]; then\n    zshrc_has_cfg=1\n  fi\n  local pre='${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh'\n  if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($pre|\\\"$pre\\\")(|[[:space:]]*|'#'*)} ]]; then\n    zshrc_has_instant_prompt=1\n  fi\n  return 0\n}\n\n() {\n  (( force )) && return\n  _p9k_can_configure -q || return 0\n  local zshrc_content zshrc_has_cfg zshrc_has_instant_prompt\n  check_zshrc_integration 2>/dev/null || return 0\n  (( zshrc_has_cfg )) || return 0\n  [[ -s $__p9k_cfg_path ]] || return 0\n  print -P \"\"\n  flowing                                                                          \\\n      Powerlevel10k configuration file \"($__p9k_cfg_path_u)\" was not sourced. This \\\n      might have been caused by errors in zsh startup files, most likely in        \\\n      $__p9k_zshrc_u. See above for any indication of such errors and fix them. If \\\n      there are no errors, try running Powerlevel10k configuration wizard:\n  print -P ''\n  print -P '  %2Fp10k%f %Bconfigure%b'\n  print -P ''\n  flowing                                                                              \\\n      If you do nothing, you will see this message again when you start zsh. You can   \\\n      suppress it by defining %BPOWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true%b in    \\\n      $__p9k_zshrc_u.\n  print -P ''\n  return 1\n} || return\n\nif (( $+terminfo[smcup] && $+terminfo[rmcup] )) && echoti smcup 2>/dev/null; then\n  function restore_screen() {\n    echoti rmcup 2>/dev/null\n    function restore_screen() {}\n  }\nelse\n  function restore_screen() {}\nfi\n\n{  # always\n\nif (( force )); then\n  _p9k_can_configure || return\nelse\n  _p9k_can_configure -q || return\nfi\n\nzmodload zsh/terminfo zsh/datetime || return\n\nif [[ $ZSH_VERSION == (5.7.<1->*|5.<8->*|<6->.*) && $COLORTERM == (24bit|truecolor) ]]; then\n  local -ir has_truecolor=1\nelse\n  local -ir has_truecolor=0\nfi\n\nstty -echo 2>/dev/null\n\nwhile true; do\n  local instant_prompt=verbose zshrc_content= zshrc_backup= zshrc_backup_u=\n  local -i zshrc_has_cfg=0 zshrc_has_instant_prompt=0 write_zshrc=0\n  local POWERLEVEL9K_MODE= POWERLEVEL9K_ICON_PADDING=moderate style= config_backup= config_backup_u=\n  local gap_char=' ' prompt_char='❯' down_triangle='\\uE0BC' up_triangle='\\uE0BA' slanted_bar='\\u2571'\n  local left_subsep= right_subsep= left_tail= right_tail= left_head= right_head= time=\n  local -i num_lines=2 empty_line=0 color=2 left_frame=1 right_frame=1 transient_prompt=0\n  local -i cap_diamond=0 cap_python=0 cap_arrow=0 cap_lock=0 cap_quotes=0\n  local -a extra_icons=('' '' '')\n  local -a frame_color=(244 242 240 238)\n  local -a color_name=(Lightest Light Dark Darkest)\n  local -a prefixes=('' '')\n  local -a options=()\n  if (( has_truecolor )); then\n    local -A pure_color=(${(kv)pure_snazzy})\n  else\n    local -A pure_color=(${(kv)pure_original})\n  fi\n\n  unset pure_use_rprompt\n\n  if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then\n    ask_font || continue\n    ask_diamond || continue\n    if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then\n      POWERLEVEL9K_MODE=awesome-mapped-fontconfig\n    else\n      ask_lock '\\uF023' || continue\n      if (( ! cap_lock )); then\n        ask_lock '\\uE138' \"Let's try another one.\" || continue\n        if (( cap_lock )); then\n          if (( cap_diamond )); then\n            POWERLEVEL9K_MODE=awesome-patched\n            ask_python || continue\n          else\n            POWERLEVEL9K_MODE=flat\n          fi\n        else\n          if (( cap_diamond )); then\n            POWERLEVEL9K_MODE=powerline\n          else\n            ask_quotes || continue\n            (( cap_quotes )) && POWERLEVEL9K_MODE=compatible || POWERLEVEL9K_MODE=ascii\n          fi\n        fi\n      elif (( ! cap_diamond )); then\n        POWERLEVEL9K_MODE=awesome-fontconfig\n      else\n        ask_arrow '\\UF0737' || continue\n        if (( cap_arrow )); then\n          ask_width || continue\n        fi\n        if (( cap_arrow )); then\n          POWERLEVEL9K_MODE=nerdfont-v3\n        else\n          ask_arrow '\\uFC35' \"Let's try another one.\" || continue\n          if (( cap_arrow )); then\n            POWERLEVEL9K_MODE=nerdfont-complete\n          else\n            POWERLEVEL9K_MODE=awesome-fontconfig\n            ask_python || continue\n          fi\n        fi\n      fi\n    fi\n  else\n    POWERLEVEL9K_MODE=ascii\n  fi\n\n  if [[ $POWERLEVEL9K_MODE == powerline ]]; then\n    options+=powerline\n  elif (( cap_diamond )); then\n    options+=\"$POWERLEVEL9K_MODE + powerline\"\n  else\n    options+=\"$POWERLEVEL9K_MODE\"\n  fi\n  (( cap_python )) && options[-1]+=' + python'\n  if (( cap_diamond )); then\n    left_sep=$right_triangle\n    right_sep=$left_triangle\n    left_subsep=$right_angle\n    right_subsep=$left_angle\n    left_head=$right_triangle\n    right_head=$left_triangle\n  else\n    left_sep=\n    right_sep=\n    left_head=\n    right_head=\n    if [[ $POWERLEVEL9K_MODE == ascii ]]; then\n      left_subsep='|'\n      right_subsep='|'\n      prompt_char='>'\n      left_frame=0\n      right_frame=0\n    else\n      left_subsep=$vertical_bar\n      right_subsep=$vertical_bar\n    fi\n  fi\n\n  _p9k_init_icons\n  ask_icon_padding     || continue\n  _p9k_init_icons\n\n  ask_style            || continue\n  ask_charset          || continue\n  ask_color_scheme     || continue\n  ask_color            || continue\n  ask_use_rprompt      || continue\n  ask_time             || continue\n  ask_separators       || continue\n  ask_heads            || continue\n  ask_tails            || continue\n  ask_num_lines        || continue\n  ask_gap_char         || continue\n  ask_frame            || continue\n  ask_ornaments_color  || continue\n  ask_empty_line       || continue\n  ask_extra_icons      || continue\n  ask_prefixes         || continue\n  ask_transient_prompt || continue\n  ask_instant_prompt   || continue\n  ask_config_overwrite || continue\n  ask_zshrc_edit       || continue\n  break\ndone\n\nrestore_screen\n\nif (( !in_z4h_wizard )); then\n  print\n\n  flowing +c New config: \"%U${__p9k_cfg_path_u//\\\\/\\\\\\\\}%u.\"\n  if [[ -n $config_backup ]]; then\n    flowing +c Backup of the old config: \"%U${config_backup_u//\\\\/\\\\\\\\}%u.\"\n  fi\n  if [[ -n $zshrc_backup ]]; then\n    flowing +c Backup of \"%U${__p9k_zshrc_u//\\\\/\\\\\\\\}%u:\" \"%U${zshrc_backup_u//\\\\/\\\\\\\\}%u.\"\n  fi\nfi\n\ngenerate_config || return\nchange_zshrc    || return\n\nif (( !in_z4h_wizard )); then\n  print -rP \"\"\n  flowing +c File feature requests and bug reports at \"$(href https://github.com/romkatv/powerlevel10k/issues)\"\n  print -rP \"\"\nfi\n\nsuccess=1\n\n} always {\n  (( success )) || quit\n  consume_input\n  stty echo 2>/dev/null\n  show_cursor\n  restore_screen\n}\n"
  },
  {
    "path": "internal/worker.zsh",
    "content": "# invoked in worker: _p9k_worker_main <pgid>\nfunction _p9k_worker_main() {\n  mkfifo -- $_p9k__worker_file_prefix.fifo || return\n  echo -nE - s$_p9k_worker_pgid$'\\x1e'     || return\n  exec <$_p9k__worker_file_prefix.fifo     || return\n  zf_rm -- $_p9k__worker_file_prefix.fifo  || return\n\n  local -i reset\n  local req fd\n  local -a ready\n  local _p9k_worker_request_id\n  local -A _p9k_worker_fds       # fd => id$'\\x1f'callback\n  local -A _p9k_worker_inflight  # id => inflight count\n\n  function _p9k_worker_reply() {\n    print -nr -- e${(pj:\\n:)@}$'\\x1e' || kill -- -$_p9k_worker_pgid\n  }\n\n  # usage: _p9k_worker_async <work> <callback>\n  function _p9k_worker_async() {\n    local fd async=$1\n    sysopen -r -o cloexec -u fd <(() { eval $async; } && print -n '\\x1e') || return\n    (( ++_p9k_worker_inflight[$_p9k_worker_request_id] ))\n    _p9k_worker_fds[$fd]=$_p9k_worker_request_id$'\\x1f'$2\n  }\n\n  trap '' PIPE\n\n  {\n    while zselect -a ready 0 ${(k)_p9k_worker_fds}; do\n      [[ $ready[1] == -r ]] || return\n      for fd in ${ready:1}; do\n        if [[ $fd == 0 ]]; then\n          local buf=\n          [[ -t 0 ]]  # https://www.zsh.org/mla/workers/2020/msg00207.html\n          if sysread -t 0 'buf[$#buf+1]'; then\n            while [[ $buf != *$'\\x1e' ]]; do\n              sysread 'buf[$#buf+1]' || return\n            done\n          else\n            (( $? == 4 )) || return\n          fi\n          for req in ${(ps:\\x1e:)buf}; do\n            _p9k_worker_request_id=${req%%$'\\x1f'*}\n            () { eval $req[$#_p9k_worker_request_id+2,-1] }\n            (( $+_p9k_worker_inflight[$_p9k_worker_request_id] )) && continue\n            print -rn -- d$_p9k_worker_request_id$'\\x1e' || return\n          done\n        else\n          local REPLY=\n          while true; do\n            if sysread -i $fd 'REPLY[$#REPLY+1]'; then\n              [[ $REPLY == *$'\\x1e' ]] || continue\n            else\n              (( $? == 5 ))            || return\n              break\n            fi\n          done\n          local cb=$_p9k_worker_fds[$fd]\n          _p9k_worker_request_id=${cb%%$'\\x1f'*}\n          unset \"_p9k_worker_fds[$fd]\"\n          exec {fd}>&-\n          if [[ $REPLY == *$'\\x1e' ]]; then\n            REPLY[-1]=\"\"\n            () { eval $cb[$#_p9k_worker_request_id+2,-1] }\n          fi\n          if (( --_p9k_worker_inflight[$_p9k_worker_request_id] == 0 )); then\n            unset \"_p9k_worker_inflight[$_p9k_worker_request_id]\"\n            print -rn -- d$_p9k_worker_request_id$'\\x1e' || return\n          fi\n        fi\n      done\n    done\n  } always {\n    kill -- -$_p9k_worker_pgid\n  }\n}\n\n# invoked in master: _p9k_worker_invoke <request-id> <list>\nfunction _p9k_worker_invoke() {\n  [[ -n $_p9k__worker_resp_fd ]] || return\n  local req=$1$'\\x1f'$2$'\\x1e'\n  if [[ -n $_p9k__worker_req_fd && $+_p9k__worker_request_map[$1] == 0 ]]; then\n    _p9k__worker_request_map[$1]=\n    print -rnu $_p9k__worker_req_fd -- $req\n  else\n    _p9k__worker_request_map[$1]=$req\n  fi\n}\n\nfunction _p9k_worker_cleanup() {\n  # __p9k_intro bugs out here in some cases for some reason.\n  emulate -L zsh\n  [[ $_p9k__worker_shell_pid == $sysparams[pid] ]] && _p9k_worker_stop\n  return 0\n}\n\nfunction _p9k_worker_stop() {\n  # See comments in _p9k_worker_cleanup.\n  emulate -L zsh\n  add-zsh-hook -D zshexit _p9k_worker_cleanup\n  [[ -n $_p9k__worker_resp_fd     ]] && zle -F $_p9k__worker_resp_fd\n  [[ -n $_p9k__worker_resp_fd     ]] && exec {_p9k__worker_resp_fd}>&-\n  [[ -n $_p9k__worker_req_fd      ]] && exec {_p9k__worker_req_fd}>&-\n  [[ -n $_p9k__worker_pid         ]] && kill -- -$_p9k__worker_pid 2>/dev/null\n  [[ -n $_p9k__worker_file_prefix ]] && zf_rm -f -- $_p9k__worker_file_prefix.fifo\n  _p9k__worker_pid=\n  _p9k__worker_req_fd=\n  _p9k__worker_resp_fd=\n  _p9k__worker_shell_pid=\n  _p9k__worker_request_map=()\n  return 0\n}\n\nfunction _p9k_worker_receive() {\n  eval \"$__p9k_intro\"\n\n  [[ -z $_p9k__worker_resp_fd ]] && return\n\n  {\n    (( $# <= 1 )) || return\n\n    local buf resp\n\n    [[ -t $_p9k__worker_resp_fd ]]  # https://www.zsh.org/mla/workers/2020/msg00207.html\n    if sysread -i $_p9k__worker_resp_fd -t 0 'buf[$#buf+1]'; then\n      while [[ $buf == *[^$'\\x05\\x1e']$'\\x05'# ]]; do\n        sysread -i $_p9k__worker_resp_fd 'buf[$#buf+1]' || return\n      done\n    else\n      (( $? == 4 )) || return\n    fi\n\n    local -i reset max_reset\n    for resp in ${(ps:\\x1e:)${buf//$'\\x05'}}; do\n      local arg=$resp[2,-1]\n      case $resp[1] in\n        d)\n          local req=$_p9k__worker_request_map[$arg]\n          if [[ -n $req ]]; then\n            _p9k__worker_request_map[$arg]=\n            print -rnu $_p9k__worker_req_fd -- $req                                   || return\n          else\n            unset \"_p9k__worker_request_map[$arg]\"\n          fi\n        ;;\n        e)\n          () { eval $arg }\n          (( reset > max_reset )) && max_reset=reset\n        ;;\n        s)\n          [[ -z $_p9k__worker_req_fd ]]                                               || return\n          [[ $arg == <1->        ]]                                                   || return\n          _p9k__worker_pid=$arg\n          sysopen -w -o cloexec -u _p9k__worker_req_fd $_p9k__worker_file_prefix.fifo || return\n          local req=\n          for req in $_p9k__worker_request_map; do\n            print -rnu $_p9k__worker_req_fd -- $req                                   || return\n          done\n          _p9k__worker_request_map=({${(k)^_p9k__worker_request_map},''})\n        ;;\n        *)\n          return 1\n        ;;\n      esac\n    done\n\n    if (( max_reset == 2 )); then\n      _p9k__refresh_reason=worker\n      _p9k_set_prompt\n      _p9k__refresh_reason=''\n    fi\n    (( max_reset )) && _p9k_reset_prompt\n    return 0\n  } always {\n    (( $? )) && _p9k_worker_stop\n  }\n}\n\nfunction _p9k_worker_start() {\n  setopt monitor || return\n  {\n    [[ -n $_p9k__worker_resp_fd ]] && return\n\n    if [[ -n \"$TMPDIR\" && ( ( -d \"$TMPDIR\" && -w \"$TMPDIR\" ) || ! ( -d /tmp && -w /tmp ) ) ]]; then\n      local tmpdir=$TMPDIR\n    else\n      local tmpdir=/tmp\n    fi\n    _p9k__worker_file_prefix=$tmpdir/p10k.worker.$EUID.$sysparams[pid].$EPOCHSECONDS\n\n    sysopen -r -o cloexec -u _p9k__worker_resp_fd <(\n      exec 0</dev/null\n      if [[ -n $_POWERLEVEL9K_WORKER_LOG_LEVEL ]]; then\n        exec 2>$_p9k__worker_file_prefix.log\n        setopt xtrace\n      else\n        exec 2>/dev/null\n      fi\n      builtin cd -q /                    || return\n      zmodload zsh/zselect               || return\n      ! { zselect -t0 || (( $? != 1 )) } || return\n      local _p9k_worker_pgid=$sysparams[pid]\n      _p9k_worker_main &\n      {\n        trap '' PIPE\n        while syswrite $'\\x05'; do zselect -t 1000; done\n        zf_rm -f $_p9k__worker_file_prefix.fifo\n        kill -- -$_p9k_worker_pgid\n      } &\n      exec =true) || return\n    _p9k__worker_pid=$sysparams[procsubstpid]\n    zle -F $_p9k__worker_resp_fd _p9k_worker_receive\n    _p9k__worker_shell_pid=$sysparams[pid]\n    add-zsh-hook zshexit _p9k_worker_cleanup\n  } always {\n    (( $? )) && _p9k_worker_stop\n  }\n}\n"
  },
  {
    "path": "powerlevel10k.zsh-theme",
    "content": "# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8\n################################################################\n# Powerlevel10k Theme\n# https://github.com/romkatv/powerlevel10k\n#\n# Forked from Powerlevel9k Theme\n# https://github.com/bhilburn/powerlevel9k\n#\n# Which in turn was forked from Agnoster Theme\n# https://github.com/robbyrussell/oh-my-zsh/blob/74177c5320b2a1b2f8c4c695c05984b57fd7c6ea/themes/agnoster.zsh-theme\n################################################################\n\n# Temporarily change options.\n'builtin' 'local' '-a' '__p9k_src_opts'\n[[ ! -o 'aliases'         ]] || __p9k_src_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || __p9k_src_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || __p9k_src_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n(( $+__p9k_root_dir )) || typeset -gr __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}\n(( $+__p9k_intro )) || {\n  # Leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!).\n  # __p9k_trapint is to work around bugs in zsh: https://www.zsh.org/mla/workers/2020/msg00612.html.\n  # Likewise for `trap \":\"` instead of the plain `trap \"\"`.\n  typeset -gr __p9k_intro_base='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre\n  (( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap \"trap ${(q)__p9k_trapint:--} INT\" EXIT }\n  local -a match mbegin mend\n  local -i MBEGIN MEND OPTIND\n  local MATCH OPTARG IFS=$'\\'' \\t\\n\\0'\\'\n  typeset -gr __p9k_intro_locale='[[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }'\n  typeset -gr __p9k_intro_no_locale=\"${${__p9k_intro_base/ match / match reply }/ MATCH / MATCH REPLY }\"\n  typeset -gr __p9k_intro_no_reply=\"$__p9k_intro_base; $__p9k_intro_locale\"\n  typeset -gr __p9k_intro=\"$__p9k_intro_no_locale; $__p9k_intro_locale\"\n}\n\nzmodload zsh/langinfo\n\nfunction _p9k_init_locale() {\n  if (( ! $+__p9k_locale )); then\n    typeset -g __p9k_locale=\n    (( $+commands[locale] )) || return\n    local -a loc\n    loc=(${(@M)$(locale -a 2>/dev/null):#*.(utf|UTF)(-|)8}) || return\n    (( $#loc )) || return\n    typeset -g __p9k_locale=${loc[(r)(#i)C.UTF(-|)8]:-${loc[(r)(#i)en_US.UTF(-|)8]:-$loc[1]}}\n  fi\n  [[ -n $__p9k_locale ]]\n}\n\n() {\n  eval \"$__p9k_intro\"\n  if (( $+__p9k_sourced )); then\n    (( $+functions[_p9k_setup] )) && _p9k_setup\n    return 0\n  fi\n  typeset -gr __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh\n  if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then\n    _p9k_preinit\n  fi\n  typeset -gr __p9k_sourced=13\n  if [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]; then\n    if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus ]]; then\n      local f\n      for f in $__p9k_root_dir/{powerlevel9k.zsh-theme,powerlevel10k.zsh-theme,internal/p10k.zsh,internal/icons.zsh,internal/configure.zsh,internal/worker.zsh,internal/parser.zsh,gitstatus/gitstatus.plugin.zsh,gitstatus/install}; do\n        [[ $f.zwc -nt $f ]] && continue\n        zmodload -F zsh/files b:zf_mv b:zf_rm\n        local tmp=$f.tmp.$$.zwc\n        {\n          # `zf_mv -f src dst` fails on NTFS if `dst` is not writable, hence `zf_rm`.\n          zf_rm -f -- $f.zwc && zcompile -R -- $tmp $f && zf_mv -f -- $tmp $f.zwc\n        } always {\n          (( $? )) && zf_rm -f -- $tmp\n        }\n      done\n    fi\n  fi\n  builtin source $__p9k_root_dir/internal/p10k.zsh || true\n}\n\n(( $+__p9k_instant_prompt_active )) && unsetopt prompt_cr prompt_sp || setopt prompt_cr prompt_sp\n\n(( ${#__p9k_src_opts} )) && setopt ${__p9k_src_opts[@]}\n'builtin' 'unset' '__p9k_src_opts'\n"
  },
  {
    "path": "powerlevel9k.zsh-theme",
    "content": "'builtin' 'source' \"${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}/powerlevel10k.zsh-theme\"\n"
  },
  {
    "path": "prompt_powerlevel10k_setup",
    "content": "'builtin' 'source' \"${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}/powerlevel10k.zsh-theme\"\n"
  },
  {
    "path": "prompt_powerlevel9k_setup",
    "content": "'builtin' 'source' \"${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}/powerlevel10k.zsh-theme\"\n"
  }
]