]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/macports/macports.plugin.zsh
...
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / macports / macports.plugin.zsh
1 alias pc="sudo port clean --all installed"
2 alias pi="sudo port install"
3 alias pli="port livecheck installed"
4 alias plm="port-livecheck-maintainer"
5 alias psu="sudo port selfupdate"
6 alias puni="sudo port uninstall inactive"
7 alias puo="sudo port upgrade outdated"
8 alias pup="sudo port selfupdate && sudo port upgrade outdated"
9
10 port-livecheck-maintainer() {
11   (( ${+commands[port]} == 0 )) || {
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
21 Usage:
22   port-livecheck-maintainer
23   port-livecheck-maintainer (maintainer)+
24   port-livecheck-maintainer -h|--help
25
26 Check
27
28 Options:
29   maintainer  maintainer id
30   -h          print this help message and exit
31 EOF
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 }