From 34f7e15fea9ed76967159bcc7ef55cc879d60005 Mon Sep 17 00:00:00 2001 From: ss-o Date: Sat, 16 May 2026 13:45:41 +0100 Subject: [PATCH 1/9] feat(docs): add z-shell syntax highlighting --- .../docs-authoring.instructions.md | 15 +++++ community/02_zsh_plugin_standard.mdx | 36 +++++------ .../03_zsh_native_scripting_handbook.mdx | 58 +++++++++--------- community/04_zunit/02_test-syntax.mdx | 12 ++-- community/04_zunit/03_assertions.mdx | 60 +++++++++---------- docs/guides/01_commands.mdx | 18 +++--- ecosystem/annexes/0_overview.mdx | 12 ++-- package.json | 2 + pnpm-lock.yaml | 6 ++ src/prism/z-shell-languages.ts | 57 ++++++++++++++++++ src/theme/prism-include-languages.ts | 28 +++++++++ 11 files changed, 206 insertions(+), 98 deletions(-) create mode 100644 src/prism/z-shell-languages.ts create mode 100644 src/theme/prism-include-languages.ts diff --git a/.github/instructions/docs-authoring.instructions.md b/.github/instructions/docs-authoring.instructions.md index f053690de..ff6731f53 100644 --- a/.github/instructions/docs-authoring.instructions.md +++ b/.github/instructions/docs-authoring.instructions.md @@ -87,6 +87,21 @@ Only import what is used on the page. - Heading IDs are managed by `pnpm write-heading-ids`; add explicit `{#custom-id}` only when needed. - For HTML elements in MDX (``, `
`, ``, `
`, etc.), refer to the [GitHub Flavored Markdown spec](https://github.github.com/gfm/#raw-html) for supported tags. +## Code Blocks + +Always choose the most specific accurate fence language so examples receive the +right highlighting: + +- `zsh` — generic Zsh syntax and shell snippets +- `zi` — Zi commands, ice modifiers, and Zi-oriented examples +- `zunit` — ZUnit test files and ZUnit CLI examples +- `sh` — portable POSIX shell +- `bash` — Bash-specific syntax +- `yaml`, `json`, `diff`, etc. — non-shell formats + +Do not use `shell` when the snippet is specifically Zsh, Zi, ZUnit, Bash, or +POSIX `sh`; reserve it for genuinely shell-agnostic examples. + ## Localization Awareness - Edit only English source files in `docs/`, `community/`, `ecosystem/`. diff --git a/community/02_zsh_plugin_standard.mdx b/community/02_zsh_plugin_standard.mdx index 7e47398f6..5da5cd57f 100644 --- a/community/02_zsh_plugin_standard.mdx +++ b/community/02_zsh_plugin_standard.mdx @@ -47,7 +47,7 @@ They cover the information on how to write a Zsh plugin. To get the plugin’s location, plugins should do: -```shell showLineNumbers +```zsh showLineNumbers 0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}" 0="${${(M)0:#/*}:-$PWD/$0}" ``` @@ -100,7 +100,7 @@ When you set e.g.: the `zsh` emulation in a function, you in general don’t hav Despite that, the current-standard plugins have their main directory added to `$fpath`, a more clean approach is being proposed: that the plugins use a subdirectory called `functions` to store their completions and autoload functions. This will allow a much cleaner design of plugins. The plugin manager should add such a directory to `$fpath`. The lack of support of the current plugin managers can be easily resolved via the [indicator](#activity-indicator): -```shell showLineNumbers +```zsh showLineNumbers if [[ ${zsh_loaded_plugins[-1]} != */kalc && -z ${fpath[(r)${0:h}/functions]} ]]; then fpath+=( "${0:h}/functions" ) fi @@ -108,7 +108,7 @@ fi or, via the use of the `PMSPEC` [parameter](#global-parameter-with-capabilities): -```shell showLineNumbers +```zsh showLineNumbers if [[ $PMSPEC != *f* ]]; then fpath+=( "${0:h}/functions" ) fi @@ -137,7 +137,7 @@ The runnable should be put into the directory with a `+x` access right assigned. 4. The plugin manager is permitted to do optional things like ensuring `+x` access rights on the directory contents. The `$PMSPEC` code letter for the feature is `b`, and it allows for the plugin to handle the `$PATH` extending itself, via, e.g.: -```shell showLineNumbers +```zsh showLineNumbers if [[ $PMSPEC != *b* ]]; then path+=( "${0:h}/bin" ) fi @@ -177,7 +177,7 @@ Note that the unload function should contain `unfunction $0` (or better `unfunct The plugin manager can provide a function `@zsh-plugin-run-on-unload` which has the following call syntax: -```shell +```zsh @zsh-plugin-run-on-unload "{code-snippet-1}" "{code-snippet-2}" … ``` @@ -193,7 +193,7 @@ The function registers pieces of code to be run by the plugin manager **on the u The plugin manager can provide a function `@zsh-plugin-run-on-update` which has the following call syntax: -```shell +```zsh @zsh-plugin-run-on-update "{code-snippet-1}" "{code-snippet-2}" … ``` @@ -219,7 +219,7 @@ The first item allows a plugin to e.g. issue a notice about missing dependencies The second item allows a plugin to e.g. set up `$fpath`, knowing that the plugin manager will not handle this: -```shell showLineNumbers +```zsh showLineNumbers if [[ ${zsh_loaded_plugins[-1]} != */kalc && -z ${fpath[(r)${0:h}]} ]]; then fpath+=( "${0:h}" ) fi @@ -285,7 +285,7 @@ The contents of the parameter describing a fully compliant plugin manager should The plugin can then verify the support by: -```shell showLineNumbers +```zsh showLineNumbers if [[ $PMSPEC != *P* ]]; then path+=( "${0:h}/bin" ) fi @@ -303,7 +303,7 @@ The document is to define a **Zsh-plugin** but also to serve as an information s Zsh ships with the function `add-zsh-hook`. It has the following invocation syntax: -```shell +```zsh add-zsh-hook [ -L | -dD ] [ -Uzk ] hook function ``` @@ -315,7 +315,7 @@ The Zle editor is the part of the Zsh that is responsible for receiving the text The syntax of the call is: -```shell +```zsh add-zle-hook-widget [ -L | -dD ] [ -Uzk ] hook widget_name ``` @@ -341,7 +341,7 @@ The plugin often has to declare global parameters that should live throughout a An example value needed by the plugin: -```shell showLineNumbers +```zsh showLineNumbers typeset -gA Plugins Plugins[MY_PLUGIN_REPO_DIR]="${0:h}" ``` @@ -352,7 +352,7 @@ This way all the data of all plugins will be kept in a single parameter, availab The following code snippet is recommended to be included at the beginning of each of the main functions provided by the plugin: -```shell showLineNumbers +```zsh showLineNumbers builtin emulate -L zsh ${=${options[xtrace]:#off}:+-o xtrace} builtin setopt extended_glob warn_create_global typeset_silent no_short_loops rc_quotes no_auto_pushd ``` @@ -385,7 +385,7 @@ The emulation is altered with the following options: It’s good to localize the following variables at the entry of the main function of a plugin: -```shell showLineNumbers +```zsh showLineNumbers local MATCH REPLY; integer MBEGIN MEND local -a match mbegin mend reply ``` @@ -430,7 +430,7 @@ The proposition of the standard prefixes is as follows: 2.4. Zsh supports any string as a function name because absolutely any string can be a **file** name – if there would be an exception in the name of the call-ables, then how would it be possible to run a script called "→abcd"? There are **no** exceptions, the function can be called even as a sequence of null bytes: - ```shell showLineNumbers + ```zsh showLineNumbers ❯ $'\0'() { print hello } ❯ $'\0' hello @@ -444,7 +444,7 @@ The proposition of the standard prefixes is as follows: ## Example code utilizing the prefixes {/* #example-code-utilizing-the-prefixes */} -```shell showLineNumbers +```zsh showLineNumbers .zinc_register_hooks() { add-zsh-hook precmd :zinc_precmd /zinc_dmsg "Installed precmd hook with the result: $?" @@ -461,7 +461,7 @@ When the main function finishes executing, the functions are left defined. This The following snippet of code, when added at the beginning of the main function will automatically unset the sub-functions when leaving the main function to don't leak any functions into the global namespace: -```shell showLineNumbers +```zsh showLineNumbers typeset -g prjef prjef=( ${(k)functions} ) trap "unset -f -- \"\${(k)functions[@]:|prjef}\" &>/dev/null; unset prjef" EXIT @@ -482,7 +482,7 @@ When writing a plugin one often needs to keep a state during the Zsh session. To With the following method, only a single global parameter per plugin can be sufficient: -```shell showLineNumbers +```zsh showLineNumbers typeset -A PlgMap typeset -A SomeMap typeset -a some_array @@ -494,7 +494,7 @@ some_array[1]=state can be converted into: -```shell showLineNumbers +```zsh showLineNumbers typeset -A PlgMap PlgMap[state]=1 diff --git a/community/03_zsh_native_scripting_handbook.mdx b/community/03_zsh_native_scripting_handbook.mdx index 8c7b5f718..f6a6c8f16 100644 --- a/community/03_zsh_native_scripting_handbook.mdx +++ b/community/03_zsh_native_scripting_handbook.mdx @@ -30,14 +30,14 @@ Glob-flags `#b` and `#m` require `setopt extended_glob`. Patterns utilizing `~` ### Reading a file {/* #reading-a-file */} -```shell showLineNumbers +```zsh showLineNumbers typeset -a lines lines=( "${(@f)"$( /dev/null > /dev/null; then ``` Those are `4` forks. The code can be replaced according to this guide: -```shell showLineNumbers +```zsh showLineNumbers local -a lines_list lines_list=( ${(f)"$(git help -a)"} ) lines_list=( ${(M)${(s: :)${(M)lines_list:# [a-z]*}}:#$mysub} ) @@ -298,7 +298,7 @@ A project was needing this to do some Zle line-continuation tricks (when you put The required functionality is: in the given string, count the number of apostrophes, but _only the unquoted ones_. This means that only apostrophes with null or an even number of preceding backslashes should be accepted into the count: -```shell showLineNumbers +```zsh showLineNumbers buf="word'continue\'after\\\'afterSecnd\\''afterPair" integer count=0 : ${buf//(#b)((#s)|[^\\])([\\][\\])#(\'\'#)/$(( count += ${#match[3]} ))} @@ -309,7 +309,7 @@ The answer (i.e. the output) to the above presentation and example is: `3` (ther Below follows a variation of the above snippet that doesn't use math-code execution: -```shell showLineNumbers +```zsh showLineNumbers buf="word'continue\'after\\\'afterSecnd\\''afterPair" buf="${(S)buf//(#b)*((#s)|[^\\])([\\][\\])#(\'\'#)*/${match[3]}}"; buf=${buf%%[^\']##} integer count=${#buf} diff --git a/community/04_zunit/02_test-syntax.mdx b/community/04_zunit/02_test-syntax.mdx index 4243b5e39..1fbd60c2c 100644 --- a/community/04_zunit/02_test-syntax.mdx +++ b/community/04_zunit/02_test-syntax.mdx @@ -17,7 +17,7 @@ keywords: Every ZUnit test file must begin with the ZUnit shebang: -```zsh +```zunit #!/usr/bin/env zunit ``` @@ -26,7 +26,7 @@ delimited with `{` and `}`. ## `@test` blocks -```zsh +```zunit #!/usr/bin/env zunit @test 'my first test' { @@ -44,7 +44,7 @@ delimited with `{` and `}`. `@setup` runs **before each test** in the file. `@teardown` runs **after each test**, even if the test fails. -```zsh +```zunit #!/usr/bin/env zunit @setup { @@ -86,7 +86,7 @@ These functions are available inside every `@test`, `@setup`, and `@teardown` bl Runs a command and captures its output and exit code without failing the test: -```zsh +```zunit @test 'run captures output' { run echo 'hello world' @@ -105,7 +105,7 @@ After `run`: Sources a file relative to the test directory (or as an absolute path): -```zsh +```zunit @test 'load a helper' { load '_support/helpers' assert $MY_HELPER same_as 'loaded' @@ -118,7 +118,7 @@ ZUnit appends `.zsh` automatically if the file without the extension is not foun Explicit test outcome shortcuts: -```zsh +```zunit @test 'explicit pass' { pass } diff --git a/community/04_zunit/03_assertions.mdx b/community/04_zunit/03_assertions.mdx index d54beef20..62ec14f35 100644 --- a/community/04_zunit/03_assertions.mdx +++ b/community/04_zunit/03_assertions.mdx @@ -14,7 +14,7 @@ toc_max_heading_level: 3 Assertions are called through the `assert` helper: -```zsh +```zunit assert [...] ``` @@ -26,7 +26,7 @@ If an assertion fails, the test stops immediately and is marked as failed. Passes when `$value` is equal to `$comparison` (string equality). -```zsh +```zunit assert "$output" same_as 'expected string' ``` @@ -34,7 +34,7 @@ assert "$output" same_as 'expected string' Passes when `$value` is **not** equal to `$comparison`. -```zsh +```zunit assert "$result" different_to 'forbidden' ``` @@ -42,7 +42,7 @@ assert "$result" different_to 'forbidden' Passes when `$value` contains `$comparison` as a substring. -```zsh +```zunit assert "$output" contains 'hello' ``` @@ -50,7 +50,7 @@ assert "$output" contains 'hello' Passes when `$value` does **not** contain `$comparison`. -```zsh +```zunit assert "$output" does_not_contain 'error' ``` @@ -58,7 +58,7 @@ assert "$output" does_not_contain 'error' Passes when `$value` is a substring of `$comparison` (reverse of `contains`). -```zsh +```zunit assert 'hell' is_substring_of 'hello world' ``` @@ -66,7 +66,7 @@ assert 'hell' is_substring_of 'hello world' Passes when `$value` is **not** a substring of `$comparison`. -```zsh +```zunit assert 'xyz' is_not_substring_of 'hello world' ``` @@ -74,7 +74,7 @@ assert 'xyz' is_not_substring_of 'hello world' Passes when `$value` matches the regex `$pattern`. -```zsh +```zunit assert "$output" matches '^[0-9]+$' ``` @@ -82,7 +82,7 @@ assert "$output" matches '^[0-9]+$' Passes when `$value` does **not** match the regex `$pattern`. -```zsh +```zunit assert "$output" does_not_match '^Error' ``` @@ -90,7 +90,7 @@ assert "$output" does_not_match '^Error' Passes when `$value` is an empty string or unset. -```zsh +```zunit assert "$output" is_empty ``` @@ -98,7 +98,7 @@ assert "$output" is_empty Passes when `$value` is non-empty. -```zsh +```zunit assert "$result" is_not_empty ``` @@ -108,7 +108,7 @@ assert "$result" is_not_empty Passes when the two integers are equal (`-eq`). -```zsh +```zunit assert $state equals 0 ``` @@ -116,7 +116,7 @@ assert $state equals 0 Passes when the two integers are **not** equal (`-ne`). -```zsh +```zunit assert $count not_equal_to 0 ``` @@ -124,7 +124,7 @@ assert $count not_equal_to 0 Passes when the integer is greater than zero. -```zsh +```zunit assert $count is_positive ``` @@ -132,7 +132,7 @@ assert $count is_positive Passes when the integer is less than zero. -```zsh +```zunit assert $diff is_negative ``` @@ -140,7 +140,7 @@ assert $diff is_negative Passes when `$value` is greater than `$comparison` (`-gt`). -```zsh +```zunit assert $count is_greater_than 5 ``` @@ -148,7 +148,7 @@ assert $count is_greater_than 5 Passes when `$value` is less than `$comparison` (`-lt`). -```zsh +```zunit assert $count is_less_than 100 ``` @@ -158,7 +158,7 @@ assert $count is_less_than 100 Passes when `$value` is found in the array. -```zsh +```zunit local -a fruits=(apple banana cherry) assert 'banana' in "${fruits[@]}" ``` @@ -167,7 +167,7 @@ assert 'banana' in "${fruits[@]}" Passes when `$value` is **not** found in the array. -```zsh +```zunit assert 'grape' not_in "${fruits[@]}" ``` @@ -177,7 +177,7 @@ assert 'grape' not_in "${fruits[@]}" Passes when `$value` is a key in the associative array. -```zsh +```zunit local -A config=(host localhost port 5432) assert 'host' is_key_in "${(kv)config[@]}" ``` @@ -186,7 +186,7 @@ assert 'host' is_key_in "${(kv)config[@]}" Passes when `$value` is **not** a key in the hash. -```zsh +```zunit assert 'password' is_not_key_in "${(kv)config[@]}" ``` @@ -194,7 +194,7 @@ assert 'password' is_not_key_in "${(kv)config[@]}" Passes when `$value` is a value in the associative array. -```zsh +```zunit assert 'localhost' is_value_in "${(kv)config[@]}" ``` @@ -202,7 +202,7 @@ assert 'localhost' is_value_in "${(kv)config[@]}" Passes when `$value` is **not** a value in the hash. -```zsh +```zunit assert 'remotehost' is_not_value_in "${(kv)config[@]}" ``` @@ -215,7 +215,7 @@ directory) or absolute paths. Passes when the path exists (file, directory, or symlink). -```zsh +```zunit assert 'output.txt' exists ``` @@ -223,7 +223,7 @@ assert 'output.txt' exists Passes when the path exists and is a regular file. -```zsh +```zunit assert 'output.txt' is_file ``` @@ -231,7 +231,7 @@ assert 'output.txt' is_file Passes when the path exists and is a directory. -```zsh +```zunit assert '_output' is_dir ``` @@ -239,7 +239,7 @@ assert '_output' is_dir Passes when the path exists and is a symbolic link. -```zsh +```zunit assert 'current' is_link ``` @@ -247,7 +247,7 @@ assert 'current' is_link Passes when the path exists and is readable by the current user. -```zsh +```zunit assert 'config.yml' is_readable ``` @@ -255,7 +255,7 @@ assert 'config.yml' is_readable Passes when the path exists and is writable. -```zsh +```zunit assert 'output.txt' is_writable ``` @@ -263,7 +263,7 @@ assert 'output.txt' is_writable Passes when the path exists and is executable. -```zsh +```zunit assert 'myscript.zsh' is_executable ``` diff --git a/docs/guides/01_commands.mdx b/docs/guides/01_commands.mdx index 2c043623b..b7cd5b8e3 100644 --- a/docs/guides/01_commands.mdx +++ b/docs/guides/01_commands.mdx @@ -24,13 +24,13 @@ The ice-modifiers for any plugin or snippet are stored in their directory in a ` Self-update & compile: -```shell +```zi zi self-update ``` Update plugins and snippets: -```shell showLineNumbers +```zi showLineNumbers zi update --all zi update --reset zi update --quiet @@ -38,26 +38,26 @@ zi update --quiet Update plugins or snippets: -```shell showLineNumbers +```zi showLineNumbers zi update --plugins zi update --snippets ``` Update specific plugins. Default is GitHub but can specify any with ice [from'…'](/search?q=from): -```shell +```zi zi update / ``` Plugin parallel update plugins: -```shell +```zi zi update --parallel ``` Increase the number of jobs in a concurrent set to 40 -```shell +```zi zi update --parallel 40 ``` @@ -75,7 +75,7 @@ With no turbo mode in use, compinit can be called normally, i.e.: as `autoload c As it should be called later, after loading all of the plugins, Zi provides its own `compdef` function that catches (i.e.: records in an array) the arguments of the call, so that the loaded plugins can freely call `compdef`. Then, the `cdreplay` (compdef-replay) can be used, after `compinit` will be called (and the original `compdef` function will become available), to execute all detected `compdef` calls. -```shell title="~/.zshrc" showLineNumbers +```zi title="~/.zshrc" showLineNumbers typeset -A ZI : ${ZI[HOME_DIR]:="${XDG_DATA_HOME:-${HOME}/.local/share}/zi"} : ${ZI[BIN_DIR]:="${ZI[HOME_DIR]}/bin"} @@ -116,7 +116,7 @@ There's also `zicdreplay` which will replay any caught compdefs so you can also It is recommended to run the `compinit` call in the `atinit` or `atload` hook of the last related plugin with the use of the helper functions `zicompinit`,`zicdreplay` & `zicdclear` as shown below: -```shell {10} title="~/.zshrc" showLineNumbers +```zi {10} title="~/.zshrc" showLineNumbers typeset -A ZI : ${ZI[HOME_DIR]:="${XDG_DATA_HOME:-${HOME}/.local/share}/zi"} : ${ZI[BIN_DIR]:="${ZI[HOME_DIR]}/bin"} @@ -137,7 +137,7 @@ zi wait lucid atload"zicompinit; zicdreplay" blockf for \ If you want to ignore compdefs provided by some plugins or snippets, place their load commands before commands loading other plugins or snippets, and issue `zi cdclear` (or `zicdclear`, designed to be used in hooks like `atload'…'`): -```shell showLineNumbers +```zi showLineNumbers typeset -A ZI : ${ZI[HOME_DIR]:="${XDG_DATA_HOME:-${HOME}/.local/share}/zi"} : ${ZI[BIN_DIR]:="${ZI[HOME_DIR]}/bin"} diff --git a/ecosystem/annexes/0_overview.mdx b/ecosystem/annexes/0_overview.mdx index 0ccff5f3d..60c96862c 100644 --- a/ecosystem/annexes/0_overview.mdx +++ b/ecosystem/annexes/0_overview.mdx @@ -46,13 +46,13 @@ keywords: Use [meta-plugins](/ecosystem/annexes/meta-plugins) to install common annexes as a group: -```shell +```zi zi light-mode for z-shell/z-a-meta-plugins @annexes ``` To install common and additional annexes: -```shell +```zi zi light-mode for z-shell/z-a-meta-plugins @annexes+rec ``` @@ -69,7 +69,7 @@ It shows how to: 3. It also shows a useful snippet that will trim the whitespace in array elements (see `# (4) …` in the code). 4. Utilize the last hook argument – the plugin’s/snippet’s containing directory. -```shell showLineNumbers +```zi showLineNumbers emulate -L zsh -o extended_glob -o warn_create_global -o typeset_silent [[ -z "${ZI_ICE[submods]}" ]] && return 0 @@ -105,7 +105,7 @@ The recommended method of creating a hook is to place its body into a file that `@zi-register-annex`: -```shell showLineNumbers +```zi showLineNumbers @zi-register-annex myproject hook:atclone \ →za-myproject-atclone-handler \ →za-myproject-atclone-help-handler \ @@ -114,7 +114,7 @@ The recommended method of creating a hook is to place its body into a file that The general syntax of the API call is: -```shell showLineNumbers +```zi showLineNumbers @zi-register-annex {project-name} \ {hook: \ {name-of-the-handler-function} \ @@ -126,7 +126,7 @@ The last argument, i.e. the `|`-separated ice list, is optional. That’s all\! Example of the [submods][submods] ice-modifier to load a plugin with additional submodules: -```shell showLineNumbers +```zi showLineNumbers zi ice submods'zsh-users/zsh-autosuggestions -> external' zi load some/plugin ``` diff --git a/package.json b/package.json index c25219601..efbe065fd 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "asciinema-player": "3.15.1", "clsx": "2.1.1", "prism-react-renderer": "2.4.1", + "prismjs": "1.30.0", "react": "^19.2.5", "react-dom": "^19.2.5" }, @@ -65,6 +66,7 @@ "@eslint/compat": "^2.0.5", "@eslint/js": "^10.0.1", "@types/node": "25.8.0", + "@types/prismjs": "^1.26.6", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "eslint": "^10.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 158c10bee..d581a0b3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,9 @@ importers: prism-react-renderer: specifier: 2.4.1 version: 2.4.1(react@19.2.6) + prismjs: + specifier: 1.30.0 + version: 1.30.0 react: specifier: ^19.2.5 version: 19.2.6 @@ -75,6 +78,9 @@ importers: '@types/node': specifier: 25.8.0 version: 25.8.0 + '@types/prismjs': + specifier: ^1.26.6 + version: 1.26.6 '@types/react': specifier: ^19.2.14 version: 19.2.14 diff --git a/src/prism/z-shell-languages.ts b/src/prism/z-shell-languages.ts new file mode 100644 index 000000000..0f2cd16ba --- /dev/null +++ b/src/prism/z-shell-languages.ts @@ -0,0 +1,57 @@ +import type * as PrismNamespace from "prismjs"; + +export function registerZShellLanguages(Prism: typeof PrismNamespace): void { + Prism.languages.zsh = Prism.languages.extend("bash", {}); + + Prism.languages.insertBefore("zsh", "keyword", { + "zsh-keyword": { + pattern: + /(^|[\s;|&()])(?:autoload|bindkey|compdef|emulate|functions|local|print|setopt|typeset|unsetopt|zcompile|zmodload|zparseopts|zstyle)\b/, + lookbehind: true, + alias: "keyword", + }, + "zsh-special-parameter": { + pattern: /\$(?:[#*@?!$]|[A-Za-z_][\w-]*|\{[^}\n]+\})/, + alias: "variable", + }, + "zsh-glob-qualifier": { + pattern: /(^|[^\w])(?:\*\*\/)?\*[^ \n]*(?:\([^)]+\))/, + lookbehind: true, + alias: "operator", + }, + }); + + Prism.languages.zi = Prism.languages.extend("zsh", {}); + Prism.languages.insertBefore("zi", "function", { + "zi-command": { + pattern: + /\b(?:zi|zinit)\s+(?:annex|bindkey|cdclear|compile|delete|ice|light|load|module|pack|snippet|source|update)\b/, + inside: { + keyword: /\b(?:zi|zinit)\b/, + function: /\b(?:annex|bindkey|cdclear|compile|delete|ice|light|load|module|pack|snippet|source|update)\b/, + }, + }, + "zi-ice": { + pattern: + /\b(?:as|atclone|atinit|atload|atpull|blockf|cloneonly|depth|from|id-as|lucid|mv|nocompile|pick|proto|src|trigger-load|wait)\b(?=(?:["'\s]|$))/, + alias: "builtin", + }, + }); + + Prism.languages.zunit = Prism.languages.extend("zsh", {}); + Prism.languages.insertBefore("zunit", "function", { + "zunit-directive": { + pattern: /@\b(?:setup|teardown|test)\b/, + alias: "keyword", + }, + "zunit-assertion": { + pattern: + /\b(?:assert|assert_contains|assert_empty|assert_equal|assert_false|assert_match|assert_not_contains|assert_not_empty|assert_not_equal|assert_not_match|assert_status|assert_true)\b/, + alias: "function", + }, + "zunit-command": { + pattern: /\bzunit\b(?=\s+(?:init|run)|$)/, + alias: "builtin", + }, + }); +} diff --git a/src/theme/prism-include-languages.ts b/src/theme/prism-include-languages.ts new file mode 100644 index 000000000..0d1106a60 --- /dev/null +++ b/src/theme/prism-include-languages.ts @@ -0,0 +1,28 @@ +import siteConfig from "@generated/docusaurus.config"; +import type * as PrismNamespace from "prismjs"; +import {registerZShellLanguages} from "../prism/z-shell-languages"; + +export default function prismIncludeLanguages(PrismObject: typeof PrismNamespace): void { + const { + themeConfig: {prism}, + } = siteConfig; + const {additionalLanguages} = prism as {additionalLanguages: string[]}; + + const PrismBefore = globalThis.Prism; + globalThis.Prism = PrismObject; + + additionalLanguages.forEach((lang) => { + if (lang === "php") { + require("prismjs/components/prism-markup-templating.js"); + } + require(`prismjs/components/prism-${lang}`); + }); + + registerZShellLanguages(PrismObject); + + if (typeof PrismBefore === "undefined") { + delete (globalThis as Record).Prism; + } else { + globalThis.Prism = PrismObject; + } +} From 6386af8b122fb10eae1242e0a5cf5c842fd5a9c6 Mon Sep 17 00:00:00 2001 From: ss-o Date: Sat, 16 May 2026 15:03:41 +0100 Subject: [PATCH 2/9] docs(community): restructure contributing section with SVG illustrations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create community/00_contributing/ as first-priority section - index.mdx: overview with banner SVG + card grid layout - 01_getting_started.mdx: org-wide fork/branch/commit/PR guide - 02_contributing_to_zi.mdx: zi-specific contributing guide - 03_zsh_plugin_standard.mdx: moved from community root (slug preserved) - 04_contributing_docs.mdx: wiki MDX authoring and Crowdin guide - 05_project_management.mdx: absorbs project tracker + labels content - Add six SVG illustrations to static/img/svg/community/: - contributing-banner.svg: wide workflow diagram (fork→code→PR→merge) - contributing-getting-started.svg: git branch tree (120×120) - contributing-zi.svg: gear with zi logo (120×120) - contributing-plugin-standard.svg: plug/socket icon (120×120) - contributing-docs.svg: document with pen (120×120) - contributing-project-management.svg: kanban board (120×120) - Renumber community top-level: - 02_zsh_plugin_standard.mdx removed (moved into 00_contributing/) - 03_zsh_native_scripting_handbook.mdx → 02_ - 04_zunit/ → 03_zunit/ (update _category_.json position + doc link) - Fix ZUnit broken links in index.mdx, 01_installation.mdx, 04_running-tests.mdx by adding .mdx extension (forces correct file-based resolution) - Update community/index.mdx with contributing CTA section Closes: docs/project-tracker-and-labels branch (content absorbed) --- .geminiignore | 0 .github/copilot-instructions.md | 75 +------ AGENTS.md | 74 +++++++ CLAUDE.md | 1 + GEMINI.md | 1 + .../00_contributing/01_getting_started.mdx | 133 ++++++++++++ .../00_contributing/02_contributing_to_zi.mdx | 131 ++++++++++++ .../03_zsh_plugin_standard.mdx} | 3 +- .../00_contributing/04_contributing_docs.mdx | 189 ++++++++++++++++++ .../00_contributing/05_project_management.mdx | 180 +++++++++++++++++ community/00_contributing/_category_.json | 8 + community/00_contributing/index.mdx | 78 ++++++++ ...x => 02_zsh_native_scripting_handbook.mdx} | 2 +- .../01_installation.mdx | 4 +- .../{04_zunit => 03_zunit}/02_test-syntax.mdx | 0 .../{04_zunit => 03_zunit}/03_assertions.mdx | 0 .../04_running-tests.mdx | 2 +- .../05_configuration.mdx | 0 community/{04_zunit => 03_zunit}/06_ci.mdx | 0 community/03_zunit/_category_.json | 8 + community/{04_zunit => 03_zunit}/index.mdx | 12 +- community/04_zunit/_category_.json | 8 - community/index.mdx | 9 +- .../img/svg/community/contributing-banner.svg | 107 ++++++++++ .../img/svg/community/contributing-docs.svg | 49 +++++ .../contributing-getting-started.svg | 47 +++++ .../contributing-plugin-standard.svg | 49 +++++ .../contributing-project-management.svg | 65 ++++++ static/img/svg/community/contributing-zi.svg | 42 ++++ 29 files changed, 1183 insertions(+), 94 deletions(-) create mode 100644 .geminiignore mode change 100644 => 120000 .github/copilot-instructions.md create mode 100644 AGENTS.md create mode 120000 CLAUDE.md create mode 120000 GEMINI.md create mode 100644 community/00_contributing/01_getting_started.mdx create mode 100644 community/00_contributing/02_contributing_to_zi.mdx rename community/{02_zsh_plugin_standard.mdx => 00_contributing/03_zsh_plugin_standard.mdx} (99%) create mode 100644 community/00_contributing/04_contributing_docs.mdx create mode 100644 community/00_contributing/05_project_management.mdx create mode 100644 community/00_contributing/_category_.json create mode 100644 community/00_contributing/index.mdx rename community/{03_zsh_native_scripting_handbook.mdx => 02_zsh_native_scripting_handbook.mdx} (99%) rename community/{04_zunit => 03_zunit}/01_installation.mdx (93%) rename community/{04_zunit => 03_zunit}/02_test-syntax.mdx (100%) rename community/{04_zunit => 03_zunit}/03_assertions.mdx (100%) rename community/{04_zunit => 03_zunit}/04_running-tests.mdx (96%) rename community/{04_zunit => 03_zunit}/05_configuration.mdx (100%) rename community/{04_zunit => 03_zunit}/06_ci.mdx (100%) create mode 100644 community/03_zunit/_category_.json rename community/{04_zunit => 03_zunit}/index.mdx (70%) delete mode 100644 community/04_zunit/_category_.json create mode 100644 static/img/svg/community/contributing-banner.svg create mode 100644 static/img/svg/community/contributing-docs.svg create mode 100644 static/img/svg/community/contributing-getting-started.svg create mode 100644 static/img/svg/community/contributing-plugin-standard.svg create mode 100644 static/img/svg/community/contributing-project-management.svg create mode 100644 static/img/svg/community/contributing-zi.svg diff --git a/.geminiignore b/.geminiignore new file mode 100644 index 000000000..e69de29bb diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 18401f787..000000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,74 +0,0 @@ -# Project Guidelines - -## Build, Lint, and Dev Commands - -- Use Node >= 20 and pnpm >= 10 (see `engines` in `package.json`). -- Install dependencies with `pnpm install`. -- `pnpm start` — local dev server at `http://localhost:3000`. -- `pnpm build` — full production build (run before finishing substantial changes). -- `pnpm build:en` — English-only build, faster for docs-only checks. -- `pnpm serve` — serve the production build locally for verification. -- `pnpm clear` — clear Docusaurus cache; use when the site behaves inconsistently after config or theme changes. -- `pnpm lint` — Unified linting with Trunk (configs in `.trunk/configs/`). Fix with `pnpm lint:fix`. -- `pnpm write-heading-ids` — regenerate heading IDs across all docs. -- Trunk CI runs pre-commit formatting and pre-push linting (config: `.trunk/trunk.yaml`). - -## Architecture - -- Docusaurus site with three independent docs content roots: - - `docs/` → `/docs` (core documentation, getting started, guides) - - `community/` → `/community` (community guides, Zsh plugin standard) - - `ecosystem/` → `/ecosystem` (annexes, packages, plugins) -- Each content root uses the shared `sidebars.ts` (autogenerated from directory structure) plus local `_category_.json` files for ordering. -- Site config, plugins, and routing: `docusaurus.config.ts`. See `.github/instructions/docusaurus-config.instructions.md` for config structure, feature flags, and constraints. -- Docusaurus client API (components, hooks, theme imports): `.github/instructions/docusaurus-api.instructions.md` — prefer native Docusaurus components over raw HTML equivalents. -- Custom MDX components are globally available via `src/theme/MDXComponents.tsx` — no import needed in `.mdx` files: - - `` — colored text spans - - `` — accessible emoji rendering - - `` — GitHub repository badges - - `` — copyable shell command blocks -- Localization uses Crowdin (`crowdin.yml`). Never edit files under `i18n/` directly. - -## Conventions - -### Documentation (MDX) - -- Numeric file prefixes control sidebar order: `01_first.mdx`, `02_second.mdx`. -- Page structure: frontmatter → imports → content. Required frontmatter: `id`, `title`, `sidebar_position`. -- Create `_category_.json` when adding new directories. -- Use admonitions (`:::tip`, `:::info`, `:::warning`) for callouts. -- Only edit English source files. Use `pnpm crowdin:sync` for localization. -- Detailed patterns: `.github/instructions/docs-authoring.instructions.md`. - -### TypeScript / React - -- Use `type` declarations for props (not `interface`). -- One default function component export per file. -- Destructure props in the function signature; return type `React.JSX.Element`. -- Import order enforced by ESLint: builtins → external (`react`, `clsx`) → internal (`@theme/*`, `@site/*`) → relative → types → styles. -- Detailed patterns: `.github/instructions/frontend-components.instructions.md`. - -### CSS - -- Prefer CSS Modules (`.module.css`) co-located with the component. -- Global overrides go in `src/css/custom.css`. -- Colors must use HSL format (enforced by Stylelint). -- Support both light and dark themes via `[data-theme]` selectors. - -### Formatting - -- Prettier: double quotes, semicolons, 2-space indent, 120 char print width, trailing commas (config: `.prettierrc.json`). -- EditorConfig: UTF-8, spaces, final newline, trim trailing whitespace (except `.md`/`.mdx`). - -### Branching - -- `next` — active development. `main` — production. -- Branch naming: `feature-`, `bug-`, `hotfix-`. -- Hotfixes branch from `main`; everything else from `next`. - -## Agent Notes - -- Prefer small, scoped edits that match surrounding MDX and TypeScript style. -- Link to existing docs rather than duplicating long guidance. -- Scoped instruction files in `.github/instructions/` are auto-applied by file glob — prefer updating those for domain-specific guidance over modifying this file. -- Do not introduce new global instruction files (e.g., `AGENTS.md`) unless explicitly requested. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 120000 index 000000000..be77ac83a --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +../AGENTS.md \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..18401f787 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,74 @@ +# Project Guidelines + +## Build, Lint, and Dev Commands + +- Use Node >= 20 and pnpm >= 10 (see `engines` in `package.json`). +- Install dependencies with `pnpm install`. +- `pnpm start` — local dev server at `http://localhost:3000`. +- `pnpm build` — full production build (run before finishing substantial changes). +- `pnpm build:en` — English-only build, faster for docs-only checks. +- `pnpm serve` — serve the production build locally for verification. +- `pnpm clear` — clear Docusaurus cache; use when the site behaves inconsistently after config or theme changes. +- `pnpm lint` — Unified linting with Trunk (configs in `.trunk/configs/`). Fix with `pnpm lint:fix`. +- `pnpm write-heading-ids` — regenerate heading IDs across all docs. +- Trunk CI runs pre-commit formatting and pre-push linting (config: `.trunk/trunk.yaml`). + +## Architecture + +- Docusaurus site with three independent docs content roots: + - `docs/` → `/docs` (core documentation, getting started, guides) + - `community/` → `/community` (community guides, Zsh plugin standard) + - `ecosystem/` → `/ecosystem` (annexes, packages, plugins) +- Each content root uses the shared `sidebars.ts` (autogenerated from directory structure) plus local `_category_.json` files for ordering. +- Site config, plugins, and routing: `docusaurus.config.ts`. See `.github/instructions/docusaurus-config.instructions.md` for config structure, feature flags, and constraints. +- Docusaurus client API (components, hooks, theme imports): `.github/instructions/docusaurus-api.instructions.md` — prefer native Docusaurus components over raw HTML equivalents. +- Custom MDX components are globally available via `src/theme/MDXComponents.tsx` — no import needed in `.mdx` files: + - `` — colored text spans + - `` — accessible emoji rendering + - `` — GitHub repository badges + - `` — copyable shell command blocks +- Localization uses Crowdin (`crowdin.yml`). Never edit files under `i18n/` directly. + +## Conventions + +### Documentation (MDX) + +- Numeric file prefixes control sidebar order: `01_first.mdx`, `02_second.mdx`. +- Page structure: frontmatter → imports → content. Required frontmatter: `id`, `title`, `sidebar_position`. +- Create `_category_.json` when adding new directories. +- Use admonitions (`:::tip`, `:::info`, `:::warning`) for callouts. +- Only edit English source files. Use `pnpm crowdin:sync` for localization. +- Detailed patterns: `.github/instructions/docs-authoring.instructions.md`. + +### TypeScript / React + +- Use `type` declarations for props (not `interface`). +- One default function component export per file. +- Destructure props in the function signature; return type `React.JSX.Element`. +- Import order enforced by ESLint: builtins → external (`react`, `clsx`) → internal (`@theme/*`, `@site/*`) → relative → types → styles. +- Detailed patterns: `.github/instructions/frontend-components.instructions.md`. + +### CSS + +- Prefer CSS Modules (`.module.css`) co-located with the component. +- Global overrides go in `src/css/custom.css`. +- Colors must use HSL format (enforced by Stylelint). +- Support both light and dark themes via `[data-theme]` selectors. + +### Formatting + +- Prettier: double quotes, semicolons, 2-space indent, 120 char print width, trailing commas (config: `.prettierrc.json`). +- EditorConfig: UTF-8, spaces, final newline, trim trailing whitespace (except `.md`/`.mdx`). + +### Branching + +- `next` — active development. `main` — production. +- Branch naming: `feature-`, `bug-`, `hotfix-`. +- Hotfixes branch from `main`; everything else from `next`. + +## Agent Notes + +- Prefer small, scoped edits that match surrounding MDX and TypeScript style. +- Link to existing docs rather than duplicating long guidance. +- Scoped instruction files in `.github/instructions/` are auto-applied by file glob — prefer updating those for domain-specific guidance over modifying this file. +- Do not introduce new global instruction files (e.g., `AGENTS.md`) unless explicitly requested. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 000000000..47dc3e3d8 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/GEMINI.md b/GEMINI.md new file mode 120000 index 000000000..47dc3e3d8 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/community/00_contributing/01_getting_started.mdx b/community/00_contributing/01_getting_started.mdx new file mode 100644 index 000000000..76c409523 --- /dev/null +++ b/community/00_contributing/01_getting_started.mdx @@ -0,0 +1,133 @@ +--- +id: getting_started +title: "🚀 Getting Started" +sidebar_position: 1 +image: /img/png/theme/z/320x320.png +description: General contributor setup — branch model, commit conventions, and pull request workflow for all Z-Shell repositories. +keywords: + - contributing + - getting-started + - branch-model + - conventional-commits + - pull-request +--- + +{/* @format */} + +import useBaseUrl from "@docusaurus/useBaseUrl"; + +
+ +
+ +This guide applies to **all repositories** in the Z-Shell organization. Repo-specific additions (zi, wiki, etc.) are documented in their own sub-pages. + +## Prerequisites + +- [Git](https://git-scm.com/) ≥ 2.30 +- [Zsh](https://www.zsh.org/) ≥ 5.8 +- A [GitHub](https://github.com) account + +## Fork and Clone + +```shell +# 1. Fork the repo on GitHub, then clone your fork +git clone https://github.com//.git +cd + +# 2. Add the upstream remote +git remote add upstream https://github.com/z-shell/.git +``` + +## Branch Model + +All repositories follow the same two-branch model: + +```text +main ←─── production (tagged releases only) + ↑ +next ←─── integration branch ← open all PRs here + ↑ + ├── feat/ new features + ├── fix/ bug fixes + ├── perf/ performance improvements + ├── refactor/ code refactors + ├── docs/ documentation updates + └── ci/ CI / workflow changes +``` + +**Rules:** + +1. **Always branch from `next`**: `git checkout -b fix/my-issue next` +2. **Open PRs targeting `next`** — never target `main` directly +3. `next` → `main` happens via a release PR once `next` is stable +4. **Hotfixes** are the only exception — branch from `main` and open a PR against `main` + +## Commit Message Format + +All commits must follow [Conventional Commits](https://www.conventionalcommits.org/): + +```text +type(scope): short description + +Optional body — explain what and why, not how. +Wrap at 72 characters. + +Optional footer(s): +Fixes #123 +BREAKING CHANGE: description of what breaks +``` + +### Allowed Types + +| Type | Purpose | +| --- | --- | +| `feat` | New feature | +| `fix` | Bug fix | +| `perf` | Performance improvement | +| `refactor` | Code restructure, no behavior change | +| `docs` | Documentation only | +| `test` | Test additions or corrections | +| `ci` | CI/CD pipeline changes | +| `chore` | Routine maintenance | +| `revert` | Revert a previous commit | + +### Rules + +- Subject line: imperative mood, ≤ 72 characters, no trailing period +- Breaking changes: use `!` suffix (`feat!:`) **and** add a `BREAKING CHANGE:` footer +- **Do not add `Co-authored-by` trailers** — this is enforced by CI + +To tidy commits before opening a PR: + +```shell +git rebase -i $(git merge-base HEAD next) +``` + +## What Not to Add + +- `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, or any AI-specific config files +- Secrets, credentials, or API tokens of any kind +- Binary files unrelated to the project + +## Pull Request Checklist + +Before opening a PR: + +- [ ] Branched from `next` (or `main` for a hotfix) +- [ ] PR targets `next` +- [ ] Commits follow Conventional Commits +- [ ] No secrets or AI config files added +- [ ] Relevant docs or tests updated +- [ ] All CI checks pass + +## Keeping Your Fork Up to Date + +```shell +git fetch upstream +git rebase upstream/next # for feature branches +``` + +## Discussion First + +Before starting significant work, [open an issue](https://github.com/z-shell/zi/issues/new/choose) to discuss the change. This avoids duplicated effort and ensures alignment with the project roadmap. diff --git a/community/00_contributing/02_contributing_to_zi.mdx b/community/00_contributing/02_contributing_to_zi.mdx new file mode 100644 index 000000000..838c421ab --- /dev/null +++ b/community/00_contributing/02_contributing_to_zi.mdx @@ -0,0 +1,131 @@ +--- +id: contributing_to_zi +title: "🔧 Contributing to Zi" +sidebar_position: 2 +image: /img/png/theme/z/320x320.png +description: Guidelines for contributing to the zi plugin manager — branch model, commits, PR workflow, and what not to add. +keywords: + - zi + - contributing + - branch-model + - pull-request + - conventional-commits +--- + +{/* @format */} + +import Link from "@docusaurus/Link"; +import useBaseUrl from "@docusaurus/useBaseUrl"; + +
+ +
+ +Thank you for contributing to zi! This page covers the guidelines specific to the +[`z-shell/zi`](https://github.com/z-shell/zi) repository. For the org-wide basics +(branch model, commit format, PR checklist) see [Getting Started](./01_getting_started.mdx). + +## Repository Overview + +Zi is a Zsh plugin manager written entirely in Zsh. The source lives in `lib/zsh/` +with the main entry point at `lib/zsh/zi.zsh`. The installer lives in +[`z-shell/zi-src`](https://github.com/z-shell/zi-src). + +```text +zi/ + lib/zsh/ ← core plugin manager source + docs/ ← repository-level docs (CONTRIBUTING.md, man page) + tests/ ← ZUnit test suite + .github/ + workflows/ ← CI workflows (syntax check, ZUnit, CodeQL) +``` + +## Setting Up Locally + +```shell +git clone https://github.com//zi.git +cd zi +git remote add upstream https://github.com/z-shell/zi.git +git checkout -b feat/my-change next +``` + +No build step is required — zi is pure Zsh. To test changes interactively, source +the modified files in a Zsh session: + +```shell +zsh +source lib/zsh/zi.zsh +``` + +## Running Tests + +Zi uses [ZUnit](https://github.com/z-shell/zunit) for tests: + +```shell +# Run all tests +zunit + +# Run a single test file +zunit tests/install.zunit +``` + +Tests live in `tests/`. Add or update tests when your change affects behavior. + +## Zi-Specific Commit Scopes + +In addition to the [standard commit types](getting_started#commit-message-format), +prefer these scopes when relevant: + +| Scope | Covers | +| --- | --- | +| `core` | `lib/zsh/zi.zsh` and `lib/zsh/zi-*.zsh` | +| `install` | installer scripts in `zi-src` | +| `ci` | GitHub Actions workflows | +| `docs` | repository-level documentation | +| `annex` | annex API surface changes | + +Examples: + +```text +fix(core): resolve fpath duplication on plugin reload +feat(annex): expose atdelete hook to external annexes +docs(ci): document workflow trigger conditions +``` + +## What Not to Add to Zi + +:::warning Off-limits +- `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, or any AI-specific config files +- Secrets, credentials, or tokens of any kind +- Files unrelated to the plugin manager itself +::: + +## Opening Issues + +Before starting significant work, [open an issue](https://github.com/z-shell/zi/issues/new/choose) +to discuss the change. Use the appropriate issue template: + +| Template | When to use | +| --- | --- | +| Bug report | Reproducible misbehavior | +| Feature request | New capability | +| Annex proposal | Proposing a new annex | + +## Release Process + +Zi follows a trunk-based flow: + +1. All work merges into `next` +2. When `next` is stable, a release PR merges `next` → `main` +3. A tag is created on `main` (e.g., `v1.14.0`) — this triggers the release workflow +4. The installer in `zi-src` is updated to point to the new tag + +Maintainers handle the `next` → `main` merge. As a contributor, you only need to +target `next`. + +## See Also + +- Code of Conduct +- Community Contributing Guidelines +- [Getting Started](getting_started) — org-wide branch and commit conventions +- [Project Management](project_management) — how work is tracked across the org diff --git a/community/02_zsh_plugin_standard.mdx b/community/00_contributing/03_zsh_plugin_standard.mdx similarity index 99% rename from community/02_zsh_plugin_standard.mdx rename to community/00_contributing/03_zsh_plugin_standard.mdx index 5da5cd57f..1a1440248 100644 --- a/community/02_zsh_plugin_standard.mdx +++ b/community/00_contributing/03_zsh_plugin_standard.mdx @@ -1,7 +1,8 @@ --- id: zsh_plugin_standard title: "ℹ️ Zsh Plugin Standard" -sidebar_position: 2 +sidebar_position: 3 +slug: /zsh_plugin_standard image: /img/png/theme/z/320x320.png description: Standards and best practices for creating Zsh plugins. toc_max_heading_level: 2 diff --git a/community/00_contributing/04_contributing_docs.mdx b/community/00_contributing/04_contributing_docs.mdx new file mode 100644 index 000000000..de9263dc8 --- /dev/null +++ b/community/00_contributing/04_contributing_docs.mdx @@ -0,0 +1,189 @@ +--- +id: contributing_docs +title: "📝 Contributing to the Wiki" +sidebar_position: 4 +image: /img/png/theme/z/320x320.png +description: How to contribute to the Z-Shell wiki — writing MDX, localization via Crowdin, and local development workflow. +keywords: + - wiki + - documentation + - mdx + - docusaurus + - contributing + - crowdin + - localization +--- + +{/* @format */} + +import useBaseUrl from "@docusaurus/useBaseUrl"; + +
+ +
+ +The wiki is a [Docusaurus 3](https://docusaurus.io/) site. All source files are +in the [`z-shell/wiki`](https://github.com/z-shell/wiki) repository. English is +the source language; translations are managed via [Crowdin](https://translate.zshell.dev). + +## Prerequisites + +- [Node.js](https://nodejs.org/) ≥ 20 +- [pnpm](https://pnpm.io/) ≥ 10 + +## Local Development + +```shell +git clone https://github.com//wiki.git +cd wiki +pnpm install # install dependencies +pnpm start # dev server at http://localhost:3000 +``` + +Other useful commands: + +| Command | Purpose | +| --- | --- | +| `pnpm build` | Full production build | +| `pnpm build:en` | English-only build (faster for docs-only checks) | +| `pnpm serve` | Serve the production build locally | +| `pnpm clear` | Clear Docusaurus cache (use when the site behaves oddly) | +| `pnpm lint` | Run all linters (ESLint + Stylelint via Trunk) | +| `pnpm lint:fix` | Auto-fix linting issues | +| `pnpm write-heading-ids` | Regenerate heading IDs across all docs | + +## Content Roots + +The wiki has three independent docs roots: + +| Directory | URL Prefix | Purpose | +| --- | --- | --- | +| `docs/` | `/docs` | Core documentation, getting started, guides | +| `community/` | `/community` | Community guides, Zsh plugin standard | +| `ecosystem/` | `/ecosystem` | Annexes, packages, plugins | + +## File Naming Conventions + +- **Numeric prefixes** control sidebar order: `01_first.mdx`, `02_second.mdx` +- **Directories** need a `_category_.json` file (see below) +- **All English source files only** — never edit files under `i18n/` + +### Frontmatter + +Every `.mdx` file requires these fields: + +```mdx +--- +id: unique_page_id +title: "Page Title" +sidebar_position: 1 +image: /img/png/theme/z/320x320.png +description: One-sentence description for SEO. +keywords: + - relevant + - keywords +--- +``` + +### `_category_.json` + +Required for every new directory: + +```json +{ + "label": "📁 Section Name", + "position": 1, + "link": { + "type": "generated-index" + } +} +``` + +## MDX Authoring Patterns + +### Admonitions + +Use Docusaurus admonitions for callouts instead of blockquotes: + +```mdx +:::tip +Helpful hint. +::: + +:::info +Neutral information. +::: + +:::warning +Something to be cautious about. +::: + +:::danger +Critical warning. +::: +``` + +### Global MDX Components + +These components are available in every `.mdx` file without importing: + +| Component | Usage | +| --- | --- | +| `text` | Colored text spans | +| `` | Accessible emoji | +| `` | GitHub repo badge | +| `command` | Copyable shell command | + +### Code Blocks + +Use language identifiers and `showLineNumbers` when helpful: + +````mdx +```zsh showLineNumbers +zi light z-shell/F-Sy-H +``` +```` + +### Links + +Prefer relative links between pages: + +```mdx +See [Getting Started](../getting_started) for more details. +``` + +Use absolute URLs only for external resources. + +## Branch and PR Workflow + +1. Branch from `next`: `git checkout -b docs/my-page next` +2. Make changes to English source files only +3. Run `pnpm build:en` to catch broken links and MDX errors +4. Open a PR targeting `next` + +:::warning Never edit `i18n/` files directly +Translation files under `i18n/` are managed exclusively through [Crowdin](https://translate.zshell.dev). Manual edits will be overwritten on the next sync. +::: + +## Localization + +The wiki supports multiple languages via Crowdin. To contribute a translation: + +1. Join the project at [translate.zshell.dev](https://translate.zshell.dev) +2. Translate strings in the Crowdin editor +3. Approved translations are synced back to the repo automatically + +Do **not** fork the repo and edit `i18n/` files manually. + +## Style Guidelines + +- Use sentence case for headings (e.g., `## Code of conduct`, not `## Code Of Conduct`) +- Keep paragraphs short — aim for ≤ 5 sentences per paragraph +- Prefer tables for structured comparisons +- Use admonitions sparingly — only when the callout level genuinely matches the content +- Formatting is enforced by Prettier (120-char print width, double quotes, 2-space indent) + +## See Also + +- [Getting Started](getting_started) — org-wide branch and commit conventions +- [Project Management](project_management) — how work is tracked diff --git a/community/00_contributing/05_project_management.mdx b/community/00_contributing/05_project_management.mdx new file mode 100644 index 000000000..e6a4b7e87 --- /dev/null +++ b/community/00_contributing/05_project_management.mdx @@ -0,0 +1,180 @@ +--- +id: project_management +title: "📋 Project Management" +sidebar_position: 5 +image: /img/png/theme/z/320x320.png +description: How work is tracked and labelled across the Z-Shell organization — project tracker, views, triage workflow, and canonical labels. +keywords: + - project + - tracker + - labels + - triage + - sprint + - roadmap + - github +--- + +{/* @format */} + +import Link from "@docusaurus/Link"; +import useBaseUrl from "@docusaurus/useBaseUrl"; + +
+ +
+ +## Project Tracker + +All work across the Z-Shell organization is tracked in a single unified project: + + + Z-Shell Tracker → + + +
+
+ +The project pulls issues and pull requests from every repository in the +[`z-shell`](https://github.com/z-shell) GitHub organization into one place, so +nothing slips through the cracks. + +### Project Views + +| View | Layout | Purpose | +| --- | --- | --- | +| **Triage** | Table | New items awaiting investigation — start here | +| **Bugs Board** | Board | Active bug work, grouped by Status | +| **Features Board** | Board | Feature and enhancement work | +| **Active Sprint** | Board | Everything in the current 2-week sprint | +| **Roadmap** | Roadmap | Planned work on a timeline | +| **By Repository** | Table | All items grouped by source repo | + +### Custom Fields + +Each item in the project can have the following fields set: + +| Field | Values | Notes | +| --- | --- | --- | +| **Status** | Triage · Todo · In Progress · In Review · Done · Blocked · Won't Fix | Set by maintainers during triage | +| **Priority** | 🔴 Critical · 🟠 High · 🟡 Medium · 🔵 Low · None | | +| **Item Type** | Bug · Feature · Enhancement · Docs · Security · Performance · Chore · CI | | +| **Effort** | XS · S · M · L · XL | Rough size estimate | +| **Sprint** | Sprint 1 … Sprint N | 2-week iterations starting Mondays | + +### Triage Workflow + +New issues and PRs are automatically added to the project with **Status = Triage**. +A maintainer reviews the item and: + +1. Sets **Item Type** (Bug, Feature, etc.) +2. Sets **Priority** +3. Moves **Status** to `Todo` (or `Won't Fix` / `Blocked` if appropriate) +4. Assigns to a **Sprint** if it should be worked on soon +5. Adds the appropriate [label](#labels) + +### Capturing Deferred Work + +Do not leave postponed work only in local diffs, review notes, or memory. +Create or update an issue in the repository that owns the work so it is added to +the shared tracker automatically. + +When splitting or deferring work: + +1. Create **one issue per logical task** so each item can be prioritized and completed independently. +2. Include enough context for another maintainer to resume later: the observed problem, why it matters, relevant files, and any known constraints. +3. Suggest the likely **Item Type**, **Priority**, and **Effort** during triage. +4. Use the canonical labels instead of repo-local tracking conventions. + +### Sprint Cadence + +Sprints run for **2 weeks**, starting every other Monday. + +At the end of each sprint, incomplete items are moved to the next sprint or +returned to the backlog (`Todo` without a sprint assignment). + +### Priority Definitions + +| Priority | Meaning | +| --- | --- | +| 🔴 **Critical** | Data loss, security vulnerability, or complete breakage with no workaround | +| 🟠 **High** | Significantly impacts users; should be in the current or next sprint | +| 🟡 **Medium** | Important but not urgent; planned within the next few sprints | +| 🔵 **Low** | Nice to have; no fixed timeline | +| **None** | Not yet triaged or genuinely optional | + +### Automation + +Every repository in the organization has a `.github/workflows/project-tracker.yml` +workflow that automatically adds new issues and pull requests to the project. No +manual steps are required from contributors. + +--- + +## Labels + +All repositories in the `z-shell` organization use the same canonical label set. +Labels are applied automatically by the stale bot or manually during triage. + +The label set is maintained by +[`scripts/sync-labels.sh`](https://github.com/z-shell/src/blob/next/scripts/sync-labels.sh) +in `z-shell/src` — run it to re-sync labels after adding a new repository. + +### Type Labels + +Use these to describe **what kind of work** an issue or PR represents. + +| Label | Color | Description | +| --- | --- | --- | +| `bug 🐛` | ![#d73a4a](https://placehold.co/12x12/d73a4a/d73a4a.png) `#d73a4a` | Something isn't working | +| `feature-request 💡` | ![#0075ca](https://placehold.co/12x12/0075ca/0075ca.png) `#0075ca` | New feature or request | +| `enhancement ✨` | ![#a2eeef](https://placehold.co/12x12/a2eeef/a2eeef.png) `#a2eeef` | Improvement to existing functionality | +| `documentation 📝` | ![#0052cc](https://placehold.co/12x12/0052cc/0052cc.png) `#0052cc` | Documentation-only changes | +| `performance 🚀` | ![#006b75](https://placehold.co/12x12/006b75/006b75.png) `#006b75` | Performance improvements | +| `security 🛡️` | ![#ee0701](https://placehold.co/12x12/ee0701/ee0701.png) `#ee0701` | Security vulnerability or hardening | +| `breaking-change 💥` | ![#d93f0b](https://placehold.co/12x12/d93f0b/d93f0b.png) `#d93f0b` | Breaks backward compatibility | +| `dependencies 📦` | ![#0366d6](https://placehold.co/12x12/0366d6/0366d6.png) `#0366d6` | Dependency updates | +| `chore 🔧` | ![#c5def5](https://placehold.co/12x12/c5def5/c5def5.png) `#c5def5` | Routine maintenance, no behavior change | +| `refactor ♻️` | ![#5319e7](https://placehold.co/12x12/5319e7/5319e7.png) `#5319e7` | Code refactor, no behavior change | +| `ci ⚙️` | ![#1d76db](https://placehold.co/12x12/1d76db/1d76db.png) `#1d76db` | CI/CD pipeline changes | + +### Status / Workflow Labels + +Use these to describe **where an issue stands** in the process. + +| Label | Color | Description | +| --- | --- | --- | +| `triage 🔍` | ![#fbca04](https://placehold.co/12x12/fbca04/fbca04.png) `#fbca04` | Needs investigation before action | +| `in-progress 🚧` | ![#f9d0c4](https://placehold.co/12x12/f9d0c4/f9d0c4.png) `#f9d0c4` | Currently being worked on | +| `blocked ⛔` | ![#e4e669](https://placehold.co/12x12/e4e669/e4e669.png) `#e4e669` | Blocked on external dependency/decision | +| `stale 💤` | ![#f2f2f2](https://placehold.co/12x12/f2f2f2/f2f2f2.png) `#f2f2f2` | No activity for an extended period | +| `invalid ⚠️` | ![#e4e669](https://placehold.co/12x12/e4e669/e4e669.png) `#e4e669` | Off-topic, cannot reproduce, or incorrect | +| `wontfix 🚫` | ![#ffffff](https://placehold.co/12x12/ffffff/ffffff.png) `#ffffff` | Will not be fixed | +| `no-stale 🔒` | ![#0e8a16](https://placehold.co/12x12/0e8a16/0e8a16.png) `#0e8a16` | Exempt from stale-bot closing | + +### Community Labels + +| Label | Color | Description | +| --- | --- | --- | +| `help-wanted 🙋` | ![#008672](https://placehold.co/12x12/008672/008672.png) `#008672` | Extra attention or expertise needed | +| `good-first-issue 🌱` | ![#7057ff](https://placehold.co/12x12/7057ff/7057ff.png) `#7057ff` | Good for newcomers | +| `Q&A ✍️` | ![#d4c5f9](https://placehold.co/12x12/d4c5f9/d4c5f9.png) `#d4c5f9` | Questions and answers | + +### Syncing Labels + +To apply the canonical label set to a repository: + +```shell +# Single repo +echo "my-repo" > /tmp/repos.txt +./scripts/sync-labels.sh z-shell /tmp/repos.txt + +# All org repos +./scripts/sync-labels.sh z-shell scripts/repos.txt +``` + +The `--force` flag means existing labels with the same name are updated to match +the canonical color and description. Labels not in the canonical set are **not** +deleted automatically — remove them manually if desired. diff --git a/community/00_contributing/_category_.json b/community/00_contributing/_category_.json new file mode 100644 index 000000000..d4e5c8436 --- /dev/null +++ b/community/00_contributing/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "🤝 Contributing", + "position": 0, + "link": { + "type": "doc", + "id": "contributing" + } +} diff --git a/community/00_contributing/index.mdx b/community/00_contributing/index.mdx new file mode 100644 index 000000000..8f6437c55 --- /dev/null +++ b/community/00_contributing/index.mdx @@ -0,0 +1,78 @@ +--- +id: contributing +title: "🤝 Contributing" +sidebar_position: 1 +image: /img/png/theme/z/320x320.png +description: Everything you need to contribute to the Z-Shell ecosystem — zi, Zsh plugins, Zi annexes, and the wiki itself. +keywords: + - contributing + - contribute + - zi + - zsh-plugin + - annex + - open-source + - community +--- + +{/* @format */} + +import Link from "@docusaurus/Link"; +import useBaseUrl from "@docusaurus/useBaseUrl"; + +Contributions are what make the Z-Shell ecosystem thrive. Whether you want to fix a bug in zi, publish a Zsh plugin, or improve this documentation — you are in the right place. + +
+ Contributing workflow: fork → write → PR → merge +
+ +:::info Code of Conduct +All contributors are expected to follow our [Code of Conduct](https://github.com/z-shell/zi/blob/main/CODE_OF_CONDUCT.md). Please read it before participating. +::: + +## Contribution Paths + +Choose the path that matches what you want to do: + +
+ +
+ + Contribute to Zi + Fix bugs, add features, improve performance, or improve the zi source code itself. + Contributing to Zi → +
+ +
+ + Create a Zsh Plugin + Write your own Zsh plugin following the community standard and best practices. + Zsh Plugin Standard → +
+ +
+ + Improve the Docs + Add pages, fix typos, improve guides, or help translate the wiki. + Contributing to the Wiki → +
+ +
+ +## Get Involved + +| Action | Link | +| --- | --- | +| 👥 Join the team | [Open a membership request](https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+) | +| 🌐 Translate | [translate.zshell.dev](https://translate.zshell.dev) | +| 📋 Project tracker | [Z-Shell Tracker](https://github.com/orgs/z-shell/projects/28) | +| 💬 Discuss | [GitHub Discussions](https://github.com/z-shell/zi/discussions) | + +## General Guidelines + +Before starting any significant work — open an [issue](https://github.com/z-shell/zi/issues/new/choose) to discuss the change first. This avoids wasted effort and helps the maintainers coordinate. + +All repositories in the z-shell organization share a common branch model, commit convention, and project tracker. See [**Getting Started**](./01_getting_started.mdx) for the details that apply everywhere. diff --git a/community/03_zsh_native_scripting_handbook.mdx b/community/02_zsh_native_scripting_handbook.mdx similarity index 99% rename from community/03_zsh_native_scripting_handbook.mdx rename to community/02_zsh_native_scripting_handbook.mdx index f6a6c8f16..562c50270 100644 --- a/community/03_zsh_native_scripting_handbook.mdx +++ b/community/02_zsh_native_scripting_handbook.mdx @@ -1,7 +1,7 @@ --- id: zsh_handbook title: "🔤 Zsh Native Scripting Handbook" -sidebar_position: 3 +sidebar_position: 2 image: /img/png/theme/z/320x320.png description: A handbook covering native Zsh scripting techniques and best practices. keywords: diff --git a/community/04_zunit/01_installation.mdx b/community/03_zunit/01_installation.mdx similarity index 93% rename from community/04_zunit/01_installation.mdx rename to community/03_zunit/01_installation.mdx index c20392bbd..b7af83cce 100644 --- a/community/04_zunit/01_installation.mdx +++ b/community/03_zunit/01_installation.mdx @@ -83,8 +83,8 @@ To also generate a GitHub Actions workflow: zunit init --github-actions ``` -See [Configuration](./zunit-configuration) for the `.zunit.yml` key reference and -[CI Integration](./zunit-ci) for the generated workflow details. +See [Configuration](./05_configuration.mdx) for the `.zunit.yml` key reference and +[CI Integration](./06_ci.mdx) for the generated workflow details. :::note Legacy package-manager recipes diff --git a/community/04_zunit/02_test-syntax.mdx b/community/03_zunit/02_test-syntax.mdx similarity index 100% rename from community/04_zunit/02_test-syntax.mdx rename to community/03_zunit/02_test-syntax.mdx diff --git a/community/04_zunit/03_assertions.mdx b/community/03_zunit/03_assertions.mdx similarity index 100% rename from community/04_zunit/03_assertions.mdx rename to community/03_zunit/03_assertions.mdx diff --git a/community/04_zunit/04_running-tests.mdx b/community/03_zunit/04_running-tests.mdx similarity index 96% rename from community/04_zunit/04_running-tests.mdx rename to community/03_zunit/04_running-tests.mdx index c9b29efb7..8bb7b8cf3 100644 --- a/community/04_zunit/04_running-tests.mdx +++ b/community/03_zunit/04_running-tests.mdx @@ -93,7 +93,7 @@ directory configured under `directories.output` in `.zunit.yml` (default: :::tip Combine `--tap` with a TAP reporter (e.g., `tap-junit`) in CI to get structured -test result artifacts. See [CI Integration](./zunit-ci) for ready-to-use workflow +test result artifacts. See [CI Integration](./06_ci.mdx) for ready-to-use workflow examples. ::: diff --git a/community/04_zunit/05_configuration.mdx b/community/03_zunit/05_configuration.mdx similarity index 100% rename from community/04_zunit/05_configuration.mdx rename to community/03_zunit/05_configuration.mdx diff --git a/community/04_zunit/06_ci.mdx b/community/03_zunit/06_ci.mdx similarity index 100% rename from community/04_zunit/06_ci.mdx rename to community/03_zunit/06_ci.mdx diff --git a/community/03_zunit/_category_.json b/community/03_zunit/_category_.json new file mode 100644 index 000000000..1081a5dbd --- /dev/null +++ b/community/03_zunit/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "🧪 ZUnit", + "position": 3, + "link": { + "type": "doc", + "id": "zunit" + } +} diff --git a/community/04_zunit/index.mdx b/community/03_zunit/index.mdx similarity index 70% rename from community/04_zunit/index.mdx rename to community/03_zunit/index.mdx index 74919d13d..d6f9eb993 100644 --- a/community/04_zunit/index.mdx +++ b/community/03_zunit/index.mdx @@ -24,12 +24,12 @@ reports, and a `zunit init` scaffolding command for fast project setup. | Section | What it covers | |---|---| -| [Installation](./zunit/zunit-installation) | Manual install, dependencies, Zi integration | -| [Test Syntax](./zunit/zunit-test-syntax) | `@test`, `@setup`/`@teardown`, helper functions | -| [Assertions](./zunit/zunit-assertions) | All ~25 assertion functions with examples | -| [Running Tests](./zunit/zunit-running-tests) | CLI usage, flags, output modes | -| [Configuration](./zunit/zunit-configuration) | `.zunit.yml` key reference | -| [CI Integration](./zunit/zunit-ci) | GitHub Actions and Travis CI workflows | +| [Installation](./01_installation.mdx) | Manual install, dependencies, Zi integration | +| [Test Syntax](./02_test-syntax.mdx) | `@test`, `@setup`/`@teardown`, helper functions | +| [Assertions](./03_assertions.mdx) | All ~25 assertion functions with examples | +| [Running Tests](./04_running-tests.mdx) | CLI usage, flags, output modes | +| [Configuration](./05_configuration.mdx) | `.zunit.yml` key reference | +| [CI Integration](./06_ci.mdx) | GitHub Actions and Travis CI workflows | ## Quick start diff --git a/community/04_zunit/_category_.json b/community/04_zunit/_category_.json deleted file mode 100644 index d96f46d40..000000000 --- a/community/04_zunit/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "🧪 ZUnit", - "position": 4, - "link": { - "type": "generated-index", - "description": "ZUnit — a unit testing framework for Zsh projects." - } -} diff --git a/community/index.mdx b/community/index.mdx index 523be08a6..cfb06f2eb 100644 --- a/community/index.mdx +++ b/community/index.mdx @@ -10,14 +10,16 @@ keywords: - zsh-lovers - community - gallery + - contributing --- {/* @format */} -```mdx-code-block +import Link from "@docusaurus/Link"; import useBaseUrl from "@docusaurus/useBaseUrl"; import ThemedImage from "@theme/ThemedImage"; +```mdx-code-block
``` + +## 🤝 Contributing + +Want to contribute to zi, create a Zsh plugin, or improve the docs? +The **Contributing** section is your starting point — it covers everything from setting up your fork to project management and the Zsh Plugin Standard. diff --git a/static/img/svg/community/contributing-banner.svg b/static/img/svg/community/contributing-banner.svg new file mode 100644 index 000000000..a868edbf5 --- /dev/null +++ b/static/img/svg/community/contributing-banner.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + fork + + + + + + + Fork & branch + + + + + + + + + + + + + + + + + + Write & commit + + + + + + + + + PR + + + + + + + + + + + + + reviewed + Open pull request + + + + + + + + + + + + + + + + + + + merged ✓ + Get merged 🎉 + + + + + + + + + + + diff --git a/static/img/svg/community/contributing-docs.svg b/static/img/svg/community/contributing-docs.svg new file mode 100644 index 000000000..04922311b --- /dev/null +++ b/static/img/svg/community/contributing-docs.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/svg/community/contributing-getting-started.svg b/static/img/svg/community/contributing-getting-started.svg new file mode 100644 index 000000000..fbe4c03cc --- /dev/null +++ b/static/img/svg/community/contributing-getting-started.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feat + + + + next + + + + diff --git a/static/img/svg/community/contributing-plugin-standard.svg b/static/img/svg/community/contributing-plugin-standard.svg new file mode 100644 index 000000000..0fb847004 --- /dev/null +++ b/static/img/svg/community/contributing-plugin-standard.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + plugin std + + + { + } + diff --git a/static/img/svg/community/contributing-project-management.svg b/static/img/svg/community/contributing-project-management.svg new file mode 100644 index 000000000..d9cf27529 --- /dev/null +++ b/static/img/svg/community/contributing-project-management.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + Z-Shell Tracker + + + + + + + Todo + In Progress + Done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/svg/community/contributing-zi.svg b/static/img/svg/community/contributing-zi.svg new file mode 100644 index 000000000..d5a748576 --- /dev/null +++ b/static/img/svg/community/contributing-zi.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + zi + + + + + + + + + + From 28500b1f3e4508bd1edbd97195b565b668a69c72 Mon Sep 17 00:00:00 2001 From: ss-o Date: Sun, 17 May 2026 05:45:00 +0100 Subject: [PATCH 3/9] feat(highlight): unified zsh/zi/zunit prism grammar with token colors - Expand zsh grammar: adds zsh-builtin (30+ builtins), zsh-expansion-flag, zsh-special-parameter, zsh-glob-qualifier alongside existing zi/zunit tokens - Simplify prism-include-languages.ts to swizzle delegation pattern - Add comprehensive CSS token palette (9 token types, light + dark themes) - Fix dead link in zsh_startify.mdx (z-shell/zsh-startify repo is gone) - Migrate 44 MDX files from shell to zsh/zi/zunit language fences --- .../01_zsh_guide/01_roadmap/10_expansion.mdx | 4 +- .../gallery/collection/01_collection.mdx | 2 +- .../gallery/collection/02_completions.mdx | 48 +++--- community/gallery/collection/03_programs.mdx | 146 +++++++++--------- community/gallery/collection/04_snippets.mdx | 6 +- community/gallery/collection/05_services.mdx | 4 +- community/gallery/collection/06_plugins.mdx | 54 +++---- community/gallery/collection/07_themes.mdx | 38 ++--- docs/getting_started/01_installation.mdx | 10 +- docs/getting_started/02_overview.mdx | 70 ++++----- docs/getting_started/03_migration.mdx | 30 ++-- docs/guides/02_customization.mdx | 18 +-- docs/guides/03_benchmark.mdx | 6 +- docs/guides/syntax/01_standard.mdx | 92 +++++------ docs/guides/syntax/02_for.mdx | 20 +-- docs/guides/syntax/10_bindkey.mdx | 16 +- ecosystem/annexes/19_eval.mdx | 14 +- ecosystem/annexes/1_bin_gem_node.mdx | 48 +++--- ecosystem/annexes/20_test.mdx | 6 +- ecosystem/annexes/2_meta_plugins.mdx | 10 +- ecosystem/annexes/3_default_ice.mdx | 6 +- ecosystem/annexes/4_patch-dl.mdx | 8 +- ecosystem/annexes/5_readurl.mdx | 14 +- ecosystem/annexes/6_submods.mdx | 4 +- ecosystem/annexes/7_unscope.mdx | 2 +- ecosystem/annexes/8_linkbin.mdx | 6 +- ecosystem/annexes/9_rust.mdx | 18 +-- ecosystem/packages/01_synopsis.mdx | 10 +- ecosystem/packages/02_usage.mdx | 76 ++++----- ecosystem/plugins/diff-so-fancy.mdx | 4 +- ecosystem/plugins/f-sy-h.mdx | 4 +- ecosystem/plugins/h-s-mw.mdx | 8 +- ecosystem/plugins/zbrowse.mdx | 2 +- ecosystem/plugins/zconvey.mdx | 6 +- ecosystem/plugins/zi_console.mdx | 10 +- ecosystem/plugins/zprompts.mdx | 2 +- ecosystem/plugins/zsh_comand_architect.mdx | 2 +- ecosystem/plugins/zsh_editing_workbench.mdx | 2 +- ecosystem/plugins/zsh_modules.mdx | 8 +- ecosystem/plugins/zsh_navigation_tools.mdx | 8 +- ecosystem/plugins/zsh_select.mdx | 2 +- ecosystem/plugins/zsh_startify.mdx | 6 +- ecosystem/plugins/zsh_unique_id.mdx | 4 +- ecosystem/plugins/zui.mdx | 6 +- ecosystem/plugins/zzcomplete.mdx | 2 +- 45 files changed, 431 insertions(+), 431 deletions(-) diff --git a/community/01_zsh_guide/01_roadmap/10_expansion.mdx b/community/01_zsh_guide/01_roadmap/10_expansion.mdx index 84df12b39..583f6ef24 100644 --- a/community/01_zsh_guide/01_roadmap/10_expansion.mdx +++ b/community/01_zsh_guide/01_roadmap/10_expansion.mdx @@ -36,13 +36,13 @@ ls ~/**/*.txt # <- THIS IS A GLOB Enable the `extended_glob` option in Zsh: -```shell +```zsh setopt extended_glob ``` Enable the `dot_glob` option in Zsh: -```shell +```zsh setopt dot_glob ``` diff --git a/community/gallery/collection/01_collection.mdx b/community/gallery/collection/01_collection.mdx index 4273d0785..ed449c1cd 100644 --- a/community/gallery/collection/01_collection.mdx +++ b/community/gallery/collection/01_collection.mdx @@ -18,7 +18,7 @@ keywords: - Additional installation methods: [meta-plugins](/ecosystem/annexes/meta-plugins), [packages][]. - Some installations may require additional functionally, it can be done by installing required [annexes][]: -```shell +```zsh zi light-mode for z-shell/z-a-meta-plugins @annexes ``` diff --git a/community/gallery/collection/02_completions.mdx b/community/gallery/collection/02_completions.mdx index 54497432f..0d25014a7 100644 --- a/community/gallery/collection/02_completions.mdx +++ b/community/gallery/collection/02_completions.mdx @@ -38,7 +38,7 @@ Create your own syntax e.g: > - The ver'main' - allows selecting a specific version or branch. > - It's optional and can be removed if not required. -```shell showlinenumbers +```zsh showLineNumbers z_lucid() { zi ice lucid ver'main' "$@" } @@ -58,7 +58,7 @@ zi_completion() { Then load as: -```shell showlinenumbers +```zsh showLineNumbers zi_completion has'…' zi snippet … @@ -73,28 +73,28 @@ zi snippet … ### COMP: [alacritty/alacritty][] {/* #comp-alacritty-alacritty */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'alacritty' zi snippet https://github.com/alacritty/alacritty/blob/master/extra/completions/_alacritty ``` ### COMP: [Aloxaf/fzf-tab][] {/* #comp-aloxaf-fzf-tab */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait has'fzf' zi light Aloxaf/fzf-tab ``` ### COMP: [beetbox/beets][] {/* #comp-beetbox-beets */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'beet' zi snippet https://github.com/beetbox/beets/blob/master/extra/_beet ``` ### COMP: [bugaevc/wl-clipboard](https://github.com/bugaevc/wl-clipboard/tree/master/completions/zsh/) {/* #comp-bugaevc-wl-clipboard */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'wl-copy' zi snippet https://github.com/bugaevc/wl-clipboard/blob/master/completions/zsh/_wl-copy @@ -104,126 +104,126 @@ zi snippet https://github.com/bugaevc/wl-clipboard/blob/master/completions/zsh/_ ### COMP: [BurntSushi/ripgrep/rg](https://github.com/BurntSushi/ripgrep/blob/master/crates/core/flags/complete/rg.zsh) {/* #comp-burntsushi-ripgrep-rg */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'rg' mv'rg.zsh -> _rg' zi snippet https://github.com/BurntSushi/ripgrep/blob/master/crates/core/flags/complete/rg.zsh ``` ### COMP: [dbrgn/tealdeer][dbrgn-tealdeer] {/* #comp-dbrgn-tealdeer */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'tldr' mv'zsh_tealdeer -> _tldr' zi snippet https://github.com/dbrgn/tealdeer/blob/main/completion/zsh_tealdeer ``` ### COMP: [docker/cli][] {/* #comp-docker-cli */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as"completion" zi snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker ``` ### COMP: [flatpak/flatpak][] {/* #comp-flatpak-flatpak */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'flatpak' zi light https://github.com/flatpak/flatpak/blob/master/completion/_flatpak ``` ### COMP: [git/git][] {/* #comp-git-git */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf mv'git-completion.zsh -> _git' zi snippet https://github.com/git/git/blob/master/contrib/completion/git-completion.zsh ``` ### COMP: [greymd/tmux-xpanes][] {/* #comp-greymd-tmux-xpanes */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'tmux' pick'completion/zsh' zi light greymd/tmux-xpanes ``` ### COMP: [jarun/Buku][] {/* #comp-jarun-Buku */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'buku' zi snippet https://github.com/jarun/Buku/blob/master/auto-completion/zsh/_buku ``` ### COMP: [mpv-player/mpv][] {/* #comp-mpv-player-mpv */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'mpv' zi snippet https://github.com/mpv-player/mpv/blob/master/etc/_mpv.zsh ``` ### COMP: [ohmyzsh/rust][] {/* #comp-ohmyzsh-rust */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'rustc' zi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/rust/_rustc ``` ### COMP: [oven-sh/bun][] {/* #comp-oven-sh-bun */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'bun' zi snippet https://github.com/oven-sh/bun/blob/main/completions/bun.zsh ``` ### COMP: [rust-lang/cargo][] {/* #comp-rust-lang-cargo */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'cargo' zi snippet https://github.com/rust-lang/cargo/blob/master/src/etc/_cargo ``` ### COMP: [srijanshetty/zsh-pandoc-completion][] {/* #comp-srijanshetty-zsh-pandoc-completion */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'pandoc' zi light srijanshetty/zsh-pandoc-completion ``` ### COMP: [TheLocehiliosan/yadm](https://github.com/yadm-dev/yadm/blob/master/completion/zsh/_yadm) {/* #comp-TheLocehiliosan-yadm */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'yadm' zi snippet https://github.com/yadm-dev/yadm/blob/master/completion/zsh/_yadm ``` ### COMP: [x-motemen/ghq][] {/* #comp-x-motemen-ghq */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'ghq' zi snippet https://github.com/x-motemen/ghq/blob/master/misc/zsh/_ghq ``` ### COMP: [zchee/zsh-completions][] {/* #comp-zchee-zsh-completions */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf zi light zchee/zsh-completions ``` ### [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide/blob/main/contrib/completions/_zoxide) {/* #comp-zoxide-completions */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'completion' blockf has'zoxide' zi snippet https://github.com/ajeetdsouza/zoxide/blob/main/contrib/completions/_zoxide ``` ### COMP: [zsh-users/zsh-completions][] {/* #comp-zsh-users-zsh-completions */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' zi light zsh-users/zsh-completions ``` ### COMP: Local {/* #comp-local */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'completion' blockf has'pip' zi snippet "$SHELL_COMMON/zsh/completions/_pip" diff --git a/community/gallery/collection/03_programs.mdx b/community/gallery/collection/03_programs.mdx index 32113646a..73c72049c 100644 --- a/community/gallery/collection/03_programs.mdx +++ b/community/gallery/collection/03_programs.mdx @@ -46,7 +46,7 @@ The `ver'…'` - allows to select a specific version, branch, or commit hash, al Example: -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for \ ver'88f3dae4f5391db589257ea069ab8fe4717c22c6' \ z-shell/F-Sy-H @@ -58,7 +58,7 @@ zi wait lucid for \ Command wrap example for cleaner or preferred syntax. -```shell showLineNumbers +```zsh showLineNumbers z_lucid() { zi ice lucid ver'master' "$@" } @@ -74,7 +74,7 @@ zi_program() { Then load as: -```shell showLineNumbers +```zsh showLineNumbers zi_program has'…' zi light … @@ -96,7 +96,7 @@ zi light … -```shell showLineNumbers +```zsh showLineNumbers zi ice has'asciinema' as'program' from'gh-r' \ mv'agg* -> agg' pick'agg' zi light asciinema/agg @@ -107,7 +107,7 @@ zi light asciinema/agg Install using the [bin-gem-node][bin-gem-node] annex. -```shell showLineNumbers +```zsh showLineNumbers zi ice has'asciinema' as'program' from'gh-r' sbin'agg* -> agg' zi light asciinema/agg ``` @@ -117,77 +117,77 @@ zi light asciinema/agg ### GH-R: [dandavison/delta][] {/* #dandavison-delta */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' from'gh-r' sbin'**/delta -> delta' zi light dandavison/delta ``` ### GH-R: [denisidoro/navi][] {/* #gh-r-denisidoronavi */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' from"gh-r" has'fzf' zi light denisidoro/navi ``` ### GH-R: [junegunn/fzf][] {/* #gh-r-junegunnfzf */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' zi light junegunn/fzf ``` ### GH-R: [sharkdp/fd][] {/* #gh-r-sharkdpfd */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' mv'fd* fd' sbin'**/fd(.exe|) -> fd' zi light @sharkdp/fd ``` ### GH-R: [sharkdp/bat][] {/* #gh-r-sharkdpbat */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' mv'bat* bat' sbin'**/bat(.exe|) -> bat' zi light @sharkdp/bat ``` ### GH-R: [sharkdp/hexyl][] {/* #gh-r-sharkdphexyl */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' mv'hexyl* hexyl' sbin'**/hexyl(.exe|) -> hexyl' zi light @sharkdp/hexyl ``` ### GH-R: [sharkdp/hyperfine][] {/* #gh-r-sharkdphyperfine */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' mv"hyperfine* hyperfine" sbin"**/hyperfine(.exe|) -> hyperfine" zi light @sharkdp/hyperfine ``` ### GH-R: [sharkdp/vivid][] {/* #gh-r-sharkdpvivid */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' mv'vivid* vivid' sbin'**/vivid(.exe|) -> vivid' zi light @sharkdp/vivid ``` ### GH-R: [ogham/exa][] {/* #gh-r-oghamexa */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from'gh-r' as'program' sbin'**/exa -> exa' atclone'cp -vf completions/exa.zsh _exa' zi light ogham/exa ``` ### GH-R: [docker/compose][] {/* #gh-r-dockercompose */} -```shell showLineNumbers +```zsh showLineNumbers zi ice from"gh-r" as'program' mv'docker* -> docker-compose' zi light docker/compose ``` ### GH-R: [neovim/neovim][] {/* #gh-r-neovimneovim */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' \ bpick'nvim-linux64.tar.gz' sbin'**/bin/nvim -> nvim' zi light neovim/neovim @@ -195,28 +195,28 @@ zi light neovim/neovim ### GH-R: [direnv/direnv][] {/* #gh-r-direnvdirenv */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' mv'direnv* -> direnv' zi light direnv/direnv ``` ### GH-R: [mvdan/sh][] {/* #gh-r-mvdansh */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' mv'shfmt* -> shfmt' zi light mvdan/sh ``` ### GH-R: [b4b4r07/gotcha][] {/* #gh-r-b4b4r07gotcha */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' mv'gotcha_* -> gotcha' zi light b4b4r07/gotcha ``` ### GH-R: [ajeetdsouza/zoxide][] {/* #gh-r-ajeetdsouzazoxide */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' pick'zoxide' \ atclone'ln -s completions/_zoxide -> _zoxide; cp man/man1/*.1 $ZI[MAN_DIR]/man1; ./zoxide init zsh --cmd x > init.zsh' \ @@ -226,28 +226,28 @@ zi light ajeetdsouza/zoxide ### SC: [zdharma/revolver][] {/* #sc-zdharmarevolver */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' pick'revolver' zi light zdharma/revolver ``` ### SC: [zdharma/zunit][] {/* #sc-zdharmazunit */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' pick'zunit' atclone'./build.zsh' atpull'%atclone' zi load zdharma/zunit ``` ### SC: [Osse/git-scripts/git-unique][] {/* #sc-ossegit-scriptsgit-unique */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' id-as'git-unique' pick'git-unique' zi snippet https://github.com/Osse/git-scripts/blob/master/git-unique ``` ### SC: [mfaerevaag/wd][] {/* #sc-mfaerevaagwd */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' cp'wd.sh -> wd' \ mv'_wd.sh -> _wd' atpull'!git reset --hard' pick'wd' zi light mfaerevaag/wd @@ -255,28 +255,28 @@ zi light mfaerevaag/wd ### SC: [z-shell/zsh-diff-so-fancy][] {/* #sc-z-shellzsh-diff-so-fancy */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' pick'bin/git-dsf' zi load z-shell/zsh-diff-so-fancy ``` ### SC: [obihann/archey-osx][] {/* #sc-obihannarchey-osx */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' pick'bin/archey' zi light obihann/archey-osx ``` ### SC: [eth-p/bat-extras][] {/* #sc-eth-pbat-extras */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'bat' pick'src/*' zi light eth-p/bat-extras ``` ### SC: [paulirish/git-open][] {/* #sc-paulirishgit-open */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'git' \ atclone"cp git-open.1.md $ZI[MAN_DIR]/man1/git-open.1" atpull'%atclone' zi light paulirish/git-open @@ -284,38 +284,38 @@ zi light paulirish/git-open ### SC: [LuRsT/hr][] {/* #sc-lursthr */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' atclone"cp hr.1 $ZI[MAN_DIR]/man1" atpull'%atclone' zi light LuRsT/hr ``` ### SC: [Seirdy/stpv][] {/* #sc-seirdystpv */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'fzf' pick'fzfp' zi light Seirdy/stpv ``` -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'ueberzug' pick'stpvimg' zi light Seirdy/stpv ``` -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' pick'stpv' zi light Seirdy/stpv ``` ### SC: [exiftool/exiftool][] {/* #sc-exiftoolexiftool */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'perl' has'convert' pick'exiftool' zi light exiftool/exiftool ``` ### SC: [smxi/inxi][] {/* #sc-smxiinxi */} -```shell showLineNumbers +```zsh showLineNumbers zi ice if'[ -z "$SSH_CONNECTION" ]' lucid wait \ as'program' has'perl' pick'inxi' zi light smxi/inxi @@ -323,35 +323,35 @@ zi light smxi/inxi ### SC: [dylanaraps/pash][] {/* #sc-dylanarapspash */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'gpg' zi light dylanaraps/pash ``` ### SC: [hackerb9/lsix][] {/* #sc-hackerb9lsix */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'mogrify' zi light hackerb9/lsix ``` ### SC: [denilsonsa/prettyping][] {/* #sc-denilsonsaprettyping */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' pick'prettyping' has'ping' zi light denilsonsa/prettyping ``` ### SC: [greymd/tmux-xpanes][] {/* #sc-greymdtmux-xpanes */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'tmux' pick'bin/xpanes' zi light greymd/tmux-xpanes ``` ### SC: [DanielG/dxld-mullvad/am-i-mullvad.sh][] {/* #sc-danielgdxld-mullvadam-i-mullvadsh */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'jq' zi snippet 'https://github.com/DanielG/dxld-mullvad/blob/master/am-i-mullvad.sh' ``` @@ -360,7 +360,7 @@ zi snippet 'https://github.com/DanielG/dxld-mullvad/blob/master/am-i-mullvad.sh' Standard syntax -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid as'program' atclone"autoreconf -i; ./configure --prefix=$ZPFX" \ atpull'%atclone' make"install" pick"$ZPFX/bin/cmatrix" zi light abishekvashok/cmatrix @@ -368,7 +368,7 @@ zi light abishekvashok/cmatrix The "for" syntax -```shell showLineNumbers +```zsh showLineNumbers zi for as'program' atclone"autoreconf -i; ./configure --prefix=$ZPFX" \ atpull'%atclone' make"all install" pick"$ZPFX/bin/cmatrix" \ abishekvashok/cmatrix @@ -376,14 +376,14 @@ zi for as'program' atclone"autoreconf -i; ./configure --prefix=$ZPFX" \ ### B: [tj/git-extras][] {/* #b-tjgit-extras */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' pick'$ZPFX/bin/git-*' make'PREFIX=$ZPFX' nocompile zi light tj/git-extras ``` ### B: [k4rthik/git-cal][] {/* #b-k4rthikgit-cal */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid as'program' atclone'perl Makefile.PL PREFIX=$ZPFX' \ atpull'%atclone' make'install' pick'$ZPFX/bin/git-cal' zi light k4rthik/git-cal @@ -391,28 +391,28 @@ zi light k4rthik/git-cal ### B: [aaronNG/reddio][] {/* #b-aaronngreddio */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'jq' pick'reddio' from'gitlab' zi light aaronNG/reddio ``` ### B: [TheLocehiliosan/yadm][] {/* #b-thelocehiliosanyadm */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' has'git' pick'yadm' atclone"cp yadm.1 $ZI[MAN_DIR]/man1" atpull'%atclone' zi light TheLocehiliosan/yadm ``` ### B: [sdushantha/farge][] {/* #b-sdushanthafarge */} -```shell showLineNumbers +```zsh showLineNumbers zi ice if'[[ -n "$WAYLAND_DISPLAY" ]]' lucid wait as'program' pick'farge' zi light 'sdushantha/farge' ``` ### B: [dylanaraps/neofetch][] {/* #b-dylanarapsneofetch */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid wait as'program' pick'neofetch' \ atclone"cp neofetch.1 $ZI[MAN_DIR]/man1" atpull'%atclone' zi light dylanaraps/neofetch @@ -420,7 +420,7 @@ zi light dylanaraps/neofetch ### B: [vim/vim][] {/* #b-vimvim */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' atclone'rm -f src/auto/config.cache; ./configure' \ atpull'%atclone' make pick'src/vim' zi light vim/vim @@ -428,7 +428,7 @@ zi light vim/vim ### B: [direnv/direnv][] {/* #b-direnvdirenv */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' make'!' atclone'./direnv hook zsh > zhook.zsh' \ atpull'%atclone' src'zhook.zsh' zi light direnv/direnv @@ -436,14 +436,14 @@ zi light direnv/direnv ### B: [mptre/yank][] {/* #b-mptreyank */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' pick'yank' make zi light mptre/yank ``` ### B: [pyenv/pyenv][] {/* #b-pyenvpyenv */} -```shell showLineNumbers +```zsh showLineNumbers zi ice atclone'PYENV_ROOT="$PWD" ./libexec/pyenv init - > zpyenv.zsh' \ atinit'export PYENV_ROOT="$PWD"' atpull"%atclone" \ as'program' pick'bin/pyenv' src"zpyenv.zsh" nocompile'!' @@ -452,7 +452,7 @@ zi light pyenv/pyenv ### B: [sdkman/sdkman-cli][] {/* #b-sdkmansdkman-cli */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' pick'$ZPFX/sdkman/bin/sdk' id-as'sdkman' run-atpull nocompile \ atclone'curl -s "https://get.sdkman.io?rcupdate=false" -o scr.sh; SDKMAN_DIR=$ZPFX/sdkman bash scr.sh' \ atpull'SDKMAN_DIR=$ZPFX/sdkman sdk selfupdate' \ @@ -462,7 +462,7 @@ zi light z-shell/0 ### B: [asciinema/asciinema][] {/* #b-asciinemaasciinema */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" wait lucid atinit"export PYTHONPATH=$ZPFX/lib/python3.10/site-packages/" \ atclone"PYTHONPATH=$ZPFX/lib/python3.10/site-packages/ python3 setup.py --quiet install --prefix $ZPFX" \ atpull"%atclone" test"0" pick"$ZPFX/bin/asciinema" @@ -471,7 +471,7 @@ zi load asciinema/asciinema ### RA: Rust and [Peltoche/lsd][] {/* #ra-rust-and-peltochelsd */} -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'!lsd' id-as'lsd' as'program' nocompile zi load z-shell/0 ``` @@ -480,28 +480,28 @@ zi load z-shell/0 The `ls` shim exposing the `exa`` binary -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'!exa -> ls' id-as'exa' as'program' nocompile zi load z-shell/0 ``` Shim with standard error redirected to `/dev/null` -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'!E:exa' id-as'exa' as'program' nocompile zi load z-shell/0 ``` ### RA: Rust and [ogham/exa][], [Peltoche/lsd][] {/* #ra-rust-and-oghamexa-peltochelsd */} -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'exa;lsd' nocompile zi load z-shell/0 ``` Expose binaries by altering $PATH: -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'exa;lsd' as'program' pick"bin/(exa|lsd)" nocompile zi load z-shell/0 ``` @@ -510,7 +510,7 @@ zi load z-shell/0 Install rust and make it available globally in the system: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as"rust" wait"0" lucid rustup as"program" pick"bin/rustc" \ atload="export nocompile CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup" zi load z-shell/0 @@ -520,7 +520,7 @@ zi load z-shell/0 ### GH-R: [argoproj/argo-cd](https://github.com/argoproj/argo-cd) {/* #gh-r-argoprojargo-cd */} -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for \ as'completions' atclone'./argocd* completion zsh > _argocd' \ atpull'%atclone' from'gh-r' if'[[ "$(uname -m)" == x86_64 ]]' \ @@ -530,7 +530,7 @@ zi light-mode for \ ### GH-R: [junegunn/fzf][] + extras {/* #gh-r-junegunnfzf--extras */} -```shell showLineNumbers +```zsh showLineNumbers zi for atclone'mkdir -p $ZPFX/{bin,man/man1}' atpull'%atclone' from'gh-r' dl' https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh -> _fzf_completion; https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh -> key-bindings.zsh; @@ -542,7 +542,7 @@ zi for atclone'mkdir -p $ZPFX/{bin,man/man1}' atpull'%atclone' from'gh-r' dl' ### GH-R: [junegunn/fzf][], [sharkdp/fd][], [sharkdp/bat][], [ogham/exa][] {/* #gh-r-junegunnfzf-sharkdpfd-sharkdpbat-oghamexa */} -```shell showLineNumbers +```zsh showLineNumbers zi from"gh-r" as"null" for \ sbin"fzf" junegunn/fzf \ sbin"**/fd" @sharkdp/fd \ @@ -552,7 +552,7 @@ zi from"gh-r" as"null" for \ ### SC: [zdharma/revolver][], [zdharma/zunit][] {/* #sc-zdharmarevolver-zdharmazunit */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for as'program' \ atclone'ln -sfv revolver.zsh-completion _revolver' \ atpull'%atclone' pick'revolver' \ @@ -564,7 +564,7 @@ zi wait lucid for as'program' \ ### SC: [tj/n](https://github.com/tj/n) {/* #sc-tjn */} -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for as'program' atinit'export N_PREFIX="$PWD/n"; \ [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"' pick"bin/n" \ tj/n @@ -581,7 +581,7 @@ zi light-mode for as'program' atinit'export N_PREFIX="$PWD/n"; \ ::: -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for id-as'pnpm' from'gh-r' bpick'*-linux-x64' as'program' \ atinit'export PNPM_HOME=$ZPFX/bin; [[ -z $NODE_PATH ]] && \ export NODE_PATH=$PWD' sbin'pnpm* -> pnpm' nocompile \ @@ -590,7 +590,7 @@ zi light-mode for id-as'pnpm' from'gh-r' bpick'*-linux-x64' as'program' \ ### GH-R: [yarnpkg/yarn][] {/* #gh-r-yarnpkgyarn */} -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for from'gh-r' as'program' \ atinit'export PATH="$HOME/.yarn/bin:$PATH"' mv'yarn* -> yarn' \ pick"yarn/bin/yarn" bpick'*.tar.gz' \ @@ -599,7 +599,7 @@ zi light-mode for from'gh-r' as'program' \ ### B: [jarun/nnn][] {/* #b-jarunnnn */} -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for pick'misc/quitcd/quitcd.zsh' as'program' nocompile \ sbin make \ jarun/nnn @@ -607,7 +607,7 @@ zi light-mode for pick'misc/quitcd/quitcd.zsh' as'program' nocompile \ ### SC: [homebrew/brew][homebrew/brew] {/* #sc-homebrewbrewhomebrewbrew */} -```shell showLineNumbers +```zsh showLineNumbers zi for as'null' depth'3' nocompletions sbin'bin/brew' \ atclone'+zi-message "{auto}Installing brew …"; ./bin/brew update --preinstall; \ ln -sf $PWD/completions/zsh/_brew $ZI[COMPLETIONS_DIR]; \ @@ -619,7 +619,7 @@ zi for as'null' depth'3' nocompletions sbin'bin/brew' \ ### GH-R: [dbrgn/tealdeer](https://github.com/dbrgn/tealdeer) {/* #gh-r-dbrgntealdeer */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid as'program' from'gh-r' for \ mv'tealdeer* -> tealdeer' \ sbin'**/tealdeer -> tldr' \ @@ -629,7 +629,7 @@ zi wait lucid as'program' from'gh-r' for \ ### GH-R: [koalaman/shellcheck](https://github.com/koalaman/shellcheck) {/* #gh-r-koalamanshellcheck */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid as'program' from'gh-r' for \ mv'shellcheck* -> shellcheck' \ sbin'**/shellcheck -> shellcheck' \ @@ -638,7 +638,7 @@ zi wait lucid as'program' from'gh-r' for \ ### GH-R: [hadolint/hadolint](https://github.com/hadolint/hadolint) {/* #gh-r-hadolinthadolint */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid as'program' from'gh-r' for \ mv'hadolint* -> hadolint' \ sbin'hadolint -> hadolint' \ @@ -648,7 +648,7 @@ zi wait lucid as'program' from'gh-r' for \ ### RA: Rust compiler environment + completions {/* #ra-rust-compiler-environment--completions */} -```shell showLineNumbers +```zsh showLineNumbers zi id-as"rust" wait=1 as=null sbin="bin/*" lucid rustup nocompile \ atload="[[ ! -f ${ZI[COMPLETIONS_DIR]}/_cargo ]] && zi creinstall -q rust; \ export CARGO_HOME=\$PWD; export RUSTUP_HOME=\$PWD/rustup" for \ @@ -657,7 +657,7 @@ zi id-as"rust" wait=1 as=null sbin="bin/*" lucid rustup nocompile \ ### B: [ytdl-org/youtube-dl][ytdl-org/youtube-dl] {/* #b-ytdl-orgyoutube-dlytdl-orgyoutube-dl */} -```shell +```zsh zi for as'program' nocompile'!' depth'1' \ has'python' pick'$ZPFX/bin/youtube-dl*' make'!PREFIX=$ZPFX install' \ atclone'ln -sfv youtube-dl.zsh _youtube-dl' atpull'%atclone' \ diff --git a/community/gallery/collection/04_snippets.mdx b/community/gallery/collection/04_snippets.mdx index 7849fa650..c78d9677d 100644 --- a/community/gallery/collection/04_snippets.mdx +++ b/community/gallery/collection/04_snippets.mdx @@ -19,11 +19,11 @@ keywords: ### SC: [OMZ::lib/git.zsh](https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/git.zsh) {/* #sc-omzlib */} -```shell showLineNumbers +```zsh showLineNumbers zi snippet OMZL::git.zsh ``` -```shell showLineNumbers +```zsh showLineNumbers zi ice multisrc'git.zsh \ functions.zsh history.zsh grep.zsh' zi snippet OMZ::lib/completion.zsh @@ -31,7 +31,7 @@ zi snippet OMZ::lib/completion.zsh ### SC: [OMZ::plugin/macos](https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/macos/macos.plugin.zsh) {/* #sc-omzpluginmacos */} -```shell showLineNumbers +```zsh showLineNumbers zi snippet OMZP::macos ``` diff --git a/community/gallery/collection/05_services.mdx b/community/gallery/collection/05_services.mdx index 3588202f7..54721411d 100644 --- a/community/gallery/collection/05_services.mdx +++ b/community/gallery/collection/05_services.mdx @@ -13,14 +13,14 @@ keywords: ### ZS: [z-shell/redis](https://github.com/z-shell/redis) {/* #zs-z-shellredis */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid service"redis" zi light z-shell/redis ``` ### ZS: [z-shell/zsh-github-issues](https://github.com/z-shell/zsh-github-issues) {/* #zs-z-shellzsh-github-issues */} -```shell showLineNumbers +```zsh showLineNumbers GIT_SLEEP_TIME=700 GIT_PROJECTS=z-shell/zsh-github-issues:z-shell/zi diff --git a/community/gallery/collection/06_plugins.mdx b/community/gallery/collection/06_plugins.mdx index 35641c81e..02d8ac069 100644 --- a/community/gallery/collection/06_plugins.mdx +++ b/community/gallery/collection/06_plugins.mdx @@ -29,7 +29,7 @@ Related: Load in turbo mode and adjust loading order by appending e.g: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'0a' lucid … zi light … @@ -47,7 +47,7 @@ zi light … - The ver'main' - allows to select specific commit, version or branch. - It's optional and can be removed if not required. -```shell showLineNumbers +```zsh showLineNumbers z_lucid() { zi ice lucid ver'main' "$@" } @@ -69,7 +69,7 @@ zi0c() { :::tip[Load:] -```shell showLineNumbers +```zsh showLineNumbers zi0a zi light … @@ -86,7 +86,7 @@ zi light … ### SC: [trapd00r/LS_COLORS](https://github.com/trapd00r/LS_COLORS) {/* #sc-trapd00rls_colors */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid reset \ atclone"[[ -z \${commands[dircolors]} ]] && local P=g \${P}sed -i '/DIR/c\DIR 38;5;63;1' LS_COLORS @@ -98,70 +98,70 @@ zi light trapd00r/LS_COLORS ### SC: [paoloantinori/hhighlighter](https://github.com/paoloantinori/hhighlighter) {/* #sc-paoloantinorihhighlighter */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid pick"h.sh" zi light paoloantinori/hhighlighter ``` ### SC: [wfxr/forgit](https://github.com/wfxr/forgit) {/* #sc-wfxrforgit */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load wfxr/forgit ``` ### SC: [urbainvaes/fzf-marks](https://github.com/urbainvaes/fzf-marks) {/* #sc-urbainvaesfzf-marks */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load urbainvaes/fzf-marks ``` ### SC: [hlissner/zsh-autopair](https://github.com/hlissner/zsh-autopair) {/* #sc-hlissnerzsh-autopair */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid pick'autopair.zsh' zi load hlissner/zsh-autopair ``` ### SC: [voronkovich/gitignore.plugin.zsh](https://github.com/voronkovich/gitignore.plugin.zsh) {/* #sc-voronkovichgitignorepluginzsh */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load voronkovich/gitignore.plugin.zsh ``` ### SC: [xPMo/zsh-toggle-command-prefix](https://github.com/xPMo/zsh-toggle-command-prefix) {/* #sc-xpmozsh-toggle-command-prefix */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi light xPMo/zsh-toggle-command-prefix ``` ### SC: [leonjza/history-here](https://github.com/leonjza/history-here) {/* #sc-leonjzahistory-here */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi light leonjza/history-here ``` ### SC: [hkbakke/bash-insulter](https://github.com/hkbakke/bash-insulter) {/* #sc-hkbakkebash-insulter */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid pick'src/bash.command-not-found' zi light hkbakke/bash-insulter ``` ### SC: [leophys/zsh-plugin-fzf-finder](https://github.com/leophys/zsh-plugin-fzf-finder) {/* #sc-leophyszsh-plugin-fzf-finder */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid has'fzf' pick'fzf-finder.plugin.zsh' zi light leophys/zsh-plugin-fzf-finder ``` ### SC: [autosuggestions][1], [fast-syntax-highlighting][2] {/* #sc-autosuggestions1-fast-syntax-highlighting2 */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid atinit"ZI[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" zi light z-shell/F-Sy-H @@ -171,7 +171,7 @@ zi load zsh-users/zsh-autosuggestions ### SC: [z-shell/zsh-github-issues](https://github.com/z-shell/zsh-github-issues) {/* #sc-z-shellzsh-github-issues */} -```shell showLineNumbers +```zsh showLineNumbers zi ice lucid id-as"GitHub-notify" \ on-update-of"~/.cache/zsh-github-issues/new_titles.log" \ notify"New issue: $NOTIFY_MESSAGE" @@ -180,28 +180,28 @@ zi light z-shell/zsh-github-issues ### SC: [zsh-shell/zsh-startify](https://github.com/z-shell/zsh-startify) {/* #sc-zsh-shellzsh-startify */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid atload"zsh-startify" zi load z-shell/zsh-startify ``` ### SC: [z-shell/declare-zsh](https://github.com/z-shell/declare-zsh) {/* #sc-z-shelldeclare-zsh */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load z-shell/declare-zsh ``` ### SC: [z-shell/zsh-navigation-tools](https://github.com/z-shell/zsh-navigation-tools) {/* #sc-z-shellzsh-navigation-tools */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load z-shell/zsh-navigation-tools ``` ### SC: [z-shell/H-S-MW](https://github.com/z-shell/H-S-MW) {/* #sc-z-shellh-s-mw */} -```shell showLineNumbers +```zsh showLineNumbers zstyle ":history-search-multi-word" page-size "11" zi ice wait lucid zi load z-shell/H-S-MW @@ -209,7 +209,7 @@ zi load z-shell/H-S-MW ### SC: [z-shell/zui](https://github.com/z-shell/zui), [z-shell/zi-crasis](https://github.com/z-shell/zi-crasis) {/* #sc-z-shellzui-z-shellzi-crasis */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load z-shell/zui @@ -219,7 +219,7 @@ zi load z-shell/zi-crasis ### SC: [z-shell/zredis](https://github.com/z-shell/zredis) {/* #sc-z-shellzredis */} -```shell showLineNumbers +```zsh showLineNumbers zstyle ":plugin:zredis" configure_opts "--without-tcsetpgrp" zstyle ":plugin:zredis" cflags "-Wall -O2 -g -Wno-unused-but-set-variable" @@ -231,7 +231,7 @@ zi load z-shell/zredis ### SC: [z-shell/zsh-eza](https://github.com/z-shell/zsh-eza) {/* #sc-z-shellzsh-eza */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for \ has'eza' atinit'AUTOCD=1' \ zplugin/zsh-eza @@ -239,21 +239,21 @@ zi wait lucid for \ ### SC: [z-shell/zsh-zoxide](https://github.com/z-shell/zsh-zoxide) {/* #sc-z-shellzsh-zoxide */} -```shell showLineNumbers +```zsh showLineNumbers zi has'zoxide' light-mode for \ z-shell/zsh-zoxide ``` ### GH-R: [pemistahl/grex](https://github.com/pemistahl/grex) {/* #gh-r-pemistahlgrex */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for as"command" from"gh-r" sbin"grex" \ pemistahl/grex ``` ### GH-R: [ahmetb/kubectx](https://github.com/ahmetb/kubectx) {/* #gh-r-ahmetbkubectx */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for as"command" from"gh-r" \ bpick"kubectx;kubens" sbin"kubectx;kubens" \ ahmetb/kubectx @@ -261,7 +261,7 @@ zi wait lucid for as"command" from"gh-r" \ ### B: [stedolan/jq](https://github.com/stedolan/jq) {/* #b-stedolanjq */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for if"(( ! ${+commands[jq]} ))" as"null" \ atclone"autoreconf -fi && ./configure --with-oniguruma=builtin && make \ && ln -sfv $PWD/jq.1 $ZI[MAN_DIR]/man1" sbin"jq" \ @@ -270,7 +270,7 @@ zi wait lucid for if"(( ! ${+commands[jq]} ))" as"null" \ ### GH-R: [github/git-sizer](https://github.com/github/git-sizer) {/* #gh-r-githubgit-sizer */} -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for \ as"command" from"gh-r" sbin"git-sizer" \ @github/git-sizer diff --git a/community/gallery/collection/07_themes.mdx b/community/gallery/collection/07_themes.mdx index 0c1a98e7a..a90333eb4 100644 --- a/community/gallery/collection/07_themes.mdx +++ b/community/gallery/collection/07_themes.mdx @@ -24,7 +24,7 @@ keywords: Zsh tweak - map colors to the nearest color in the available palette. -```shell +```zsh [[ $COLORTERM = *(24bit|truecolor)* ]] || zmodload zsh/nearcolor ``` @@ -57,7 +57,7 @@ When running: `zi update` will: - if an update is available, will update the fonts. - repeat the install process to update fonts. -```shell +```zsh zi ice if"[[ -d ${HOME}/.fonts/ttf ]] && [[ $OSTYPE = linux* ]]" \ id-as"meslo" from"gh-r" bpick"Meslo.zip" extract nocompile depth"1" \ atclone="rm -f *Windows*; mv -vf *.ttf ${HOME}/.fonts/ttf/; fc-cache -v -f" atpull"%atclone" @@ -66,14 +66,14 @@ zi light ryanoasis/nerd-fonts Load prompt if the terminal has at least 256 colors. -```shell showLineNumbers +```zsh showLineNumbers zi ice if"[ "${TERM##*-}" = '256color' ] || [ "${terminfo[colors]:?}" -gt 255 ]" depth=1 zi light romkatv/powerlevel10k ``` Oneliner: -```shell +```zsh zi ice depth=1; zi light romkatv/powerlevel10k ``` @@ -81,7 +81,7 @@ zi ice depth=1; zi light romkatv/powerlevel10k - Run manually: `p10k configure` (The file `~/.p10k.zsh` auto sourced if exists). -```shell +```zsh zi light-mode for @romkatv ``` @@ -89,21 +89,21 @@ After finishing the configuration wizard last question: - "Apply changes to ~/.zshrc?" choose no - unless you know what you're doing. -```shell showLineNumbers +```zsh showLineNumbers zi ice depth'1' atload"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" nocd zi light romkatv/powerlevel10k ``` ### THP: [ohmyzsh/robbyrussell](https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme) {/* #thp-ohmyzshrobbyrussell */} -```shell showLineNumbers +```zsh showLineNumbers zi wait'!' lucid for OMZL::prompt_info_functions.zsh \ OMZT::robbyrussell ``` ### THP: [z-shell/zprompts](https://github.com/z-shell/zprompts) {/* #thp-z-shellzprompts */} -```shell showLineNumbers +```zsh showLineNumbers zi lucid for \ atload"!promptinit; typeset -g PSSHORT=0; \ prompt sprint3 yellow red green blue" nocd \ @@ -112,14 +112,14 @@ zi lucid for \ ### THP: [halfo/lambda-mod-zsh-theme](https://github.com/halfo/lambda-mod-zsh-theme) {/* #thp-halfolambda-mod-zsh-theme */} -```shell showLineNumbers +```zsh showLineNumbers zi lucid for nocd \ halfo/lambda-mod-zsh-theme ``` ### THP: [geometry-zsh/geometry](https://github.com/geometry-zsh/geometry) {/* #thp-geometry-zshgeometry */} -```shell showLineNumbers +```zsh showLineNumbers zi lucid for atload"!geometry::prompt" \ atinit"GEOMETRY_COLOR_DIR=63 GEOMETRY_PATH_COLOR=63" nocd \ geometry-zsh/geometry @@ -127,7 +127,7 @@ zi lucid for atload"!geometry::prompt" \ ### THP: [sindresorhus/pure](https://github.com/sindresorhus/pure) {/* #thp-sindresorhuspure */} -```shell showLineNumbers +```zsh showLineNumbers zi lucid for pick"/dev/null" multisrc"{async,pure}.zsh" \ atload"!prompt_pure_precmd" nocd \ sindresorhus/pure @@ -135,13 +135,13 @@ atload"!prompt_pure_precmd" nocd \ Install as meta-plugin: -```shell +```zsh zi light-mode for @sindresorhus/pure ``` Personalised: -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh' atload" \ PURE_GIT_UP_ARROW='↑'; PURE_GIT_DOWN_ARROW='↓'; PURE_PROMPT_SYMBOL='ᐳ'; PURE_PROMPT_VICMD_SYMBOL='ᐸ'; \ zstyle ':prompt:pure:prompt:success' color 'green' \ @@ -154,7 +154,7 @@ zi light-mode for compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh' atload ### THP: [agkozak/agkozak-zsh-prompt](https://github.com/agkozak/agkozak-zsh-prompt) {/* #thp-agkozakagkozak-zsh-prompt */} -```shell showLineNumbers +```zsh showLineNumbers zi lucid nocd atinit"AGKOZAK_COLORS_PROMPT_CHAR='magenta' AGKOZAK_MULTILINE=0 \ AGKOZAK_PROMPT_CHAR=( ❯ ❯ ❮ ) AGKOZAK_USER_HOST_DISPLAY=0" for \ agkozak/agkozak-zsh-prompt @@ -162,20 +162,20 @@ zi lucid nocd atinit"AGKOZAK_COLORS_PROMPT_CHAR='magenta' AGKOZAK_MULTILINE=0 \ Install as meta-plugin: -```shell +```zsh zi for @agkozak/agkozak-zsh-prompt ``` ### THP: [chauncey-garrett/zsh-prompt-garrett](https://github.com/chauncey-garrett/zsh-prompt-garrett) {/* #thp-chauncey-garrettzsh-prompt-garrett */} -```shell showLineNumbers +```zsh showLineNumbers zi ice atload"fpath+=( \$PWD );" zi light chauncey-garrett/zsh-prompt-garrett ``` ### THP: [starship/starship](https://github.com/starship/starship) {/* #thp-starshipstarship */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as"command" from"gh-r" \ atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \ atpull"%atclone" src"init.zsh" @@ -184,7 +184,7 @@ zi light starship/starship ### THP: [robobenklein/zinc][robobenklein/zinc] {/* #thp-robobenkleinzincrobobenkleinzinc */} -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'!' lucid nocompletions \ compile"{zinc_functions/*,segments/*,zinc.zsh}" \ atload'!prompt_zinc_setup; prompt_zinc_precmd' @@ -193,7 +193,7 @@ zi load robobenklein/zinc ZINC git info is already async, but if you want it even faster with [gitstatus][gitstatus] in turbo mode: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'1' atload'zinc_optional_dependency_loaded' zi load romkatv/gitstatus ``` diff --git a/docs/getting_started/01_installation.mdx b/docs/getting_started/01_installation.mdx index a9d5ad235..e007b51bd 100644 --- a/docs/getting_started/01_installation.mdx +++ b/docs/getting_started/01_installation.mdx @@ -45,7 +45,7 @@ sh -c "$(curl -fsSL get.zshell.dev)" -- -a loader The installer will download the loader and add the snippet below to the .zshrc file. -```shell showLineNumbers +```zsh showLineNumbers if [[ -r "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" ]]; then source "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" && zzinit fi @@ -95,7 +95,7 @@ sh -c "$(curl -fsSL get.zshell.dev)" -- -a zunit Set up the install location and create a directory: -```shell showLineNumbers +```zsh showLineNumbers typeset -Ag ZI typeset -gx ZI[HOME_DIR]="${XDG_DATA_HOME:-${HOME}/.local/share}/zi" typeset -gx ZI[BIN_DIR]="${ZI[HOME_DIR]}/bin" @@ -106,7 +106,7 @@ For security reasons run function compaudit to check if the [completi If failed, then set the current user as the owner of directories, then remove group/others write permissions, and clone the repository: -```shell showLineNumbers +```zsh showLineNumbers compaudit | xargs chown -R "$(whoami)" "$ZI[HOME_DIR]" compaudit | xargs chmod -R go-w "$ZI[HOME_DIR]" command git clone https://github.com/z-shell/zi.git "$ZI[BIN_DIR]" @@ -116,7 +116,7 @@ command git clone https://github.com/z-shell/zi.git "$ZI[BIN_DIR]" To enable Zi, source the zi.zsh from the previously set up directory placing the following snippet in the .zshrc file: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers typeset -A ZI : ${ZI[HOME_DIR]:="${XDG_DATA_HOME:-${HOME}/.local/share}/zi"} : ${ZI[BIN_DIR]:="${ZI[HOME_DIR]}/bin"} @@ -133,7 +133,7 @@ The snippet below must be placed after after enabling Zi. ::: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers autoload -Uz _zi (( ${+_comps} )) && _comps[zi]=_zi ``` diff --git a/docs/getting_started/02_overview.mdx b/docs/getting_started/02_overview.mdx index 01375a2bc..c84eb19e1 100644 --- a/docs/getting_started/02_overview.mdx +++ b/docs/getting_started/02_overview.mdx @@ -22,14 +22,14 @@ This overview will cover the basics for: ## Plugin and snippet loading {/* #plugin-and-snippet-loading */} -```shell showLineNumbers +```zsh showLineNumbers zi load z-shell/H-S-MW zi light zsh-users/zsh-syntax-highlighting ``` The above commands show two ways of basic plugin loading. If you want to source local or remote files (using a direct URL), you can do so with a `snippet`. -```shell +```zsh zi snippet ``` @@ -41,27 +41,27 @@ Using `light` is a faster loading without tracking and reporting about the plugi Using `load` or `light`: -```shell showLineNumbers +```zsh showLineNumbers zi load # Load with reporting/investigating. zi light # Load without reporting/investigating. ``` Plugin history-search-multi-word loaded with investigating: -```shell +```zsh zi load z-shell/H-S-MW ``` Two regular plugins loaded without investigating: -```shell showLineNumbers +```zsh showLineNumbers zi light zsh-users/zsh-autosuggestions zi light z-shell/F-Sy-H ``` Snippet: -```shell +```zsh zi snippet https://gist.githubusercontent.com/hightemp/5071909/raw/ ``` @@ -75,14 +75,14 @@ In turbo mode loading, the slowdown by plugin tracking is done in the background To load Oh-My-Zsh and Prezto plugins, use the `snippet` feature. Snippets are **single files** downloaded by `curl`, `wget`, etc., automatic detection of the download tool is being performed, directly from the URL: -```shell showLineNumbers +```zsh showLineNumbers zi snippet 'https://github.com/robbyrussell/oh-my-zsh/raw/master/plugins/git/git.plugin.zsh' zi snippet 'https://github.com/sorin-ionescu/prezto/blob/master/modules/helper/init.zsh' ``` Also, for Oh-My-Zsh and Prezto, you can use `OMZ::` and `PZT::` shorthands: -```shell showLineNumbers +```zsh showLineNumbers zi snippet OMZ::plugins/git/git.plugin.zsh zi snippet PZT::modules/helper/init.zsh ``` @@ -107,7 +107,7 @@ This way editors like `vim` and `emacs` and also `zsh-users/zsh-syntax-highlight A plugin might not be a file for sourcing, but a command to be added to `$PATH`. To obtain this effect, use ice-modifier `as` with value `program` (or an alias value `command`). -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice as"program" cp"httpstat.sh -> httpstat" pick"httpstat" zi light b4b4r07/httpstat ``` @@ -124,7 +124,7 @@ The `cp` and `mv` ices (and also some other ones, like `atclone`) are being run Copying file is safe for doing later updates – original files of the repository are unmodified and `Git` will report no conflicts. However, `mv` also can be used, if a proper `atpull`, an ice-modifier ran at **update** of the plugin: -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" mv"httpstat.sh -> httpstat" \ pick"httpstat" atpull'!git reset --hard' zi light b4b4r07/httpstat @@ -148,7 +148,7 @@ Ice modifier defers the loading of a plugin while checking the modification time Copy and paste the example below to the terminal or add it to the `.zshrc` file and reload the shell with `exec zsh`. -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice subscribe'{~/files-*,/tmp/files-*}' id-as'z-sub' lucid \ atload'+zi-message "{profile}I have been loaded{nl}\ {auto}\`Zi Rocks ♥\`"' notify"Yes that is cool ♥ " @@ -167,7 +167,7 @@ The plugin or snippet will be sourced as many times as the file gets updated. Commands can also be added to `$PATH` using **snippets**: -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi ice mv"httpstat.sh -> httpstat" \ pick"httpstat" as"program" zi snippet https://github.com/b4b4r07/httpstat/blob/master/httpstat.sh @@ -183,7 +183,7 @@ Snippets also support `atpull`. There’s also an `atinit` ice-modifier, execute By using the `as'…'` ice modifier with the value `completion` you can point the `snippet` subcommand directly to a completion file: -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice as"completion" zi snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker ``` @@ -192,7 +192,7 @@ zi snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_doc Zi allows disabling and enabling each completion in every plugin. Try installing a popular plugin that provides completions: -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice blockf zi light zsh-users/zsh-completions ``` @@ -203,13 +203,13 @@ To uninstall and install completions: Uninstall: -```shell +```zsh zi cuninstall zsh-users/zsh-completions ``` Install: -```shell +```zsh zi creinstall zsh-users/zsh-completions ``` @@ -217,7 +217,7 @@ zi creinstall zsh-users/zsh-completions To see what completions **all** plugins provide, in tabular formatting and with the name of each plugin: -```shell +```zsh zi clist ``` @@ -235,13 +235,13 @@ Completions can be disabled and other completion will be used, e.g. Zsh builtin. Disable `cmake` completion: -```shell +```zsh zi cdisable cmake ``` Enable `cmake` completion: -```shell +```zsh zi cenable cmake ``` @@ -269,7 +269,7 @@ Zsh 5.3 or greater is required. To use turbo mode add `wait` ice to the target plugin in one of the following ways: -```shell {2} showLineNumbers +```zsh {2} showLineNumbers PS1="READY > " zi ice wait'!0' zi load halfo/lambda-mod-zsh-theme @@ -279,7 +279,7 @@ This sets plugin `halfo/lambda-mod-zsh-theme` to be loaded `0` seconds after `.z You probably won't load the prompt in such a way, however, it is a good example in which turbo mode can be observed. The exclamation mark causes Zi to reset the prompt after loading the plugin – commonly needed for themes. Using `zsh-users/zsh-autosuggestions` without any drawbacks: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid atload'!_zsh_autosuggest_start' zi light zsh-users/zsh-autosuggestions ``` @@ -294,21 +294,21 @@ The `wait` is equivalent to `wait'0'`. ::: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait zi load z-shell/H-S-MW ``` Load after 2 seconds: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'2' zi load z-shell/H-S-MW ``` Also can be used in `light` and `snippet`: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait zi snippet https://gist.githubusercontent.com/hightemp/5071909/raw/ ``` @@ -317,7 +317,7 @@ zi snippet https://gist.githubusercontent.com/hightemp/5071909/raw/ Turbo and lucid are the most used options because turbo mode is verbose and may require an option for quiet and this can be achieved with the `lucid`. -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid zi load z-shell/H-S-MW ``` @@ -336,7 +336,7 @@ _zsh_autosuggest_start prompt_zinc_setup prompt_zinc_precmd Then, add them to the ice list in the `atload'…'` ice: -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi ice wait'!' lucid nocd \ atload'!prompt_zinc_setup; prompt_zinc_precmd' zi load robobenklein/zinc @@ -360,7 +360,7 @@ Ices `load` and `unload` allow defining when you want plugins active or inactive Load when in `~/tmp`: -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice load'![[ $PWD = */tmp* ]]' unload'![[ $PWD != */tmp* ]]' \ atload'!promptinit; prompt sprint3' zi load z-shell/zprompts @@ -370,7 +370,7 @@ zi load z-shell/zprompts Load when NOT in `~/tmp`: -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice load'![[ $PWD != */tmp* ]]' unload'![[ $PWD = */tmp* ]]' zi load russjohnson/angry-fly-zsh ``` @@ -399,7 +399,7 @@ This is [powerlevel10k](https://github.com/romkatv/powerlevel10k), [pure](https: Load powerlevel10k theme: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice depth"1" zi light romkatv/powerlevel10k ``` @@ -408,7 +408,7 @@ Load pure theme: > will pick the `async.zsh` library and will source it. -```shell {1} title="~/.zshrc" showLineNumbers +```zsh {1} title="~/.zshrc" showLineNumbers zi ice pick"async.zsh" src"pure.zsh" zi light sindresorhus/pure ``` @@ -420,7 +420,7 @@ Load starship theme: > - the `atpull'…'` behavior same as `atclone'…'` and but is used when running `zi update`. > - `src` will source `init.zsh`. -```shell {2} {3} title="~/.zshrc" showLineNumbers +```zsh {2} {3} title="~/.zshrc" showLineNumbers zi ice as"command" from"gh-r" \ atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \ atpull"%atclone" src"init.zsh" @@ -431,14 +431,14 @@ zi light starship/starship Load the pure theme, with the **zsh-async** library that's bundled with it. -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice pick"async.zsh" src"pure.zsh" zi light sindresorhus/pure ``` Binary release in the archive, from GitHub. After automatic unpacking, it provides the program "fzf". -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice from"gh-r" as"program" zi light junegunn/fzf ``` @@ -447,14 +447,14 @@ One other binary release needs renaming from `docker-compose-Linux-x86_64`. This There are multiple packages per single version for OS X, Linux, and Windows – the ice-modifier `bpick` is utilized to select the Linux package – in this case - not required, Zi will grep operating system name and architecture automatically when there's no `bpick`. -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice from"gh-r" as"program" mv"docker* -> docker-compose" bpick"*linux*" zi load docker/compose ``` Handle completions without loading any plugin, see the `clist` command. This one is to be run just once, in an interactive session. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi creinstall %HOME/my_completions ``` diff --git a/docs/getting_started/03_migration.mdx b/docs/getting_started/03_migration.mdx index df155d69b..a4ba2caa1 100644 --- a/docs/getting_started/03_migration.mdx +++ b/docs/getting_started/03_migration.mdx @@ -15,7 +15,7 @@ import Link from "@docusaurus/Link"; ### OMZ shorthand syntax {/* #omz-shorthand-syntax */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet # Raw syntax with URL zi snippet OMZ:: # Shorthand OMZ:: (http://github.com/ohmyzsh/ohmyzsh/raw/master/) zi snippet OMZL:: # Shorthand OMZ::lib (http://github.com/ohmyzsh/ohmyzsh/raw/master/lib) @@ -29,21 +29,21 @@ Importing the [clipboard][omz/clipboard] and [termsupport][omz/termsupport] from Raw syntax: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh zi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh ``` OMZ shorthand syntax: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet OMZ::lib/clipboard.zsh zi snippet OMZ::lib/termsupport.zsh ``` OMZL shorthand syntax: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet OMZL::clipboard.zsh zi snippet OMZL::termsupport.zsh ``` @@ -68,7 +68,7 @@ zi snippet OMZL::termsupport.zsh Example of more advanced, conditional turbo loading: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi is-snippet wait lucid for \ atload"unalias grv g" \ OMZP::{git,sudo,encode64,extract} \ @@ -102,7 +102,7 @@ Use `zi ice as"completion"` to directly add single file completion snippets. - [docker][omz/docker] -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice as"completion" zi snippet OMZP::docker/completions/_docker ``` @@ -153,7 +153,7 @@ You need to load `prompt_info_functions.zsh` All together it looks like this: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet OMZL::git.zsh zi snippet OMZP::git zi snippet OMZL::theme-and-appearance.zsh @@ -162,7 +162,7 @@ zi snippet OMZL::prompt_info_functions.zsh Then load the prompt: -```shell showLineNumbers +```zsh showLineNumbers setopt prompt_subst zi snippet OMZT::robbyrussell ``` @@ -177,20 +177,20 @@ ZSH_THEME="alpharized" Load `git` library from OMZ: -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi snippet OMZL::git.zsh ``` Load `git` plugin from OMZ: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet OMZP::git zi cdclear -q ``` Then load the prompt: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers setopt prompt_subst zi light NicoSantangelo/Alpharized ``` @@ -199,7 +199,7 @@ zi light NicoSantangelo/Alpharized ### PZT shorthand syntax {/* #pzt-shorthand-syntax */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet # Raw syntax with URL zi snippet PZT:: # Shorthand PZT:: (https://github.com/sorin-ionescu/prezto/tree/master/) zi snippet PZTM:: # Shorthand PZT::modules/ (https://github.com/sorin-ionescu/prezto/blob/master/modules/) @@ -211,14 +211,14 @@ Importing the [environment](https://github.com/sorin-ionescu/prezto/blob/master/ Raw syntax -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/environment/init.zsh zi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/terminal/init.zsh ``` PZT shorthand syntax: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet PZT:: zi snippet PZT::modules/environment zi snippet PZT::modules/terminal @@ -226,7 +226,7 @@ zi snippet PZT::modules/terminal PZTM shorthand syntax: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi snippet PZTM:: zi snippet PZTM::environment zi snippet PZTM::terminal diff --git a/docs/guides/02_customization.mdx b/docs/guides/02_customization.mdx index ec6b8f783..7e1bffc60 100644 --- a/docs/guides/02_customization.mdx +++ b/docs/guides/02_customization.mdx @@ -24,7 +24,7 @@ Set the initial hash definition and custom values, before enabling Zi. Example: -```shell showLineNumbers +```zsh showLineNumbers typeset -A ZI ZI[BIN_DIR]="some/custom/path/to/bin" source "${ZI[BIN_DIR]}/zi.zsh" @@ -88,7 +88,7 @@ Several projects provide git extensions. Installing them with Zi has many benefi Below is a configuration that adds multiple git extensions, loaded in Turbo mode, 1 second after prompt, with the use of the [bin-gem-node][z-shell/z-a-bin-gem-node] annex: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi as'null' wait'1' lucid for \ sbin Fakerr/git-recall \ sbin cloneopts paulirish/git-open \ @@ -126,7 +126,7 @@ Git tools: just run: -```shell +```zsh zi light-mode for z-shell/z-a-meta-plugins @annexes @ext-git ``` @@ -140,7 +140,7 @@ The sense of an option name may be inverted by preceding it with `no`, so `setop {/* TODO: Include more setopt examples and import as component */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers setopt append_history # Allow multiple sessions to append to one Zsh command history. setopt extended_history # Show timestamp in history. setopt hist_expire_dups_first # Expire A duplicate event first when trimming history. @@ -157,7 +157,7 @@ setopt share_history # Share history between different instances of the ### Other tweaks {/* #other-tweaks */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers setopt auto_cd # Use cd by typing directory name if it's not a command. setopt auto_list # Automatically list choices on ambiguous completion. setopt auto_pushd # Make cd push the old directory onto the directory stack. @@ -180,7 +180,7 @@ The `zstyle` handles the obvious style control for the [completion system][compl {/* TODO: Include more zstyle examples and import as component */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' original only zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' @@ -188,7 +188,7 @@ zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX ### Pretty completions {/* #pretty-completions */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zstyle ':completion:*:matches' group 'yes' zstyle ':completion:*:options' description 'yes' zstyle ':completion:*:options' auto-description '%d' @@ -208,13 +208,13 @@ zstyle ':completion:*' rehash true ### Do menu-driven completion {/* #do-menu-driven-completion */} -```shell +```zsh zstyle ':completion:*' menu select ``` ### Color completion for [some things][color-completion-using-zsh-modules-on] {/* #color-completion-for-some-things */} -```shell +```zsh zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} ``` diff --git a/docs/guides/03_benchmark.mdx b/docs/guides/03_benchmark.mdx index a61781a72..21b1879f3 100644 --- a/docs/guides/03_benchmark.mdx +++ b/docs/guides/03_benchmark.mdx @@ -22,7 +22,7 @@ Run `zi analytics` to see the available commands for statistics and reporting. ## Profile plugins {/* #i-classfa-solid-fa-gauge-highi-profile-plugins */} -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice atinit'zmodload zsh/zprof' \ atload'zprof | head -n 20; zmodload -u zsh/zprof' zi light z-shell/F-Sy-H @@ -70,7 +70,7 @@ The table is sorted in the **self-time** column. Place the snippet below at the top of `.zshrc`. -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers PROFILE_STARTUP=false if [[ "$PROFILE_STARTUP" == true ]]; then @@ -89,7 +89,7 @@ Zsh Sourceforge docs: [Prompt Expansion][prompt-expansion] Place at the bottom of `.zshrc` -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers if [[ "$PROFILE_STARTUP" == true ]]; then unsetopt xtrace exec 2>&3 3>&-; zprof > ~/zshprofile$(date +'%s') diff --git a/docs/guides/syntax/01_standard.mdx b/docs/guides/syntax/01_standard.mdx index bdf03c175..9d7d93535 100644 --- a/docs/guides/syntax/01_standard.mdx +++ b/docs/guides/syntax/01_standard.mdx @@ -26,7 +26,7 @@ It is up to the user which syntax to use, but it is highly recommended to famili - Execute the following command in your terminal: -```shell +```zsh zi load z-shell/0 ``` @@ -36,8 +36,8 @@ A snippet is a single file with a portion of reusable source code, machine code, > - Execute the following command in your terminal: -```shell -zi snippet https://raw.githubusercontent.com/z-shell/src/main/lib/zsh/snippets/welcome.zsh +```zsh +zi snippet https://raw.githubusercontent.com/z-shell/src/main/public/zsh/snippets/welcome.zsh ``` Success! But not always everything is so easy and simple, also sometimes we want certain things to happen at certain times or conditions. This can be achieved using [ice-modifiers][ice-mods]. @@ -46,7 +46,7 @@ The top line contains ice-modifiers, and the bottom line is the plugin. > - Execute the following commands in your terminal: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as'zsh/plugin' atinit'print "Hello World!"' zi load z-shell/0 ``` @@ -57,7 +57,7 @@ Let's install again with more ice-modifiers. > - Execute the following commands in your terminal: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as'final/countdown' \ atinit'+zi-message "{bapo}Cloned!"' \ atclone'+zi-message "{quos}Boom!"' \ @@ -95,21 +95,21 @@ The order of execution of related ice-modifiers is as follows: Zi supports alternatives such as the equal (`=`) syntax: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as=equal atload="print Hello World" zi load z-shell/0 ``` The colon (`:`) syntax: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as:colon atload:"print Hello World" zi load z-shell/0 ``` And also – in conjunction with all of the above – the GNU syntax: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as=GNU --atload="print Hello World" zi load z-shell/0 ``` @@ -120,7 +120,7 @@ The syntax alternatives can utilize the highlighting of editors like Vim – and Vim repository on GitHub – a typical source code that needs compilation, Zi can manage the run of `./configure` and other `make` stuff. Ice-modifier `pick` adds the binary program to `$PATH`. You could also install the package under the path $ZPFX. -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice as"program" atclone"rm -f src/auto/config.cache; ./configure" \ atpull"%atclone" make pick"src/vim" zi light vim/vim @@ -134,7 +134,7 @@ The `make'…'` ice could also be: `make"install PREFIX=$ZPFX"`, if "install" wo ::: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" zi light tj/git-extras ``` @@ -151,7 +151,7 @@ The `Makefile` with 2 tasks, can use: ### Compiling programs {/* #compiling-programs */} -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" atclone"rm -f src/auto/config.cache; ./configure" \ atpull"%atclone" make pick"src/vim" zi light vim/vim @@ -175,7 +175,7 @@ zi light vim/vim The same but with **installation** (`make install`) under [$ZPFX][global-parameter-with-prefix] by default: -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' atclone'rm -f src/auto/config.cache; \ ./configure --prefix=$ZPFX' atpull'%atclone' make'all install' pick'$ZPFX/bin/vim' zi light vim/vim @@ -201,7 +201,7 @@ zi light vim/vim A repository [trapd00r/LS_COLORS][trapd00r-ls_colors] provides a file with color definitions for GNU `ls` command, and also for [ogham/exa][ogham-exa]. Typically one does `eval $( dircolors -b $HOME/LS_COLORS)` to process this file and set the environment for `ls`. This means `dircolors` is run by every shell startup. It costs much time to create a fork and program, i.e., the `dircolors` binary needs to be loaded to obtain and process the color definitions. The following invocation solves this problem: -```shell showLineNumbers +```zsh showLineNumbers zi ice atclone'dircolors -b LS_COLORS > clrs.zsh' \ atpull'%atclone' pick"clrs.zsh" nocompile'!' \ atload'zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}' @@ -230,7 +230,7 @@ This way, except for the plugin installation and update, `dircolors` isn't run, The project [direnv/direnv][direnv-direnv] registers itself in the Z shell to modify the environment on directory change. This registration is most often done by `eval "$(direnv hook zsh)"` added to `.zshrc`. -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" make'!' atclone'./direnv hook zsh > zhook.zsh' \ atpull'%atclone' src"zhook.zsh" zi light direnv/direnv @@ -247,7 +247,7 @@ Above `atclone'…'` puts this code into file `zhook.zsh`, `src''` sources it. T The drawback of this standard procedure is that the `direnv` binary is run on every shell startup and significantly slows it down. Zi allows to solve this in the following way: -```shell showLineNumbers +```zsh showLineNumbers zi as"program" make'!' atclone'./direnv hook zsh > zhook.zsh' \ atpull'%atclone' pick"direnv" src"zhook.zsh" for \ direnv/direnv @@ -272,7 +272,7 @@ zi as"program" make'!' atclone'./direnv hook zsh > zhook.zsh' \ In this method, the registered code is generated once on every installation or update, then sourced without running `direnv` itself. The project is also available as a binary [GitHub releases][gh-releases]. This distribution can be installed by: -```shell showLineNumbers +```zsh showLineNumbers zi from"gh-r" as"program" mv"direnv* -> direnv" \ atclone'./direnv hook zsh > zhook.zsh' atpull'%atclone' \ pick"direnv" src="zhook.zsh" for \ @@ -350,7 +350,7 @@ Zip, rar, tar.gz, tar.bz2, tar.xz, tar.7z, tar, tgz, tbz2, gz, bz2, txz, xz, 7z, To install and load a plugin whose repository is private - e.g: requires providing credentials to log in – use the `from'…'` ice in the following way: -```shell showLineNumbers +```zsh showLineNumbers zi ice from"user@github.com" zi load user/fsh-auto-themes ``` @@ -397,7 +397,7 @@ In order to change the protocol, use the `proto'…'` ice. Load a plugin or snippet with a nickname with the `id-as'…'` ice-modifier. For example, one could try to load [docker/compose][docker-compose] from GitHub binary releases: -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" from"gh-r" mv"docker-c* -> docker-compose" zi light "docker/compose" ``` @@ -406,21 +406,21 @@ This registers the plugin under the ID `docker/compose`. Now suppose the user wo The solution to this problem – the `id-as'…'` (to be read as _identify-as_) ice to which this document is devoted: by using the `id-as'…'` ice the user can resolve the conflict by loading the completion under a kind of a _nickname_, for example under "_dc-complete_", by issuing the following commands: -```shell showLineNumbers +```zsh showLineNumbers zi ice as"completion" id-as"dc-complete" zi load docker/compose ``` The plugin (of the type `completion`) is now seen under ID `dc-complete`: -```shell showLineNumbers +```zsh showLineNumbers zi list | grep -i dc-complete dc-complete ``` Issuing `zi report dc-complete` will work as with regular command: -```shell showLineNumbers +```zsh showLineNumbers zi report dc-complete Plugin report for dc-complete @@ -432,7 +432,7 @@ _docker-compose [enabled] The same method applies to nickname snippets. For instance, use it to create handy IDs in place of long URLs: -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" id-as"git-unique" zi snippet https://github.com/Osse/git-scripts/blob/master/git-unique ``` @@ -443,14 +443,14 @@ The commands `zi update git-unique`, and `zi delete git-unique` will work as exp There's a special value to the `id-as'…'` ice – `auto`. It causes the nickname to be automatically set to the last component of the plugin name or snippet URL. For example: -```shell showLineNumbers +```zsh showLineNumbers zi ice as"program" id-as"auto" zi snippet https://github.com/Osse/git-scripts/blob/master/git-unique ``` will work the same as before, e.g: if the ice used was `id-as'git-unique'`. Will work as if id-as'zsh-autopair' was passed: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid id-as"auto" zi load hlissner/zsh-autopair ``` @@ -459,7 +459,7 @@ zi load hlissner/zsh-autopair An empty `id-as'…'` will work the same as `id-as'auto'` as if id-as'zsh-autopair' was passed, e.g: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait lucid id-as zi load hlissner/zsh-autopair ``` @@ -472,7 +472,7 @@ Turbo mode, i.e. the `wait'…'` is ice that implements it - needs Zsh >= 5.3. ::: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'0' # or just: zi ice wait zi light wfxr/forgit ``` @@ -480,7 +480,7 @@ zi light wfxr/forgit - waits for prompt, - instantly ("0" seconds) after prompt loads given plugin. -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'[[ -n ${ZLAST_COMMANDS[(r)cras*]} ]]' zi light z-shell/zi-crasis ``` @@ -494,14 +494,14 @@ zi light z-shell/zi-crasis - `-n` means: not-empty, so it will be true when users enter "cras", - after 1 second or less, Zi will detect that the `wait'…'` condition is true, and load the plugin, which provides command _crasis_, -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'[[ $PWD = */github || $PWD = */github/* ]]' zi load unixorn/git-extra-commands ``` it waits until the user enters a `github` directory. Turbo mode also supports a suffix – the letter a, `b`, or `c`. The meaning is illustrated by the following example: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait"0b" as"command" pick"wd.sh" atinit"echo Firing 1" lucid zi light mfaerevaag/wd zi ice wait"0a" as"command" pick"wd.sh" atinit"echo Firing 2" lucid @@ -523,7 +523,7 @@ In other words, instead of `wait'1'`, you can enter `wait'1a'`, `wait'1b'`, and Normally `src'…'` can be used to specify the additional file to the source: -```shell showLineNumbers +```zsh showLineNumbers zi ice pick'powerless.zsh' src'utilities.zsh' zi light martinrotter/powerless ``` @@ -537,7 +537,7 @@ zi light martinrotter/powerless Loads **multiple** files enumerated with spaces as the separator (e.g. `multisrc'misc.zsh grep.zsh'`) and also using brace-expansion syntax (e.g. `multisrc'{misc,grep}.zsh')`. Example: -```shell showLineNumbers +```zsh showLineNumbers zi ice pick'completion.zsh' \ multisrc'git.zsh functions.zsh {history,grep}.zsh' zi snippet OMZ::lib/completion.zsh @@ -545,19 +545,19 @@ zi snippet OMZ::lib/completion.zsh All possible ways to use the `multisrc'…'` ice-modifier: -```shell +```zsh zi ice depth'1' multisrc='lib/{functions,misc}.zsh' pick'/dev/null' zi load robbyrussell/oh-my-zsh ``` Can use patterns: -```shell showLineNumbers +```zsh showLineNumbers zi ice multisrc'{funct*,misc}.zsh' pick'/dev/null' zi light some/plugin ``` -```shell showLineNumbers +```zsh showLineNumbers zi ice multisrc'misc.zsh functions.zsh' pick'/dev/null' zi light some/plugin ``` @@ -566,7 +566,7 @@ Will use the array's value at the moment of plugin load: > This can matter when using turbo mode. -```shell showLineNumbers +```zsh showLineNumbers array=({functions,misc}.zsh) zi ice multisrc"\$array" pick'/dev/null' zi light some/plugin @@ -574,7 +574,7 @@ zi light some/plugin Compatible with KSH_ARRAYS option: -```shell showLineNumbers +```zsh showLineNumbers array=({functions,misc}.zsh) zi ice multisrc"${array[*]}" pick'/dev/null' zi light some/plugin @@ -584,7 +584,7 @@ Hack with Zi: the ice's contents are simply `eval`-uated like follows: eval "rep So it might get handy on an occasion to pass code there, but first, you must close the paren and then don't forget to assign `reply`, and to provide a trailing opening paren. In the code be careful to not redefine any variable used internally by Zi – e.g.: `i` is safe: -```shell showLineNumbers +```zsh showLineNumbers array=({functions,misc}.zsh) zi ice multisrc'); local i; for i in $array; do reply+=( ${i/.zsh/.sh} ); done; ((1)' pick'/dev/null' zi light some/plugin @@ -594,14 +594,14 @@ Extended with the [for][for-syntax] syntax which can in some situations replace Instead of: -```shell showLineNumbers +```zsh showLineNumbers zi ice multisrc'(functions|misc|completion).zsh' zi snippet OMZ::lib/completion.zsh ``` it's possible to write: -```shell showLineNumbers +```zsh showLineNumbers zi for \ OMZL::functions.zsh \ OMZL::misc.zsh \ @@ -647,14 +647,14 @@ However, if the function is being called from the `atload'…'` ice, then the _e For example, in the following invocation: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as'test' atload'!PATH+=:~/share' zi load z-shell/null ``` the `$PATH` is being changed within `atload'…'` ice. Zi's tracking registers `$PATH` changes and withdraws them on the plugin unload and shows loading information: -```shell title="zi report test" showLineNumbers +```zsh title="zi report test" showLineNumbers Report for test plugin ---------------------- Source (reporting enabled) @@ -665,7 +665,7 @@ PATH elements added: As it can be seen, the `atload'…'` code is being correctly tracked and can be unloaded & viewed. Below is the result of using the `unload'…'` subcommand to unload the `test` plugin: -```shell title="zi unload test" showLineNumbers +```zsh title="zi unload test" showLineNumbers --- Unloading plugin: test --- Removing PATH element /home/user/share Unregistering plugin test @@ -676,7 +676,7 @@ The same example as in the [wrap'…'](#use-case-for-wrap) article, but using th Load when - `MYPROMPT == 4` -```shell showLineNumbers +```zsh showLineNumbers zi ice load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ atload'!source ~/.p10k.zsh; _p9k_precmd' zi load romkatv/powerlevel10k @@ -688,7 +688,7 @@ The `wrap' …'` ice-modifier allows extending the tracking (e.g.: the gathering For example, [romkatv/powerlevel10k][romkatv-powerlevel10k] works this way. The ice takes a list of function names, with the elements separated by `;`: -```shell +```zsh zi ice wrap"func1;func2;…" ``` @@ -698,7 +698,7 @@ Therefore, to load and unload for the example powerlevel10k prompt in the fashio Load when `MYPROMPT == 4` -```shell showLineNumbers +```zsh showLineNumbers zi ice load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' \ atload'source ~/.p10k.zsh; _p9k_precmd' wrap'_p9k_precmd' zi load romkatv/powerlevel10k @@ -706,7 +706,7 @@ zi load romkatv/powerlevel10k This way the actions done during the first call to `_p9k_precmd()` will be normally recorded, which can be viewed in the report of the [romkatv/powerlevel10k][romkatv-powerlevel10k] theme: -```shell title="zi report romkatv/powerlevel10k" showLineNumbers +```zsh title="zi report romkatv/powerlevel10k" showLineNumbers Report for romkatv/powerlevel10k plugin --------------------------------------- Source powerlevel10k.zsh-theme (reporting enabled) diff --git a/docs/guides/syntax/02_for.mdx b/docs/guides/syntax/02_for.mdx index d74656016..76e563bea 100644 --- a/docs/guides/syntax/02_for.mdx +++ b/docs/guides/syntax/02_for.mdx @@ -23,7 +23,7 @@ To find more information about anything use [search][3] or just CTRL+K exa" sbin ogham/exa \ mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd \ @@ -64,7 +64,7 @@ zi for as"null" wait"2" lucid from"gh-r" \ [Turbo][6] load some plugins, without any plugin-specific ices: -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for \ hlissner/zsh-autopair \ urbainvaes/fzf-marks @@ -72,7 +72,7 @@ zi wait lucid for \ Load two [Oh-My-Zsh][7] files as [snippets][8], in turbo mode: -```shell showLineNumbers +```zsh showLineNumbers zi wait lucid for \ OMZ::lib/git.zsh \ atload"unalias grv" \ @@ -81,7 +81,7 @@ zi wait lucid for \ Popular plugin set with [turbo][6] and The "For": -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi wait lucid light-mode for \ atinit"zicompinit; zicdreplay" \ z-shell/F-Sy-H \ @@ -114,7 +114,7 @@ zi wait lucid light-mode for \ ### Without [turbo mode][6] and The "For" {/* #i-classfa-solid-fa-forward-stepi-without-turbo-mode6-and-the-for */} -```shell showLineNumbers +```zsh showLineNumbers # A. setopt prompt_subst @@ -142,7 +142,7 @@ zi light z-shell/F-Sy-H ### With [turbo mode][6] and The "For" {/* #i-classfa-solid-fa-forward-fasti-with-turbo-mode6-and-the-for */} -```shell showLineNumbers +```zsh showLineNumbers # A. setopt prompt_subst @@ -193,7 +193,7 @@ Try both setups on the daily basis to notice the difference. The features of Zi The `zi-turbo` is a function to simplify `wait`: -```shell showLineNumbers +```zsh showLineNumbers zi-turbo() { zi depth'3' lucid ${1/#[0-9][a-c]/wait"${1}"} "${@:2}" } @@ -201,7 +201,7 @@ zi-turbo() { Then use the `for` syntax in the imposed loading order: -```shell {1,6,10,15} showLineNumbers +```zsh {1,6,10,15} showLineNumbers zi-turbo '0a' for \ OMZL::git.zsh \ OMZL::compfix.zsh \ diff --git a/docs/guides/syntax/10_bindkey.mdx b/docs/guides/syntax/10_bindkey.mdx index 6ca84d647..89788b48a 100644 --- a/docs/guides/syntax/10_bindkey.mdx +++ b/docs/guides/syntax/10_bindkey.mdx @@ -42,7 +42,7 @@ Zi provides a solution to this problem – the ability to remap the bindkeys wit Map Ctrl-G instead of Ctrl-R for the history searcher. -```shell +```zsh zi bindmap'^R -> ^G' for z-shell/history-search-multi-word ``` @@ -54,7 +54,7 @@ Could also separate the bindmaps with a semicolon, i.e.: bindmap'"\\e[1\;6D" -> \\e[1\;5D ; "\\e[1\;6C" -> ^[[1\;5C' \ ``` -```shell showLineNumbers +```zsh showLineNumbers zi wait light-mode trackbinds bindmap'"\\e[1\;6D" -> \\e[1\;5D"' \ bindmap'"\\e[1\;6C" -> ^[[1\;5C' pick'dircycle.zsh' for \ michaelxmcbride/zsh-dircycle @@ -62,7 +62,7 @@ zi wait light-mode trackbinds bindmap'"\\e[1\;6D" -> \\e[1\;5D"' \ Map space to regular space and Ctrl-Space to the `globalias` widget, which expands the alias entered on the left, provided by OMZ globalias plugin. -```shell showLineNumbers +```zsh showLineNumbers zi bindmap='!" " -> magic-space; !"^ " -> globalias' nocompletions \ depth=1 pick=plugins/globalias/globalias.plugin.zsh for \ ohmyzsh/ohmyzsh @@ -78,14 +78,14 @@ In this mode, the given key is being mapped to the given widget instead of the w Instead of: -```shell showLineNumbers +```zsh showLineNumbers bindkey "^ " magic-space bindkey " " globalias ``` The actual call that'll be done will be: -```shell showLineNumbers +```zsh showLineNumbers bindkey "^ " globalias bindkey " " magic-space ``` @@ -104,14 +104,14 @@ In the non-investigation: With the use of the light-mode ice and the for-syntax: -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for trackbinds bindmap'^R -> ^G' \ z-shell/history-search-multi-word ``` With the use of the traditional syntax: -```shell showLineNumbers +```zsh showLineNumbers zi ice trackbinds bindmap'^R -> ^G' zi light z-shell/history-search-multi-word ``` @@ -120,7 +120,7 @@ zi light z-shell/history-search-multi-word There are four special values that can be used on the left side of the bind-map: UPAR, DOWNAR, LEFTAR, RIGHTAR. They'll match up arrow, down arrow, etc. So that it's possible to do: -```shell +```zsh zi bindmap='LEFTAR -> ^F; RIGHTAR -> ^G' … ``` diff --git a/ecosystem/annexes/19_eval.mdx b/ecosystem/annexes/19_eval.mdx index 52316bc56..dbbe1f6b8 100644 --- a/ecosystem/annexes/19_eval.mdx +++ b/ecosystem/annexes/19_eval.mdx @@ -33,14 +33,14 @@ The optional preceding `!` flag means to store command output regardless of exit -```shell showLineNumbers +```zsh showLineNumbers zi ice as"command" from"gh-r" \ atclone"./zoxide init --cmd x zsh > init.zsh" \ atpull"%atclone" src"init.zsh" nocompile'!' zi light ajeetdsouza/zoxide ``` -```shell showLineNumbers +```zsh showLineNumbers zi ice atclone"dircolors -b LS_COLORS > init.zsh" \ atpull"%atclone" pick"init.zsh" nocompile'!' \ atload'zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}' @@ -50,13 +50,13 @@ zi light trapd00r/LS_COLORS -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi ice as"command" from"gh-r" \ eval"./zoxide init --cmd x zsh" zi light ajeetdsouza/zoxide ``` -```shell {1} showLineNumbers +```zsh {1} showLineNumbers zi ice eval"dircolors -b LS_COLORS" \ atload'zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}' zi light trapd00r/LS_COLORS @@ -76,7 +76,7 @@ fi -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi ice id-as"kubectl_completion" has"kubectl" \ eval"kubectl completion zsh" run-atpull zi light z-shell/null @@ -100,7 +100,7 @@ zi light z-shell/null Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-eval ``` @@ -111,7 +111,7 @@ Add the following snippet in the `.zshrc` file: > Set value `Z_A_USECOMP=1` to enable TAB completion for subcommand `recache`. -```shell showLineNumbers +```zsh showLineNumbers zi ice atinit'Z_A_USECOMP=1' zi light z-shell/z-a-eval ``` diff --git a/ecosystem/annexes/1_bin_gem_node.mdx b/ecosystem/annexes/1_bin_gem_node.mdx index f0cbf1478..9f2f7228e 100644 --- a/ecosystem/annexes/1_bin_gem_node.mdx +++ b/ecosystem/annexes/1_bin_gem_node.mdx @@ -34,27 +34,27 @@ As previously mentioned, the function can automatically export `$GEM_HOME`, `$NO Suppose that we want to install the `junegunn/fzf` plugin from GitHub Releases, which contains only a single file – the `fzf` binary for the selected architecture. It is possible to do it in the standard way – by adding the plugin's directory to the `$PATH`. -```shell +```zsh zi ice as'program' from'gh-r' zi load junegunn/fzf ``` After this command, the `$PATH` variable will contain e.g.: -```shell title="print $PATH" showLineNumbers +```zsh title="print $PATH" showLineNumbers /home/sall/.zi/plugins/junegunn---fzf:/bin:/usr/bin:/usr/sbin:/sbin ``` For many such programs loaded as plugins, the PATH can become quite cluttered. I've had 26 entries before switching to `z-a-bin-gem-node`. To solve this, load with the use of [sbin](#sbin-1) ice-modifier provided and handled by `z-a-bin-gem-node`: -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' sbin'fzf' zi load junegunn/fzf ``` The `$PATH` will remain unchanged and a forwarder-script of `fzf` shim will be created in `$ZPFX/bin` (`${XDG_DATA_HOME:-$HOME/.local/share}/zi/polaris/bin` by default), which is being already added to the `$PATH` by Zi when it is being sourced: -```shell title="cat $ZPFX/bin/fzf" showLineNumbers +```zsh title="cat $ZPFX/bin/fzf" showLineNumbers #!/usr/bin/env zsh function fzf { @@ -128,12 +128,12 @@ Creates the so-called `shim` known from `rbenv` – a wrapper script that forwar fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' from'gh-r' sbin'fzf' zi load junegunn/fzf ``` -```shell title="cat $ZPFX/bin/fzf" showLineNumbers +```zsh title="cat $ZPFX/bin/fzf" showLineNumbers #!/usr/bin/env zsh function fzf { @@ -175,12 +175,12 @@ Creates a wrapper function of the name the same as the last segment of the path fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers zi ice from"gh-r" fbin"g:fzf -> myfzf" nocompile zi load junegunn/fzf ``` -```shell title="which myfzf" showLineNumbers +```zsh title="which myfzf" showLineNumbers myfzf () { local bindir="/home/sall/.zi/plugins/junegunn---fzf" local -x GEM_HOME="/home/sall/.zi/plugins/junegunn---fzf" @@ -213,12 +213,12 @@ Installs the gem of name `{gem-name}` with `$GEM_HOME` set to the plugin's or sn fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers zi ice gem'!asciidoctor' id-as'asciidoctor' nocompile zi load z-shell/0 ``` -```shell title="which asciidoctor" showLineNumbers +```zsh title="which asciidoctor" showLineNumbers asciidoctor () { local bindir="/home/sall/.zi/plugins/asciidoctor/bin" local -x GEM_HOME="/home/sall/.zi/plugins/asciidoctor" @@ -253,12 +253,12 @@ Installs the node module of name `{node-module}` inside the plugin's or snippet' fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers zi ice node'remark <- !remark-cli -> remark; remark-man' id-as'remark' nocompile zi load z-shell/0 ``` -```shell title="which remark" showLineNumbers +```zsh title="which remark" showLineNumbers remark () { local bindir="/home/sall/.zi/plugins/remark/node_modules/.bin" local -x NODE_PATH="/home/sall/.zi/plugins/remark"/node_modules @@ -295,12 +295,12 @@ Installs the node module of name `{pip-package}` inside the plugin's or snippet' fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers zi ice pip'youtube-dl <- !youtube-dl -> youtube-dl' id-as'youtube-dl' nocompile zi load z-shell/0 ``` -```shell title="which youtube-dl" showLineNumbers +```zsh title="which youtube-dl" showLineNumbers youtube-dl () { local bindir="/home/sall/.zi/plugins/youtube-dl/venv/bin" local -x VIRTUALENV="/home/sall/.zi/plugins/youtube-dl"/venv @@ -337,12 +337,12 @@ Example: fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers myfunc() { pwd; ls -1 }; zi ice fmod'cgn:myfunc' id-as'myfunc' nocompile zi load z-shell/0 ``` -```shell title="which myfunc" showLineNumbers +```zsh title="which myfunc" showLineNumbers myfunc () { local -x GEM_HOME="/home/sall/.zi/plugins/myfunc" local -x NODE_PATH="/home/sall/.zi/plugins/myfunc"/node_modules @@ -359,7 +359,7 @@ myfunc () { } ``` -```shell title="myfun" showLineNumbers +```zsh title="myfun" showLineNumbers /home/sall/.zi/plugins/z-shell---0 docs/ LICENSE @@ -397,12 +397,12 @@ Creates a wrapper function that at each invocation sources the given file. The s fit={false} /> -```shell showLineNumbers +```zsh showLineNumbers zi ice fsrc"myscript -> myfunc" ferc"myscript" nocompile zi load z-shell/0 ``` -```shell title="which myfunc" showLineNumbers +```zsh title="which myfunc" showLineNumbers myfunc () { local bindir="/home/sall/.zi/plugins/z-shell---0" local -xU PATH="$bindir":"$PATH" @@ -412,7 +412,7 @@ myfunc () { } ``` -```shell title="which myscript" showLineNumbers +```zsh title="which myscript" showLineNumbers myscript () { local bindir="/home/sall/.zi/plugins/z-shell---0" local -xU PATH="$bindir":"$PATH" @@ -436,7 +436,7 @@ An annex provides a subcommand – `shim-list` for shims currently stored in `$Z Available flags are: -```shell +```zsh zi shim-list [ -t | -i | -o | -s | -h ] ``` @@ -452,7 +452,7 @@ zi shim-list [ -t | -i | -o | -s | -h ] The [sbin](#sbin-1) ice-modifier has an explicit Cygwin support – it creates additional, **extra shim files** – Windows batch scripts that allow running the shielded applications from e.g.: Windows run dialog – if the `${XDG_DATA_HOME:-$HOME/.local/share}/zi/polaris/bin` directory is being added to the Windows `PATH` environment variable, for example (it is a good idea to do so, IMHO). The Windows shims have the same name as the standard ones (which are also being created, normally) plus the `.cmd` extension. You can test the feature by e.g.: installing Firefox from the Zi package via: -```shell +```zsh zi pack=bgn for firefox ``` @@ -471,7 +471,7 @@ zi pack=bgn for firefox Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-bin-gem-node ``` @@ -480,7 +480,7 @@ zi light z-shell/z-a-bin-gem-node Add the following snippet in the `.zshrc` file to install using the [unscope][] annex: -```shell +```zsh zi light z-shell/z-a-unscope bgn ``` diff --git a/ecosystem/annexes/20_test.mdx b/ecosystem/annexes/20_test.mdx index 11d6afc27..af502e6ba 100644 --- a/ecosystem/annexes/20_test.mdx +++ b/ecosystem/annexes/20_test.mdx @@ -33,7 +33,7 @@ An annex runs `zunit` and `make` tests if they are configured in the repository. Simply load it like any other plugin to make it active: -```shell +```zsh zi light z-shell/z-a-test ``` @@ -42,13 +42,13 @@ zi light z-shell/z-a-test To run the tests in a verbose mode, issue: -```shell +```zsh zstyle :zi:annex:test quiet 0 ``` To skip tests for a single plugin before installing or updating add the `notest` ice-modifier: -```shell showLineNumbers +```zsh showLineNumbers zi ice notest zi load … ``` diff --git a/ecosystem/annexes/2_meta_plugins.mdx b/ecosystem/annexes/2_meta_plugins.mdx index 8fd726dab..5b5529adc 100644 --- a/ecosystem/annexes/2_meta_plugins.mdx +++ b/ecosystem/annexes/2_meta_plugins.mdx @@ -28,20 +28,20 @@ An annex has the curated, optimal [ice-modifiers][] lists automatically applied. The following snippets are examples of how to install meta-plugins: -```shell +```zsh zi light @annexes ``` -```shell +```zsh zi light-mode for @annexes @zsh-users @console-tools ``` -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for z-a-meta-plugins \ @annexes @ext-git @zsh-users ``` -```shell showLineNumbers +```zsh showLineNumbers zi light-mode for @annexes \ skip'zsh-completions' @zsh-users \ skip'vivid exa tig' @console-tools @@ -130,7 +130,7 @@ Other unique benefits of the meta-plugins annex: Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-meta-plugins ``` diff --git a/ecosystem/annexes/3_default_ice.mdx b/ecosystem/annexes/3_default_ice.mdx index f1a019828..154350937 100644 --- a/ecosystem/annexes/3_default_ice.mdx +++ b/ecosystem/annexes/3_default_ice.mdx @@ -17,13 +17,13 @@ An annex delivers the capability to set **default ices** for the next `zi` comma set default-ices: -```shell +```zsh zi default-ice lucid from"gh-r" ``` this will download from GitHub releases (gh-r) and also use the lucid ice by default: -```shell showLineNumbers +```zsh showLineNumbers zi wait for \ sbin junegunn/fzf-bin \ sbin"**/pk" peco/peco @@ -65,7 +65,7 @@ An annex provides a subcommand – `default-ice` which has the following synopsi Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-default-ice ``` diff --git a/ecosystem/annexes/4_patch-dl.mdx b/ecosystem/annexes/4_patch-dl.mdx index b361d4377..806cc2d7f 100644 --- a/ecosystem/annexes/4_patch-dl.mdx +++ b/ecosystem/annexes/4_patch-dl.mdx @@ -18,13 +18,13 @@ An annex downloads files and applies patches and adds two ice-modifiers: first: -```shell +```zsh zi ice dl'{URL} [-> {optional-output-file-name}]; …' … ``` second: -```shell +```zsh zi ice patch'{file-name-with-the-patch-to-apply}; …' … ``` @@ -32,7 +32,7 @@ The annex will download the given `{URL}` under the path `{optional-output-file- For example, to install `fbterm`, two patches are being needed, one to fix the operation, the other one to fix the build: -```shell showLineNumbers +```zsh showLineNumbers zi ice as"command" pick"$ZPFX/bin/fbterm" \ dl"https://bugs.archlinux.org/task/46860?getfile=13513 -> ins.patch" \ dl"https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-build-with-gcc-6.patch?h=fbterm-git" \ @@ -61,7 +61,7 @@ This command will result in: Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-patch-dl ``` diff --git a/ecosystem/annexes/5_readurl.mdx b/ecosystem/annexes/5_readurl.mdx index 8a72ed779..6437be2dc 100644 --- a/ecosystem/annexes/5_readurl.mdx +++ b/ecosystem/annexes/5_readurl.mdx @@ -30,7 +30,7 @@ The part after the `|` has the same meaning as in the normal `as'…'` ice. ## Examples {/* #examples */} -```shell showLineNumbers +```zsh showLineNumbers zi id-as=fzf as='readurl|command' for \ dlink='/junegunn/fzf/releases/download/%VERSION%/fzf-%VERSION%-linux_amd64.tar.gz' \ https://github.com/junegunn/fzf/releases/ @@ -44,7 +44,7 @@ As it can be seen, the `dlink'…'` can be a relative or an absolute path and al Sometimes, like it is in the case of the [terraform][terraform-link] command, the final download link isn't on the download page, but on a page, that's listed on it. In such a case use the `dlink0'…'` ice to provide the pattern for the additional, intermediate download page, e.g.: -```shell showLineNumbers +```zsh showLineNumbers zi id-as=terraform as='readurl|command' extract for \ dlink0='/terraform/%VERSION%/' \ dlink='/terraform/%VERSION%/terraform_%VERSION%_linux_386.zip' \ @@ -55,14 +55,14 @@ zi id-as=terraform as='readurl|command' extract for \ Sometimes the URL of the download page differs from the URL of the archive in just a few `/`-sections. In such a case, it is possible to skip the `dlink'…'` ice by appending a `++`-separated fragment of the archive URL, like so: -```shell showLineNumbers +```zsh showLineNumbers zi as'readurl|command' extract for \ http://domain.com/download-page++/archive.zip ``` If the archive URL has some different `/`-sections, then it's possible to strip the conflicting ones from the download URL by using `+++`, `++++`, etc. – the number of the `/`-section that'll be stripped equals to the number of the `+` minus 2. So, for example: -```shell showLineNumbers +```zsh showLineNumbers zi as'readurl|command' extract for \ http://domain.com/download-page/removed-section+++/archive.zip ``` @@ -75,7 +75,7 @@ Sometimes the download page doesn't list the package versions from newest to old Sometimes some unwanted URLs match the `dlink'…'`/`dlink0'…'` regex/pattern. In such a case it's possible to filter them out by appending a filtering regex to the `dlink'…'` ice as: `dlink='the-main-regex~%the-unwanted-URLs-regex%'` (or the same for `dlink0'…'`). An example package that can benefit from this is the [Open Shift][open-shift-link] client, which doesn't sort the URLs from latest to the oldest – hence the exclamation mark (`!`) prepend – and it has special URLs like `stable-4.4` or `candidate-4.5` together with the regular version URLs (like `4.5.0-rc.1`): -```shell showLineNumbers +```zsh showLineNumbers zi id-as"ocp" as"readurl|command" for \ dlink0'!%VERSION%~%(stable|latest|fast|candidate).*%' \ dlink"openshift-client-windows-%VERSION%.zip" \ @@ -88,7 +88,7 @@ The above snippet of Zsh code / Zi invocation will sort the URLs (`dlink0'!…'` [Pulumi][pulumi-link], a tool to create, deploy and manage modern cloud software. -```shell showLineNumbers +```zsh showLineNumbers zi id-as'pulumi' as'readurl|null' for \ dlink='https://get.pulumi.com/releases/sdk/pulumi-%VERSION%-linux-x64.tar.gz' \ sbin'pulumi*' \ @@ -110,7 +110,7 @@ zi id-as'pulumi' as'readurl|null' for \ Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-readurl ``` diff --git a/ecosystem/annexes/6_submods.mdx b/ecosystem/annexes/6_submods.mdx index 80ed6ea25..6e3647d30 100644 --- a/ecosystem/annexes/6_submods.mdx +++ b/ecosystem/annexes/6_submods.mdx @@ -23,7 +23,7 @@ submods'{user}/{plugin} -> {output directory}; …` An example command utilizing the annex and its ice-modifier to load a plugin with additional submodules: -```shell title='~/.zshrc' showLineNumbers +```zsh title='~/.zshrc' showLineNumbers zi ice submods'zsh-users/zsh-autosuggestions -> external' zi load some/plugin ``` @@ -43,7 +43,7 @@ zi load some/plugin Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-submods ``` diff --git a/ecosystem/annexes/7_unscope.mdx b/ecosystem/annexes/7_unscope.mdx index cb6883cb5..053e8e1ca 100644 --- a/ecosystem/annexes/7_unscope.mdx +++ b/ecosystem/annexes/7_unscope.mdx @@ -147,7 +147,7 @@ Besides the GitHub-API querying, there's also a fixed, curated list of mappings Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-unscope ``` diff --git a/ecosystem/annexes/8_linkbin.mdx b/ecosystem/annexes/8_linkbin.mdx index 9cef09393..a5330f854 100644 --- a/ecosystem/annexes/8_linkbin.mdx +++ b/ecosystem/annexes/8_linkbin.mdx @@ -29,7 +29,7 @@ The optional preceding `!` flag means creating a soft link instead of a hard lin Example: -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi ice from'gh-r' as'program' \ lbin'!fzf' zi load junegunn/fzf @@ -52,7 +52,7 @@ The ice-modifier can contain globs as it will expand these when searching for th Example: -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi ice from'gh-r' as'program' \ lbin'**fzf -> myfzf' zi load junegunn/fzf @@ -91,7 +91,7 @@ The above also applies if just `!` were passed. Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-linkbin ``` diff --git a/ecosystem/annexes/9_rust.mdx b/ecosystem/annexes/9_rust.mdx index 799a89259..42d06bdaf 100644 --- a/ecosystem/annexes/9_rust.mdx +++ b/ecosystem/annexes/9_rust.mdx @@ -49,7 +49,7 @@ The crate can create so-called _shims_ – scripts that are exposed to the stand Example of the _shim_ script: -```shell showLineNumbers +```zsh showLineNumbers #!/usr/bin/env zsh function lsd { @@ -70,42 +70,42 @@ As it can be seen shim ultimately provides the binary to the command line. Set up rust and the `lsd` crate with a shim `lsd` exposing the binary: -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'!lsd' zi load z-shell/0 ``` Set up rust and the `exa` crate with a shim `ls` exposing the `exa` binary: -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'!exa -> ls' zi load z-shell/0 ``` Set up rust and the `exa` and `lsd` crates: -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'exa;lsd' zi load z-shell/0 ``` Set up rust, then the `exa` and `lsd` crates, with their binaries exposed by altering `$PATH`: -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'exa;lsd' as"command" pick"bin/(exa|lsd)" zi load z-shell/0 ``` Set up rust and then the `exa` crate with shim standard error redirected to `/dev/null`: -```shell showLineNumbers +```zsh showLineNumbers zi ice rustup cargo'!E:exa' zi load z-shell/0 ``` Just install rust and make it available globally in the system: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as"rust" wait"0" lucid rustup as"command" pick"bin/rustc" atload="export \ CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup" zi load z-shell/0 @@ -113,7 +113,7 @@ zi load z-shell/0 A little more complex rustup configuration that uses [bin-gem-node][annex-bin-gem-node] annex and installs the cargo completion provided with rustup, using the [for][for-syntax] syntax: -```shell showLineNumbers +```zsh showLineNumbers zi id-as=rust wait=1 as=null sbin="bin/*" lucid rustup \ atload="[[ ! -f ${ZI[COMPLETIONS_DIR]}/_cargo ]] && zi creinstall rust; \ export CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup" for \ @@ -137,7 +137,7 @@ z-shell/0 Add the following snippet in the `.zshrc` file: -```shell +```zsh zi light z-shell/z-a-rust ``` diff --git a/ecosystem/packages/01_synopsis.mdx b/ecosystem/packages/01_synopsis.mdx index 2d0668e79..ea0821f56 100644 --- a/ecosystem/packages/01_synopsis.mdx +++ b/ecosystem/packages/01_synopsis.mdx @@ -37,7 +37,7 @@ The [bin-gem-node][] annex is recommended, otherwise, some packages will fail to They allow the installation of any Gem(s) or Node module(s) locally in a newly created plugin directory. For example: -```shell showLineNumbers +```zsh showLineNumbers zi pack param='GEM -> rails' for any-gem zi pack param='MOD -> doctoc' for any-node ``` @@ -50,7 +50,7 @@ The Unicode arrow is allowed in Zi syntax as in the example below. ::: -```shell +```zsh zi id-as=jekyll pack param='GEM → jekyll' for any-gem ``` @@ -60,7 +60,7 @@ The binaries will be exposed without altering the PATH via shims. Shims are corr This way, instead of the following command used to install `fzf`: -```shell showLineNumbers +```zsh showLineNumbers zi lucid as=program pick="$ZPFX/bin/(fzf|fzf-tmux)" \ atclone="cp shell/completion.zsh _fzf_completion; \ cp bin/(fzf|fzf-tmux) $ZPFX/bin" \ @@ -70,7 +70,7 @@ zi lucid as=program pick="$ZPFX/bin/(fzf|fzf-tmux)" \ you only need: -```shell +```zsh zi pack for fzf ``` @@ -89,7 +89,7 @@ Using Zi to install software where one could use a regular package manager has s 2. **Pro:** You can influence the installation easily by specifying Zi ice-modifiers, e.g.: - ```shell + ```zsh zi pack=bgn atclone="cp fzy.1 $ZI[MAN_DIR]/man1" for fzy ``` diff --git a/ecosystem/packages/02_usage.mdx b/ecosystem/packages/02_usage.mdx index 7c95a4080..a88bf4aae 100644 --- a/ecosystem/packages/02_usage.mdx +++ b/ecosystem/packages/02_usage.mdx @@ -91,7 +91,7 @@ For all the available packages use [GitHub search][github-search]. Download, build and install the latest Apache Portable Runtime. -```shell +```zsh zi pack for apr ``` @@ -136,7 +136,7 @@ Download the Gem of asciidoctor locally with the [bin-gem-node][] annex. > Using the `@` prefix because of collision with the as'' ice. -```shell +```zsh zi pack for @asciidoctor ``` @@ -182,7 +182,7 @@ zi pack for @asciidoctor Download the binary of the Amazon-ECS-CLI command. -```shell +```zsh zi pack for ecs-cli ``` @@ -191,7 +191,7 @@ zi pack for ecs-cli Download the ECS-CLI binary with the use of the bin-gem-node annex. -```shell +```zsh zi pack"bgn" for ecs-cli ``` @@ -240,7 +240,7 @@ zi pack"bgn" for ecs-cli Download the default profile. -```shell +```zsh zi pack for dircolors-material ``` @@ -249,7 +249,7 @@ zi pack for dircolors-material Download the "no-zsh-completion" profile. -```shell +```zsh zi pack"no-zsh-completion" for dircolors-material ``` @@ -258,7 +258,7 @@ zi pack"no-zsh-completion" for dircolors-material Download the "no-color-swaps" profile. -```shell +```zsh zi pack"no-color-swaps" for dircolors-material ``` @@ -267,7 +267,7 @@ zi pack"no-color-swaps" for dircolors-material Download the minimal profile without altering the original theme. -```shell +```zsh zi pack"minimal" for dircolors-material ``` @@ -313,7 +313,7 @@ zi pack"minimal" for dircolors-material A download default profile with the Node package of doctoc. -```shell +```zsh zi pack for doctoc ``` @@ -359,7 +359,7 @@ zi pack for doctoc Download the firefox-dev latest binary. -```shell +```zsh zi pack for firefox-dev ``` @@ -368,7 +368,7 @@ zi pack for firefox-dev Download the firefox-dev latest binary with use of the [bin-gem-node][] annex. -```shell +```zsh zi pack"bgn" for firefox-dev ``` @@ -417,7 +417,7 @@ zi pack"bgn" for firefox-dev Download the package with the default profile. -```shell +```zsh zi pack for fzf ``` @@ -426,7 +426,7 @@ zi pack for fzf Download the package with the default profile + key bindings. -```shell +```zsh zi pack"default+keys" for fzf ``` @@ -435,7 +435,7 @@ zi pack"default+keys" for fzf Download the package with the [bin-gem-node][] annex. -```shell +```zsh zi pack"bgn" for fzf ``` @@ -446,7 +446,7 @@ Download the package with the [bin-gem-node][] annex and with the key bindings. > The "+keys" variants are available for each profile. -```shell +```zsh zi pack"bgn+keys" for fzf ``` @@ -455,7 +455,7 @@ zi pack"bgn+keys" for fzf Download with the [bin-gem-node][] annex from GitHub repository. -```shell +```zsh zi pack"bgn" git for fzf ``` @@ -464,7 +464,7 @@ zi pack"bgn" git for fzf Download the binary from the GitHub releases. -```shell +```zsh zi pack"binary" for fzf ``` @@ -473,7 +473,7 @@ zi pack"binary" for fzf Download the binary from the GitHub releases and install using [bin-gem-node][] + shims. -```shell +```zsh zi pack"bgn-binary" for fzf ``` @@ -522,7 +522,7 @@ zi pack"bgn-binary" for fzf Download the package with the default profile. -```shell +```zsh zi pack for fzy ``` @@ -531,7 +531,7 @@ zi pack for fzy Download the package with the [bin-gem-node][] annex. -```shell +```zsh zi pack"bgn" for fzy ``` @@ -540,7 +540,7 @@ zi pack"bgn" for fzy Download with the [bin-gem-node][] annex from GitHub repository. -```shell +```zsh zi pack"bgn" git for fzy ``` @@ -549,7 +549,7 @@ zi pack"bgn" git for fzy Download normal ice list and override atclone'' ice to skip the contrib scripts -```shell +```zsh zi pack"bgn" atclone'' for fzy ``` @@ -594,7 +594,7 @@ zi pack"bgn" atclone'' for fzy Download the default profile. -```shell +```zsh zi pack for ls_colors ``` @@ -603,7 +603,7 @@ zi pack for ls_colors Download the "no-zsh-completion" profile. -```shell +```zsh zi pack"no-zsh-completion" for ls_colors ``` @@ -612,7 +612,7 @@ zi pack"no-zsh-completion" for ls_colors Download the "no-dir-color-swap" profile. -```shell +```zsh zi pack"no-dir-color-swap" for ls_colors ``` @@ -654,7 +654,7 @@ zi pack"no-dir-color-swap" for ls_colors Default profile are using [bin-gem-node][] to set shims. -```shell +```zsh zi pack for nb ``` @@ -700,7 +700,7 @@ zi pack for nb Download the tarball with the default ice list. -```shell +```zsh zi pack for pyenv ``` @@ -709,7 +709,7 @@ zi pack for pyenv Download the binary from the GitHub releases with the [bin-gem-node][] annex. -```shell +```zsh zi pack"bgn" for pyenv ``` @@ -718,7 +718,7 @@ zi pack"bgn" for pyenv Download with the [bin-gem-node][] annex from GitHub repository. -```shell +```zsh zi pack"bgn" git for pyenv ``` @@ -763,7 +763,7 @@ zi pack"bgn" git for pyenv Download the Node package of remark-CLI, remark-man and remark-HTML -```shell +```zsh zi pack for remark ``` @@ -772,7 +772,7 @@ zi pack for remark Download the Node package of remark-CLI and remark-man -```shell +```zsh zi pack"man-only" for remark ``` @@ -781,7 +781,7 @@ zi pack"man-only" for remark Download the Node package of remark-CLI and remark-HTML -```shell +```zsh zi pack"html-only" for remark ``` @@ -829,7 +829,7 @@ Download, build and install the latest Subversion. > Dependency of Subversion: [APR][] -```shell +```zsh zi pack for subversion ``` @@ -875,7 +875,7 @@ zi pack for subversion Install the newest Zsh. -```shell +```zsh zi pack for zsh ``` @@ -884,7 +884,7 @@ zi pack for zsh Install preferred Zsh version. -```shell +```zsh zi pack"5.9" for zsh zi pack"5.8.1" for zsh zi pack"5.8" for zsh @@ -942,7 +942,7 @@ zi pack"5.1.1" for zsh Requires **root** access to install Zsh at `/usr/local` and will attempt to register it as a login shell. -```shell +```zsh zi pack for zsh-bin ``` @@ -951,7 +951,7 @@ zi pack for zsh-bin Does not require **root** access, when install using [bin-gem-node][] to set shims. -```shell +```zsh zi pack"bgn" for zsh-bin ``` @@ -960,7 +960,7 @@ zi pack"bgn" for zsh-bin Does not require **root** access, will install to `~/.local`. -```shell +```zsh zi pack"rootless" for zsh-bin ``` diff --git a/ecosystem/plugins/diff-so-fancy.mdx b/ecosystem/plugins/diff-so-fancy.mdx index 85a1f52dc..d3013f2e2 100644 --- a/ecosystem/plugins/diff-so-fancy.mdx +++ b/ecosystem/plugins/diff-so-fancy.mdx @@ -45,14 +45,14 @@ Add the following to your `.zshrc` file: Using [bin-gem-node](/ecosystem/annexes/bin-gem-node) annex (recommended): -```shell showLineNumbers +```zsh showLineNumbers zi ice as'null' sbin'bin/*' zi light z-shell/zsh-diff-so-fancy ``` Standard installation: -```shell showLineNumbers +```zsh showLineNumbers zi ice as'program' pick'bin/*' zi light z-shell/zsh-diff-so-fancy ``` diff --git a/ecosystem/plugins/f-sy-h.mdx b/ecosystem/plugins/f-sy-h.mdx index 3dedd2593..9455df52a 100644 --- a/ecosystem/plugins/f-sy-h.mdx +++ b/ecosystem/plugins/f-sy-h.mdx @@ -25,13 +25,13 @@ import ChromaFunctionExample from "@site/src/components/Markdown/_chroma_functio Add the following to your `.zshrc` file. -```shell +```zsh zi light z-shell/F-Sy-H ``` Load the plugin in [turbo mode][turbo-mode]: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zi wait lucid for \ atinit"ZI[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \ z-shell/F-Sy-H \ diff --git a/ecosystem/plugins/h-s-mw.mdx b/ecosystem/plugins/h-s-mw.mdx index 7278ec420..4ca5fa22b 100644 --- a/ecosystem/plugins/h-s-mw.mdx +++ b/ecosystem/plugins/h-s-mw.mdx @@ -44,7 +44,7 @@ The plugin allows to search history for multiple keywords, Ctrl+ Add the following to your `.zshrc` file: -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi light z-shell/H-S-MW ``` @@ -121,7 +121,7 @@ Add `zstyle` to `~/.zshrc`: `zstyle :plugin:history-search-multi-word `, Example: -```shell showLineNumbers title="~/.zshrc" +```zsh showLineNumbers title="~/.zshrc" zstyle :plugin:history-search-multi-word reset-prompt-protect 1 zstyle ":history-search-multi-word" page-size "8" ``` @@ -130,7 +130,7 @@ zstyle ":history-search-multi-word" page-size "8" For a better experience adjust history using [options][zsh-options], for example: -```shell showLineNumbers title="~/.zshrc" +```zsh showLineNumbers title="~/.zshrc" setopt extended_history # record timestamp of command in HISTFILE setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt hist_ignore_all_dups # remove older duplicate entries from the history @@ -154,7 +154,7 @@ Use `zle reset-prompt` in `sched` calls, in the presence of [z-shell/F-Sy-H][z-s For example, to refresh the clock in prompt every second: -```shell showLineNumbers +```zsh showLineNumbers PROMPT=%B%F{yellow}%D{%H:%M:%S}%B%b%f schedprompt() { diff --git a/ecosystem/plugins/zbrowse.mdx b/ecosystem/plugins/zbrowse.mdx index 80560bc8b..669dd9ae3 100644 --- a/ecosystem/plugins/zbrowse.mdx +++ b/ecosystem/plugins/zbrowse.mdx @@ -32,7 +32,7 @@ First, install the [z-shell/zui][] plugin - a UI library for Z shell. Add the following to your `.zshrc`. Zi will handle cloning the plugin for you automatically the next time you start Zsh. To update run `zi update z-shell/zbrowse`. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zbrowse ``` diff --git a/ecosystem/plugins/zconvey.mdx b/ecosystem/plugins/zconvey.mdx index 58df33039..2290c9cff 100644 --- a/ecosystem/plugins/zconvey.mdx +++ b/ecosystem/plugins/zconvey.mdx @@ -76,20 +76,20 @@ The main command is `zc` (yet it is rather rarely used, I'm always sending to al Add the following to your `.zshrc` file. Zi will clone the plugin the next time you start Zsh. To update issue `zi update z-shell/zconvey`. -```shell +```zsh zi load z-shell/zconvey ``` Zi can load in [turbo mode](/search?q=turbo+and+lucid), below is an example configuration. -```shell showLineNumbers +```zsh showLineNumbers zi ice wait"0" zi light z-shell/zconvey ``` Adding `zc-bg-notify` to `$PATH`: -```shell showLineNumbers +```zsh showLineNumbers zi ice wait"0" as"command" pick"cmds/zc-bg-notify" silent zi light z-shell/zconvey ``` diff --git a/ecosystem/plugins/zi_console.mdx b/ecosystem/plugins/zi_console.mdx index 30d8042d7..17cce4d2d 100644 --- a/ecosystem/plugins/zi_console.mdx +++ b/ecosystem/plugins/zi_console.mdx @@ -62,7 +62,7 @@ Start the console by Ctrl-O Ctrl-J keyboard shortcut, or b Standard syntax: -```shell +```zsh zi load z-shell/zi-console ``` @@ -71,7 +71,7 @@ zi load z-shell/zi-console with use of [turbo mode][4] and the [for][5] syntax: -```shell +```zsh zi wait lucid for z-shell/zi-console ``` @@ -80,7 +80,7 @@ zi wait lucid for z-shell/zi-console The plugin needs the `zsh/curses` Zsh module. You can check if it's available to your Zsh by executing: -```shell +```zsh zmodload zsh/curses ``` @@ -90,7 +90,7 @@ If the call will return an error, then the `zsh/curses` module isn't available. You can build the `zsh/curses`-equipped Z shell with Zi by the following command: -```shell showLineNumbers +```zsh showLineNumbers zi ice id-as"zsh" atclone"./.preconfig CFLAGS='-I/usr/include -I/usr/local/include -g -O2 -Wall' \ LDFLAGS='-L/usr/lib -L/usr/local/lib' ./configure --prefix='$ZPFX'" \ @@ -102,7 +102,7 @@ The command will build a custom `zsh` and install it under `$ZPFX` (`${XDG_DATA_ When on Gentoo, and possibly other systems, the `zsh` can still not have the ncurses library linked. To address this, utilize the [patch-dl][z-a-patch-dl] annex and automatically patch the source first: -```shell showLineNumbers +```zsh showLineNumbers zi light z-shell/z-a-patch-dl zi ice id-as"zsh" atclone"./.preconfig CFLAGS='-I/usr/include -I/usr/local/include -g -O2 -Wall' \ diff --git a/ecosystem/plugins/zprompts.mdx b/ecosystem/plugins/zprompts.mdx index fbd56dda1..b092315c0 100644 --- a/ecosystem/plugins/zprompts.mdx +++ b/ecosystem/plugins/zprompts.mdx @@ -37,7 +37,7 @@ The previews demonstrate: Add the following to your `.zshrc` file with preferred theme e.g: -```shell {2} showLineNumbers +```zsh {2} showLineNumbers zi nocd for \ atload'!promptinit; typeset -g PSSHORT=0; prompt sprint3 yellow red green blue' \ z-shell/zprompts diff --git a/ecosystem/plugins/zsh_comand_architect.mdx b/ecosystem/plugins/zsh_comand_architect.mdx index b8a9001b6..7fcea60a2 100644 --- a/ecosystem/plugins/zsh_comand_architect.mdx +++ b/ecosystem/plugins/zsh_comand_architect.mdx @@ -44,7 +44,7 @@ The Zsh Command Architect allows to copy segments of commands in history, rearra Add the following to `.zshrc`. The config files will be available in `~/.config/zca`. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zsh-cmd-architect ``` diff --git a/ecosystem/plugins/zsh_editing_workbench.mdx b/ecosystem/plugins/zsh_editing_workbench.mdx index d2d4ea264..836fc77b4 100644 --- a/ecosystem/plugins/zsh_editing_workbench.mdx +++ b/ecosystem/plugins/zsh_editing_workbench.mdx @@ -38,7 +38,7 @@ Organized shortcuts for various command line editing operations, plus new operat Add the following to `.zshrc`. The config files will be available in `~/.config/zew`. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zsh-editing-workbench ``` diff --git a/ecosystem/plugins/zsh_modules.mdx b/ecosystem/plugins/zsh_modules.mdx index 0719aada1..1e87af30e 100644 --- a/ecosystem/plugins/zsh_modules.mdx +++ b/ecosystem/plugins/zsh_modules.mdx @@ -52,7 +52,7 @@ Used by zpmod internally to speed up loading plugins with tracking (reporting). To enable debug messages from the module set: -```shell +```zsh typeset -g ZI_MOD_DEBUG=1 ``` @@ -64,7 +64,7 @@ typeset -g ZI_MOD_DEBUG=1 - To start using the module run: `zi module -B`, append `--clean` to run `make distclean`. - To display the instructions on loading the module, run: `zi module -I`. -```shell showLineNumbers +```zsh showLineNumbers zi module [-B|--build[--clean]] [-I|--info] [-r|--reset] [-h|--help] [options] zi module -B [--clean] # Build the module, append --clean to run distclean. zi module -I # Display instructions on loading the module. @@ -99,7 +99,7 @@ Change the values before loading the `zgdbm` plugin. ::: -```shell title="~/.zshrc" showLineNumbers +```zsh title="~/.zshrc" showLineNumbers zstyle ":plugin:zgdbm" cppflags "-I/usr/local/include" # Additional include directory zstyle ":plugin:zgdbm" cflags "-Wall -O2 -g" # Additional CFLAGS zstyle ":plugin:zgdbm" ldflags "-L/usr/local/lib" # Additional library directory @@ -107,7 +107,7 @@ zstyle ":plugin:zgdbm" ldflags "-L/usr/local/lib" # Additional library dir ### Install zgdbm {/* #install-zgdbm */} -```shell +```zsh zi light z-shell/zgdbm ``` diff --git a/ecosystem/plugins/zsh_navigation_tools.mdx b/ecosystem/plugins/zsh_navigation_tools.mdx index 360f24792..f13c69f62 100644 --- a/ecosystem/plugins/zsh_navigation_tools.mdx +++ b/ecosystem/plugins/zsh_navigation_tools.mdx @@ -85,7 +85,7 @@ Feature highlights include incremental multi-word searching, approximate matchin Add the following to `.zshrc`. The config files will be in `~/.config/znt`. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zsh-navigation-tools ``` @@ -143,7 +143,7 @@ Don't forget to copy [configuration files][2]. They should go to `~/.config/znt`. Moreover, `n-cd` works together with option `AUTO_PUSHD` and you should have: -```shell +```zsh setopt AUTO_PUSHD ``` @@ -169,7 +169,7 @@ After installing and reloading the shell give `ZNT` a quick try with `Ctrl-R` To have `n-history` as the incremental searcher bound to `Ctrl-R` copy `znt-*` files into the `*/site-functions` dir (unless you do a single file install) and add: -```shell showLineNumbers +```zsh showLineNumbers autoload znt-history-widget zle -N znt-history-widget bindkey "^R" znt-history-widget @@ -177,7 +177,7 @@ bindkey "^R" znt-history-widget to `.zshrc`. This is done automatically when using the installer, zgen, antigen, or single file install. Two other widgets exist, `and-cd-widget` and `znt-kill-widget`, they too can be assigned to key combinations (`autoload` is done in `.zshrc` so no need for it): -```shell showLineNumbers +```zsh showLineNumbers zle -N znt-cd-widget bindkey "^B" znt-cd-widget zle -N znt-kill-widget diff --git a/ecosystem/plugins/zsh_select.mdx b/ecosystem/plugins/zsh_select.mdx index 58c75f029..bc86177ad 100644 --- a/ecosystem/plugins/zsh_select.mdx +++ b/ecosystem/plugins/zsh_select.mdx @@ -46,7 +46,7 @@ Simply copy file `zsh-select` to any `bin` directory such as `/usr/local/bin`. Add the following to `.zshrc`. The plugin will be loaded next time you start `Zsh`. To update issue `zi update z-shell/zsh-select` from command line. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zsh-select ``` diff --git a/ecosystem/plugins/zsh_startify.mdx b/ecosystem/plugins/zsh_startify.mdx index 11edf70ec..f150c7692 100644 --- a/ecosystem/plugins/zsh_startify.mdx +++ b/ecosystem/plugins/zsh_startify.mdx @@ -38,7 +38,7 @@ Overview: The zstyles used to configure the plugin (add such commands anywhere in the `zshrc`): -```shell showLineNumbers +```zsh showLineNumbers zstyle ":plugin:zsh-startify:shellutils" size 5 # The size of the recently used file list (default: 5) zstyle ":plugin:zsh-startify:vim" size 5 # The size of the recently opened in Vim list (default: 5) ``` @@ -52,7 +52,7 @@ The Standard install loads the plugin synchronously, at the time of execution of Standard syntax without [turbo mode](/search?q=turbo+mode). -```shell showLineNumbers +```zsh showLineNumbers zi ice atload'zsh-startify' zi load z-shell/zsh-startify ``` @@ -62,7 +62,7 @@ zi load z-shell/zsh-startify Load using [turbo mode](/search?q=turbo+mode). -```shell showLineNumbers +```zsh showLineNumbers zi ice wait'0' lucid atload'zsh-startify' zi load z-shell/zsh-startify ``` diff --git a/ecosystem/plugins/zsh_unique_id.mdx b/ecosystem/plugins/zsh_unique_id.mdx index 5484fd392..175b47e3a 100644 --- a/ecosystem/plugins/zsh_unique_id.mdx +++ b/ecosystem/plugins/zsh_unique_id.mdx @@ -50,7 +50,7 @@ Default code names are: Zstyle configuration allows to customize the codenames: -```shell +```zsh zstyle :plugin:zuid codenames paper metal wood plastic # first 4 shells will have those codenames ``` @@ -72,7 +72,7 @@ Sourcing is recommended, because it can be done early, at top of zshrc, without Add the following to your `.zshrc` file. Zi will clone the plugin the next time you start zsh. To update issue `zi update z-shell/zsh-unique-id`. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zsh-unique-id ``` diff --git a/ecosystem/plugins/zui.mdx b/ecosystem/plugins/zui.mdx index a365638ef..365784c65 100644 --- a/ecosystem/plugins/zui.mdx +++ b/ecosystem/plugins/zui.mdx @@ -674,13 +674,13 @@ Returning `0` means not-updating the status window, and `reply` is then ignored. To change ZUI global default, invoke: -```shell +```zsh zstyle ":plugin:zui" colorpair "white/black" ``` An application may override such default with its default. To change the default per application, invoke: -```shell +```zsh zstyle ":plugin:zui:app:zui-demo-fly" colorpair "250/17" # 256 colors – zsh >= 5.3; "default" color also from this version ``` @@ -768,7 +768,7 @@ source {where-zui-is}/zui.plugin.zsh Add the following to your `.zshrc` file. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi load z-shell/zui ``` diff --git a/ecosystem/plugins/zzcomplete.mdx b/ecosystem/plugins/zzcomplete.mdx index cd657b1b7..36aadee65 100644 --- a/ecosystem/plugins/zzcomplete.mdx +++ b/ecosystem/plugins/zzcomplete.mdx @@ -43,7 +43,7 @@ With ZZComplete, the user can: Add the following to your `.zshrc` file. -```shell title="~/.zshrc" +```zsh title="~/.zshrc" zi light z-shell/zzcomplete ``` From 329675e7931ffb1e645c6810a5b3d6507d213fd1 Mon Sep 17 00:00:00 2001 From: ss-o Date: Sun, 17 May 2026 06:42:46 +0100 Subject: [PATCH 4/9] fix(docs): remove dead links to non-existent GitHub repositories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ecosystem/plugins/zsh_startify.mdx: remove link to z-shell/zsh-startify (404) and remove FontAwesome icon from heading (FA kit removed from wiki) - community/gallery/collection/06_plugins.mdx: remove hyperlink from zsh-startify heading (repo no longer exists) - community/00_contributing/index.mdx: fix broken CODE_OF_CONDUCT link (z-shell/zi repo has no CODE_OF_CONDUCT.md) — use contributor-covenant.org - community/00_contributing/02_contributing_to_zi.mdx: fix same broken CODE_OF_CONDUCT link; remove link to z-shell/community guidelines (repo 404) --- community/00_contributing/02_contributing_to_zi.mdx | 3 +-- community/00_contributing/index.mdx | 2 +- community/gallery/collection/06_plugins.mdx | 2 +- ecosystem/plugins/zsh_startify.mdx | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/community/00_contributing/02_contributing_to_zi.mdx b/community/00_contributing/02_contributing_to_zi.mdx index 838c421ab..481f6a367 100644 --- a/community/00_contributing/02_contributing_to_zi.mdx +++ b/community/00_contributing/02_contributing_to_zi.mdx @@ -125,7 +125,6 @@ target `next`. ## See Also -- Code of Conduct -- Community Contributing Guidelines +- Code of Conduct - [Getting Started](getting_started) — org-wide branch and commit conventions - [Project Management](project_management) — how work is tracked across the org diff --git a/community/00_contributing/index.mdx b/community/00_contributing/index.mdx index 8f6437c55..d75cc57cc 100644 --- a/community/00_contributing/index.mdx +++ b/community/00_contributing/index.mdx @@ -30,7 +30,7 @@ Contributions are what make the Z-Shell ecosystem thrive. Whether you want to fi :::info Code of Conduct -All contributors are expected to follow our [Code of Conduct](https://github.com/z-shell/zi/blob/main/CODE_OF_CONDUCT.md). Please read it before participating. +All contributors are expected to follow our [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Please read it before participating. ::: ## Contribution Paths diff --git a/community/gallery/collection/06_plugins.mdx b/community/gallery/collection/06_plugins.mdx index 02d8ac069..6e63dd6be 100644 --- a/community/gallery/collection/06_plugins.mdx +++ b/community/gallery/collection/06_plugins.mdx @@ -178,7 +178,7 @@ zi ice lucid id-as"GitHub-notify" \ zi light z-shell/zsh-github-issues ``` -### SC: [zsh-shell/zsh-startify](https://github.com/z-shell/zsh-startify) {/* #sc-zsh-shellzsh-startify */} +### SC: zsh-shell/zsh-startify {/* #sc-zsh-shellzsh-startify */} ```zsh showLineNumbers zi ice wait lucid atload"zsh-startify" diff --git a/ecosystem/plugins/zsh_startify.mdx b/ecosystem/plugins/zsh_startify.mdx index f150c7692..63ec337eb 100644 --- a/ecosystem/plugins/zsh_startify.mdx +++ b/ecosystem/plugins/zsh_startify.mdx @@ -14,7 +14,7 @@ draft: true import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -## [z-shell/zsh-startify][] {/* #i-classfa-brands-fa-githubi-z-shellzsh-startify */} +## z-shell/zsh-startify {/* #z-shellzsh-startify */} A plugin that aims at providing what [mhinz/vim-startify][] plugin does but in Zsh. The analogy isn't fully easy to make. `vim-startify` states - it provides dynamically created headers or footers and uses configurable lists to show recently used or bookmarked files and persistent sessions. @@ -73,5 +73,4 @@ zi load z-shell/zsh-startify {/* end-of-file */} {/* links */} -[z-shell/zsh-startify]: https://github.com/z-shell/zsh-startify [mhinz/vim-startify]: https://github.com/mhinz/vim-startify From 0f3fc5081bcc69293c2bce9d14a5bff0d298ebbc Mon Sep 17 00:00:00 2001 From: ss-o Date: Sun, 17 May 2026 06:43:28 +0100 Subject: [PATCH 5/9] feat(highlight): implement zsh/zi/zunit prism grammar and token CSS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - z-shell-languages.ts: rewrite grammar using named capture groups for ESLint prefer-named-capture-group compliance; expand zsh-builtin list to 50+ builtins; rename zsh-keyword → zsh-builtin; add zsh-expansion-flag token; reorganize insertBefore calls for correct priority ordering - prism-include-languages.ts: replace manual additionalLanguages loop with clean swizzle delegation to @theme-original/prism-include-languages - custom.css: add 9-token semantic color palette (light + dark) for zsh-builtin, zsh-expansion-flag, zsh-special-parameter, zsh-glob-qualifier, zi-command keyword, zi-command subcommand function, zi-ice, zunit-command, zunit-directive, zunit-assertion; uses CSS custom properties and nested rules --- src/css/custom.css | 71 ++++++++++++++++++++++++++++ src/prism/z-shell-languages.ts | 19 ++++++-- src/theme/prism-include-languages.ts | 27 ++--------- 3 files changed, 89 insertions(+), 28 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 9e09737ff..6e22b7926 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -69,6 +69,17 @@ --duration-normal: 0.3s; --duration-slow: 0.5s; --ease-out: cubic-bezier(0.16, 1, 0.3, 1); + /* ── ZSH Prism syntax token colors (light) ── */ + --site-zsh-builtin-color: hsl(198deg 100% 32%); + --site-zsh-expansion-color: hsl(273deg 65% 42%); + --site-zsh-param-color: hsl(32deg 90% 38%); + --site-zsh-glob-color: hsl(315deg 70% 38%); + --site-zi-command-color: hsl(38deg 95% 36%); + --site-zi-subcommand-color: hsl(210deg 85% 40%); + --site-zi-ice-color: hsl(175deg 70% 28%); + --site-zunit-command-color: hsl(15deg 85% 42%); + --site-zunit-directive-color: hsl(220deg 85% 42%); + --site-zunit-assertion-color: hsl(152deg 70% 32%); color-scheme: light; } @@ -84,6 +95,17 @@ --ifm-color-primary-light: hsl(var(--site-primary-hue-saturation-light) 54%); --ifm-color-primary-lighter: hsl(var(--site-primary-hue-saturation-light) 62%); --ifm-color-primary-lightest: hsl(var(--site-primary-hue-saturation-light) 73%); + /* ── ZSH Prism syntax token colors (dark) ── */ + --site-zsh-builtin-color: hsl(198deg 100% 72%); + --site-zsh-expansion-color: hsl(288deg 85% 78%); + --site-zsh-param-color: hsl(35deg 100% 68%); + --site-zsh-glob-color: hsl(315deg 90% 72%); + --site-zi-command-color: hsl(45deg 100% 68%); + --site-zi-subcommand-color: hsl(210deg 100% 70%); + --site-zi-ice-color: hsl(175deg 80% 62%); + --site-zunit-command-color: hsl(15deg 90% 68%); + --site-zunit-directive-color: hsl(210deg 100% 72%); + --site-zunit-assertion-color: hsl(145deg 80% 62%); color-scheme: dark; } @@ -95,6 +117,55 @@ border-left: 3px solid var(--site-color-error-border); } +/* ── ZSH / Zi / ZUnit Prism token colors ── */ +:is(code[class*="language-zsh"], code[class*="language-zi"], code[class*="language-zunit"]) { + .token.zsh-builtin { + color: var(--site-zsh-builtin-color); + } + + .token.zsh-expansion-flag { + color: var(--site-zsh-expansion-color); + } + + .token.zsh-special-parameter { + color: var(--site-zsh-param-color); + } + + .token.zsh-glob-qualifier { + color: var(--site-zsh-glob-color); + } +} + +code[class*="language-zi"] { + .token.zi-command .token.keyword { + color: var(--site-zi-command-color); + font-weight: 700; + } + + .token.zi-command .token.function { + color: var(--site-zi-subcommand-color); + } + + .token.zi-ice { + color: var(--site-zi-ice-color); + } +} + +code[class*="language-zunit"] { + .token.zunit-command { + color: var(--site-zunit-command-color); + } + + .token.zunit-directive { + color: var(--site-zunit-directive-color); + font-weight: 700; + } + + .token.zunit-assertion { + color: var(--site-zunit-assertion-color); + } +} + .navbar--dark { --ifm-navbar-background-color: var(--site-color-navbar-dark); --ifm-navbar-link-hover-color: var(--ifm-color-primary); diff --git a/src/prism/z-shell-languages.ts b/src/prism/z-shell-languages.ts index 0f2cd16ba..8edc9c3c9 100644 --- a/src/prism/z-shell-languages.ts +++ b/src/prism/z-shell-languages.ts @@ -3,19 +3,28 @@ import type * as PrismNamespace from "prismjs"; export function registerZShellLanguages(Prism: typeof PrismNamespace): void { Prism.languages.zsh = Prism.languages.extend("bash", {}); - Prism.languages.insertBefore("zsh", "keyword", { - "zsh-keyword": { + // ZSH-specific builtins — inserted before 'function' so they take priority + Prism.languages.insertBefore("zsh", "function", { + "zsh-builtin": { pattern: - /(^|[\s;|&()])(?:autoload|bindkey|compdef|emulate|functions|local|print|setopt|typeset|unsetopt|zcompile|zmodload|zparseopts|zstyle)\b/, + /(?^|[\s;|&])(?:autoload|bindkey|builtin|compctl|compdump|compinit|compdef|compfiles|compgroups|compquote|comptags|comptry|compvalues|declare|dirs|disable|disown|emulate|enable|fc|float|functions|getcap|getln|getopts|history|integer|jobs|let|limit|local|log|noglob|popd|print|printf|pushd|pushln|pwd|read|readonly|sched|set|setcap|setopt|shift|source|stat|suspend|ttyctl|type|typeset|ulimit|umask|unalias|unfunction|unhash|unlimit|unset|unsetopt|vared|wait|whence|where|which|zcompile|zformat|zle|zmodload|zparseopts|zpty|zregexparse|zsocket|zstyle|ztcp)(?=\s|;|$)/, lookbehind: true, - alias: "keyword", + alias: "builtin", + }, + }); + + // Expansion flags and parameter tokens — inserted before 'variable' for priority + Prism.languages.insertBefore("zsh", "variable", { + "zsh-expansion-flag": { + pattern: /\$\{\([^)]*\)/, + alias: "attr-value", }, "zsh-special-parameter": { pattern: /\$(?:[#*@?!$]|[A-Za-z_][\w-]*|\{[^}\n]+\})/, alias: "variable", }, "zsh-glob-qualifier": { - pattern: /(^|[^\w])(?:\*\*\/)?\*[^ \n]*(?:\([^)]+\))/, + pattern: /(?^|[^\w])(?:\*\*\/)?\*[^ \n]*(?:\([^)]+\))/, lookbehind: true, alias: "operator", }, diff --git a/src/theme/prism-include-languages.ts b/src/theme/prism-include-languages.ts index 0d1106a60..190412e39 100644 --- a/src/theme/prism-include-languages.ts +++ b/src/theme/prism-include-languages.ts @@ -1,28 +1,9 @@ -import siteConfig from "@generated/docusaurus.config"; -import type * as PrismNamespace from "prismjs"; +import prismIncludeLanguagesOriginal from "@theme-original/prism-include-languages"; + import {registerZShellLanguages} from "../prism/z-shell-languages"; +import type * as PrismNamespace from "prismjs"; export default function prismIncludeLanguages(PrismObject: typeof PrismNamespace): void { - const { - themeConfig: {prism}, - } = siteConfig; - const {additionalLanguages} = prism as {additionalLanguages: string[]}; - - const PrismBefore = globalThis.Prism; - globalThis.Prism = PrismObject; - - additionalLanguages.forEach((lang) => { - if (lang === "php") { - require("prismjs/components/prism-markup-templating.js"); - } - require(`prismjs/components/prism-${lang}`); - }); - + (prismIncludeLanguagesOriginal as (p: typeof PrismNamespace) => void)(PrismObject); registerZShellLanguages(PrismObject); - - if (typeof PrismBefore === "undefined") { - delete (globalThis as Record).Prism; - } else { - globalThis.Prism = PrismObject; - } } From 24c7516a6f7de3a0d28250e93ae444b9106c775e Mon Sep 17 00:00:00 2001 From: ss-o Date: Sun, 17 May 2026 07:17:14 +0100 Subject: [PATCH 6/9] fix(docs): fix admonition titles and lychee exclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Convert space-separated admonition titles to bracket syntax (MDX v3 requirement): :::note Title -> :::note[Title] in 4 files - Add z-shell/zsh-startify to lychee exclude list — repo is archived/removed and is referenced in existing docs on the target (next) branch; Trunk checks both PR and base versions, causing false CI failures --- .trunk/configs/.lychee.toml | 3 +++ community/00_contributing/02_contributing_to_zi.mdx | 2 +- community/00_contributing/04_contributing_docs.mdx | 2 +- community/00_contributing/index.mdx | 2 +- community/03_zunit/01_installation.mdx | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.trunk/configs/.lychee.toml b/.trunk/configs/.lychee.toml index a40b0abc1..88b5571e2 100644 --- a/.trunk/configs/.lychee.toml +++ b/.trunk/configs/.lychee.toml @@ -115,6 +115,9 @@ exclude = [ # Asciinema (embeds, not navigational links) 'https://asciinema\.org', + + # Archived/removed z-shell repositories that are referenced in docs for historical context + 'https://github\.com/z-shell/zsh-startify', ] # Exclude paths from being checked (regex patterns) diff --git a/community/00_contributing/02_contributing_to_zi.mdx b/community/00_contributing/02_contributing_to_zi.mdx index 481f6a367..b906f4fb4 100644 --- a/community/00_contributing/02_contributing_to_zi.mdx +++ b/community/00_contributing/02_contributing_to_zi.mdx @@ -94,7 +94,7 @@ docs(ci): document workflow trigger conditions ## What Not to Add to Zi -:::warning Off-limits +:::warning[Off-limits] - `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, or any AI-specific config files - Secrets, credentials, or tokens of any kind - Files unrelated to the plugin manager itself diff --git a/community/00_contributing/04_contributing_docs.mdx b/community/00_contributing/04_contributing_docs.mdx index de9263dc8..36bd7cc6f 100644 --- a/community/00_contributing/04_contributing_docs.mdx +++ b/community/00_contributing/04_contributing_docs.mdx @@ -161,7 +161,7 @@ Use absolute URLs only for external resources. 3. Run `pnpm build:en` to catch broken links and MDX errors 4. Open a PR targeting `next` -:::warning Never edit `i18n/` files directly +:::warning[Never edit `i18n/` files directly] Translation files under `i18n/` are managed exclusively through [Crowdin](https://translate.zshell.dev). Manual edits will be overwritten on the next sync. ::: diff --git a/community/00_contributing/index.mdx b/community/00_contributing/index.mdx index d75cc57cc..3c0b68e25 100644 --- a/community/00_contributing/index.mdx +++ b/community/00_contributing/index.mdx @@ -29,7 +29,7 @@ Contributions are what make the Z-Shell ecosystem thrive. Whether you want to fi /> -:::info Code of Conduct +:::info[Code of Conduct] All contributors are expected to follow our [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Please read it before participating. ::: diff --git a/community/03_zunit/01_installation.mdx b/community/03_zunit/01_installation.mdx index b7af83cce..a9311513d 100644 --- a/community/03_zunit/01_installation.mdx +++ b/community/03_zunit/01_installation.mdx @@ -86,7 +86,7 @@ zunit init --github-actions See [Configuration](./05_configuration.mdx) for the `.zunit.yml` key reference and [CI Integration](./06_ci.mdx) for the generated workflow details. -:::note Legacy package-manager recipes +:::note[Legacy package-manager recipes] Older recipes may reference historical coordinates such as `zunit-zsh/zunit` or `zdharma/zunit`. These are not the canonical source. Prefer the manual From e3f3e0d5b1c1b3dc41d87509dbd314833f768216 Mon Sep 17 00:00:00 2001 From: ss-o Date: Sun, 17 May 2026 07:53:29 +0100 Subject: [PATCH 7/9] fix(ci): correct build-script for compressed-size-action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The action prepends 'pnpm run' to the build-script value, so passing 'pnpm build:en' ran 'pnpm run pnpm build:en' — a non-existent script. Change to the bare script name 'build:en' so the action runs 'pnpm run build:en' correctly. --- .github/workflows/ci-perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-perf.yml b/.github/workflows/ci-perf.yml index d7d3917c1..490ef7507 100644 --- a/.github/workflows/ci-perf.yml +++ b/.github/workflows/ci-perf.yml @@ -59,7 +59,7 @@ jobs: - uses: preactjs/compressed-size-action@v3 with: install-script: pnpm i --frozen-lockfile - build-script: "pnpm build:en" + build-script: "build:en" pattern: "{build/assets/js/*.js,build/assets/css/*.css,build/**/*.html,.docusaurus/globalData.json,build/blog/**/swiss-army-knife-for-zsh/*}" exclude: "{./build/manifest.json,./build/**/*.xml,**/*.map,**/node_modules/**,build/assets/**/*.ttf}" strip-hash: '\.([^;]\w{7})\.' From 538a7dcc133aa5417c76761c12da021bba73b25a Mon Sep 17 00:00:00 2001 From: ss-o Date: Sun, 17 May 2026 08:05:57 +0100 Subject: [PATCH 8/9] fix(highlight): correct CSS selector and override inline Prism theme colors prism-react-renderer applies inline style="color:..." to token spans using the Dracula/GitHub theme's alias colors, which beats plain CSS rules. Two fixes: - Selector: token colors were targeting but Docusaurus puts language-* on
; change to pre.language-* selectors.
- Override: add !important to all custom token color declarations so
  they win over the inline styles.

Also migrate z-shell/community membership links to z-shell/.github
(community repo is private; .github has the same 05_membership.yml
template and public issues enabled).
---
 community/00_contributing/index.mdx |  2 +-
 community/99_contributors.mdx       |  2 +-
 src/css/custom.css                  | 30 +++++++++++++++--------------
 3 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/community/00_contributing/index.mdx b/community/00_contributing/index.mdx
index 3c0b68e25..b05f72eda 100644
--- a/community/00_contributing/index.mdx
+++ b/community/00_contributing/index.mdx
@@ -66,7 +66,7 @@ Choose the path that matches what you want to do:
 
 | Action | Link |
 | --- | --- |
-| 👥 Join the team | [Open a membership request](https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+) |
+| 👥 Join the team | [Open a membership request](https://github.com/z-shell/.github/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=05_membership.yml&title=team%3A+) |
 | 🌐 Translate | [translate.zshell.dev](https://translate.zshell.dev) |
 | 📋 Project tracker | [Z-Shell Tracker](https://github.com/orgs/z-shell/projects/28) |
 | 💬 Discuss | [GitHub Discussions](https://github.com/z-shell/zi/discussions) |
diff --git a/community/99_contributors.mdx b/community/99_contributors.mdx
index 7b53b5a7c..f64380dc5 100644
--- a/community/99_contributors.mdx
+++ b/community/99_contributors.mdx
@@ -28,7 +28,7 @@ import ThemedImage from "@theme/ThemedImage";
 
 Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated, our target support each other, and the projects we love .
 
-> To participate or support the project consider  joining ,  translating , and sharing .
+> To participate or support the project consider  joining ,  translating , and sharing .
 
 ##  General {/* #i-classfa-solid-fa-awardi-general */}
 
diff --git a/src/css/custom.css b/src/css/custom.css
index 6e22b7926..a52a242bd 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -117,52 +117,54 @@
   border-left: 3px solid var(--site-color-error-border);
 }
 
-/* ── ZSH / Zi / ZUnit Prism token colors ── */
-:is(code[class*="language-zsh"], code[class*="language-zi"], code[class*="language-zunit"]) {
+/* ── ZSH / Zi / ZUnit Prism token colors ──
+ * Selectors target 
 (not ).
+ * !important overrides inline style="color:..." set by prism-react-renderer. */
+:is(pre.language-zsh, pre.language-zi, pre.language-zunit) {
   .token.zsh-builtin {
-    color: var(--site-zsh-builtin-color);
+    color: var(--site-zsh-builtin-color) !important;
   }
 
   .token.zsh-expansion-flag {
-    color: var(--site-zsh-expansion-color);
+    color: var(--site-zsh-expansion-color) !important;
   }
 
   .token.zsh-special-parameter {
-    color: var(--site-zsh-param-color);
+    color: var(--site-zsh-param-color) !important;
   }
 
   .token.zsh-glob-qualifier {
-    color: var(--site-zsh-glob-color);
+    color: var(--site-zsh-glob-color) !important;
   }
 }
 
-code[class*="language-zi"] {
+pre.language-zi {
   .token.zi-command .token.keyword {
-    color: var(--site-zi-command-color);
+    color: var(--site-zi-command-color) !important;
     font-weight: 700;
   }
 
   .token.zi-command .token.function {
-    color: var(--site-zi-subcommand-color);
+    color: var(--site-zi-subcommand-color) !important;
   }
 
   .token.zi-ice {
-    color: var(--site-zi-ice-color);
+    color: var(--site-zi-ice-color) !important;
   }
 }
 
-code[class*="language-zunit"] {
+pre.language-zunit {
   .token.zunit-command {
-    color: var(--site-zunit-command-color);
+    color: var(--site-zunit-command-color) !important;
   }
 
   .token.zunit-directive {
-    color: var(--site-zunit-directive-color);
+    color: var(--site-zunit-directive-color) !important;
     font-weight: 700;
   }
 
   .token.zunit-assertion {
-    color: var(--site-zunit-assertion-color);
+    color: var(--site-zunit-assertion-color) !important;
   }
 }
 

From 282ec52419100ef4182e8093f0312fadfc12e794 Mon Sep 17 00:00:00 2001
From: ss-o 
Date: Sun, 17 May 2026 11:11:42 +0100
Subject: [PATCH 9/9] =?UTF-8?q?fix(highlight):=20flatten=20CSS=20selectors?=
 =?UTF-8?q?=20=E2=80=94=20Docusaurus=20pipeline=20strips=20CSS=20nesting?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Nested rules inside :is() and block selectors were mangled by the build,
producing invalid CSS like `.language-zsh,...) .token.zsh-builtin` with
the `pre` and `:is(` prefix stripped. Flattened all token color rules to
standard descendant selectors which the pipeline processes correctly.
---
 src/css/custom.css | 67 +++++++++++++++++++++-------------------------
 1 file changed, 31 insertions(+), 36 deletions(-)

diff --git a/src/css/custom.css b/src/css/custom.css
index a52a242bd..846ff87be 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -119,53 +119,48 @@
 
 /* ── ZSH / Zi / ZUnit Prism token colors ──
  * Selectors target 
 (not ).
- * !important overrides inline style="color:..." set by prism-react-renderer. */
-:is(pre.language-zsh, pre.language-zi, pre.language-zunit) {
-  .token.zsh-builtin {
-    color: var(--site-zsh-builtin-color) !important;
-  }
+ * !important overrides inline style="color:..." set by prism-react-renderer.
+ * Flat selectors required — Docusaurus CSS pipeline does not support CSS nesting. */
+:is(pre.language-zsh, pre.language-zi, pre.language-zunit) .token.zsh-builtin {
+  color: var(--site-zsh-builtin-color) !important;
+}
 
-  .token.zsh-expansion-flag {
-    color: var(--site-zsh-expansion-color) !important;
-  }
+:is(pre.language-zsh, pre.language-zi, pre.language-zunit) .token.zsh-expansion-flag {
+  color: var(--site-zsh-expansion-color) !important;
+}
 
-  .token.zsh-special-parameter {
-    color: var(--site-zsh-param-color) !important;
-  }
+:is(pre.language-zsh, pre.language-zi, pre.language-zunit) .token.zsh-special-parameter {
+  color: var(--site-zsh-param-color) !important;
+}
 
-  .token.zsh-glob-qualifier {
-    color: var(--site-zsh-glob-color) !important;
-  }
+:is(pre.language-zsh, pre.language-zi, pre.language-zunit) .token.zsh-glob-qualifier {
+  color: var(--site-zsh-glob-color) !important;
 }
 
-pre.language-zi {
-  .token.zi-command .token.keyword {
-    color: var(--site-zi-command-color) !important;
-    font-weight: 700;
-  }
+pre.language-zi .token.zi-command .token.keyword {
+  color: var(--site-zi-command-color) !important;
+  font-weight: 700;
+}
 
-  .token.zi-command .token.function {
-    color: var(--site-zi-subcommand-color) !important;
-  }
+pre.language-zi .token.zi-command .token.function {
+  color: var(--site-zi-subcommand-color) !important;
+}
 
-  .token.zi-ice {
-    color: var(--site-zi-ice-color) !important;
-  }
+pre.language-zi .token.zi-ice {
+  color: var(--site-zi-ice-color) !important;
 }
 
-pre.language-zunit {
-  .token.zunit-command {
-    color: var(--site-zunit-command-color) !important;
-  }
+pre.language-zunit .token.zunit-command {
+  color: var(--site-zunit-command-color) !important;
+}
 
-  .token.zunit-directive {
-    color: var(--site-zunit-directive-color) !important;
-    font-weight: 700;
-  }
+pre.language-zunit .token.zunit-directive {
+  color: var(--site-zunit-directive-color) !important;
+  font-weight: 700;
+}
 
-  .token.zunit-assertion {
-    color: var(--site-zunit-assertion-color) !important;
-  }
+pre.language-zunit .token.zunit-assertion {
+  color: var(--site-zunit-assertion-color) !important;
 }
 
 .navbar--dark {