diff options
author | Roman Kamyk <roman.kamyk@gmail.com> | 2011-05-12 13:40:07 +0200 |
---|---|---|
committer | Roman Kamyk <roman.kamyk@gmail.com> | 2011-05-12 13:40:07 +0200 |
commit | f71647fa85267d558d0d69034902f53aeeed67ad (patch) | |
tree | e48c05b9de6c435ccb5df37c6d0a5b4c351b380e /plugins/macports | |
parent | dccfdf7dbf707b2e860fde1b6540e66ec6bda207 (diff) | |
parent | 0365ef0529ddfb912ca8202773e45916c55fdf4f (diff) | |
download | zsh-f71647fa85267d558d0d69034902f53aeeed67ad.tar.gz zsh-f71647fa85267d558d0d69034902f53aeeed67ad.tar.bz2 zsh-f71647fa85267d558d0d69034902f53aeeed67ad.zip |
Merge branch 'master' of http://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/macports')
-rw-r--r-- | plugins/macports/_port | 89 | ||||
-rw-r--r-- | plugins/macports/macports.plugin.zsh | 1 |
2 files changed, 90 insertions, 0 deletions
diff --git a/plugins/macports/_port b/plugins/macports/_port new file mode 100644 index 000000000..06d7fb426 --- /dev/null +++ b/plugins/macports/_port @@ -0,0 +1,89 @@ +#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' +'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/plugins/macports/macports.plugin.zsh b/plugins/macports/macports.plugin.zsh index 9564829b0..277352e32 100644 --- a/plugins/macports/macports.plugin.zsh +++ b/plugins/macports/macports.plugin.zsh @@ -5,3 +5,4 @@ alias psu="sudo port selfupdate" alias puni="sudo port uninstall inactive" alias puo="sudo port upgrade outdated" alias pup="psu && puo" + |