diff options
| author | Amr Elsayyad <20210190+AmrElsayyad@users.noreply.github.com> | 2025-06-19 11:05:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-19 10:05:40 +0200 |
| commit | f8022980a3423f25e3d5e1b6a60d2372a2ba006b (patch) | |
| tree | dad88765e31ffd7e0b804406f16a0c47b34d270a /plugins/ubuntu/ubuntu.plugin.zsh | |
| parent | 7ee92de190b3710b55aa04e10eb54e907587e61c (diff) | |
| download | zsh-f8022980a3423f25e3d5e1b6a60d2372a2ba006b.tar.gz zsh-f8022980a3423f25e3d5e1b6a60d2372a2ba006b.tar.bz2 zsh-f8022980a3423f25e3d5e1b6a60d2372a2ba006b.zip | |
feat(ubuntu): add `apt-fast` support (#13175)
Diffstat (limited to 'plugins/ubuntu/ubuntu.plugin.zsh')
| -rw-r--r-- | plugins/ubuntu/ubuntu.plugin.zsh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh index 7b765a406..66e2d52cb 100644 --- a/plugins/ubuntu/ubuntu.plugin.zsh +++ b/plugins/ubuntu/ubuntu.plugin.zsh @@ -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' |
