aliases/package-manager: improve aliases of portage (#513)

* docs: mark `ers` deprecated
* fix(emfu): remove -j and change -U to -N
* docs(emfu): add description
* feat: add 'ec' and `ecp`
* fix: add restrictions on defining 'ecd', 'ecp', and 'elip'
This commit is contained in:
Blackteahamburger
2024-01-14 10:57:07 +08:00
committed by GitHub
parent d025bddc67
commit 4306bfebcb
2 changed files with 22 additions and 13 deletions

View File

@@ -93,7 +93,7 @@ To activate it, add `debian` to `plugins(...)` in your `.bashrc` file:
This plugin provides the set of aliases that can be used to control package managers. Here is the list of the supported aliases for each package manager. You can find the details of each alias in the source [`package-manager.aliases.bash`](package-manager.aliases.bash).
- `emerge` (Portage Enoch Merge) ... `em`, `es`, `esync`, `eb`, `er`, `ers`, `emfu`, `elip`
- `emerge` (Portage Enoch Merge) ... `em`, `es`, `esync`, `eb`, `er`, `emfu`, `ecd`, `ecp`, `elip`
- `cave` (Paludis Cave) ... `cave`, `cr`, `cui`, `cs`, `cli`
- `apt` (Advanced Packaging Tool) ... `apt`, `aptfu`, `apti`, `apts`, `aptr`, `aptar`, `aptli`
- `dpkg` (Debian Package) ... `dpkg`
@@ -111,16 +111,18 @@ OMB_ALIAS_PACKAGE_MANAGER_SUDO=
### Emerge Package Manager
| Alias | Command | Description |
| ------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| `em` | `sudo emerge` | Emerge is the definitive command-line interface to the Portage system. |
| `es` | `sudo emerge --search` | Searches for matches of the supplied string in the ebuild repository. |
| `esync` | `sudo emerge --sync` | Updates repositories, for which auto-sync, sync-type and sync-uri attributes are set in repos.conf. |
| `eb` | `sudo ebuild` | An ebuild must be, at a minimum, a valid Portage package directory name without a version or category, such as portage or python. |
| `er` | `sudo emerge -c` | Cleans the system by removing packages that are not associated with explicitly merged packages. |
| `ers` | `sudo emerge -c` | Cleans the system by removing packages that are not associated with explicitly merged packages. |
| `emfu` | `sudo emerge --sync && sudo emerge -uDUj @world` | Emerge Update & Upgrade. |
| `elip` | `sudo eix-installed -a` | List all installed programs. |
| Alias | Command | Description |
| ------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `em` | `sudo emerge` | Emerge is the definitive command-line interface to the Portage system. |
| `es` | `sudo emerge --search` | Searches for matches of the supplied string in the ebuild repository. |
| `esync` | `sudo emerge --sync` | Updates repositories, for which auto-sync, sync-type and sync-uri attributes are set in repos.conf. |
| `eb` | `sudo ebuild` | An ebuild must be, at a minimum, a valid Portage package directory name without a version or category, such as portage or python. |
| `er` | `sudo emerge -c` | Cleans the system by removing packages that are not associated with explicitly merged packages. |
| `emfu` | `sudo emerge --sync && sudo emerge -uDN @world` | Emerge Update & Upgrade. |
| `ecd` | `sudo eclean-dist -d` | Cleans repository source files |
| `ecp` | `sudo eclean-pkg -d` | Cleans binary packages |
| `elip` | `sudo eix-installed -a` | List all installed programs. |
| `ers` | `sudo emerge -c` | (Deprecated, retained for backward compatibility. Use `er` instead.) |
### Paludis Package Manager (`cave`)

View File

@@ -21,8 +21,15 @@ if _omb_util_binary_exists emerge; then
alias esync="${_omb_tmp_sudo}emerge --sync" # Enoch SYNC
alias eb="${_omb_tmp_sudo}ebuild" # Enoch Build
alias er="${_omb_tmp_sudo}emerge -c" # Enoch Remove
alias ers="${_omb_tmp_sudo}emerge -c" # Enoch Remove Systempackage
alias emfu="${_omb_tmp_sudo}emerge --sync && ${_omb_tmp_sudo}emerge -uDUj @world"
alias emfu="${_omb_tmp_sudo}emerge --sync && ${_omb_tmp_sudo}emerge -uDN @world" # Enoch Upgrade System
# Deprecated, retained for backward compatibility. Use `er` instead.
alias ers="${_omb_tmp_sudo}emerge -c"
fi
if _omb_util_binary_exists eclean; then
alias ecd="${_omb_tmp_sudo}eclean-dist -d" # Enoch Clean Repository Source Files
alias ecp="${_omb_tmp_sudo}eclean-pkg -d" # Enoch Clean Binary Packages
fi
if _omb_util_binary_exists eix; then
alias elip="${_omb_tmp_sudo}eix-installed -a" # Enoch List Installed Packages
fi