summaryrefslogtreecommitdiff
path: root/plugins/ubuntu/ubuntu.plugin.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2026-01-04 22:47:54 -0800
committerTuowen Zhao <ztuowen@gmail.com>2026-01-04 22:47:54 -0800
commit2aa4cb7a52b28722816ecfd55f3b06293332c55c (patch)
treef02a9f3d59d109c70caf932a24e43368994e0e8c /plugins/ubuntu/ubuntu.plugin.zsh
parent7e951c254e779ff0620537cf43ca69dd878387b4 (diff)
parentd23d3ea69fdb839088e6e5589557cce77b34aaf8 (diff)
downloadzsh-2aa4cb7a52b28722816ecfd55f3b06293332c55c.tar.gz
zsh-2aa4cb7a52b28722816ecfd55f3b06293332c55c.tar.bz2
zsh-2aa4cb7a52b28722816ecfd55f3b06293332c55c.zip
Merge remote-tracking branch 'github/master'HEADmaster
Diffstat (limited to 'plugins/ubuntu/ubuntu.plugin.zsh')
-rw-r--r--plugins/ubuntu/ubuntu.plugin.zsh15
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'