mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-12-04 06:59:10 +08:00
_port: add upgrade completions
Port upgrade completes only outdated ports.
This commit is contained in:
1 parent
4aa41e2267
commit
1168563524
1 file changed
+5
@@ -104,6 +104,11 @@ _port() {
|
||||
"pseudo-common:Common Pseudo-portnames:($pseudo_common)" \
|
||||
"pseudo-advanced:Advanced Pseudo-portnames:($pseudo_advanced)"
|
||||
;;
|
||||
upgrade)
|
||||
local outdated_packages
|
||||
outdated_packages=("${(f)$(port outdated | sed -e '1 d' -e 's/^\([[:graph:]]*\).*/\1/')}")
|
||||
_describe "Outdated ports" outdated_packages
|
||||
;;
|
||||
*)
|
||||
# Cache the list of all ports.
|
||||
if ( [[ ${+_port_available_packages} -eq 0 ]] || _cache_invalid PORT_AVAILABLE_PACKAGES ) &&
|
||||
|
||||
Reference in new issue
Block a user