Updated formatting of the documentation

zrep 2024-04-06 09:31:41 +02:00
parent 757dcfa6d0
commit 289a67644d
4 changed files with 21 additions and 21 deletions

10
Home.md

@ -2,14 +2,14 @@
Welcome to the official Wiki for [zpi](https://git.kekepower.com/kekePower/zpi), a comprehensive Zsh Repository Tool designed to enhance your Zsh experience. Developed with flexibility and ease of use in mind, `zpi` allows for the efficient management of Zsh functions, scripts, and addons.
`zpi` is meant to be used on a per user basis and not globally. This means that you, the user, have full control over what is installed and activated.
**zpi** is meant to be used on a per user basis and not globally. This means that you, the user, have full control over what is installed and activated.
## Features
- **Version Control:** Easily track the version of your `zpi` installation with a straightforward versioning system.
- **Dynamic Function Path Management:** Automatically adds directories containing at least one file to `fpath`.
- **Version Control:** Easily track the version of your **zpi** installation with a straightforward versioning system.
- **Dynamic Function Path Management:** Automatically adds directories containing at least one file to **fpath**.
- **Modular Design:** Supports the installation, removal, and management of Zsh addons and scripts.
- **Configuration via `.zreprc`:** Customizable settings through a dedicated configuration file.
- **Configuration via _.zreprc_:** Customizable settings through a dedicated configuration file.
## How it all works
@ -36,4 +36,4 @@ To create you own scripts, follow this How-to.
## License
`zpi` is licensed under the [MIT License](https://git.kekepower.com/kekePower/zpi/src/branch/main/LICENSE).
**zpi** is licensed under the [MIT License](https://git.kekepower.com/kekePower/zpi/src/branch/main/LICENSE).

@ -2,15 +2,15 @@
### Installation
1. Clone the `zpi` [repository](https://git.kekepower.com/kekePower/zpi) to your local machine.
2. Run the script with `zpi init` to initialize the installation process.
3. Copy or sym link zrep to a directory in your `PATH`. I use `$HOME/bin/`.
- Clone the **zpi** [repository](https://git.kekepower.com/kekePower/zpi) to your local machine.
- Run the script with **zpi init** to initialize the installation process.
- Copy or sym link zrep to a directory in your **PATH**. I use **$HOME/bin/**.
### Configuration
Upon first run, `zpi` will prompt you to specify the installation directory, defaulting to `$HOME/.zrep` if left unspecified. This path will be used to store scripts, functions, and configuration files.
Upon first run, **zpi** will prompt you to specify the installation directory, defaulting to **$HOME/.zrep** if left unspecified. This path will be used to store scripts, functions, and configuration files.
### `.zreprc` Configuration
### .zreprc Configuration
The `.zreprc` file located in your home directory (`$HOME/.zreprc`) contains all configurable settings for `zpi`. Initially, this file will include the installation directory path. You can edit this file to adjust `zpi` settings to your liking.
The **.zreprc** file located in your home directory (**$HOME/.zreprc**) contains all configurable settings for **zpi**. Initially, this file will include the installation directory path. You can edit this file to adjust **zpi** settings to your liking.

@ -4,11 +4,11 @@
### Basic Commands
- `zpi init`: Initializes `zpi`, setting up necessary directories and configuration files.
- `zpi install <author/package>`: Installs a specified package.
- `zpi remove <author/package>`: Removes a specified package.
- `zpi enable <author/package>`: Enables a package, adding it to your `fpath`.
- `zpi disable <author/package>`: Disables a package, removing it from your `fpath`.
- `zpi list`: Lists all installed packages along with their status (active/inactive).
- `zpi <author/package> help`: Show the included usage information for package.
- **zpi init**: Initializes **zpi**, setting up necessary directories and configuration files.
- **zpi install <author/package>**: Installs a specified package.
- **zpi remove <author/package>**: Removes a specified package.
- **zpi enable <author/package>**: Enables a package, adding it to your **fpath**.
- **zpi disable <author/package>**: Disables a package, removing it from your **fpath**.
- **zpi list**: Lists all installed packages along with their status (active/inactive).
- **zpi <author/package> help**: Show the included usage information for package.

@ -1,11 +1,11 @@
# Zsh and autoload
The main function behind `zrep` is Zsh's autoload feature. It searches through a variable called `fpath` and anything in this path can be loaded and used.
The main function behind **zrep** is Zsh's autoload feature. It searches through a variable called **fpath** and anything in this path can be loaded and used.
`autoload` loads the contents of the files, so it usually contains a function. It is the function that gets executed by Zsh when the command is used, not the file itself.
**autoload** loads the contents of the files, so it usually contains a function. It is the function that gets executed by Zsh when the command is used, not the file itself.
As far as I know, Zsh allows for nested functions, meaning you can have functions within functions.
You can see an example in my [update-dynamic-ip](https://zrep.kekepower.com/source/kekePower/update-dynamic-ip) script.
Zsh lazy loads the files in `fpath` and this means that it's not in memory until you actually executes the function.
Zsh lazy loads the files in **fpath** and this means that it's not in memory until you actually executes the function.
This means that it won't have an effect on your shell in terms of speed or memory usage.