diff options
| author | Tuowen Zhao <ztuowen@gmail.com> | 2022-01-01 02:26:11 -0600 |
|---|---|---|
| committer | Tuowen Zhao <ztuowen@gmail.com> | 2022-01-01 02:26:11 -0600 |
| commit | 49edbf438ed690c76e6b2af80368c59404cf0167 (patch) | |
| tree | 129b3adb2f5f39a1329a426a3b7d51ed2c2290c1 /plugins/macports/macports.plugin.zsh | |
| parent | 1bc186dabe12b3d01b2257e82f3a104c48b8b3c7 (diff) | |
| parent | 78c91ccbf99c77bd4d9cdb74279a40776721f66d (diff) | |
| download | zsh-49edbf438ed690c76e6b2af80368c59404cf0167.tar.gz zsh-49edbf438ed690c76e6b2af80368c59404cf0167.tar.bz2 zsh-49edbf438ed690c76e6b2af80368c59404cf0167.zip | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/macports/macports.plugin.zsh')
| -rw-r--r-- | plugins/macports/macports.plugin.zsh | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/plugins/macports/macports.plugin.zsh b/plugins/macports/macports.plugin.zsh index d1fde30d4..d438057f9 100644 --- a/plugins/macports/macports.plugin.zsh +++ b/plugins/macports/macports.plugin.zsh @@ -1,6 +1,44 @@ alias pc="sudo port clean --all installed" alias pi="sudo port install" +alias pli="port livecheck installed" +alias plm="port-livecheck-maintainer" alias psu="sudo port selfupdate" alias puni="sudo port uninstall inactive" alias puo="sudo port upgrade outdated" -alias pup="psu && puo" +alias pup="sudo port selfupdate && sudo port upgrade outdated" + +port-livecheck-maintainer() { + (( ${+commands[port]} == 0 )) || { + print -- "port: not found" >&2 + return 1 + } + + local -a help_flag + zparseopts -D -E h=help_flag -help=help_flag + + (( ${#help_flag} )) && { + cat << EOF >&2 +Usage: + port-livecheck-maintainer + port-livecheck-maintainer (maintainer)+ + port-livecheck-maintainer -h|--help + +Check + +Options: + maintainer maintainer id + -h print this help message and exit +EOF + return 1 + } + + if (( $# == 0 )); then + local default=${MACPORTS_MAINTAINER:-${USER}} + port livecheck maintainer:${default} + return $? + fi + + for i in $@; do + port livecheck maintainer:${i} + done +} |
