macports.plugin.zsh 987 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. port-livecheck-maintainer() {
  10. (( ${+commands[port]} == 0 )) || {
  11. print -- "port: not found" >&2
  12. return 1
  13. }
  14. local -a help_flag
  15. zparseopts -D -E h=help_flag -help=help_flag
  16. (( ${#help_flag} )) && {
  17. cat << EOF >&2
  18. Usage:
  19. port-livecheck-maintainer
  20. port-livecheck-maintainer (maintainer)+
  21. port-livecheck-maintainer -h|--help
  22. Check
  23. Options:
  24. maintainer maintainer id
  25. -h print this help message and exit
  26. EOF
  27. return 1
  28. }
  29. if (( $# == 0 )); then
  30. local default=${MACPORTS_MAINTAINER:-${USER}}
  31. port livecheck maintainer:${default}
  32. return $?
  33. fi
  34. for i in $@; do
  35. port livecheck maintainer:${i}
  36. done
  37. }