mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-16 02:27:03 +01:00
updating scripts
This commit is contained in:
parent
a9da3e497d
commit
1c1ab1eaec
7 changed files with 162 additions and 9 deletions
|
|
@ -1,9 +1,16 @@
|
||||||
#compdef -P (|./)launch_trial.sh
|
#compdef -P (|./)launch_trial.sh
|
||||||
|
|
||||||
__launch_trial_list_tests()
|
__test_programs()
|
||||||
{
|
{
|
||||||
tests=($(./launch_trial.sh --list-tests))
|
tests=($(./launch_trial.sh --list-test-programs))
|
||||||
_describe -t tests 'Select test to run' tests
|
_describe -t tests 'Select test program:' tests
|
||||||
|
}
|
||||||
|
|
||||||
|
__test_program_and_class()
|
||||||
|
{
|
||||||
|
_arguments -C : \
|
||||||
|
'2: :__test_programs' \
|
||||||
|
'3: :__test_programs'
|
||||||
}
|
}
|
||||||
|
|
||||||
_launch_trial()
|
_launch_trial()
|
||||||
|
|
@ -14,10 +21,12 @@ _launch_trial()
|
||||||
local ret=1
|
local ret=1
|
||||||
|
|
||||||
_arguments -C : \
|
_arguments -C : \
|
||||||
'(- 1 *)--help[show usage]'\
|
'(- 1 *)--help[show usage]' \
|
||||||
'(- 1 *)--htmlcov[generate html coverage report in htmlcov surbdirectory]'\
|
'(- 1 *)--htmlcov[generate html coverage report in htmlcov surbdirectory]' \
|
||||||
'(- 1 *)--list-tests[list all tests]'\
|
'(- 1 *)--list-test-programs[list all test programs]' \
|
||||||
':projects:__launch_trial_list_tests' \
|
'(- 1 *)--list-test-classes[list test classes for a given test program]:programs:__test_programs' \
|
||||||
|
'(- 1 *)--list-test-methods[list all test method of a given test class]:class:__test_program_and_class' \
|
||||||
|
':projects:__test_programs' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
|
|
|
||||||
41
plugins/buildbot/_buildslave
Normal file
41
plugins/buildbot/_buildslave
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
#compdef buildslave
|
||||||
|
|
||||||
|
_buildslave()
|
||||||
|
{
|
||||||
|
typeset -A opt_args
|
||||||
|
local context state line curcontext="$curcontext"
|
||||||
|
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C : \
|
||||||
|
'(- 1 *)--help[show usage]'\
|
||||||
|
'(- 1 *)--version[display version]'\
|
||||||
|
'(- 1 *)--verbose[verbose output]'\
|
||||||
|
'1:command:->command'\
|
||||||
|
'*::args:->args' && ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
local commands;
|
||||||
|
commands=(
|
||||||
|
'create-slave:Create and populate a directory for a new buildslave'
|
||||||
|
'upgrade-slave:Upgrade an existing buildslave directory for the current version'
|
||||||
|
'start:Start a buildslave'
|
||||||
|
'stop:Stop a buildslave'
|
||||||
|
'restart:Restart a buildslave'
|
||||||
|
)
|
||||||
|
_describe -t commands 'command' commands && ret=0
|
||||||
|
;;
|
||||||
|
(args)
|
||||||
|
ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_buildslave "$@"
|
||||||
|
return $?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -67,6 +67,7 @@ alias gpoat='git push origin --all && git push origin --tags'
|
||||||
alias gg='git gui citool'
|
alias gg='git gui citool'
|
||||||
alias gga='git gui citool --amend'
|
alias gga='git gui citool --amend'
|
||||||
alias gk='gitk --all --branches'
|
alias gk='gitk --all --branches'
|
||||||
|
alias gss='git stash show --text'
|
||||||
|
|
||||||
# Will cd into the top of the current repository
|
# Will cd into the top of the current repository
|
||||||
# or submodule.
|
# or submodule.
|
||||||
|
|
|
||||||
101
plugins/vim-scp/_vim
Normal file
101
plugins/vim-scp/_vim
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
#compdef vim exim gvim gex gview rvim rview rgvim rgview evim eview vimdiff gvimdiff
|
||||||
|
|
||||||
|
(( $+functions[_vim_files] )) ||
|
||||||
|
_vim_files () {
|
||||||
|
case $PREFIX in
|
||||||
|
(+*) _files -P './' $* && return 0 ;;
|
||||||
|
(scp|http(|s)|(|s)ftp):*) _urls ;;
|
||||||
|
(*) _files $* ;;
|
||||||
|
esac
|
||||||
|
case $PREFIX in
|
||||||
|
(+) _message -e 'start at a given line (default: end of file)' ;;
|
||||||
|
(+<1->) _message -e 'line number' ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
local curcontext="$curcontext" state line expl
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
local arguments
|
||||||
|
|
||||||
|
arguments=(
|
||||||
|
'( -e -E -s -d -y)-v[vi mode]'
|
||||||
|
'(-v -E -d -y)-e[ex mode]'
|
||||||
|
'(-v -e -d -y)-E[improved ex mode]'
|
||||||
|
'(-v -e -E -s -y)-d[diff mode]'
|
||||||
|
'(-v -e -E -s -d )-y[easy mode]'
|
||||||
|
'-R[readonly mode]'
|
||||||
|
'-Z[restricted mode]'
|
||||||
|
'-m[modifications (writing files) not allowed]'
|
||||||
|
'-M[modifications in text not allowed]'
|
||||||
|
'-b[binary mode]'
|
||||||
|
'-g[start with GUI]'
|
||||||
|
'-l[lisp mode]'
|
||||||
|
'-C[start in compatible mode]'
|
||||||
|
'-N[start in incompatible mode]'
|
||||||
|
'(--nofork -f)'{--nofork,-f}'[do not detach the GUI version from the shell]'
|
||||||
|
'-V-[verbosity level]::verbosity:((0\:"do not display any messages"
|
||||||
|
1\:"display when viminfo file is read or written"
|
||||||
|
2\:"display sourced files"
|
||||||
|
5\:"display every searched tag-file"
|
||||||
|
8\:"display files that trigger autocommands"
|
||||||
|
9\:"display every triggered autocommand (default)"
|
||||||
|
12\:"display every executed function"
|
||||||
|
13\:"report every thrown, caught, finished, or discarded exception"
|
||||||
|
14\:"display anything pending in a \:finally clause"
|
||||||
|
15\:"display every executed ex-command"))'
|
||||||
|
'-D[debugging mode]'
|
||||||
|
'-n[no swap file (memory only)]'
|
||||||
|
'-nb[start as NetBean server]'
|
||||||
|
{-r,-L}'[list swap files and exit or recover from a swap file]::swap file:_vim_files -g "*.sw?(-.)"'
|
||||||
|
'( -H -F)-A[start in Arabic mode]'
|
||||||
|
'(-A -F)-H[start in Hebrew mode]'
|
||||||
|
'(-A -H )-F[start in Farsi mode]'
|
||||||
|
'-T[set terminal type]:::_terminals'
|
||||||
|
'-u[use given vimrc file instead of default .vimrc]::rc file:_files'
|
||||||
|
'-U[use given gvimrc file instead of default .gvimrc]::rc file:_files'
|
||||||
|
'--noplugin[do not load plugin scripts]'
|
||||||
|
'-o-[number of windows to open (default: one for each file)]::window count: '
|
||||||
|
'-O-[number of windows to vertically split open (default is one for each file)]::window count: '
|
||||||
|
'-p-[number of tabs to open (default: one for each file)]::tab count: '
|
||||||
|
'(* -t)-q-[quickfix file]:*:file:_vim_files'
|
||||||
|
'*--cmd[execute given command before loading any RC files]:command: '
|
||||||
|
'-c[execute given command after loading the first file]:command: '
|
||||||
|
'-S[source a session file after loading the first file]:session file:_files'
|
||||||
|
'-s[read normal-mode commands from script file]:script file:_files'
|
||||||
|
'-w[append all typed commands to given file]:output file:_files'
|
||||||
|
'-W[write all typed commands to given file, overwriting existing file]:output file:_files'
|
||||||
|
'-x[edit encrypted files]'
|
||||||
|
'-X[do not connect to X server]'
|
||||||
|
'--remote[edit given files in a vim server if possible]:*:file:_vim_files'
|
||||||
|
'--remote-silent[as --remote but without complaining if not possible]:*:file:_vim_files'
|
||||||
|
'--remote-wait[as --remote but wait for files to have been edited]:*:file:_vim_files'
|
||||||
|
'--remote-wait-silent[as --remote-wait but without complaining if not possible]:*:file:_vim_files'
|
||||||
|
'--remote-send[send given keys to vim server if possible]:keys: '
|
||||||
|
'--remote-tab[as --remote but open tab page for each file]:*:file:_vim_files'
|
||||||
|
'--remote-tab-silent[as --remote-silent but open tab page for each file]:*:file:_vim_files'
|
||||||
|
'--remote-tab-wait[as --remote-wait but open tab page for each file]:*:file:_vim_files'
|
||||||
|
'--remote-tab-wait-silent[as --remote-wait-silent but open tab page for each file]:*:file:_vim_files'
|
||||||
|
'--remote-expr[evaluate given expression in a vim server and print result]:expression: '
|
||||||
|
'--echo-wid[echo window ID on STDOUT, GUI version only]'
|
||||||
|
'--literal[do not expand wildcards in arguments (this is useless with ZSH)]'
|
||||||
|
'(- *)--serverlist[list available vim servers and exit]'
|
||||||
|
'--servername[name of vim server to send to or name of server to become]:server name:->server'
|
||||||
|
'--startuptime[write startup timing messages to given file]:log file:_files'
|
||||||
|
'--socketid[run GVIM in another window]'
|
||||||
|
'-i[use given viminfo file instead of default .viminfo]:viminfo file:_files'
|
||||||
|
'(- *)'{-h,--help}'[print help and exit]'
|
||||||
|
'(- *)--version[print version information and exit]'
|
||||||
|
'(* -q)-t[edit file where tag is defined]:tag:_complete_tag'
|
||||||
|
'(-t -q)*:file:_vim_files'
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments -C -S $arguments && return
|
||||||
|
|
||||||
|
if [[ "$state" = server ]]; then
|
||||||
|
local -a servers
|
||||||
|
servers=( ${(f)"$(_call_program servers $words[1] --serverlist 2>/dev/null)"} )
|
||||||
|
_wanted servers expl server compadd -M 'm:{a-z}={A-Z}' -a servers && return
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
1
plugins/vim-scp/vim-scp.plugin.zsh
Normal file
1
plugins/vim-scp/vim-scp.plugin.zsh
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
#
|
||||||
|
|
@ -32,7 +32,7 @@ DISABLE_VENV_CD="true"
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
plugins=(git tmux debian python pythonbrew vim-override virtualenvwrapper)
|
plugins=(git python pythonbrew repo cp buildbot rsync git-remote-branch command-not-found debian dircycle encode64 lol extract launch_trial common-aliases vim-scp)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
# source `which virtualenvwrapper.sh`
|
# source `which virtualenvwrapper.sh`
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ DISABLE_AUTO_UPDATE="true"
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
plugins=(git python vim-override)
|
plugins=(git python pythonbrew repo cp buildbot rsync git-remote-branch command-not-found debian dircycle encode64 lol extract launch_trial common-aliases vim-scp)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
source `which virtualenvwrapper.sh`
|
source `which virtualenvwrapper.sh`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue