From 5c529b5daac6e22cb8a267dcd7796c8400c63679 Mon Sep 17 00:00:00 2001 From: Armin Widegreen Date: Tue, 16 Jul 2013 17:10:47 +0200 Subject: [PATCH 1/7] Fix ssh-agent plugin identities comment for using multiple identities. --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 7468749f8..3b0042a7d 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -9,7 +9,7 @@ # To load multiple identities use the identities style, For # example: # -# zstyle :omz:plugins:ssh-agent id_rsa id_rsa2 id_github +# zstyle :omz:plugins:ssh-agent identities id_rsa id_rsa2 id_github # # To set the maximum lifetime of the identities, use the # lifetime style. The lifetime may be specified in seconds From 00ccee1f33c90c8900e8c2efe4dca9bf5db040f9 Mon Sep 17 00:00:00 2001 From: Trae Robrock Date: Tue, 16 Jul 2013 16:57:08 -0700 Subject: [PATCH 2/7] Add knife_ssh command to make connecting to servers managed with chef easier --- plugins/knife_ssh/knife_ssh.plugin.zsh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/knife_ssh/knife_ssh.plugin.zsh diff --git a/plugins/knife_ssh/knife_ssh.plugin.zsh b/plugins/knife_ssh/knife_ssh.plugin.zsh new file mode 100644 index 000000000..ea3361c49 --- /dev/null +++ b/plugins/knife_ssh/knife_ssh.plugin.zsh @@ -0,0 +1,18 @@ +function knife_ssh() { + grep -q $1 ~/.knife_comp~ || rm -f ~/.knife_comp~; + ssh $(knife node show $1 | awk '/IP:/{print $2}') +} + +_knife_ssh() { + if hash knife 2>/dev/null; then + if [[ ! -f ~/.knife_comp~ ]]; then + echo "\nGenerating ~/.knife_comp~..." >/dev/stderr + knife node list > ~/.knife_comp~ + fi + compadd `cat ~/.knife_comp~` + else + echo "Could not find knife" > /dev/stderr; + fi +} + +compdef _knife_ssh knife_ssh From 9a9e6e929964cbb25c5ce656a995e31ab9636762 Mon Sep 17 00:00:00 2001 From: Trae Robrock Date: Tue, 16 Jul 2013 17:01:58 -0700 Subject: [PATCH 3/7] No cat, and hide errors for missing cache file --- plugins/knife_ssh/knife_ssh.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/knife_ssh/knife_ssh.plugin.zsh b/plugins/knife_ssh/knife_ssh.plugin.zsh index ea3361c49..7fdd42a1e 100644 --- a/plugins/knife_ssh/knife_ssh.plugin.zsh +++ b/plugins/knife_ssh/knife_ssh.plugin.zsh @@ -1,5 +1,5 @@ function knife_ssh() { - grep -q $1 ~/.knife_comp~ || rm -f ~/.knife_comp~; + grep -q $1 ~/.knife_comp~ 2> /dev/null || rm -f ~/.knife_comp~; ssh $(knife node show $1 | awk '/IP:/{print $2}') } @@ -9,7 +9,7 @@ _knife_ssh() { echo "\nGenerating ~/.knife_comp~..." >/dev/stderr knife node list > ~/.knife_comp~ fi - compadd `cat ~/.knife_comp~` + compadd $(<~/.knife_comp~) else echo "Could not find knife" > /dev/stderr; fi From 4b8e10958467899765e0e4fedb80d31f8e0adb8d Mon Sep 17 00:00:00 2001 From: John Warwick Date: Fri, 19 Jul 2013 23:19:11 -0400 Subject: [PATCH 4/7] Added autocompletion support for Elixir mix command --- plugins/mix/_mix | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 plugins/mix/_mix diff --git a/plugins/mix/_mix b/plugins/mix/_mix new file mode 100644 index 000000000..602f5ffa0 --- /dev/null +++ b/plugins/mix/_mix @@ -0,0 +1,63 @@ +#compdef mix +#autoload + +# Elixir mix zsh completion + +local -a _1st_arguments +_1st_arguments=( + 'archive:Archive this project into a .ez file' + 'clean:Clean generated application files' + 'compile:Compile source files' + 'deps:List dependencies and their status' + "deps.clean:Remove dependencies' files" + 'deps.compile:Compile dependencies' + 'deps.get:Get all out of date dependencies' + 'deps.unlock:Unlock the given dependencies' + 'deps.update:Update dependencies' + 'do:Executes the commands separated by comma' + 'escriptize:Generates an escript for the project' + 'help:Print help information for tasks' + 'local:List local tasks' + 'local.install:Install a task or an archive locally' + 'local.rebar:Install rebar locally' + 'local.uninstall:Uninstall local tasks or archives' + 'new:Creates a new Elixir project' + 'run:Run the given file or expression' + "test:Run a project's tests" + '--help:Describe available tasks' + '--version:Prints the Elixir version information' +) + +__task_list () +{ + local expl + declare -a tasks + + tasks=(archive clean compile deps deps.clean deps.compile deps.get deps.unlock deps.update do escriptize help local local.install local.rebar local.uninstall new run test) + + _wanted tasks expl 'help' compadd $tasks +} + +local expl + +local curcontext="$curcontext" state line +typeset -A opt_args + +_arguments -C \ + ':command:->command' \ + '*::options:->options' + +case $state in + (command) + _describe -t commands "mix subcommand" _1st_arguments + return + ;; + + (options) + case $line[1] in + (help) + _arguments ':feature:__task_list' + esac + ;; +esac + From d0e312fc13d8f2a1a6bb9a02ca4acf1bcdc0bbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Macias?= Date: Mon, 22 Jul 2013 15:51:16 +0200 Subject: [PATCH 5/7] Fix symfony command completion 'permission denied' --- plugins/symfony/symfony.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/symfony/symfony.plugin.zsh b/plugins/symfony/symfony.plugin.zsh index 9de767548..f070e9e47 100644 --- a/plugins/symfony/symfony.plugin.zsh +++ b/plugins/symfony/symfony.plugin.zsh @@ -1,7 +1,7 @@ # symfony basic command completion _symfony_get_command_list () { - ./symfony | sed "1,/Available tasks/d" | awk 'BEGIN { cat=null; } /^[A-Za-z]+$/ { cat = $1; } /^ :[a-z]+/ { print cat $1; }' + php symfony | sed "1,/Available tasks/d" | awk 'BEGIN { cat=null; } /^[A-Za-z]+$/ { cat = $1; } /^ :[a-z]+/ { print cat $1; }' } _symfony () { From b456541cc392e79ce7b8b30f0cba98f2796ed9a4 Mon Sep 17 00:00:00 2001 From: Andrey Janzen Date: Tue, 23 Jul 2013 15:52:44 +0700 Subject: [PATCH 6/7] In capistrano completion show also tasks without description --- plugins/capistrano/_capistrano | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano index 1002dad96..3cadf3d54 100644 --- a/plugins/capistrano/_capistrano +++ b/plugins/capistrano/_capistrano @@ -4,7 +4,7 @@ if [[ -f config/deploy.rb || -f Capfile ]]; then if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then echo "\nGenerating .cap_tasks~..." > /dev/stderr - cap --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~ + cap -v --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~ fi compadd `cat .cap_tasks~` fi From 107d196f94ee800907abcb3c2de8df1f73b2b31e Mon Sep 17 00:00:00 2001 From: Kenneth Geerts Date: Tue, 23 Jul 2013 15:51:35 +0200 Subject: [PATCH 7/7] Updated gem plugin zsh completion (gem 2.0.3). --- plugins/gem/_gem | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/gem/_gem b/plugins/gem/_gem index 83cba40d1..975cec602 100644 --- a/plugins/gem/_gem +++ b/plugins/gem/_gem @@ -9,8 +9,9 @@ _gem_installed() { local -a _1st_arguments _1st_arguments=( + 'build:Build a gem from a gemspec' 'cert:Manage RubyGems certificates and signing settings' - 'check:Check installed gems' + 'check:Check a gem repository for added or missing files' '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' @@ -21,7 +22,7 @@ _1st_arguments=( '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' + 'mirror:Mirror all gem files (requires rubygems-mirror)' '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' @@ -35,8 +36,9 @@ _1st_arguments=( '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' + 'update:Update installed gems to the latest version' 'which:Find the location of a library file you can require' + 'yank:Remove a specific gem version release from RubyGems.org' ) local expl