Compare commits
54 Commits
cd6e4c51b5
...
v0.0.7
Author | SHA1 | Date | |
---|---|---|---|
ae6becb2cc | |||
8ea89b837b | |||
e37233009c | |||
6399a20ed1 | |||
2e0d42c040 | |||
8f34150a78 | |||
c4c384c799 | |||
d0fed1720e | |||
c3962c72a0 | |||
255649a53e | |||
a64e876b7d | |||
a50a99183b | |||
fcf519dd68 | |||
dd518d733b | |||
7243ae4235 | |||
3345f78b7a | |||
ba1829953c | |||
03adceec67 | |||
7da1c425f4 | |||
3830e58ebb | |||
4337b13a28 | |||
e314131622 | |||
b160120893 | |||
d4e355cf32 | |||
c297c2a551 | |||
c92eb49c05 | |||
17355e5779 | |||
53bd010da6 | |||
de3bb15662 | |||
17c9058be5 | |||
d0210580b1 | |||
40adc05b9b | |||
a492260ec9 | |||
de29949486 | |||
7ddcd309c5 | |||
548012d7cc | |||
4d249d2bf1 | |||
849d4e46a4 | |||
77eb36815b | |||
02ae618bf1 | |||
dbc9a8b6dd | |||
2ebb0fd3b7 | |||
cb15f80042 | |||
4b6eb5734c | |||
d7e0a5ec4c | |||
5562ae7986 | |||
5f7c437701 | |||
e3ee9e49a9 | |||
d1f2b04d5b | |||
469ff49206 | |||
bc1c7f4e4f | |||
ad7ef3d777 | |||
720fc65095 | |||
588848b644 |
40
README.md
40
README.md
@ -1,3 +1,39 @@
|
|||||||
# zrep
|
<img src="zrep-logo.png" width="150" align="left">
|
||||||
|
|
||||||
The Zsh Repository tool, akin to PyPi and pip
|
# Zsh Repository Tool (zrep)
|
||||||
|
|
||||||
|
zrep is a powerful and user-friendly package manager for the Zsh shell. It allows you to easily install, manage, and share Zsh packages, such as plugins, themes, and scripts, directly from a central repository.
|
||||||
|
|
||||||
|
## What is it?
|
||||||
|
|
||||||
|
`zrep` in and of itself is the command line tool that you use to install and manage scripts that are placed in `$fpath` used by Zsh. The packages are available on [the zrep website](https://zrep.kekepower.com) where you can, if you want to share your own scripts, register for an account. By sharing your scripts with the community, you are probably making somebody's day easier.
|
||||||
|
|
||||||
|
You can read more in the Wiki.
|
||||||
|
|
||||||
|
## Key Features
|
||||||
|
|
||||||
|
- **Easy Installation**: zrep simplifies the process of installing Zsh packages. With a single command, you can install packages from the zrep repository.
|
||||||
|
|
||||||
|
- **Package Management**: zrep provides a set of commands to manage your installed packages. You can list, enable, disable, update, and remove packages effortlessly.
|
||||||
|
|
||||||
|
- **Centralized Repository**: All packages are stored in a central repository, making it convenient to discover and share Zsh packages with the community.
|
||||||
|
|
||||||
|
- **Automatic Setup**: zrep automatically sets up the necessary configuration files and directories, ensuring a smooth integration with your Zsh environment.
|
||||||
|
|
||||||
|
- **Customizable**: zrep allows you to customize the installation directory and other settings through a configuration file.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
To start using zrep, simply run the `zrep init` command to initialize the tool. zrep will guide you through the setup process and create the required configuration files.
|
||||||
|
|
||||||
|
Use the search function on **[the zrep website](https://zrep.kekepower.com)** to find useful scripts until a search function is added to the `zrep` script some time in the future.
|
||||||
|
|
||||||
|
Once initialized, you can explore and install packages using commands like `zrep install <author/package>`, `zrep list`, and `zrep enable <author/package>`.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
zrep is an open-source project, and contributions are welcome! If you have any ideas, bug reports, or feature requests, please open an issue on the GitHub repository.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
zrep is released under the MIT License.
|
||||||
|
34
t
Executable file
34
t
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/zsh
|
||||||
|
|
||||||
|
function zrep_fpath_2() {
|
||||||
|
local base_dir="${1}"
|
||||||
|
|
||||||
|
# Ensure globbing finds dotfiles and nullglob avoids empty directory issues
|
||||||
|
setopt local_options dotglob nullglob
|
||||||
|
|
||||||
|
# Check if the base directory exists
|
||||||
|
if [[ ! -d "${base_dir}" ]]; then
|
||||||
|
echo "Error: Base directory '${base_dir}' does not exist."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Iterate over directories within $base_dir with exactly one character
|
||||||
|
for one_char_dir in ${base_dir}/?; do
|
||||||
|
# Check if it's indeed a directory
|
||||||
|
[[ -d "${one_char_dir}" ]] || continue
|
||||||
|
|
||||||
|
# Recursively find all final directories under one_char_dir with the pattern first_letter/author/script
|
||||||
|
for script_dir in ${one_char_dir}/*/*(/); do
|
||||||
|
local script_name=$(basename "${script_dir}")
|
||||||
|
local matching_files=("${script_dir}/${script_name}")
|
||||||
|
|
||||||
|
# Check if there's at least one file matching the script directory's name
|
||||||
|
if (( ${#matching_files} )); then
|
||||||
|
echo "${script_dir}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
zrep_fpath_2 /home/stig/.zrep
|
||||||
|
|
10
themes/classic
Normal file
10
themes/classic
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Classic zrep theme
|
||||||
|
declare -A theme_colors=(
|
||||||
|
[std]="green"
|
||||||
|
[info]="yellow"
|
||||||
|
[debug]="red"
|
||||||
|
[other]="bold_yellow"
|
||||||
|
[sub]="magenta"
|
||||||
|
[main]="white green_bg" # Combining colors for 'main'
|
||||||
|
[help]="bold_green"
|
||||||
|
)
|
BIN
zrep-logo.png
Normal file
BIN
zrep-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 231 KiB |
Reference in New Issue
Block a user