Skip to content

Commit

Permalink
bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-o committed Jun 23, 2024
1 parent d8617a5 commit 9d56be1
Show file tree
Hide file tree
Showing 17 changed files with 9,834 additions and 7,443 deletions.
1 change: 1 addition & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
plugins
user_trunk.yaml
user.yaml
tmp
2 changes: 1 addition & 1 deletion .trunk/setup-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
- name: ⎔ Setup node
uses: actions/[email protected]
with:
node-version: 'lts/*'
node-version: "lts/*"
cache: "pnpm"
- name: 🏗 Prepare
shell: bash
Expand Down
41 changes: 20 additions & 21 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
version: 0.1
cli:
version: 1.18.1
repo:
repo:
host: github.com
owner: z-shell
name: wiki
version: 1.22.2
plugins:
sources:
- id: trunk
uri: https://github.com/trunk-io/plugins
ref: v1.4.1
ref: v1.6.0
merge:
required_statuses:
- Trunk Check
Expand All @@ -25,17 +20,17 @@ lint:
- yamllint
- shellcheck
enabled:
- sort-package-json@2.6.0
- sort-package-json@2.10.0
- [email protected]
- oxipng@9.0.0
- svgo@3.1.0
- stylelint@16.1.0
- oxipng@9.1.1
- svgo@3.3.2
- stylelint@16.6.1
- git-diff-check@SYSTEM
- actionlint@1.6.26
- eslint@8.56.0
- [email protected].1
- markdownlint@0.38.0
- prettier@3.1.1
- actionlint@1.7.1
- eslint@8.57.0
- [email protected].4
- markdownlint@0.41.0
- prettier@3.3.2
- [email protected]
- [email protected]
ignore:
Expand All @@ -54,15 +49,19 @@ lint:
- linters: [markdownlint]
paths:
- src/components/Markdown/*
runtimes:
enabled:
- [email protected]
- [email protected]
- [email protected]
actions:
enabled:
- trunk-upgrade-available
- trunk-fmt-pre-commit
- trunk-check-pre-push
- trunk-cache-prune
- trunk-announce
tools:
enabled:
runtimes:
- python
runtimes:
enabled:
- [email protected]
- [email protected]
- [email protected]
6 changes: 3 additions & 3 deletions community/02_zsh_plugin_standard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ When you set e.g.: the `zsh` emulation in a function, you in general don’t hav

> [ functions-directory ]
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](#indicator):
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
if [[ ${zsh_loaded_plugins[-1]} != */kalc && -z ${fpath[(r)${0:h}/functions]} ]]; then
fpath+=( "${0:h}/functions" )
fi
```

or, via the use of the `PMSPEC` [parameter](#pmspec):
or, via the use of the `PMSPEC` [parameter](#global-parameter-with-capabilities):

```shell showLineNumbers
if [[ $PMSPEC != *f* ]]; then
Expand Down Expand Up @@ -441,7 +441,7 @@ The proposition of the standard prefixes is as follows:
4. `/`: for debugging functions, i.e.: for functions that output debug messages to the screen or a log or e.g.: gather some debug data. **Note:** The slash makes it impossible for such functions to be auto-loaded via the `autoload` mechanism. It is somewhat risky to assume, that this will never be needed for the functions, however, the limited number of available ASCII characters justifies such allocation. Example function name: `/prompt_zinc_dmsg`.
5. `@`: for API-like functions, i.e.: for functions that are on a boundary to a subsystem and expose their functionality through a well-defined, generally fixed interface. For example, this plugin standard [defines](#update-register-call) the function `@zsh-plugin-run-on-update`, which exposes a plugin manager’s functionality in a well-defined way.
5. `@`: for API-like functions, i.e.: for functions that are on a boundary to a subsystem and expose their functionality through a well-defined, generally fixed interface. For example, this plugin standard [defines](#run-on-update-call) the function `@zsh-plugin-run-on-update`, which exposes a plugin manager’s functionality in a well-defined way.
## Example code utilizing the prefixes
Expand Down
2 changes: 1 addition & 1 deletion community/03_zsh_native_scripting_handbook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ local needle="?" required_preceding='[[:space:]]#'
[[ "$(svn status)" = *((#s)|$nl)${~required_preceding}${needle}* ]] && echo found
```

It does a single fork (called` svn` status). The `${~variable}` means (the`~` init): "the variable is holding a pattern, interpret it". All in all, instead of regular expressions we were using patterns (globs) (see [this section](#built-in-regular-expressions-engine)).
It does a single fork (called` svn` status). The `${~variable}` means (the`~` init): "the variable is holding a pattern, interpret it". All in all, instead of regular expressions we were using patterns (globs) (see [this section](#using-built-in-regular-expressions-engine)).

### Pattern matching in AND-fashion

Expand Down
6 changes: 3 additions & 3 deletions community/gallery/collection/03_programs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,11 @@ zi for as'program' nocompile'!' depth'1' \
[compiling-programs]: /docs/guides/syntax/standard#compiling-programs
[customizing-paths]: /docs/guides/customization#customizing-paths
[for-syntax]: /docs/guides/syntax/for
[ice-modifiers-by-bin-gem-node]: /ecosystem/annexes/bin-gem-node#the-ice-modifiers-provided-by-the-annex
[ice-modifiers-by-bin-gem-node]: /ecosystem/annexes/bin-gem-node
[ice-modifiers]: /docs/guides/syntax/ice-modifiers
[standard-syntax]: /docs/guides/syntax/standard
[make-syntax]: /docs/guides/syntax/standard#the-make-syntax
[turbo-and-lucid]: /docs/getting_started/overview/#turbo--lucid
[make-syntax]: /docs/guides/syntax/standard#utilizing-make
[turbo-and-lucid]: /docs/getting_started/overview#turbo-mode--lucid
[bin-gem-node]: /ecosystem/annexes/bin-gem-node

<!-- external-links -->
Expand Down
4 changes: 2 additions & 2 deletions community/gallery/collection/06_plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ zi wait lucid for \
<!-- end-of-file -->
<!-- links -->

[3]: /docs/getting_started/overview#turbo--lucid
[3]: /docs/getting_started/overview#turbo-mode--lucid
[4]: /docs/guides/syntax/for
[5]: /docs/guides/syntax/standard
[6]: /docs/guides/syntax/ice-modifiers
[7]: /docs/guides/syntax/standard#compiling-programs
[8]: /docs/guides/customization#customizing-paths
[9]: /ecosystem/annexes/bin-gem-node#the-ice-modifiers-provided-by-the-annex
[9]: /ecosystem/annexes/bin-gem-node

<!-- external -->

Expand Down
25 changes: 11 additions & 14 deletions docs/getting_started/01_installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ if [[ -r "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" ]]; then
fi
```

:::tip

The loader can be manually fetched from available [links](#loader) to any location on the system, and sourced from <kbd>.zshrc</kbd> or as shown in the [quick-setup](#quick-setup).

:::

Then reload the shell with: `exec zsh`. All done!

</TabItem>
Expand Down Expand Up @@ -97,6 +91,8 @@ sh -c "$(curl -fsSL get.zshell.dev)" -- -a zunit

:::

### <i class="fas fa-spinner fa-spin"></i> Prepare

Set up the install location and create a directory:

```shell showLineNumbers
Expand All @@ -116,6 +112,8 @@ compaudit | xargs chmod -R go-w "$ZI[HOME_DIR]"
command git clone https://github.com/z-shell/zi.git "$ZI[BIN_DIR]"
```

### <i class="fas fa-spinner fa-spin"></i> Enable

To enable Zi, source the <kbd>zi.zsh</kbd> from the previously set up directory placing the following snippet in the <kbd>.zshrc</kbd> file:

```shell title="~/.zshrc" showLineNumbers
Expand All @@ -124,14 +122,16 @@ ZI[BIN_DIR]="${HOME}/.zi/bin"
source "${ZI[BIN_DIR]}/zi.zsh"
```

### <i class="fas fa-spinner fa-spin"></i> Completions {#enable-zi-completions}

Enable Zi completions by placing the following snippet in the <kbd>.zshrc</kbd> file:

:::caution

The two lines below must be placed after the lines above, i.e. after enabling Zi.
The snippet below must be placed after after enabling Zi.

:::

Enable Zi completions:

```shell title="~/.zshrc" showLineNumbers
autoload -Uz _zi
(( ${+_comps} )) && _comps[zi]=_zi
Expand Down Expand Up @@ -188,7 +188,8 @@ RUN zsh -i -c -- '@zi-scheduler burst || true'

The module transparently and automatically compiles sourced scripts and lists of all sourced files with the time the sourcing took in milliseconds on the left.

- [⚙️ Wiki: zpmod][zpmod-page]
- [⚙️ Wiki: zpmod][zpmod-page]

- [📦 Source: zpmod][z-shell/zpmod]

## <i class="fas fa-sync-alt fa-spin"></i> Available links {#available-links}
Expand All @@ -199,17 +200,13 @@ The module transparently and automatically compiles sourced scripts and lists of

| Service | URL |
| :--------- | ----------------------------------------------------------------------- |
| Redirect | https://get.zshell.dev |
| Cloudflare | https://src.zshell.dev/sh/install.sh |
| Git.io | https://git.io/get-zi |
| GitHub RAW | https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh |

### <i class="fa-brands fa-superpowers"></i> Loader {#loader}

| Service | URL |
| :--------- | ---------------------------------------------------------------------- |
| Redirect | https://init.zshell.dev |
| Cloudflare | https://src.zshell.dev/zsh/init.zsh |
| Git.io | https://git.io/zi-loader |
| GitHub RAW | https://raw.githubusercontent.com/z-shell/zi-src/main/lib/zsh/init.zsh |

Expand Down
5 changes: 4 additions & 1 deletion docs/guides/01_commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,19 @@ Following commands are passed to `zi …` to obtain described effects.
| `-h, help` | Usage information. |
| `man` | Manual. |

## Commands available using <kbd>^TAB</kbd> <Link to="/docs/getting_started/installation#enable-completions">completion</Link>
## Commands available using <kbd>^TAB</kbd> <Link to="/docs/getting_started/installation#enable-zi-completions">completion</Link>

<ZiTabCompletion />

<!-- end-of-file -->
<!-- footnotes -->

[^1]: There's also `light-mode` ice which can be used to induce the no-investigating (i.e.: _light_) loading, regardless of the command used.

[^2]: The URL can use the following shorthands: `PZT::` (Prezto), `PZTM::` (Prezto module), `OMZ::` (Oh-My-Zsh), `OMZP::` (OMZ plugin), `OMZL::` (OMZ library), `OMZT::` (OMZ theme), e.g.: `PZTM::environment`, `OMZP::git`, etc.

[^3]: The `'…'` can be an absolute path, i.e.: it's possible to also add regular directories. If the option `-f` or `--front` is given, the directory path is prepended instead of appended to `$fpath`.

[^4]: If the option `-l` will be given then the plugin should be skipped the option will cause the previous plugin to be reused.

<!-- links -->
Expand Down
9 changes: 6 additions & 3 deletions docs/guides/syntax/01_standard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The `make'…'` ice could also be: `make"install PREFIX=$ZPFX"`, if "install" wo

:::info

[$ZPFX][zpfx] is provided by Zi, it is set to `~/.zi/polaris` by default. However, it can be changed by specifying the `$ZPFX=` target.
[$ZPFX][global-parameter-with-prefix] is provided by Zi, it is set to `~/.zi/polaris` by default. However, it can be changed by specifying the `$ZPFX=` target.

:::

Expand Down Expand Up @@ -175,7 +175,7 @@ zi light vim/vim
</APITable>
```

The same but with **installation** (`make install`) under [$ZPFX][zpfx] by default:
The same but with **installation** (`make install`) under [$ZPFX][global-parameter-with-prefix] by default:

```shell showLineNumbers
zi ice as'program' atclone'rm -f src/auto/config.cache; \
Expand Down Expand Up @@ -763,16 +763,19 @@ As it can be seen, the creation of four additional Zle-widgets has been recorded
<!-- footnotes -->

[^1]: Save it to a file. The `atclone'…'` is being run on the **installation** while the `atpull'…'` hook is being run on an **update** of the [**trapd00r/LS_COLORS**][trapd00r-ls_colors] plugin.

[^2]: The `%atclone` is just a special string that denotes the `atclone'…'` hook and is copied onto the `atpull'…'` hook.

[^3]: Note that `atload'…'` uses apostrophes, not double quotes, to put `$f` into the string, `atload'…'`'s code is automatically being run **within the snippet's or plugin's directory**.

[^4]: Unless you load a plugin (not a snippet) with `zi load …` and prepend the value of the ice with an exclamation mark. Example: `atload'!local f; for …'`.

<!-- links -->

[for-syntax]: /docs/guides/syntax/for
[ice-mods]: /docs/guides/syntax/ice-modifiers
[exclamation]: /search?q=exclamation+mark
[zpfx]: /docs/guides/customization#$ZPFX
[global-parameter-with-prefix]: /community/zsh_plugin_standard#global-parameter-with-prefix
[multiple-prompts]: /docs/guides/customization#multiple-prompts

<!-- external -->
Expand Down
1 change: 1 addition & 0 deletions docs/guides/syntax/02_for.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ However, in practice, you just have to ensure that such plugin is loaded after p
<!-- footnotes -->

[^1]: Then the tracking of plugin, activity report gathering, accessible via the `zi report {plugin-name}` subcommand) is being disabled. Note that for turbo mode, the performance gains are almost `0`, so in this mode, you can load all plugins with the tracking and the `light-mode` ice can be removed from the command.

[^2]: They were recorded and `compinit` can be called later. `compinit` provides the `compdef` function, so it must be run before issuing the taken-over `compdef`s with `zicdreplay`.

<!-- links -->
Expand Down
15 changes: 12 additions & 3 deletions docs/guides/syntax/03_ice_modifiers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The <strong>ice</strong> is something that melts in a drink, though in Zi syntax

:::

An ice-modifiers are [passed][alternate-syntax] to `zi ice …` to obtain described effects, additionally can be added with [annexes][12]. To see all available ice-modifiers run `zi icemods`.
An ice-modifiers are [passed][zi-syntax] to `zi ice …` to obtain described effects, additionally can be added with [annexes][12]. To see all available ice-modifiers run `zi icemods`.

Some ice-modifiers are highlighted and clicking on them will take you to the appropriate Wiki page for an extended explanation. You may safely assume that given ice works with both plugins and snippets unless explicitly stated otherwise.

Expand Down Expand Up @@ -185,14 +185,23 @@ Some ice-modifiers are highlighted and clicking on them will take you to the app
<!-- footnotes -->

[^1]: This pattern will alphabetically match and choose the first file e.g: `zi ice pick"*.plugin.zsh"; zi load …`.

[^2]: Example: `multisrc'misc.zsh grep.zsh'` and also using brace-expansion syntax: `multisrc'{misc,grep}.zsh'` also supports patterns.

[^3]: For `wait'[[ ]]'`, `wait'(( ))'`, loading is done when given condition is meet. For `wait'!…'`, the prompt is reset after load. Zsh can start 80% (i.e.: 5x) faster thanks to postponed loading. **Fact:** when `wait` is used without a value, it works as `wait'0'`.

[^4]: It will load once, the condition can be still true, but will not trigger the second load, unless the plugin is unloaded earlier, see `unload`. E.g.: `load'[[ $PWD = */github* ]]'`.

[^5]: It will unload once, then only if loaded again e.g: `unload'[[ $PWD != */github* ]]'`.

[^6]: Example: `zi ice if'[[ -n "$commands[otool]" ]]'; zi load …` or `zi ice if'[[ $OSTYPE = darwin* ]]'; zi load …`.

[^7]: To use the option, precede the ice content with `!` to automatically forward the call afterward, to a command of the same name as the function. Can obtain multiple functions to create separate with `;`.

[^8]: The third possible value is `as"null"` a shorthand for `pick"/dev/null" nocompletions` i.e.: it disables the default script-file sourcing and also the installation of completions.

[^9]: In summary, `wrap` allows to extend the investigating beyond the moment of loading of a plugin. An example use is to `wrap` a precmd function of a prompt (like `_p9k_precmd()` of powerlevel10k) or other plugins that _postpones its initialization till the first prompt_ (like e.g.: zsh-autosuggestions). **Does not work with snippets.**

[^10]: If it has no value, then it works in the _auto_ mode it automatically extracts all files of known archive extensions IF they aren't located deeper than in a sub-directory (this is to prevent extraction of some helper archive files, typically located somewhere deeper in the tree). If no such files will be found, then it extracts all found files of known **type** the type is being read by the `file` Unix command. If not empty, then takes the names of the files to extract. Refer to the Wiki page for further information.

<!-- end-of-file -->
Expand All @@ -202,12 +211,12 @@ Some ice-modifiers are highlighted and clicking on them will take you to the app
[9]: /docs/guides/syntax/standard#wrap
[10]: /docs/guides/syntax/standard#extract
[12]: /ecosystem/annexes/overview
[alternate-syntax]: /docs/guides/syntax/standard#the-alternative-syntaxes
[zi-syntax]: /docs/category/%EF%B8%8F-syntax
[1]: /docs/guides/syntax/standard#src-pick-multisrc
[2]: /docs/guides/syntax/standard#wait
[3]: /docs/guides/customization#multiple-prompts
[4]: /docs/guides/syntax/standard#atclone-atpull-atinit-atload
[5]: /docs/guides/syntax/standard#the-make-syntax
[5]: /docs/guides/syntax/standard#utilizing-make
[6]: /docs/guides/syntax/standard#id-as

<!-- external -->
Expand Down
Loading

0 comments on commit 9d56be1

Please sign in to comment.