From 7b6be5611763f25eca043f9ed0d46066a3454205 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Fri, 20 Aug 2010 18:55:30 +0200 Subject: fix problems with brew completion - update plugin architecture - completion function in $ZSH/functions/brew - plugins/brew.plugin.zsh only activates --- functions/brew/_brew | 69 +++++++++++++++++++++++++++++++++++++++++++++++ plugins/brew.plugin.zsh | 71 +++---------------------------------------------- 2 files changed, 73 insertions(+), 67 deletions(-) create mode 100644 functions/brew/_brew diff --git a/functions/brew/_brew b/functions/brew/_brew new file mode 100644 index 000000000..4e590ac63 --- /dev/null +++ b/functions/brew/_brew @@ -0,0 +1,69 @@ +#compdef brew +#autoload + +# imported from the latest homebrew contributions + +_brew_all_formulae() { + formulae=(`brew search`) +} + +_brew_installed_formulae() { + installed_formulae=(`brew list`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cat:display formula file for a formula' + 'cleanup:uninstall unused and old versions of packages' + 'create:create a new formula' + 'deps:list dependencies and dependants of a formula' + 'doctor:audits your installation for common issues' + 'edit:edit a formula' + 'home:visit the homepage of a formula or the brew project' + 'info:information about a formula' + 'install:install a formula' + 'link:link a formula' + 'list:list files in a formula or not-installed formulae' + 'log:git commit log for a formula' + 'outdated:list formulas for which a newer version is available' + 'prune:remove dead links' + 'remove:remove a formula' + 'search:search for a formula (/regex/ or string)' + 'unlink:unlink a formula' + 'update:freshen up links' + 'uses:show formulas which depend on a formula' +) + +local expl +local -a formula installed_formulae + +_arguments \ + '(-v --verbose)'{-v,--verbose}'[verbose]' \ + '(--version)--version[version information]' \ + '(--prefix)--prefix[where brew lives on this system]' \ + '(--cache)--cache[brew cache]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "brew subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + _arguments \ + '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ + '1: :->forms' && return 0 + + if [[ "$state" == forms ]]; then + _brew_installed_formulae + _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae + fi ;; + install|home|log|info|uses|cat|deps) + _brew_all_formulae + _wanted formulae expl 'all formulae' compadd -a formulae ;; + remove|edit|xo) + _brew_installed_formulae + _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; +esac + diff --git a/plugins/brew.plugin.zsh b/plugins/brew.plugin.zsh index 162eb6442..a30540966 100644 --- a/plugins/brew.plugin.zsh +++ b/plugins/brew.plugin.zsh @@ -1,67 +1,4 @@ -#compdef brew - -# imported from the latest homebrew contributions - -_brew_all_formulae() { - formulae=(`brew search`) -} - -_brew_installed_formulae() { - installed_formulae=(`brew list`) -} - -local -a _1st_arguments -_1st_arguments=( - 'cat:display formula file for a formula' - 'cleanup:uninstall unused and old versions of packages' - 'create:create a new formula' - 'deps:list dependencies and dependants of a formula' - 'doctor:audits your installation for common issues' - 'edit:edit a formula' - 'home:visit the homepage of a formula or the brew project' - 'info:information about a formula' - 'install:install a formula' - 'link:link a formula' - 'list:list files in a formula or not-installed formulae' - 'log:git commit log for a formula' - 'outdated:list formulas for which a newer version is available' - 'prune:remove dead links' - 'remove:remove a formula' - 'search:search for a formula (/regex/ or string)' - 'unlink:unlink a formula' - 'update:freshen up links' - 'uses:show formulas which depend on a formula' -) - -local expl -local -a formula installed_formulae - -_arguments \ - '(-v --verbose)'{-v,--verbose}'[verbose]' \ - '(--version)--version[version information]' \ - '(--prefix)--prefix[where brew lives on this system]' \ - '(--cache)--cache[brew cache]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "brew subcommand" _1st_arguments - return -fi - -case "$words[1]" in - list) - _arguments \ - '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ - '1: :->forms' && return 0 - - if [[ "$state" == forms ]]; then - _brew_installed_formulae - _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae - fi ;; - install|home|log|info|uses|cat|deps) - _brew_all_formulae - _wanted formulae expl 'all formulae' compadd -a formulae ;; - remove|edit|xo) - _brew_installed_formulae - _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; -esac +# add brew completion function to path +fpath=($ZSH/functions/brew $fpath) +autoload -U compinit +compinit -i -- cgit v1.2.3-70-g09d2 From c96f5f78cbb95d29c712af173c5b9c630efcf710 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Wed, 1 Sep 2010 13:07:11 +0200 Subject: add gem completion function and plugin --- functions/gem/_gem | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/gem.plugin.zsh | 4 ++++ 2 files changed, 68 insertions(+) create mode 100644 functions/gem/_gem create mode 100644 plugins/gem.plugin.zsh diff --git a/functions/gem/_gem b/functions/gem/_gem new file mode 100644 index 000000000..83cba40d1 --- /dev/null +++ b/functions/gem/_gem @@ -0,0 +1,64 @@ +#compdef gem +#autoload + +# gem zsh completion, based on homebrew completion + +_gem_installed() { + installed_gems=(`gem list --local --no-versions`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cert:Manage RubyGems certificates and signing settings' + 'check:Check installed gems' + 'cleanup:Clean up old versions of installed gems in the local repository' + 'contents:Display the contents of the installed gems' + 'dependency:Show the dependencies of an installed gem' + 'environment:Display information about the RubyGems environment' + 'fetch:Download a gem and place it in the current directory' + 'generate_index:Generates the index files for a gem server directory' + 'help:Provide help on the `gem` command' + 'install:Install a gem into the local repository' + 'list:Display gems whose name starts with STRING' + 'lock:Generate a lockdown list of gems' + 'mirror:Mirror a gem repository' + 'outdated:Display all gems that need updates' + 'owner:Manage gem owners on RubyGems.org.' + 'pristine:Restores installed gems to pristine condition from files located in the gem cache' + 'push:Push a gem up to RubyGems.org' + 'query:Query gem information in local or remote repositories' + 'rdoc:Generates RDoc for pre-installed gems' + 'search:Display all gems whose name contains STRING' + 'server:Documentation and gem repository HTTP server' + 'sources:Manage the sources and cache file RubyGems uses to search for gems' + 'specification:Display gem specification (in yaml)' + 'stale:List gems along with access times' + 'uninstall:Uninstall gems from the local repository' + 'unpack:Unpack an installed gem to the current directory' + 'update:Update the named gems (or all installed gems) in the local repository' + 'which:Find the location of a library file you can require' +) + +local expl +local -a gems installed_gems + +_arguments \ + '(-v --version)'{-v,--version}'[show version]' \ + '(-h --help)'{-h,--help}'[show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "gem subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + if [[ "$state" == forms ]]; then + _gem_installed + _requested installed_gems expl 'installed gems' compadd -a installed_gems + fi ;; + uninstall|update) + _gem_installed + _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;; +esac diff --git a/plugins/gem.plugin.zsh b/plugins/gem.plugin.zsh new file mode 100644 index 000000000..0b6ef3c86 --- /dev/null +++ b/plugins/gem.plugin.zsh @@ -0,0 +1,4 @@ +# add brew completion function to path +fpath=($ZSH/functions/gem $fpath) +autoload -U compinit +compinit -i -- cgit v1.2.3-70-g09d2 From fe09064fcf4859b0e417c8040094f622f971012a Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Wed, 1 Sep 2010 13:21:11 +0200 Subject: add pip completion and plugin --- functions/pip/_pip | 46 ++++++++++++++++++++++++++++++++++++++++++++++ plugins/pip.plugin.zsh | 4 ++++ 2 files changed, 50 insertions(+) create mode 100644 functions/pip/_pip create mode 100644 plugins/pip.plugin.zsh diff --git a/functions/pip/_pip b/functions/pip/_pip new file mode 100644 index 000000000..b58010173 --- /dev/null +++ b/functions/pip/_pip @@ -0,0 +1,46 @@ +#compdef pip +#autoload + +# pip zsh completion, based on homebrew completion + +_pip_installed() { + installed_pkgs=(`pip freeze`) +} + +local -a _1st_arguments +_1st_arguments=( + 'bundle:Create pybundles (archives containing multiple packages)' + 'freeze:Output all currently installed packages (exact versions) to stdout' + 'help:Show available commands' + 'install:Install packages' + 'search:Search PyPI' + 'uninstall:Uninstall packages' + 'unzip:Unzip individual packages' + 'zip:Zip individual packages' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '(--version)--version[Show version number of program and exit]' \ + '(-v --verbose)'{-v,--verbose}'[Give more output]' \ + '(-q --quiet)'{-q,--quiet}'[Give less output]' \ + '(-h --help)'{-h,--help}'[Show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "pip subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + if [[ "$state" == forms ]]; then + _pip_installed + _requested installed_pkgs expl 'installed packages' compadd -a installed_pkgs + fi ;; + uninstall) + _pip_installed + _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;; +esac diff --git a/plugins/pip.plugin.zsh b/plugins/pip.plugin.zsh new file mode 100644 index 000000000..69e21f8d7 --- /dev/null +++ b/plugins/pip.plugin.zsh @@ -0,0 +1,4 @@ +# add brew completion function to path +fpath=($ZSH/functions/pip $fpath) +autoload -U compinit +compinit -i -- cgit v1.2.3-70-g09d2 From 26d97a9355d37c55e0b044d8dafc425cc0ca7217 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 30 Sep 2010 21:34:06 -0700 Subject: Reorganizing plugins so that each plugin has it's own directory now so that any plugin-specific functions can be bundled within there. --- oh-my-zsh.sh | 2 +- plugins/brew.plugin.zsh | 67 -------------------------------- plugins/brew/brew.plugin.zsh | 67 ++++++++++++++++++++++++++++++++ plugins/dirpersist.plugin.zsh | 39 ------------------- plugins/dirpersist/dirpersist.plugin.zsh | 39 +++++++++++++++++++ plugins/git.plugin.zsh | 32 --------------- plugins/git/git.plugin.zsh | 32 +++++++++++++++ plugins/lighthouse.plugin.zsh | 16 -------- plugins/lighthouse/lighthouse.plugin.zsh | 16 ++++++++ plugins/macports.plugin.zsh | 7 ---- plugins/macports/macports.plugin.zsh | 7 ++++ plugins/mysql-macports.plugin.zsh | 6 --- plugins/mysql/mysql-macports.plugin.zsh | 6 +++ plugins/osx.plugin.zsh | 11 ------ plugins/osx/osx.plugin.zsh | 11 ++++++ plugins/rails.plugin.zsh | 36 ----------------- plugins/rails/rails.plugin.zsh | 36 +++++++++++++++++ plugins/ruby.plugin.zsh | 4 -- plugins/ruby/ruby.plugin.zsh | 4 ++ plugins/ssh-agent.plugin.zsh | 23 ----------- plugins/ssh-agent/ssh-agent.plugin.zsh | 23 +++++++++++ plugins/textmate.plugin.zsh | 14 ------- plugins/textmate/textmate.plugin.zsh | 14 +++++++ plugins/vi-mode.plugin.zsh | 22 ----------- plugins/vi-mode/vi-mode.plugin.zsh | 22 +++++++++++ 25 files changed, 278 insertions(+), 278 deletions(-) delete mode 100644 plugins/brew.plugin.zsh create mode 100644 plugins/brew/brew.plugin.zsh delete mode 100644 plugins/dirpersist.plugin.zsh create mode 100644 plugins/dirpersist/dirpersist.plugin.zsh delete mode 100644 plugins/git.plugin.zsh create mode 100644 plugins/git/git.plugin.zsh delete mode 100644 plugins/lighthouse.plugin.zsh create mode 100644 plugins/lighthouse/lighthouse.plugin.zsh delete mode 100644 plugins/macports.plugin.zsh create mode 100644 plugins/macports/macports.plugin.zsh delete mode 100644 plugins/mysql-macports.plugin.zsh create mode 100644 plugins/mysql/mysql-macports.plugin.zsh delete mode 100644 plugins/osx.plugin.zsh create mode 100644 plugins/osx/osx.plugin.zsh delete mode 100644 plugins/rails.plugin.zsh create mode 100644 plugins/rails/rails.plugin.zsh delete mode 100644 plugins/ruby.plugin.zsh create mode 100644 plugins/ruby/ruby.plugin.zsh delete mode 100644 plugins/ssh-agent.plugin.zsh create mode 100644 plugins/ssh-agent/ssh-agent.plugin.zsh delete mode 100644 plugins/textmate.plugin.zsh create mode 100644 plugins/textmate/textmate.plugin.zsh delete mode 100644 plugins/vi-mode.plugin.zsh create mode 100644 plugins/vi-mode/vi-mode.plugin.zsh diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c46aea7ac..848e48eb5 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -12,7 +12,7 @@ for config_file ($ZSH/custom/*.zsh) source $config_file # Load all of the plugins that were defined in ~/.zshrc plugin=${plugin:=()} -for plugin ($plugins) source $ZSH/plugins/$plugin.plugin.zsh +for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" = "true" ] diff --git a/plugins/brew.plugin.zsh b/plugins/brew.plugin.zsh deleted file mode 100644 index 162eb6442..000000000 --- a/plugins/brew.plugin.zsh +++ /dev/null @@ -1,67 +0,0 @@ -#compdef brew - -# imported from the latest homebrew contributions - -_brew_all_formulae() { - formulae=(`brew search`) -} - -_brew_installed_formulae() { - installed_formulae=(`brew list`) -} - -local -a _1st_arguments -_1st_arguments=( - 'cat:display formula file for a formula' - 'cleanup:uninstall unused and old versions of packages' - 'create:create a new formula' - 'deps:list dependencies and dependants of a formula' - 'doctor:audits your installation for common issues' - 'edit:edit a formula' - 'home:visit the homepage of a formula or the brew project' - 'info:information about a formula' - 'install:install a formula' - 'link:link a formula' - 'list:list files in a formula or not-installed formulae' - 'log:git commit log for a formula' - 'outdated:list formulas for which a newer version is available' - 'prune:remove dead links' - 'remove:remove a formula' - 'search:search for a formula (/regex/ or string)' - 'unlink:unlink a formula' - 'update:freshen up links' - 'uses:show formulas which depend on a formula' -) - -local expl -local -a formula installed_formulae - -_arguments \ - '(-v --verbose)'{-v,--verbose}'[verbose]' \ - '(--version)--version[version information]' \ - '(--prefix)--prefix[where brew lives on this system]' \ - '(--cache)--cache[brew cache]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "brew subcommand" _1st_arguments - return -fi - -case "$words[1]" in - list) - _arguments \ - '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ - '1: :->forms' && return 0 - - if [[ "$state" == forms ]]; then - _brew_installed_formulae - _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae - fi ;; - install|home|log|info|uses|cat|deps) - _brew_all_formulae - _wanted formulae expl 'all formulae' compadd -a formulae ;; - remove|edit|xo) - _brew_installed_formulae - _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; -esac diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh new file mode 100644 index 000000000..162eb6442 --- /dev/null +++ b/plugins/brew/brew.plugin.zsh @@ -0,0 +1,67 @@ +#compdef brew + +# imported from the latest homebrew contributions + +_brew_all_formulae() { + formulae=(`brew search`) +} + +_brew_installed_formulae() { + installed_formulae=(`brew list`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cat:display formula file for a formula' + 'cleanup:uninstall unused and old versions of packages' + 'create:create a new formula' + 'deps:list dependencies and dependants of a formula' + 'doctor:audits your installation for common issues' + 'edit:edit a formula' + 'home:visit the homepage of a formula or the brew project' + 'info:information about a formula' + 'install:install a formula' + 'link:link a formula' + 'list:list files in a formula or not-installed formulae' + 'log:git commit log for a formula' + 'outdated:list formulas for which a newer version is available' + 'prune:remove dead links' + 'remove:remove a formula' + 'search:search for a formula (/regex/ or string)' + 'unlink:unlink a formula' + 'update:freshen up links' + 'uses:show formulas which depend on a formula' +) + +local expl +local -a formula installed_formulae + +_arguments \ + '(-v --verbose)'{-v,--verbose}'[verbose]' \ + '(--version)--version[version information]' \ + '(--prefix)--prefix[where brew lives on this system]' \ + '(--cache)--cache[brew cache]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "brew subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + _arguments \ + '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ + '1: :->forms' && return 0 + + if [[ "$state" == forms ]]; then + _brew_installed_formulae + _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae + fi ;; + install|home|log|info|uses|cat|deps) + _brew_all_formulae + _wanted formulae expl 'all formulae' compadd -a formulae ;; + remove|edit|xo) + _brew_installed_formulae + _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; +esac diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh deleted file mode 100644 index 6a2b289a2..000000000 --- a/plugins/dirpersist.plugin.zsh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/zsh -# -# Make the dirstack more persistant -# -# Add dirpersist to $plugins in ~/.zshrc to load -# - -# $zdirstore is the file used to persist the stack -zdirstore=~/.zdirstore - -dirpersistinstall () { - if grep 'dirpersiststore' ~/.zlogout > /dev/null; then - else - if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then - echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout - else - echo "If you don't want this message to appear, remove dirspersist from \$plugins" - fi - fi -} - -dirpersiststore () { - dirs -p | perl -e 'foreach (reverse ) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore -} - -dirpersistrestore () { - if [ -f $zdirstore ]; then - source $zdirstore - fi -} - -DIRSTACKSIZE=10 -setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups - -dirpersistinstall -dirpersistrestore - -# Make popd changes permanent without having to wait for logout -alias popd="popd;dirpersiststore" diff --git a/plugins/dirpersist/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh new file mode 100644 index 000000000..6a2b289a2 --- /dev/null +++ b/plugins/dirpersist/dirpersist.plugin.zsh @@ -0,0 +1,39 @@ +#!/bin/zsh +# +# Make the dirstack more persistant +# +# Add dirpersist to $plugins in ~/.zshrc to load +# + +# $zdirstore is the file used to persist the stack +zdirstore=~/.zdirstore + +dirpersistinstall () { + if grep 'dirpersiststore' ~/.zlogout > /dev/null; then + else + if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then + echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout + else + echo "If you don't want this message to appear, remove dirspersist from \$plugins" + fi + fi +} + +dirpersiststore () { + dirs -p | perl -e 'foreach (reverse ) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore +} + +dirpersistrestore () { + if [ -f $zdirstore ]; then + source $zdirstore + fi +} + +DIRSTACKSIZE=10 +setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups + +dirpersistinstall +dirpersistrestore + +# Make popd changes permanent without having to wait for logout +alias popd="popd;dirpersiststore" diff --git a/plugins/git.plugin.zsh b/plugins/git.plugin.zsh deleted file mode 100644 index 655eaf728..000000000 --- a/plugins/git.plugin.zsh +++ /dev/null @@ -1,32 +0,0 @@ -# Aliases -alias g='git' -alias gst='git status' -alias gl='git pull' -alias gup='git fetch && git rebase' -alias gp='git push' -alias gd='git diff | mate' -alias gdv='git diff -w "$@" | vim -R -' -alias gc='git commit -v' -alias gca='git commit -v -a' -alias gb='git branch' -alias gba='git branch -a' -alias gcount='git shortlog -sn' -alias gcp='git cherry-pick' - - -# Git and svn mix -alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' - -# -# Will return the current branch name -# Usage example: git pull origin $(current_branch) -# -function current_branch() { - ref=$(git symbolic-ref HEAD 2> /dev/null) || return - echo ${ref#refs/heads/} -} - -# these aliases take advangate of the previous function -alias ggpull='git pull origin $(current_branch)' -alias ggpush='git push origin $(current_branch)' -alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' \ No newline at end of file diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh new file mode 100644 index 000000000..655eaf728 --- /dev/null +++ b/plugins/git/git.plugin.zsh @@ -0,0 +1,32 @@ +# Aliases +alias g='git' +alias gst='git status' +alias gl='git pull' +alias gup='git fetch && git rebase' +alias gp='git push' +alias gd='git diff | mate' +alias gdv='git diff -w "$@" | vim -R -' +alias gc='git commit -v' +alias gca='git commit -v -a' +alias gb='git branch' +alias gba='git branch -a' +alias gcount='git shortlog -sn' +alias gcp='git cherry-pick' + + +# Git and svn mix +alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' + +# +# Will return the current branch name +# Usage example: git pull origin $(current_branch) +# +function current_branch() { + ref=$(git symbolic-ref HEAD 2> /dev/null) || return + echo ${ref#refs/heads/} +} + +# these aliases take advangate of the previous function +alias ggpull='git pull origin $(current_branch)' +alias ggpush='git push origin $(current_branch)' +alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' \ No newline at end of file diff --git a/plugins/lighthouse.plugin.zsh b/plugins/lighthouse.plugin.zsh deleted file mode 100644 index 4eb06a997..000000000 --- a/plugins/lighthouse.plugin.zsh +++ /dev/null @@ -1,16 +0,0 @@ -# To use: add a .lighthouse file into your directory with the URL to the -# individual project. For example: -# https://rails.lighthouseapp.com/projects/8994 -# Example usage: http://screencast.com/t/ZDgwNDUwNT -open_lighthouse_ticket () { - if [ ! -f .lighthouse-url ]; then - echo "There is no .lighthouse file in the current directory..." - return 0; - else - lighthouse_url=$(cat .lighthouse-url); - echo "Opening ticket #$1"; - `open $lighthouse_url/tickets/$1`; - fi -} - -alias lho='open_lighthouse_ticket' \ No newline at end of file diff --git a/plugins/lighthouse/lighthouse.plugin.zsh b/plugins/lighthouse/lighthouse.plugin.zsh new file mode 100644 index 000000000..4eb06a997 --- /dev/null +++ b/plugins/lighthouse/lighthouse.plugin.zsh @@ -0,0 +1,16 @@ +# To use: add a .lighthouse file into your directory with the URL to the +# individual project. For example: +# https://rails.lighthouseapp.com/projects/8994 +# Example usage: http://screencast.com/t/ZDgwNDUwNT +open_lighthouse_ticket () { + if [ ! -f .lighthouse-url ]; then + echo "There is no .lighthouse file in the current directory..." + return 0; + else + lighthouse_url=$(cat .lighthouse-url); + echo "Opening ticket #$1"; + `open $lighthouse_url/tickets/$1`; + fi +} + +alias lho='open_lighthouse_ticket' \ No newline at end of file diff --git a/plugins/macports.plugin.zsh b/plugins/macports.plugin.zsh deleted file mode 100644 index 9564829b0..000000000 --- a/plugins/macports.plugin.zsh +++ /dev/null @@ -1,7 +0,0 @@ -#Aliases -alias pc="sudo port clean --all installed" -alias pi="sudo port install $1" -alias psu="sudo port selfupdate" -alias puni="sudo port uninstall inactive" -alias puo="sudo port upgrade outdated" -alias pup="psu && puo" diff --git a/plugins/macports/macports.plugin.zsh b/plugins/macports/macports.plugin.zsh new file mode 100644 index 000000000..9564829b0 --- /dev/null +++ b/plugins/macports/macports.plugin.zsh @@ -0,0 +1,7 @@ +#Aliases +alias pc="sudo port clean --all installed" +alias pi="sudo port install $1" +alias psu="sudo port selfupdate" +alias puni="sudo port uninstall inactive" +alias puo="sudo port upgrade outdated" +alias pup="psu && puo" diff --git a/plugins/mysql-macports.plugin.zsh b/plugins/mysql-macports.plugin.zsh deleted file mode 100644 index 63b881c9f..000000000 --- a/plugins/mysql-macports.plugin.zsh +++ /dev/null @@ -1,6 +0,0 @@ -# commands to control local mysql-server installation -# paths are for osx installtion via macports - -alias mysqlstart='sudo /opt/local/bin/mysqld_safe5' -alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown' -alias mysqlstatus='mysqladmin5 -u root -p ping' \ No newline at end of file diff --git a/plugins/mysql/mysql-macports.plugin.zsh b/plugins/mysql/mysql-macports.plugin.zsh new file mode 100644 index 000000000..63b881c9f --- /dev/null +++ b/plugins/mysql/mysql-macports.plugin.zsh @@ -0,0 +1,6 @@ +# commands to control local mysql-server installation +# paths are for osx installtion via macports + +alias mysqlstart='sudo /opt/local/bin/mysqld_safe5' +alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown' +alias mysqlstatus='mysqladmin5 -u root -p ping' \ No newline at end of file diff --git a/plugins/osx.plugin.zsh b/plugins/osx.plugin.zsh deleted file mode 100644 index fce88c796..000000000 --- a/plugins/osx.plugin.zsh +++ /dev/null @@ -1,11 +0,0 @@ -function tab() { - osascript 2>/dev/null </dev/null <=' $changed) - fi -} - -function _cap () { - if [ -f config/deploy.rb ]; then - if _cap_does_task_list_need_generating; then - echo "\nGenerating .cap_tasks~..." > /dev/stderr - cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' -> .cap_tasks~ - fi - compadd `cat .cap_tasks~` - fi -} - -compctl -K _cap cap - -function remote_console() { - /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" -} diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh new file mode 100644 index 000000000..45bebb722 --- /dev/null +++ b/plugins/rails/rails.plugin.zsh @@ -0,0 +1,36 @@ + +alias ss='thin --stats "/thin/stats" start' +alias sg='ruby script/generate' +alias sd='ruby script/destroy' +alias sp='ruby script/plugin' +alias ssp='ruby script/spec' +alias rdbm='rake db:migrate' +alias sc='ruby script/console' +alias sd='ruby script/server --debugger' +alias devlog='tail -f log/development.log' + +function _cap_does_task_list_need_generating () { + if [ ! -f .cap_tasks~ ]; then return 0; + else + accurate=$(stat -f%m .cap_tasks~) + changed=$(stat -f%m config/deploy.rb) + return $(expr $accurate '>=' $changed) + fi +} + +function _cap () { + if [ -f config/deploy.rb ]; then + if _cap_does_task_list_need_generating; then + echo "\nGenerating .cap_tasks~..." > /dev/stderr + cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' +> .cap_tasks~ + fi + compadd `cat .cap_tasks~` + fi +} + +compctl -K _cap cap + +function remote_console() { + /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" +} diff --git a/plugins/ruby.plugin.zsh b/plugins/ruby.plugin.zsh deleted file mode 100644 index 82bf5d49d..000000000 --- a/plugins/ruby.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -alias sgem='sudo gem' - -# Find ruby file -alias rfind='find . -name *.rb | xargs grep -n' \ No newline at end of file diff --git a/plugins/ruby/ruby.plugin.zsh b/plugins/ruby/ruby.plugin.zsh new file mode 100644 index 000000000..82bf5d49d --- /dev/null +++ b/plugins/ruby/ruby.plugin.zsh @@ -0,0 +1,4 @@ +alias sgem='sudo gem' + +# Find ruby file +alias rfind='find . -name *.rb | xargs grep -n' \ No newline at end of file diff --git a/plugins/ssh-agent.plugin.zsh b/plugins/ssh-agent.plugin.zsh deleted file mode 100644 index ce0d645c1..000000000 --- a/plugins/ssh-agent.plugin.zsh +++ /dev/null @@ -1,23 +0,0 @@ -# Based on code from Joseph M. Reagle -# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html - -local SSH_ENV=$HOME/.ssh/environment - -function start_agent { - /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} - chmod 600 ${SSH_ENV} - . ${SSH_ENV} > /dev/null - /usr/bin/ssh-add; -} - -# Source SSH settings, if applicable - -if [ -f "${SSH_ENV}" ]; then - . ${SSH_ENV} > /dev/null - ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { - start_agent; - } -else - start_agent; -fi - diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh new file mode 100644 index 000000000..ce0d645c1 --- /dev/null +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -0,0 +1,23 @@ +# Based on code from Joseph M. Reagle +# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html + +local SSH_ENV=$HOME/.ssh/environment + +function start_agent { + /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} + chmod 600 ${SSH_ENV} + . ${SSH_ENV} > /dev/null + /usr/bin/ssh-add; +} + +# Source SSH settings, if applicable + +if [ -f "${SSH_ENV}" ]; then + . ${SSH_ENV} > /dev/null + ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { + start_agent; + } +else + start_agent; +fi + diff --git a/plugins/textmate.plugin.zsh b/plugins/textmate.plugin.zsh deleted file mode 100644 index 7b73e2751..000000000 --- a/plugins/textmate.plugin.zsh +++ /dev/null @@ -1,14 +0,0 @@ - -# TextMate -alias et='mate . &' -alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' -alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' -alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' - -# Editor Ruby file in TextMate -alias mr='mate CHANGELOG app config db lib public script spec test' - -function tm() { - cd $1 - mate $1 -} diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh new file mode 100644 index 000000000..7b73e2751 --- /dev/null +++ b/plugins/textmate/textmate.plugin.zsh @@ -0,0 +1,14 @@ + +# TextMate +alias et='mate . &' +alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' +alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' +alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' + +# Editor Ruby file in TextMate +alias mr='mate CHANGELOG app config db lib public script spec test' + +function tm() { + cd $1 + mate $1 +} diff --git a/plugins/vi-mode.plugin.zsh b/plugins/vi-mode.plugin.zsh deleted file mode 100644 index c47ab7211..000000000 --- a/plugins/vi-mode.plugin.zsh +++ /dev/null @@ -1,22 +0,0 @@ -function zle-line-init zle-keymap-select { - zle reset-prompt -} - -zle -N zle-line-init -zle -N zle-keymap-select - -bindkey -v - -# if mode indicator wasn't setup by theme, define default -if [[ "$MODE_INDICATOR" == "" ]]; then - MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" -fi - -function vi_mode_prompt_info() { - echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}" -} - -# define right prompt, if it wasn't defined by a theme -if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then - RPS1='$(vi_mode_prompt_info)' -fi diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh new file mode 100644 index 000000000..c47ab7211 --- /dev/null +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -0,0 +1,22 @@ +function zle-line-init zle-keymap-select { + zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select + +bindkey -v + +# if mode indicator wasn't setup by theme, define default +if [[ "$MODE_INDICATOR" == "" ]]; then + MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" +fi + +function vi_mode_prompt_info() { + echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}" +} + +# define right prompt, if it wasn't defined by a theme +if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then + RPS1='$(vi_mode_prompt_info)' +fi -- cgit v1.2.3-70-g09d2 From 7936bbbd5a3895caa7153e4d03740ac12a333862 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Fri, 1 Oct 2010 10:59:48 +0200 Subject: adapt brew,gem,pip plugin to new structure --- functions/brew/_brew | 69 -------------------------------------------- functions/gem/_gem | 64 ---------------------------------------- functions/pip/_pip | 46 ----------------------------- plugins/brew/_brew | 69 ++++++++++++++++++++++++++++++++++++++++++++ plugins/brew/brew.plugin.zsh | 2 +- plugins/gem.plugin.zsh | 4 --- plugins/gem/_gem | 64 ++++++++++++++++++++++++++++++++++++++++ plugins/gem/gem.plugin.zsh | 4 +++ plugins/pip.plugin.zsh | 4 --- plugins/pip/_pip | 46 +++++++++++++++++++++++++++++ plugins/pip/pip.plugin.zsh | 4 +++ 11 files changed, 188 insertions(+), 188 deletions(-) delete mode 100644 functions/brew/_brew delete mode 100644 functions/gem/_gem delete mode 100644 functions/pip/_pip create mode 100644 plugins/brew/_brew delete mode 100644 plugins/gem.plugin.zsh create mode 100644 plugins/gem/_gem create mode 100644 plugins/gem/gem.plugin.zsh delete mode 100644 plugins/pip.plugin.zsh create mode 100644 plugins/pip/_pip create mode 100644 plugins/pip/pip.plugin.zsh diff --git a/functions/brew/_brew b/functions/brew/_brew deleted file mode 100644 index 4e590ac63..000000000 --- a/functions/brew/_brew +++ /dev/null @@ -1,69 +0,0 @@ -#compdef brew -#autoload - -# imported from the latest homebrew contributions - -_brew_all_formulae() { - formulae=(`brew search`) -} - -_brew_installed_formulae() { - installed_formulae=(`brew list`) -} - -local -a _1st_arguments -_1st_arguments=( - 'cat:display formula file for a formula' - 'cleanup:uninstall unused and old versions of packages' - 'create:create a new formula' - 'deps:list dependencies and dependants of a formula' - 'doctor:audits your installation for common issues' - 'edit:edit a formula' - 'home:visit the homepage of a formula or the brew project' - 'info:information about a formula' - 'install:install a formula' - 'link:link a formula' - 'list:list files in a formula or not-installed formulae' - 'log:git commit log for a formula' - 'outdated:list formulas for which a newer version is available' - 'prune:remove dead links' - 'remove:remove a formula' - 'search:search for a formula (/regex/ or string)' - 'unlink:unlink a formula' - 'update:freshen up links' - 'uses:show formulas which depend on a formula' -) - -local expl -local -a formula installed_formulae - -_arguments \ - '(-v --verbose)'{-v,--verbose}'[verbose]' \ - '(--version)--version[version information]' \ - '(--prefix)--prefix[where brew lives on this system]' \ - '(--cache)--cache[brew cache]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "brew subcommand" _1st_arguments - return -fi - -case "$words[1]" in - list) - _arguments \ - '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ - '1: :->forms' && return 0 - - if [[ "$state" == forms ]]; then - _brew_installed_formulae - _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae - fi ;; - install|home|log|info|uses|cat|deps) - _brew_all_formulae - _wanted formulae expl 'all formulae' compadd -a formulae ;; - remove|edit|xo) - _brew_installed_formulae - _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; -esac - diff --git a/functions/gem/_gem b/functions/gem/_gem deleted file mode 100644 index 83cba40d1..000000000 --- a/functions/gem/_gem +++ /dev/null @@ -1,64 +0,0 @@ -#compdef gem -#autoload - -# gem zsh completion, based on homebrew completion - -_gem_installed() { - installed_gems=(`gem list --local --no-versions`) -} - -local -a _1st_arguments -_1st_arguments=( - 'cert:Manage RubyGems certificates and signing settings' - 'check:Check installed gems' - 'cleanup:Clean up old versions of installed gems in the local repository' - 'contents:Display the contents of the installed gems' - 'dependency:Show the dependencies of an installed gem' - 'environment:Display information about the RubyGems environment' - 'fetch:Download a gem and place it in the current directory' - 'generate_index:Generates the index files for a gem server directory' - 'help:Provide help on the `gem` command' - 'install:Install a gem into the local repository' - 'list:Display gems whose name starts with STRING' - 'lock:Generate a lockdown list of gems' - 'mirror:Mirror a gem repository' - 'outdated:Display all gems that need updates' - 'owner:Manage gem owners on RubyGems.org.' - 'pristine:Restores installed gems to pristine condition from files located in the gem cache' - 'push:Push a gem up to RubyGems.org' - 'query:Query gem information in local or remote repositories' - 'rdoc:Generates RDoc for pre-installed gems' - 'search:Display all gems whose name contains STRING' - 'server:Documentation and gem repository HTTP server' - 'sources:Manage the sources and cache file RubyGems uses to search for gems' - 'specification:Display gem specification (in yaml)' - 'stale:List gems along with access times' - 'uninstall:Uninstall gems from the local repository' - 'unpack:Unpack an installed gem to the current directory' - 'update:Update the named gems (or all installed gems) in the local repository' - 'which:Find the location of a library file you can require' -) - -local expl -local -a gems installed_gems - -_arguments \ - '(-v --version)'{-v,--version}'[show version]' \ - '(-h --help)'{-h,--help}'[show help]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "gem subcommand" _1st_arguments - return -fi - -case "$words[1]" in - list) - if [[ "$state" == forms ]]; then - _gem_installed - _requested installed_gems expl 'installed gems' compadd -a installed_gems - fi ;; - uninstall|update) - _gem_installed - _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;; -esac diff --git a/functions/pip/_pip b/functions/pip/_pip deleted file mode 100644 index b58010173..000000000 --- a/functions/pip/_pip +++ /dev/null @@ -1,46 +0,0 @@ -#compdef pip -#autoload - -# pip zsh completion, based on homebrew completion - -_pip_installed() { - installed_pkgs=(`pip freeze`) -} - -local -a _1st_arguments -_1st_arguments=( - 'bundle:Create pybundles (archives containing multiple packages)' - 'freeze:Output all currently installed packages (exact versions) to stdout' - 'help:Show available commands' - 'install:Install packages' - 'search:Search PyPI' - 'uninstall:Uninstall packages' - 'unzip:Unzip individual packages' - 'zip:Zip individual packages' -) - -local expl -local -a pkgs installed_pkgs - -_arguments \ - '(--version)--version[Show version number of program and exit]' \ - '(-v --verbose)'{-v,--verbose}'[Give more output]' \ - '(-q --quiet)'{-q,--quiet}'[Give less output]' \ - '(-h --help)'{-h,--help}'[Show help]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "pip subcommand" _1st_arguments - return -fi - -case "$words[1]" in - list) - if [[ "$state" == forms ]]; then - _pip_installed - _requested installed_pkgs expl 'installed packages' compadd -a installed_pkgs - fi ;; - uninstall) - _pip_installed - _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;; -esac diff --git a/plugins/brew/_brew b/plugins/brew/_brew new file mode 100644 index 000000000..4e590ac63 --- /dev/null +++ b/plugins/brew/_brew @@ -0,0 +1,69 @@ +#compdef brew +#autoload + +# imported from the latest homebrew contributions + +_brew_all_formulae() { + formulae=(`brew search`) +} + +_brew_installed_formulae() { + installed_formulae=(`brew list`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cat:display formula file for a formula' + 'cleanup:uninstall unused and old versions of packages' + 'create:create a new formula' + 'deps:list dependencies and dependants of a formula' + 'doctor:audits your installation for common issues' + 'edit:edit a formula' + 'home:visit the homepage of a formula or the brew project' + 'info:information about a formula' + 'install:install a formula' + 'link:link a formula' + 'list:list files in a formula or not-installed formulae' + 'log:git commit log for a formula' + 'outdated:list formulas for which a newer version is available' + 'prune:remove dead links' + 'remove:remove a formula' + 'search:search for a formula (/regex/ or string)' + 'unlink:unlink a formula' + 'update:freshen up links' + 'uses:show formulas which depend on a formula' +) + +local expl +local -a formula installed_formulae + +_arguments \ + '(-v --verbose)'{-v,--verbose}'[verbose]' \ + '(--version)--version[version information]' \ + '(--prefix)--prefix[where brew lives on this system]' \ + '(--cache)--cache[brew cache]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "brew subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + _arguments \ + '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ + '1: :->forms' && return 0 + + if [[ "$state" == forms ]]; then + _brew_installed_formulae + _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae + fi ;; + install|home|log|info|uses|cat|deps) + _brew_all_formulae + _wanted formulae expl 'all formulae' compadd -a formulae ;; + remove|edit|xo) + _brew_installed_formulae + _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; +esac + diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index a30540966..353a18942 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1,4 +1,4 @@ # add brew completion function to path -fpath=($ZSH/functions/brew $fpath) +fpath=($ZSH/plugins/brew $fpath) autoload -U compinit compinit -i diff --git a/plugins/gem.plugin.zsh b/plugins/gem.plugin.zsh deleted file mode 100644 index 0b6ef3c86..000000000 --- a/plugins/gem.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add brew completion function to path -fpath=($ZSH/functions/gem $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/gem/_gem b/plugins/gem/_gem new file mode 100644 index 000000000..83cba40d1 --- /dev/null +++ b/plugins/gem/_gem @@ -0,0 +1,64 @@ +#compdef gem +#autoload + +# gem zsh completion, based on homebrew completion + +_gem_installed() { + installed_gems=(`gem list --local --no-versions`) +} + +local -a _1st_arguments +_1st_arguments=( + 'cert:Manage RubyGems certificates and signing settings' + 'check:Check installed gems' + 'cleanup:Clean up old versions of installed gems in the local repository' + 'contents:Display the contents of the installed gems' + 'dependency:Show the dependencies of an installed gem' + 'environment:Display information about the RubyGems environment' + 'fetch:Download a gem and place it in the current directory' + 'generate_index:Generates the index files for a gem server directory' + 'help:Provide help on the `gem` command' + 'install:Install a gem into the local repository' + 'list:Display gems whose name starts with STRING' + 'lock:Generate a lockdown list of gems' + 'mirror:Mirror a gem repository' + 'outdated:Display all gems that need updates' + 'owner:Manage gem owners on RubyGems.org.' + 'pristine:Restores installed gems to pristine condition from files located in the gem cache' + 'push:Push a gem up to RubyGems.org' + 'query:Query gem information in local or remote repositories' + 'rdoc:Generates RDoc for pre-installed gems' + 'search:Display all gems whose name contains STRING' + 'server:Documentation and gem repository HTTP server' + 'sources:Manage the sources and cache file RubyGems uses to search for gems' + 'specification:Display gem specification (in yaml)' + 'stale:List gems along with access times' + 'uninstall:Uninstall gems from the local repository' + 'unpack:Unpack an installed gem to the current directory' + 'update:Update the named gems (or all installed gems) in the local repository' + 'which:Find the location of a library file you can require' +) + +local expl +local -a gems installed_gems + +_arguments \ + '(-v --version)'{-v,--version}'[show version]' \ + '(-h --help)'{-h,--help}'[show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "gem subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + if [[ "$state" == forms ]]; then + _gem_installed + _requested installed_gems expl 'installed gems' compadd -a installed_gems + fi ;; + uninstall|update) + _gem_installed + _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;; +esac diff --git a/plugins/gem/gem.plugin.zsh b/plugins/gem/gem.plugin.zsh new file mode 100644 index 000000000..65d3766f3 --- /dev/null +++ b/plugins/gem/gem.plugin.zsh @@ -0,0 +1,4 @@ +# add brew completion function to path +fpath=($ZSH/plugins/gem $fpath) +autoload -U compinit +compinit -i diff --git a/plugins/pip.plugin.zsh b/plugins/pip.plugin.zsh deleted file mode 100644 index 69e21f8d7..000000000 --- a/plugins/pip.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add brew completion function to path -fpath=($ZSH/functions/pip $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/pip/_pip b/plugins/pip/_pip new file mode 100644 index 000000000..b58010173 --- /dev/null +++ b/plugins/pip/_pip @@ -0,0 +1,46 @@ +#compdef pip +#autoload + +# pip zsh completion, based on homebrew completion + +_pip_installed() { + installed_pkgs=(`pip freeze`) +} + +local -a _1st_arguments +_1st_arguments=( + 'bundle:Create pybundles (archives containing multiple packages)' + 'freeze:Output all currently installed packages (exact versions) to stdout' + 'help:Show available commands' + 'install:Install packages' + 'search:Search PyPI' + 'uninstall:Uninstall packages' + 'unzip:Unzip individual packages' + 'zip:Zip individual packages' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '(--version)--version[Show version number of program and exit]' \ + '(-v --verbose)'{-v,--verbose}'[Give more output]' \ + '(-q --quiet)'{-q,--quiet}'[Give less output]' \ + '(-h --help)'{-h,--help}'[Show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "pip subcommand" _1st_arguments + return +fi + +case "$words[1]" in + list) + if [[ "$state" == forms ]]; then + _pip_installed + _requested installed_pkgs expl 'installed packages' compadd -a installed_pkgs + fi ;; + uninstall) + _pip_installed + _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;; +esac diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh new file mode 100644 index 000000000..bf9f23968 --- /dev/null +++ b/plugins/pip/pip.plugin.zsh @@ -0,0 +1,4 @@ +# add brew completion function to path +fpath=($ZSH/plugins/pip $fpath) +autoload -U compinit +compinit -i -- cgit v1.2.3-70-g09d2 From a4afcfddbf8c9e8769e4e78c23a144c9b3c9aaf3 Mon Sep 17 00:00:00 2001 From: Luke Randall Date: Sun, 5 Sep 2010 16:52:38 +0200 Subject: Add lukerandall.zsh-theme --- themes/lukerandall.zsh-theme | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 themes/lukerandall.zsh-theme diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme new file mode 100644 index 000000000..24a0612b7 --- /dev/null +++ b/themes/lukerandall.zsh-theme @@ -0,0 +1,10 @@ +# ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc +# Thanks to gallifrey, upon whose theme this is based + +local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B»%b ' +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" -- cgit v1.2.3-70-g09d2 From 541da0c9d1cdf88583490fa06b6e307ea09bfc94 Mon Sep 17 00:00:00 2001 From: Jake Bell Date: Fri, 1 Oct 2010 14:15:52 -0500 Subject: Removing capistrano aliases/functions from rails plugin (since cap is not rails-specific). --- plugins/cap/cap.plugin.zsh | 21 +++++++++++++++++++++ plugins/rails/rails.plugin.zsh | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 plugins/cap/cap.plugin.zsh diff --git a/plugins/cap/cap.plugin.zsh b/plugins/cap/cap.plugin.zsh new file mode 100644 index 000000000..a0fa21d00 --- /dev/null +++ b/plugins/cap/cap.plugin.zsh @@ -0,0 +1,21 @@ +function _cap_does_task_list_need_generating () { + if [ ! -f .cap_tasks~ ]; then return 0; + else + accurate=$(stat -f%m .cap_tasks~) + changed=$(stat -f%m config/deploy.rb) + return $(expr $accurate '>=' $changed) + fi +} + +function _cap () { + if [ -f config/deploy.rb ]; then + if _cap_does_task_list_need_generating; then + echo "\nGenerating .cap_tasks~..." > /dev/stderr + cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' +> .cap_tasks~ + fi + compadd `cat .cap_tasks~` + fi +} + +compctl -K _cap cap \ No newline at end of file diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 45bebb722..ac8119e83 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -1,4 +1,3 @@ - alias ss='thin --stats "/thin/stats" start' alias sg='ruby script/generate' alias sd='ruby script/destroy' @@ -9,28 +8,6 @@ alias sc='ruby script/console' alias sd='ruby script/server --debugger' alias devlog='tail -f log/development.log' -function _cap_does_task_list_need_generating () { - if [ ! -f .cap_tasks~ ]; then return 0; - else - accurate=$(stat -f%m .cap_tasks~) - changed=$(stat -f%m config/deploy.rb) - return $(expr $accurate '>=' $changed) - fi -} - -function _cap () { - if [ -f config/deploy.rb ]; then - if _cap_does_task_list_need_generating; then - echo "\nGenerating .cap_tasks~..." > /dev/stderr - cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' -> .cap_tasks~ - fi - compadd `cat .cap_tasks~` - fi -} - -compctl -K _cap cap - function remote_console() { /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" } -- cgit v1.2.3-70-g09d2 From d53d0eac070b270222c042c2e187dcf3a109b39a Mon Sep 17 00:00:00 2001 From: Phillip Ridlen Date: Tue, 5 Oct 2010 17:06:08 -0500 Subject: Add cloud.zsh-theme --- themes/cloud.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/cloud.zsh-theme diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme new file mode 100644 index 000000000..ad5e2834b --- /dev/null +++ b/themes/cloud.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 8059c0727a09257dc387aa9ba17dc99d1842aa19 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 01:27:40 +0200 Subject: Improving git plugin so it can display much more data. --- lib/git.zsh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/git.zsh b/lib/git.zsh index 889dd98df..57a78e27f 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -11,3 +11,31 @@ parse_git_dirty () { echo "$ZSH_THEME_GIT_PROMPT_CLEAN" fi } + +# get the status of the working tree +git_prompt_status() { + INDEX=$(git status --porcelain 2> /dev/null) + STATUS="" + if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" + fi + if $(echo "$INDEX" | grep '^A ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + fi + if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + fi + if $(echo "$INDEX" | grep '^R ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS" + fi + if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" + fi + if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" + fi + echo $STATUS +} + -- cgit v1.2.3-70-g09d2 From b6dde1e8cfb938e507e5e8db9eac99d28a020468 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 01:49:35 +0200 Subject: Adding new gozilla theme --- themes/gozilla.zsh-theme | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 themes/gozilla.zsh-theme diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme new file mode 100644 index 000000000..3112b3670 --- /dev/null +++ b/themes/gozilla.zsh-theme @@ -0,0 +1,15 @@ +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +RPROMPT='$(git_prompt_status)' + +ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}" +ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" + -- cgit v1.2.3-70-g09d2 From deb0f7478b292b48338bc4d6098b8f6b013d0b4b Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 02:16:10 +0200 Subject: Fixing some minor redrew issue --- themes/gozilla.zsh-theme | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme index 3112b3670..97566e380 100644 --- a/themes/gozilla.zsh-theme +++ b/themes/gozilla.zsh-theme @@ -1,8 +1,12 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -RPROMPT='$(git_prompt_status)' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" + +RPROMPT='$(git_prompt_status)' + ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}" ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}" @@ -10,6 +14,3 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" - -- cgit v1.2.3-70-g09d2 From aab235f6121a93b81a425d522a0c7f2aaac946bd Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 8 Oct 2010 22:44:42 -0700 Subject: functions: fix title() to not match any $TERM On my linux virtual terminals, where TERM="linux", I was getting annoying output that was messing up my prompt. It turns out the title function was always matching on the elif statement for xterm/rxvt no matter what and the linux vt doesn't know what to do with the title special control sequence and thus was printing out garbage. Through experimentation I figured out that the || inside of the [[ ]] did not work: export TERM=linux $ if [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then echo $TERM; fi linux $ if [[ $TERM =~ "^xterm" ]] || [[ $TERM == "rxvt" ]]; then echo $TERM; fi Signed-off-by: Brandon Philips openSUSE running zsh 4.3.10 --- lib/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index 561586cba..e494f1f4d 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -5,7 +5,7 @@ function title { print -nR $'\033k'$1$'\033'\\\ print -nR $'\033]0;'$2$'\a' - elif [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then + elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]]; then # Use this one instead for XTerms: print -nR $'\033]0;'$*$'\a' fi -- cgit v1.2.3-70-g09d2 From df1e305736f23d8702a4d68b0fb8fc502e8c442a Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 8 Oct 2010 22:57:43 -0700 Subject: themes: add philips theme Theme based on clean that is more suitable for white background terminals. Signed-off-by: Brandon Philips --- themes/philips.zsh-theme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/philips.zsh-theme diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme new file mode 100644 index 000000000..fa7c59035 --- /dev/null +++ b/themes/philips.zsh-theme @@ -0,0 +1,14 @@ +if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi + +PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +RPROMPT='[%*]' + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" +ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' -- cgit v1.2.3-70-g09d2 From 249fe1471cde3b12366729e5a869dd56c26b07ce Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 14:29:24 +0100 Subject: adding github plugin --- plugins/github/_github | 39 +++++++++++++++++++++++++++++++++++++++ plugins/github/github.plugin.zsh | 4 ++++ 2 files changed, 43 insertions(+) create mode 100644 plugins/github/_github create mode 100644 plugins/github/github.plugin.zsh diff --git a/plugins/github/_github b/plugins/github/_github new file mode 100644 index 000000000..5295081e5 --- /dev/null +++ b/plugins/github/_github @@ -0,0 +1,39 @@ +#compdef github +#autoload + +# github zsh completion, based on homebrew completion + +local -a _1st_arguments +_1st_arguments=( + 'browse:Open this repo in a web browser' + 'clone:Clone a repo' + 'config:Automatically set configuration info, or pass args to specify' + 'create-from-local:Create a new GitHub repository from the current local repository' + 'create:Create a new empty GitHub repository' + 'fetch:Fetch from a remote to a local branch' + 'fetch_all:Fetch all refs from a user' + 'fork:Forks a GitHub repository' + 'home:Open this repos master branch in a web browser' + 'ignore:Ignore a SHA from github network commits' + 'info:Info about this project' + 'issues:Project issues tools' + 'network:Project network tools - sub-commands : web [user], list, fetch, commits' + 'network --after:Only show commits after a certain date' + 'network --applies:Filter commits to patches that apply cleanly' + 'open:Open the given user/project in a web browser' + 'pull-request:Generate the text for a pull request' + 'pull:Pull from a remote' + 'search:Search GitHub for the given repository name' + 'track:Track another users repository' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "github subcommand" _1st_arguments + return +fi diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh new file mode 100644 index 000000000..c23504b85 --- /dev/null +++ b/plugins/github/github.plugin.zsh @@ -0,0 +1,4 @@ +# add github completion function to path +fpath=($ZSH/plugins/github $fpath) +autoload -U compinit +compinit -i -- cgit v1.2.3-70-g09d2 From dfbed8fd9894ec4b13745e9e08233a750c2369ee Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 15:03:08 +0100 Subject: added git log incl. stats for the past 5 commits --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 655eaf728..d317d179d 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -12,7 +12,7 @@ alias gb='git branch' alias gba='git branch -a' alias gcount='git shortlog -sn' alias gcp='git cherry-pick' - +alias glg='git log --stat --max-count=5' # Git and svn mix alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' -- cgit v1.2.3-70-g09d2 From fcd88edfb3464e46d3337c3ee72d28248e92ac79 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 15:18:35 +0100 Subject: adding comment and URL to github gem --- plugins/github/_github | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/github/_github b/plugins/github/_github index 5295081e5..72178946a 100644 --- a/plugins/github/_github +++ b/plugins/github/_github @@ -1,3 +1,6 @@ +# in order to make this work, you would need to have the github gem installed +# http://github.com/defunkt/github-gem + #compdef github #autoload -- cgit v1.2.3-70-g09d2 From 210c76c35b1db7a761df45cd7f85d3b324f8e0b5 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 15:29:28 +0100 Subject: leaving out subcommands for now --- plugins/github/_github | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/github/_github b/plugins/github/_github index 72178946a..b8e1a9ada 100644 --- a/plugins/github/_github +++ b/plugins/github/_github @@ -21,8 +21,6 @@ _1st_arguments=( 'info:Info about this project' 'issues:Project issues tools' 'network:Project network tools - sub-commands : web [user], list, fetch, commits' - 'network --after:Only show commits after a certain date' - 'network --applies:Filter commits to patches that apply cleanly' 'open:Open the given user/project in a web browser' 'pull-request:Generate the text for a pull request' 'pull:Pull from a remote' -- cgit v1.2.3-70-g09d2 From 061ea5c7c98ada295ae4623692e6811c0baab88d Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sat, 9 Oct 2010 18:06:00 +0200 Subject: changeing unicode characters that were causing issues --- themes/gozilla.zsh-theme | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme index 97566e380..c6b752e9b 100644 --- a/themes/gozilla.zsh-theme +++ b/themes/gozilla.zsh-theme @@ -1,16 +1,15 @@ PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" - -RPROMPT='$(git_prompt_status)' - -ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}" - +ZSH_THEME_GIT_PROMPT_PREFIX="(" +ZSH_THEME_GIT_PROMPT_SUFFIX=")" +ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +RPROMPT='$(git_prompt_status)%{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" -- cgit v1.2.3-70-g09d2 From 425b0ef89fcd40b6b235347e32d8efd44709a802 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 18:38:01 +0100 Subject: bugfix - moved gem info --- plugins/github/_github | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/github/_github b/plugins/github/_github index b8e1a9ada..83e1713c7 100644 --- a/plugins/github/_github +++ b/plugins/github/_github @@ -1,9 +1,9 @@ -# in order to make this work, you would need to have the github gem installed -# http://github.com/defunkt/github-gem - #compdef github #autoload +# in order to make this work, you will need to have the github gem installed +# http://github.com/defunkt/github-gem + # github zsh completion, based on homebrew completion local -a _1st_arguments -- cgit v1.2.3-70-g09d2 From dc12853b0c3e5af9e42f44cb9efdf57d44d20711 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Sat, 9 Oct 2010 19:11:07 +0100 Subject: merging in changes from robby's repo --- lib/functions.zsh | 1 - lib/git.zsh | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index e494f1f4d..e3c0de43e 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -37,4 +37,3 @@ function take() { mkdir -p $1 cd $1 } - diff --git a/lib/git.zsh b/lib/git.zsh index 57a78e27f..75fdc1f9c 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -38,4 +38,3 @@ git_prompt_status() { fi echo $STATUS } - -- cgit v1.2.3-70-g09d2