macports.plugin.zsh
982 bytes
1alias pc="sudo port clean --all installed"
2alias pi="sudo port install"
3alias pli="port livecheck installed"
4alias plm="port-livecheck-maintainer"
5alias psu="sudo port selfupdate"
6alias puni="sudo port uninstall inactive"
7alias puo="sudo port upgrade outdated"
8alias pup="sudo port selfupdate && sudo port upgrade outdated"
9
10port-livecheck-maintainer() {
11 (( ${+commands[port]} )) || {
12 print -- "port: not found" >&2
13 return 1
14 }
15
16 local -a help_flag
17 zparseopts -D -E h=help_flag -help=help_flag
18
19 (( ${#help_flag} )) && {
20 cat << EOF >&2
21Usage:
22 port-livecheck-maintainer
23 port-livecheck-maintainer (maintainer)+
24 port-livecheck-maintainer -h|--help
25
26Check
27
28Options:
29 maintainer maintainer id
30 -h print this help message and exit
31EOF
32 return 1
33 }
34
35 if (( $# == 0 )); then
36 local default=${MACPORTS_MAINTAINER:-${USER}}
37 port livecheck maintainer:${default}
38 return $?
39 fi
40
41 for i in $@; do
42 port livecheck maintainer:${i}
43 done
44}