summaryrefslogtreecommitdiffstats
path: root/zsh/oh-my-zsh/plugins/macports
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
commita62114c91f2070c8c8453d117f3d81dc113e41ff (patch)
treef266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/macports
parentaf120ab348f2e1a5a39dec035ed9dcf84189a64e (diff)
downloaddotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/macports')
-rw-r--r--zsh/oh-my-zsh/plugins/macports/README.md47
-rw-r--r--zsh/oh-my-zsh/plugins/macports/_port92
-rw-r--r--zsh/oh-my-zsh/plugins/macports/macports.plugin.zsh44
3 files changed, 0 insertions, 183 deletions
diff --git a/zsh/oh-my-zsh/plugins/macports/README.md b/zsh/oh-my-zsh/plugins/macports/README.md
deleted file mode 100644
index 09bd42d..0000000
--- a/zsh/oh-my-zsh/plugins/macports/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Macports plugin
-
-This plugin adds completion for the package manager [Macports](https://macports.com/),
-as well as some aliases for common Macports commands.
-
-To use it, add `macports` to the plugins array in your zshrc file:
-
-```zsh
-plugins=(... macports)
-```
-
-## Aliases
-
-| Alias | Command | Description |
-|-------|------------------------------------|--------------------------------------------------------------|
-| pc | `sudo port clean --all installed` | Clean up intermediate installation files for installed ports |
-| pi | `sudo port install` | Install package given as argument |
-| pli | `port livecheck installed` | Check for updates for installed ports |
-| plm | `port-livecheck-maintainer` | Check for updates of ports mainained by the specified users |
-| psu | `sudo port selfupdate` | Update ports tree with MacPorts repository |
-| puni | `sudo port uninstall inactive` | Uninstall inactive ports |
-| puo | `sudo port upgrade outdated` | Upgrade ports with newer versions available |
-| pup | `psu && puo` | Update ports tree, then upgrade ports to newest versions |
-
-## Commands
-
-### port-livecheck-maintainer
-
-```text
-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
-```
-
-Checks whether updates are available for ports whose maintainer is the current
-user, or any of a specified list of maintainer expressions. The current user
-maintainer id is retrieved as follows:
-
-* The value of the `MACPORTS_MAINTAINER` variable, if set and not null.
-* The value of the `USER` variable.
diff --git a/zsh/oh-my-zsh/plugins/macports/_port b/zsh/oh-my-zsh/plugins/macports/_port
deleted file mode 100644
index 897598a..0000000
--- a/zsh/oh-my-zsh/plugins/macports/_port
+++ /dev/null
@@ -1,92 +0,0 @@
-#compdef port
-
-local subcmds
-
-# we cache the list of ports
-# we shall use some cache policy to avoid problems with new ports
-if (( ! $+portlist )); then
- portlist=($(port echo all; echo "all current active inactive installed uninstalled outdated"))
-fi
-
-subcmds=(
-'activate'
-'archive'
-'build'
-'cat'
-'clean'
-'configure'
-'contents'
-'deactivate'
-'dependents'
-'deps'
-'destroot'
-'dir'
-'distcheck'
-'distclean'
-'dmg'
-'echo'
-'edit'
-'extract'
-'fetch'
-'file'
-'help'
-'info'
-'install'
-'installed'
-'list'
-'livecheck'
-'location'
-'mpkg'
-'outdated'
-'patch'
-'pkg'
-'provides'
-'rdependents'
-'rdeps'
-'reclaim'
-'rpmpackage'
-'search'
-'selfupdate'
-'sync'
-'test'
-'unarchive'
-'uninstall'
-'upgrade'
-'variants'
-'version'
-)
-
-_arguments -C \
-'-v[verbose mode (generate verbose messages)]' \
-'-d[debug mode (generate debugging messages)]' \
-'-q[quiet mode (suppress messages)]' \
-'-D[specify portdir]' \
-'-k[keep mode (do not autoclean after install)]' \
-'-n[dont follow dependencies in upgrade (only for upgrading)]' \
-'-a[upgrade all installed ports (only for upgrading)]' \
-'-u[uninstall non-active ports when upgrading and uninstalling]' \
-'-f[force mode (ignore state file)]' \
-'-s[source-only mode]' \
-'-b[binary-only mode]' \
-'-o[honor state files older than Portfile]' \
-'*::command:->command' \
-&& return 0
-
-case $state in
- command)
- if ((CURRENT == 1)); then
- state=subcommands
- else
- state=portname
- fi
- ;;
-esac
-
-case $state in
- subcommands)
- _describe -t commands 'port commands' subcmds
- ;;
- portname)
- _describe -t commands 'available ports' portlist
- ;;
-esac
diff --git a/zsh/oh-my-zsh/plugins/macports/macports.plugin.zsh b/zsh/oh-my-zsh/plugins/macports/macports.plugin.zsh
deleted file mode 100644
index d438057..0000000
--- a/zsh/oh-my-zsh/plugins/macports/macports.plugin.zsh
+++ /dev/null
@@ -1,44 +0,0 @@
-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="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
-}