mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
feat(ubuntu): add apt-fast support for faster package management
Enhanced the ubuntu plugin to detect and use apt-fast when available, falling back to apt or apt-get as before. This provides faster package operations when apt-fast is installed while maintaining compatibility with existing setups. Signed-off-by: Amr Elsayyad <20210190+AmrElsayyad@users.noreply.github.com>
This commit is contained in:
parent
2fbdfa93f9
commit
5d55359d40
2 changed files with 22 additions and 10 deletions
|
|
@ -1,11 +1,22 @@
|
|||
(( $+commands[apt] )) && APT=apt || APT=apt-get
|
||||
# Detect available package manager (prefer apt-fast > apt > apt-get)
|
||||
if (( $+commands[apt-fast] )); then
|
||||
APT=apt-fast
|
||||
elif (( $+commands[apt] )); then
|
||||
APT=apt
|
||||
else
|
||||
APT=apt-get
|
||||
fi
|
||||
|
||||
alias acs='apt-cache search'
|
||||
|
||||
alias afs='apt-file search --regexp'
|
||||
|
||||
# These are apt/apt-get only
|
||||
alias ags="$APT source"
|
||||
if (( $+commands[apt] )); then
|
||||
alias ags="apt source"
|
||||
else
|
||||
alias ags="apt-get source"
|
||||
fi
|
||||
|
||||
alias acp='apt-cache policy'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue