From 6a88d7a8fbc8f1dce27365ef6cf6f99ff19877c7 Mon Sep 17 00:00:00 2001 From: gasmat <53443116+MattiaG-afk@users.noreply.github.com> Date: Sat, 15 May 2021 08:51:46 +0200 Subject: [PATCH] Add gentoolinux plugin --- plugins/gentoolinux/README.md | 77 ++++++++++++++++++++++ plugins/gentoolinux/gentoolinux.plugin.zsh | 51 ++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 plugins/gentoolinux/README.md create mode 100644 plugins/gentoolinux/gentoolinux.plugin.zsh diff --git a/plugins/gentoolinux/README.md b/plugins/gentoolinux/README.md new file mode 100644 index 000000000..7bd612ea0 --- /dev/null +++ b/plugins/gentoolinux/README.md @@ -0,0 +1,77 @@ +# Gentoo Linux plugin + +This plugin adds some aliases and functions to work with Gentoo Linux. + +To use it, add `gentoolinux` to the plugins array in your zshrc file: + +```zsh +plugins=(... gentoolinux) +``` + +## Features +### EMERGE + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| emin | `sudo emerge ` | Install the packet in the system | +| eminsl | `sudo emerge -K ` | Install the packet using a local binary | +| eminsr | `sudo emerge -G ` | Install the packet using a remote binary | +| emre | `sudo emerge -C ` | Uninstall the packet in the system | +| emsearch | `emerge -s ` | Search the packet in the local repository | +| emsync | `sudo emerge --sync` | Sync the local repository with the remote repository | +| emup | `sudo emerge -aDuN world` | Update the packages in the local system | +| emclean | `sudo emerge --depclean` | Delete the unwanted software | +### PORTAGEQ + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| pocolor | `portageq colormap ` | Display the color.map as environment variables | +| podist | `portageq distdir ` | Returns the DISTDIR path | +| povar | `portageq envvar ` | Returns a specific environment variable as exists prior to ebuild.sh| +| pomirror | `portageq gentoo_mirrors` | Returns the mirrors set to use in the portage configuration | +| poorphan | `portageq --orphaned ` | Match only orphaned (maintainer-needed) packages | +### GENLOP + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| genstory | `sudo genlop -l` | Show full merge history | +| geneta | `sudo genlop -c` | Display the currently compiling packages (if any) | +| genweta | `watch -ct -n 1 sudo genlop -c` | Display the currently compiling packages (if any), with refresh | +| geninfo | `sudo genlop -i ` | Extra infos for the selected (build specific USE, CFLAGS) | +| genustory | `sudo genlop -u` | Show when packages have been unmerged | +| genstorytime| `sudo genlop -t ` | Calculate merge time for the specific | +### QLOP + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| qsummary | `sudo qlop -c` | Print summary of average merges | +| qtime | `sudo qlop -t` | Print time taken to complete action | +| qavg | `sudo qlop -a` | Print average time taken to complete action | +| qhum | `sudo qlop -H` | Print elapsed time in human readable format | +| qmachine | `sudo qlop -M` | Print start/elapsed time as seconds with no formatting | +| qmstory | `sudo qlop -m` | Show merge history | +| qustory | `sudo qlop -u` | Show unmerge history | +| qastory | `sudo qlop -U` | Show autoclean unmerge history | +| qsstory | `sudo qlop -s` | Show sync histroy | +| qend | `sudo qlop -e` | Report time at which the operation finished (iso started) | +| qrun | `sudo qlop -r` | Show current emerging packages | +### ECLEAN + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| distclean | `sudo eclean --deep distfiles` | Clean files from /usr/portage/distfiles | +| pkgclean | `sudo eclean-pkg` | Clean files from /usr/portage/packages | +### EUSE + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| newuse | `sudo euse -E ` | Add th flag in /etc/portage/make.conf | +| deluse | `sudo euse -D ` | Delete th flag in /etc/portage/make.conf | +### VIM + +| Alias | Command | Description | +|-------------|--------------------------------------|---------------------------------------------------------------------| +| make.conf | `sudo vim /etc/portage/make.conf` | Open the make.conf configuration file | +| package.mask| `sudo vim /etc/portage/package.mask` | Open the package.mask configuration file | +| package.use | `sudo vim /etc/portage/package.use` | Open the package.use configuration file | +| repos.conf | `sudo vim /etc/portage/repos.conf` | Open the repos.conf configuration file | \ No newline at end of file diff --git a/plugins/gentoolinux/gentoolinux.plugin.zsh b/plugins/gentoolinux/gentoolinux.plugin.zsh new file mode 100644 index 000000000..9a2ca4bd0 --- /dev/null +++ b/plugins/gentoolinux/gentoolinux.plugin.zsh @@ -0,0 +1,51 @@ +# EMERGE +alias emin='sudo emerge ' +alias eminsl='sudo emerge -K ' +alias eminsr='sudo emerge -G ' +alias emre='sudo emerge -C ' +alias emsearch='emerge -s ' +alias emsync='sudo emerge --sync ' +alias emup='sudo emerge -aDuN world ' +alias emclean='sudo emerge --depclean ' + +# PORTAGEQ +alias pocolor='portageq colormap ' +alias podist='portageq distdir ' +alias povar='portageq envvar ' +alias pomirror='portageq gentoo_mirrors' +alias poorphan='portageq --orphaned ' + +# GENLOP +alias genstroy='sudo genlop -l ' +alias geneta='sudo genlop -c ' +alias genweta='watch -ct -n 1 sudo genlop -c ' +alias geninfo='sudo genlop -i ' +alias genustory='sudo genlop -u ' +alias genstorytime='sudo genlop -t ' + +# QLOP +alias qsummary='sudo qlop -c ' +alias qtime='sudo qlop -t ' +alias qavg='sudo qlop -a ' +alias qhum='sudo qlop -H ' +alias qmachine='sudo qlop -M ' +alias qmstory='sudo qlop -m ' +alias qustory='sudo qlop -u ' +alias qastory='sudo qlop -U ' +alias qsstory='sudo qlop -s ' +alias qend='sudo qlop -e ' +alias qrun='sudo qlop -r ' + +# ECLEAN +alias distclean='sudo eclean --deep distfiles ' +alias pkgclean='sudo eclean-pkg ' + +# EUSE +alias newuse='sudo euse -E ' +alias deluse='sudo euse -D ' + +# VIM +alias make.conf='sudo vim /etc/portage/make.conf ' +alias package.mask='sudo vim /etc/portage/package.mask ' +alias package.use='sudo vim /etc/portage/package.use ' +alias repos.conf='sudo vim /etc/portage/repos.conf '