mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
898ca51248
4 changed files with 70 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
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
|
||||
|
||||
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue