mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7e32d561e2
6 changed files with 89 additions and 6 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
if [[ -f config/deploy.rb || -f Capfile ]]; then
|
if [[ -f config/deploy.rb || -f Capfile ]]; then
|
||||||
if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
|
if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
|
||||||
echo "\nGenerating .cap_tasks~..." > /dev/stderr
|
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
|
fi
|
||||||
compadd `cat .cap_tasks~`
|
compadd `cat .cap_tasks~`
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@ _gem_installed() {
|
||||||
|
|
||||||
local -a _1st_arguments
|
local -a _1st_arguments
|
||||||
_1st_arguments=(
|
_1st_arguments=(
|
||||||
|
'build:Build a gem from a gemspec'
|
||||||
'cert:Manage RubyGems certificates and signing settings'
|
'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'
|
'cleanup:Clean up old versions of installed gems in the local repository'
|
||||||
'contents:Display the contents of the installed gems'
|
'contents:Display the contents of the installed gems'
|
||||||
'dependency:Show the dependencies of an installed gem'
|
'dependency:Show the dependencies of an installed gem'
|
||||||
|
|
@ -21,7 +22,7 @@ _1st_arguments=(
|
||||||
'install:Install a gem into the local repository'
|
'install:Install a gem into the local repository'
|
||||||
'list:Display gems whose name starts with STRING'
|
'list:Display gems whose name starts with STRING'
|
||||||
'lock:Generate a lockdown list of gems'
|
'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'
|
'outdated:Display all gems that need updates'
|
||||||
'owner:Manage gem owners on RubyGems.org.'
|
'owner:Manage gem owners on RubyGems.org.'
|
||||||
'pristine:Restores installed gems to pristine condition from files located in the gem cache'
|
'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'
|
'stale:List gems along with access times'
|
||||||
'uninstall:Uninstall gems from the local repository'
|
'uninstall:Uninstall gems from the local repository'
|
||||||
'unpack:Unpack an installed gem to the current directory'
|
'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'
|
'which:Find the location of a library file you can require'
|
||||||
|
'yank:Remove a specific gem version release from RubyGems.org'
|
||||||
)
|
)
|
||||||
|
|
||||||
local expl
|
local expl
|
||||||
|
|
|
||||||
18
plugins/knife_ssh/knife_ssh.plugin.zsh
Normal file
18
plugins/knife_ssh/knife_ssh.plugin.zsh
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
function knife_ssh() {
|
||||||
|
grep -q $1 ~/.knife_comp~ 2> /dev/null || 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 $(<~/.knife_comp~)
|
||||||
|
else
|
||||||
|
echo "Could not find knife" > /dev/stderr;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
compdef _knife_ssh knife_ssh
|
||||||
63
plugins/mix/_mix
Normal file
63
plugins/mix/_mix
Normal file
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
# To load multiple identities use the identities style, For
|
# To load multiple identities use the identities style, For
|
||||||
# example:
|
# 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
|
# To set the maximum lifetime of the identities, use the
|
||||||
# lifetime style. The lifetime may be specified in seconds
|
# lifetime style. The lifetime may be specified in seconds
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# symfony basic command completion
|
# symfony basic command completion
|
||||||
|
|
||||||
_symfony_get_command_list () {
|
_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 () {
|
_symfony () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue