From 0525bd64d1bd1725ddf2a279d56712b75593178a Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:51:09 -0200 Subject: [PATCH 01/65] Added alias to clear .orig files on mercurial plugin --- plugins/mercurial/mercurial.plugin.zsh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index a3a6ff8b6..a8c681892 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -1,3 +1,8 @@ +function hg_current_branch() { + if [ -d .hg ]; then + echo hg:$(hg branch) + fi +} # Mercurial alias hgc='hg commit' @@ -13,8 +18,5 @@ alias hgs='hg status' # this is the 'git commit --amend' equivalent alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip' -function hg_current_branch() { - if [ -d .hg ]; then - echo hg:$(hg branch) - fi -} \ No newline at end of file +# Remove all .orig files +alias hgclear='find . -name "*.orig" -delete' From 7a281a90ac1915bcc377e169348c02b59156e681 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:51:40 -0200 Subject: [PATCH 02/65] Added function to lock at osx plugin --- plugins/osx/osx.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index f278d4f8d..ba2463483 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -154,3 +154,6 @@ function trash() { IFS=$temp_ifs } +function lock() { + open -a ScreenSaverEngine +} From d9ef52ba311a5e4d9fb10d97e27964a96536a376 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:52:36 -0200 Subject: [PATCH 03/65] Added some aliases at rails3 plugin --- plugins/rails3/rails3.plugin.zsh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh index 237d0594b..badbcb5d5 100644 --- a/plugins/rails3/rails3.plugin.zsh +++ b/plugins/rails3/rails3.plugin.zsh @@ -19,5 +19,11 @@ alias ru='_rails_command runner' alias rs='_rails_command server' alias rsd='_rails_command server --debugger' alias devlog='tail -f log/development.log' -alias rdm='rake db:migrate' -alias rdr='rake db:rollback' +alias rdm='_run-with-bundler rake db:migrate' +alias rdr='_run-with-bundlerrake db:rollback' + +alias rspec='_run-with-bundler rspec' +alias cuke='_run-with-bundler cucumber' + +alias routes='_run-with-bundler rake routes' +alias groutes='routes | grep' From 60e209325d6dab240d6542086fb07ae4f96e073c Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:52:57 -0200 Subject: [PATCH 04/65] Added alias at rvm plugin --- plugins/rvm/rvm.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 1ab800b0f..151d69322 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -2,6 +2,7 @@ fpath=($rvm_path/scripts/zsh/Completion $fpath) alias rubies='rvm list rubies' alias gemsets='rvm gemset list' +alias rvms='rvm gemset' local ruby18='ruby-1.8.7-p334' local ruby19='ruby-1.9.3-p194' From 76f5989d3272b62967b67bf81be5fc72d6b439ef Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:56:13 -0200 Subject: [PATCH 05/65] New general aliases --- lib/aliases.zsh | 8 ++++++++ lib/functions.zsh | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index a7f699c19..16bba40d4 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -24,3 +24,11 @@ alias sl=ls # often screw this up alias afind='ack-grep -il' +alias reload="source ~/.zshrc" +alias galias='alias | grep' + +# Request confirmation before attempting to remove each file, regardless of the file's permissions, or +# whether or not the standard input device is a terminal. The -i option overrides any previous -f options. +#alias rm="rm -i" + +alias psg='show_processes' diff --git a/lib/functions.zsh b/lib/functions.zsh index 63ab755cf..98342237d 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -15,3 +15,11 @@ function take() { cd $1 } +function show_processes() { + if (($# == 0)); then + ps -ef + else + echo " UID PID PPID C STIME TTY TIME CMD" + ps -ef | grep $* + fi +} From 23a398e39f57ffb7f2ff7892e00cce0a02a1c661 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:58:33 -0200 Subject: [PATCH 06/65] bugfix to display the current cirectory as `~rvm_rvmrc_cwd` and reload the .rvmrc file for solve bug when use zsh + rvm with iTerm2 --- lib/aliases.zsh | 7 +++++++ lib/rvm.zsh | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 16bba40d4..2944cadf0 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -32,3 +32,10 @@ alias galias='alias | grep' #alias rm="rm -i" alias psg='show_processes' + +# If you are using oh-my-zsh and you see something like this error: +# pwd:4: too many arguments +# This is caused by an alias and due to the sh style sourcing of a +# script using the '.' operator instead of 'source'. +# So, uncomment below line. +# alias .='pwd' diff --git a/lib/rvm.zsh b/lib/rvm.zsh index e8744e61e..4a4e42a25 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -6,3 +6,18 @@ function rvm_prompt_info() { [[ "${rvm_prompt}x" == "x" ]] && return echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}" } + +# Bugfix: prompt displays the current directory as "~rvm_rvmrc_cwd" +# http://beginrescueend.com/integration/zsh/ +if [[ -s $HOME/.rvm/scripts/rvm ]]; then + unsetopt auto_name_dirs + + source $HOME/.rvm/scripts/rvm +fi + +# If you are using oh-my-zsh and you see something like this error: +# pwd:4: too many arguments +# This is caused by an alias and due to the sh style sourcing of a +# script using the '.' operator instead of 'source'. +# So, go to .oh-my-zsh/lib/aliases.zsh file and uncomment the alias line: +# to "." From cea9fed668ac19fe018d6a82379ab12b4eac3c8f Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 15:19:36 -0200 Subject: [PATCH 07/65] tinogomes plugin shows rvm_prompt and git_prompt or hg_prompt --- themes/tinogomes.zsh-theme | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 themes/tinogomes.zsh-theme diff --git a/themes/tinogomes.zsh-theme b/themes/tinogomes.zsh-theme new file mode 100644 index 000000000..68b5e588b --- /dev/null +++ b/themes/tinogomes.zsh-theme @@ -0,0 +1,35 @@ +# tinogomes theme: Inspired over dst theme + +# This theme shows rvm_prompt and git_prompt or hg_prompt. + +# Format: +# @: +# $ _ +# +# You can see a screenshot at +# http://tinogomes.files.wordpress.com/2012/01/screen-shot-2012-01-28-at-15-09-00.png + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[green]%})%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +function prompt_char { + if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi +} + +function prompt_hg_info { + hg branch >/dev/null 2>/dev/null && echo " %{$fg[green]%}($(hg branch))%{$reset_color%}" && return + echo "" +} + +#RVM settings +local RVM_PROMPT='' + +if [[ -s ~/.rvm/scripts/rvm ]] ; then + RVM_PROMPT='%{$fg[cyan]%}$(rvm_prompt_info)%{$reset_color%}' +fi + +PROMPT=' +%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT'$(git_prompt_info)$(prompt_hg_info) +%_$(prompt_char) ' From 19bbc9b608e5ae10860da6d8ddcc03c334842309 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 15:29:48 -0200 Subject: [PATCH 08/65] Added the Faggy song on osx plugin --- plugins/osx/osx.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index ba2463483..db5192e61 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -157,3 +157,6 @@ function trash() { function lock() { open -a ScreenSaverEngine } + +# Listen the faggy song +alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy' From 468e727063e29e6a029c0057377ae69bbbebfba8 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 15:30:38 -0200 Subject: [PATCH 09/65] mercurial completion --- plugins/mercurial/_mercurial | 638 +++++++++++++++++++++++++++++++++++ 1 file changed, 638 insertions(+) create mode 100644 plugins/mercurial/_mercurial diff --git a/plugins/mercurial/_mercurial b/plugins/mercurial/_mercurial new file mode 100644 index 000000000..329249b46 --- /dev/null +++ b/plugins/mercurial/_mercurial @@ -0,0 +1,638 @@ +#compdef hg +#autoload + +local -a _1st_arguments + +_1st_arguments=( + 'add:add the specified files on the next commit' + 'addremove:add all new files, delete all missing files' + {annotate,blame}':show changeset information by line for each file' + 'archive:create an unversioned archive of a repository revision' + 'backout:reverse effect of earlier changeset' + 'bisect:subdivision search of changesets' + 'bookmarks:track a line of development with movable markers' + 'branch:set or show the current branch name' + 'branches:list repository named branches' + 'bundle:create a changegroup file' + 'cat:output the current or given revision of files' + 'clone:make a copy of an existing repository' + {commit,ci}':commit the specified files or all outstanding changes' + {copy,cp}':mark files as copied for the next commit' + 'diff:diff repository (or selected files)' + 'export:dump the header and diffs for one or more changesets' + 'fetch:pull changes from a remote repository, merge new changes if needed. (FetchExtension)' + 'forget:forget the specified files on the next commit' + 'grep:search for a pattern in specified files and revisions' + 'heads:show current repository heads or show branch heads' + 'help:show help for a given topic or a help overview' + {identify,id}:'identify the working copy or specified revision' + {import,patch}':import an ordered set of patches' + {incoming,in}':show new changesets found in source' + 'init:create a new repository in the given directory' + 'locate:locate files matching specific patterns' + {log,history}':show revision history of entire repository or files' + 'manifest:output the current or given revision of the project manifest' + 'merge:merge working directory with another revision' + {outgoing,out}':show changesets not found in the destination' + 'parents:show the parents of the working directory or revision' + 'paths:show aliases for remote repositories' + 'pull:pull changes from the specified source' + 'push:push changes to the specified destination' + 'rebase:move changeset (and descendants) to a different branch (RebaseExtension)' + 'recover:roll back an interrupted transaction' + {remove,rm}':remove the specified files on the next commit' + {rename,move,mv}':rename files; equivalent of copy + remove' + 'resolve:redo merges or set/view the merge status of files' + 'revert:restore individual files or directories to an earlier state' + 'rollback:roll back the last transaction (dangerous)' + 'root:print the root (top) of the current working directory' + 'serve:start stand-alone webserver' + {showconfig,debugconfig}':show combined config settings from all hgrc files' + {status,st}':show changed files in the working directory' + {summary,sum}':summarize working directory state' + 'tag:add one or more tags for the current or given revision' + 'tags:list repository tags' + 'tip:show the tip revision' + 'transplant:transplant changesets from another branch (TransplantExtension)' + 'unbundle:apply one or more changegroup files' + {update,up,checkout,co}':update working directory or switch revisions' + 'verify:verify the integrity of the repository' + 'version:output version and copyright information' + # additional help topics + 'config:Configuration Files' + 'dates:Date Formats' + 'patterns:File Name Patterns' + 'environment:Environment Variables' + 'revisions:Specifying Single Revisions' + 'multirevs:Specifying Multiple Revisions' + 'revsets:Specifying Revision Sets' + 'diffs:Diff Formats' + 'merge-tools:Merge Tools' + 'templating:Template Usage' + 'urls:URL Paths' + 'extensions:Using additional features' + 'subrepos:Subrepositories' + 'hgweb:Configuring hgweb' + 'glossary:Glossary' +) + +local expl + +_arguments \ + '(-h --help)'{-h,--help}'[show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "hg subcommand" _1st_arguments + return +fi + +local -a _global_options + +_global_options=( + '(-R --repository REPO)'{-R,--repository}'[repository root directory or name of overlay bundle file]' + '(--cwd DIR)'--cwd'[change working directory]' + '(-y --noninteractive)'{-y,--noninteractive}'[do not prompt, assume `yes` for any required answers]' + '(-q --quiet)'{-q,--quiet}'[suppress output]' + '(-v --verbose)'{-v,--verbose}'[enable additional output]' + '(--config CONFIG [+])'--config'[set/override config option (use `section.name=value`)]' + '(--debug)'--debug'[enable debugging output]' + '(--debugger)'--debugger'[start debugger]' + '(--encoding ENCODE)'--encoding'[set the charset encoding (default: UTF-8)]' + '(--encodingmode MODE)'--encodingmode'[set the charset encoding mode (default: strict)]' + '(--traceback)'--traceback'[always print a traceback on exception]' + '(--time)'--time'[time how long the command takes]' + '(--profile)'--profile'[print command execution profile]' + '(--version)'--version'[output version information and exit]' + '(-h --help)'{-h,--help}'[display help and exit]' + "*::archieve file:_files -g '(#i)*.*'" +) + +local -a _command_options + +case "$words[1]" in + add) + _command_options=( + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + addremove) + _command_options=( + '(-s --similarity SIMILARITY)'{-s,--similarity}'[guess renamed files by similarity (0<=s<=100)]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + annotate|blame) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[annotate the specified revision]' + '(--no-follow)--no-follow[do not follow copies and renames]' + '(-a --text)'{-a,--text}'[treat all files as text]' + '(-u --user)'{-u,--user}'[list the author (long with -v)]' + '(-f --file)'{-f,--file}'[list the filename]' + '(-d --date)'{-d,--date}'[list the date (short with -q)]' + '(-n --number)'{-n,--number}'[list the revision number (default)]' + '(-c --changeset)'{-c,--changeset}'[list the changeset]' + '(-l --line-number)'{-l,--line-number}'[show line number at the first appearance]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + archive) + _command_options=( + '(--no-decode)--no-decode[do not pass files through decoders]' + '(-p --prefix PREFIX)'{-p,--prefix}'[directory prefix for files in archive]' + '(-r --rev REV)'{-r,--rev}'[revision to distribute]' + '(-t --type TYPE)'{-t,--type}'[type of distribution to create]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + backout) + _command_options=( + '(--merge)--merge[merge with old dirstate parent after backout]' + '(--parent REV)--parent[parent to choose when backing out merge]' + '(-t --tool VALUE)'{-t,--tool}'[specify merge tool]' + '(-r --rev REV)'{-r,--rev}'[revision to backout]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + ) + ;; + bisect) + _command_options=( + '(-r --reset)'{-r,--reset}'[reset bisect state]' + '(-g --good)'{-g,--good}'[mark changeset good]' + '(-b --bad)'{-b,--bad}'[mark changeset bad]' + '(-s --skip)'{-s,--skip}'[skip testing changeset]' + '(-c --command CMD)'{-c,--command}'[use command to check changeset state]' + '(-U --noupdate)'{-U,--noupdate}'[do not update to target]' + ) + ;; + bookmarks) + _command_options=( + '(-f --force)'{-f,--force}'[force]' + '(-r --rev REV)'{-r,--rev}'[revision]' + '(-d --delete)'{-d,--delete}'[delete a given bookmark]' + '(-m --rename NAME)'{-m,--rename}'[rename a given bookmark]' + ) + ;; + branch) + _command_options=( + '(-f --force)-f[set branch name even if it shadows an existing branch]' + '(-C --clean)-C[reset branch name to parent branch name]' + ) + ;; + branches) + _command_options=( + '(-a --active)'{-a,--active}'[show only branches that have unmerged heads]' + '(-c --closed)'{-c,--closed}'[show normal and closed branches]' + ) + ;; + bundle) + _command_options=( + '(-f --force)'{-f,--force}'[run even when the destination is unrelated]' + '(-r --rev REV [+])'{-r,--rev}'[a changeset intended to be added to the destination]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to bundle]' + '(--base REV [+])--base[a base changeset assumed to be available at the destination]' + '(-a --all)'{-a,--all}'[bundle all changesets in the repository]' + '(-t --type TYPE)'{-t,--type}'[bundle compression type to use (default: bzip2)]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + cat) + _command_options=( + '(-o --output FORMAT)'{-o,--output}'[print output to file with formatted name]' + '(-r --rev REV)'{-r,--rev}'[print the given revision]' + '(--decode)--decode[apply any matching decode filter]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + clone) + _command_options=( + '(-U --noupdate)'{-U,--noupdate}'[the clone will include an empty working copy (only a repository)]' + '(-u --updaterev REV)'{-u,--updaterev}'[revision, tag or branch to check out]' + '(-r --rev REV [+])'{-r,--rev}'[include the specified changeset]' + '(-b --branch BRANCH [+])'{-b,--branch}'[clone only the specified branch]' + '(--pull)--pull[use pull protocol to copy metadata]' + '(--uncompressed)--uncompressed[use uncompressed transfer (fast over LAN)]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + commit|ci) + _command_options=( + '(-A --addremove)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' + '(--close-branch)--close-branch[mark a branch as closed, hiding it from the branch list]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + ) + ;; + copy|cp) + _command_options=( + '(-A --after)'{-A,--after}'[record a copy that has already occurred]' + '(-f --force)'{-f,--force}'[forcibly copy over an existing managed file]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + diff) + _command_options=( + '(-r --rev REV [+])'{-r,--rev}'[revision]' + '(-c --change REV)'{-c,--change}'[change made by revision]' + '(-a --text)'{-a,--text}'[treat all files as text]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(--nodates)--nodates[omit dates from diff headers]' + '(-p --show-function)'{-p,--show-function}'[show which function each change is in]' + '(--reverse)--reverse[produce a diff that undoes the changes]' + '(-w --ignore-all-space)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' + '(-b --ignore-space-change)-b[ignore changes in the amount of white space]' + '(-B --ignore-blank-lines)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' + '(-U --unified NUM)'{-U,--unified}'[number of lines of context to show]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + export) + _command_options=( + '(-o --output FORMAT)'{-o,--output}'[print output to file with formatted name]' + '(--switch-parent)--switch-parent[diff against the second parent]' + '(-r --rev REV [+])'{-r,--rev}'[revisions to export]' + '(-a --text)'{-a,--text}'[treat all files as text]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(--nodates)--nodates[omit dates from diff headers]' + ) + ;; + fetch) + _command_options=( + '(-r --rev REV [+])'{-r,--rev}'[a specific revision you would like to pull]' + '(-e --edit)'{-e,--edit}'[edit commit message]' + '(--switch-parent)--switch-parent[switch parents when merging]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + forget) + _command_options=( + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + grep) + _command_options=( + '(-0 --print0)'{-0,--print0}'[end fields with NUL]' + '(--all)--all[print all revisions that match]' + '(-f --follow)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' + '(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' + '(-l --files-with-matches)'{-l,--files-with-matches}'[print only filenames and revisions that match]' + '(-n --line-number)'{-n,--line-number}'[print matching line numbers]' + '(-r --rev REV [+])'{-r,--rev}'[only search files changed within revision range]' + '(-u --user)'{-u,--user}'[list the author (long with -v)]' + '(-d --date)'{-d,--date}'[list the date (short with -q)]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + heads) + _command_options=( + '(-r --rev STARTREV)'{-r,--rev}'[show only heads which are descendants of STARTREV]' + '(-t --topo)'{-t,--topo}'[show topological heads only]' + '(-c --closed)'{-c,--closed}'[show normal and closed branch heads]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + identify|id) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[identify the specified revision]' + '(-n --num)'{-n,--num}'[show local revision number]' + '(-i --id)'{-i,--id}'[show global revision id]' + '(-b --branch)'{-b,--branch}'[show branch]' + '(-t --tags)'{-t,--tags}'[show tags]' + '(-B --bookmarks)'{-B,--bookmarks}'[show bookmarks]' + ) + ;; + import|patch) + _command_options=( + '(-p --strip NUM)'{-p,--strip}'[directory strip option for patch. This has the same meaning as the corresponding patch option (default: 1)]' + '(-b --base PATH)'{-b,--base}'[base path]' + '(-f --force)'{-f,--force}'[skip check for outstanding uncommitted changes]' + '(--no-commit)--no-commit[do not commit, just update the working directory]' + '(--exact)--exact[apply patch to the nodes from which it was generated]' + '(--import-branch)--import-branch[use any branch information in patch (implied by --exact)]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + '(-s --similarity SIMILARITY)'{-s,--similarity}'[guess renamed files by similarity (0<=s<=100)]' + ) + ;; + incoming|in) + _command_options=( + '(-f --force)'{-f,--force}'[run even if remote repository is unrelated]' + '(-n --newest-first)'{-n,--newest-first}'[show newest record first]' + '(--bundle FILE)--bundle[file to store the bundles into]' + '(-r --rev REV [+])'{-r,--rev}'[a remote changeset intended to be added]' + '(-B --bookmarks)'{-B,--bookmarks}'[compare bookmarks]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to pull]' + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(-l --limit NUM)'{-l,--limit}'[limit number of changes displayed]' + '(-M --no-merges)'{-M,--no-merges}'[do not show merges]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + init) + _command_options=( + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + locate) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[search the repository as it is in REV]' + '(-0 --print0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' + '(-f --fullpath)'{-f,--fullpath}'[print complete paths from the filesystem root]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + log|history) + _command_options=( + '(-f --follow)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' + '(--follow-first)--follow-first[only follow the first parent of merge changesets]' + '(-d --date DATE)'{-d,--date}'[show revisions matching date spec]' + '(-C --copies)'{-C,--copies}'[show copied files]' + '(-k --keyword TEXT [+])'{-k,--keyword}'[do case-insensitive search for a given text]' + '(-r --rev REV [+])'{-r,--rev}'[show the specified revision or range]' + '(--removed)--removed[include revisions where files were removed]' + '(-m --only-merges)'{-m,--only-merges}'[show only merges]' + '(-u --user USER [+])'{-u,--user}'[revisions committed by user]' + '(-b --branch BRANCH [+])'{-b,--branch}'[show changesets within the given named branch]' + '(-P --prune REV [+])'{-P,--prune}'[do not display revision or any of its ancestors]' + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(-l --limit NUM)'{-l,--limit}'[limit number of changes displayed]' + '(-M --no-merges)'{-M,--no-merges}'[do not show merges]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + manifest) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[revision to display]' + ) + ;; + merge) + _command_options=( + '(-f --force)'{-f,--force}'[force a merge with outstanding changes]' + '(-t --tool VALUE)'{-t,--tool}'[specify merge tool]' + '(-r --rev REV)'{-r,--rev}'[revision to merge]' + '(-P --preview)'{-P,--preview}'[review revisions to merge (no merge is performed)]' + ) + ;; + outgoing|out) + _command_options=( + '(-f --force)'{-f,--force}'[run even when the destination is unrelated]' + '(-r --rev REV [+])'{-r,--rev}'[a changeset intended to be included in the destination]' + '(-n --newest-first)'{-n,--newest-first}'[show newest record first]' + '(-B --bookmarks)'{-B,--bookmarks}'[compare bookmarks]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to push]' + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(-l --limit NUM)'{-l,--limit}'[limit number of changes displayed]' + '(-M --no-merges)'{-M,--no-merges}'[do not show merges]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + parents) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[show parents of the specified revision]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + pull) + _command_options=( + '(-u --update)'{-u,--update}'[update to new branch head if changesets were pulled]' + '(-f --force)'{-f,--force}'[run even when remote repository is unrelated]' + '(-r --rev REV [+])'{-r,--rev}'[a remote changeset intended to be added]' + '(-B --bookmark BOOKMARK [+])'{-B,--bookmark}'[bookmark to pull]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to pull]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + push) + _command_options=( + '(-f --force)'{-f,--force}'[force push]' + '(-r --rev REV [+])'{-r,--rev}'[a changeset intended to be included in the destination]' + '(-B --bookmark BOOKMARK [+])'{-B,--bookmark}'[bookmark to push]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to push]' + '(--new-branch)--new-branch[allow pushing a new branch]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + rebase) + _command_options( + '(-s --source REV)'{-s,--source}'[rebase from the specified changeset]' + '(--base REV)--base[rebase from the base of the specified changeset (up to greatest common ancestor of base and dest)]' + '(-d --dest REV)'{-d,--dest}'[rebase onto the specified changeset]' + '(--collapse)--collapse[collapse the rebased changesets]' + '(--keep)--keep[keep original changesets]' + '(--keepbranches)--keepbranches[keep original branch names]' + '(-detach)-detach[force detaching of source from its original branch]' + '(-c --continue)'{-c,--continue}'[continue an interrupted rebase]' + '(-a --abort){-a,--abort}[abort an interrupted rebase]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + remove|rm) + _command_options=( + '(-A --after)'{-A,--after}'[record delete for missing files]' + '(-f --force)'{-f,--force}'[remove (and delete) file even if added or modified]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + rename|move|mv) + _command_options=( + '(-A --after)'{-A,--after}'[record a rename that has already occurred]' + '(-f --force)'{-f,--force}'[forcibly copy over an existing managed file]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + resolve) + _command_options=( + '(-a --all)'{-a,--all}'[select all unresolved files]' + '(-l --list)'{-l,--list}'[list state of files needing merge]' + '(-m --mark)'{-m,--mark}'[mark files as resolved]' + '(-u --unmark)'{-u,--unmark}'[mark files as unresolved]' + '(-t --tool VALUE)'{-t,--tool}'[specify merge tool]' + '(-n --no-status)'{-n,--no-status}'[hide status prefix]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + revert) + _command_options=( + '(-a --all)'{-a,--all}'[revert all changes when no arguments given]' + '(-d --date DATE)'{-d,--date}'[tipmost revision matching date]' + '(-r --rev REV)'{-r,--rev}'[revert to the specified revision]' + '(--no-backup)--no-backup[do not save backup copies of files]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + rollback) + _command_options=( + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + serve) + _command_options=( + '(-A --accesslog FILE)'{-A,--accesslog}'[name of access log file to write to]' + '(-d --daemon)'{-d,--daemon}'[run server in background]' + '(--daemon-pipefds NUM)--daemon-pipefds[used internally by daemon mode]' + '(-E --errorlog FILE)'{-E,--errorlog}'[name of error log file to write to]' + '(-p --port PORT)'{-p,--port}'[port to listen on (default: 8000)]' + '(-a --address ADDR)'{-a,--address}'[address to listen on (default: all interfaces)]' + '(--prefix PREFIX)--prefix[prefix path to serve from (default: server root)]' + '(-n --name NAME)'{-n,--name}'[name to show in web pages (default: working directory)]' + '(--web-conf FILE)--web-conf[name of the hgweb config file (see "hg help hgweb")]' + '(--pid-file FILE)--pid-file[name of file to write process ID to]' + '(--stdio)--stdio[for remote clients]' + '(-t --templates TEMPLATE)'{-t,--templates}'[web templates to use]' + '(--style STYLE)--style[template style to use]' + '(-6 --ipv6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' + '(--certificate FILE)--certificate[SSL certificate file]' + ) + ;; + showconfig|debugconfig) + _command_options=( + '(-u -untrusted)'{-u,-untrusted}'[show untrusted configuration options]' + ) + ;; + status|st) + _command_options=( + '(-A --all)'{-A,--all}'[show status of all files]' + '(-m --modified)'{-m,--modified}'[show only modified files]' + '(-a --added)'{-a,--added}'[show only added files]' + '(-r --removed)'{-r,--removed}'[show only removed files]' + '(-d --deleted)'{-d,--deleted}'[show only deleted (but tracked) files]' + '(-c --clean)'{-c,--clean}'[show only files without changes]' + '(-u --unknown)'{-u,--unknown}'[show only unknown (not tracked) files]' + '(-i --ignored)'{-i,--ignored}'[show only ignored files]' + '(-n --no-status)'{-n,--no-status}'[hide status prefix]' + '(-C --copies)'{-C,--copies}'[show source of copied files]' + '(-0 --print0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' + '(--rev REV [+])--rev[show difference from revision]' + '(--change REV)--change[list the changed files of a revision]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + summary|sum) + _command_options=( + '(--remote)--remote[check for push and pull]' + ) + ;; + tag) + _command_options=( + '(-f --force)'{-f,--force}'[force tag]' + '(-l --local)'{-l,--local}'[make the tag local]' + '(-r --rev REV)'{-r,--rev}'[revision to tag]' + '(--remove)--remove[remove a tag]' + '(-e --edit)'{-e,--edit}'[edit commit message]' + '(-m --message TEXT)'{-m,--message}'[use as commit message]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + ) + ;; + transplant) + _command_options=( + '(-s --source REPO)'{-s,--source}'[pull patches from REPO]' + '(-b --branch BRANCH [+])'{-b,--branch}'[pull patches from branch BRANCH]' + '(-a --all)'{-a,--all}'[pull all changesets up to BRANCH]' + '(-p --prune REV [+])'{-p,--prune}'[skip over REV]' + '(-m --merge REV [+])'{-m,--merge}'[merge at REV]' + '(--log)--log[append transplant info to log message]' + '(-c --continue)'{-c,--continue}'[continue last transplant session after repair]' + '(--filter CMD)--filter[filter changesets through command]' + ) + ;; + tip) + _command_options=( + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + unbundle) + _command_options=( + '(-u --update)'{-u,--update}'[update to new branch head if changesets were unbundled]' + ) + ;; + update|up|checkout|co) + _command_options=( + '(-C --clean)'{-C,--clean}'[discard uncommitted changes (no backup)]' + '(-c --check)'{-c,--check}'[update across branches if no uncommitted changes]' + '(-d --date DATE)'{-d,--date}'[tipmost revision matching date]' + '(-r --rev REV)'{-r,--rev}'[revision]' + ) + ;; + *) +esac + +_arguments \ + $_global_options \ + $_command_options From a3b31d9cc97ef66429f6ea3d2bbd72b03caaed14 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 3 Feb 2012 10:20:26 -0200 Subject: [PATCH 10/65] added reload bundles alias for textmate plugin --- plugins/textmate/textmate.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index a11a097f5..e715d1ed6 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -10,3 +10,5 @@ function tm() { cd $1 mate $1 } + +alias reload_bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" \ No newline at end of file From 42e9f56dbc4bbcd960d3587563f4139f66629c31 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 23 Feb 2012 09:01:01 -0200 Subject: [PATCH 11/65] alias to git rm for removed files --- plugins/git/git.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 154aa6db1..0a5117cb5 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -91,3 +91,6 @@ alias ggpush='git push origin $(current_branch)' compdef ggpush=git alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' compdef ggpnp=git + +# Remove from repo all files deleted +alias gitstrm="git st | egrep 'deleted' | sed -e 's/#//' -e 's/deleted:/git rm/' | sh" From 42e1cb4a3e9392f2f86c5fd19f004355b9eab476 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 23 Feb 2012 09:01:24 -0200 Subject: [PATCH 12/65] alias to list ssh config file --- lib/aliases.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 2944cadf0..3e2fc57d8 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -39,3 +39,5 @@ alias psg='show_processes' # script using the '.' operator instead of 'source'. # So, uncomment below line. # alias .='pwd' + +alias ssh-list='cat ~/.ssh/config' \ No newline at end of file From 1273db8adff541f47fc198cb98bccc590c609f67 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 23 Feb 2012 11:34:14 -0200 Subject: [PATCH 13/65] renamed alias reload_bundles to reload-bundles at textmate plugin --- plugins/textmate/textmate.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index e715d1ed6..7b7ddbb1d 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -11,4 +11,4 @@ function tm() { mate $1 } -alias reload_bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" \ No newline at end of file +alias reload-bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" \ No newline at end of file From becaa24081e796e073613213e9a779de172cbad4 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Mon, 16 Apr 2012 10:31:29 -0300 Subject: [PATCH 14/65] Added alias for git to remote prune and GC aggressive mode --- lib/git.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git.zsh b/lib/git.zsh index 3e14695bd..3c01e04f4 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -130,3 +130,4 @@ POST_1_7_2_GIT=$(git_compare_version "1.7.2") unset -f git_compare_version +alias gitgcprune="git remote prune origin ; git gc --prune --aggressive" From dc2b0af1812b3f8f19caaf58402d96a623254b31 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 25 Apr 2012 14:57:40 -0300 Subject: [PATCH 15/65] flipcoin at lol plugin --- plugins/lol/lol.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh index ae065c12f..52c53bbbd 100644 --- a/plugins/lol/lol.plugin.zsh +++ b/plugins/lol/lol.plugin.zsh @@ -36,3 +36,6 @@ alias nomnom='killall' alias byes='exit' alias cya='reboot' alias kthxbai='halt' + +# Flip a coin function. http://twitter.com/#!/climagic/status/195158151534882817 +flipcoin() { [[ $(( $RANDOM % 2 )) == 0 ]] && echo heads || echo tails; } From 67677b5e660221fb24875f396e6d453de037c87c Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 12 Apr 2012 10:01:56 -0300 Subject: [PATCH 16/65] New aliases for OSX - ssh-key-copy --- plugins/osx/osx.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index db5192e61..ba0050c58 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -160,3 +160,5 @@ function lock() { # Listen the faggy song alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy' + +alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" \ No newline at end of file From a71471ca9533821105ce7ee2d9c09a53550af8a3 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 31 Aug 2012 10:31:26 -0300 Subject: [PATCH 17/65] new aliases for git pull/push --- plugins/git/git.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 0a5117cb5..3cc71ab98 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -93,4 +93,9 @@ alias ggpnp='git pull origin $(current_branch) && git push origin $(current_bran compdef ggpnp=git # Remove from repo all files deleted -alias gitstrm="git st | egrep 'deleted' | sed -e 's/#//' -e 's/deleted:/git rm/' | sh" +alias gitstrm='git st | egrep "deleted" | sed -e "s/#//" -e "s/deleted:/git rm/" | sh' + +alias gpush='git push' +compdef gpush=git +alias gpull='git pull' +compdef gpull=git From 784caf3d2edd4b5e07b00fa654b4703787d4b847 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:51:40 -0200 Subject: [PATCH 18/65] Added function to lock at osx plugin --- plugins/osx/osx.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index ba0050c58..036c37268 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -161,4 +161,4 @@ function lock() { # Listen the faggy song alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy' -alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" \ No newline at end of file +alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" From 00872756d2fedf662c03186ce5e5a9edcb5ff35f Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:56:13 -0200 Subject: [PATCH 19/65] New general aliases --- lib/aliases.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 3e2fc57d8..40f193914 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -40,4 +40,4 @@ alias psg='show_processes' # So, uncomment below line. # alias .='pwd' -alias ssh-list='cat ~/.ssh/config' \ No newline at end of file +alias ssh-list='cat ~/.ssh/config' From d96c95ab0a04175ae227b26ba00c942a55affbfc Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 3 Feb 2012 10:20:26 -0200 Subject: [PATCH 20/65] added reload bundles alias for textmate plugin --- plugins/textmate/textmate.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index 7b7ddbb1d..5fef90fb5 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -11,4 +11,4 @@ function tm() { mate $1 } -alias reload-bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" \ No newline at end of file +alias reload-bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" From 894de9e462e0542d89b63b832f8ceae0db25b0f0 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 3 Oct 2012 19:10:06 -0300 Subject: [PATCH 21/65] added human format for ls aliases --- lib/aliases.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 40f193914..46b9e13f8 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -17,9 +17,9 @@ alias history='fc -l 1' # List direcory contents alias lsa='ls -lah' -alias l='ls -lA1' -alias ll='ls -l' -alias la='ls -lA' +alias l='ls -lAh1' +alias ll='ls -lh' +alias la='ls -lAh' alias sl=ls # often screw this up alias afind='ack-grep -il' From e0733bf783a1f2f51b14104d879cca0387f748c3 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 11 Oct 2012 07:04:38 -0300 Subject: [PATCH 22/65] moving cd aliases for directories library --- lib/aliases.zsh | 4 ---- lib/directories.zsh | 14 +++++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 46b9e13f8..97211c111 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -2,10 +2,6 @@ alias pu='pushd' alias po='popd' -# Basic directory operations -alias ...='cd ../..' -alias -- -='cd -' - # Super user alias _='sudo' alias please='sudo' diff --git a/lib/directories.zsh b/lib/directories.zsh index 6c743e40e..ab829720f 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -3,11 +3,15 @@ setopt auto_name_dirs setopt auto_pushd setopt pushd_ignore_dups -alias ..='cd ..' -alias cd..='cd ..' -alias cd...='cd ../..' -alias cd....='cd ../../..' -alias cd.....='cd ../../../..' +# Basic directory operations +alias ..='cd ..; ls' +alias ...='cd ../..; ls' +alias -- -='cd -' + +alias cd..='cd ..; ls' +alias cd...='cd ../..; ls' +alias cd....='cd ../../..; ls' +alias cd.....='cd ../../../..; ls' alias cd/='cd /' alias 1='cd -' From 8ebd14b09c5910be4e1ec9eade1bbe0a5df00264 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Tue, 13 Nov 2012 18:09:20 -0200 Subject: [PATCH 23/65] aliases for list/grep hosts --- lib/aliases.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 97211c111..3659812cd 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -37,3 +37,5 @@ alias psg='show_processes' # alias .='pwd' alias ssh-list='cat ~/.ssh/config' +alias lhosts='cat /etc/hosts' +alias ghosts='cat /etc/hosts | grep' From ff0666d100eb54c776b2420b54ce40ac340f8a61 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 16 Nov 2012 10:00:00 -0200 Subject: [PATCH 24/65] aliases: bugfix on ssh-list --- lib/aliases.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 3659812cd..a61b647bb 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -36,6 +36,6 @@ alias psg='show_processes' # So, uncomment below line. # alias .='pwd' -alias ssh-list='cat ~/.ssh/config' -alias lhosts='cat /etc/hosts' -alias ghosts='cat /etc/hosts | grep' +alias cat-ssh-config='[ -e ~/.ssh/config ] && cat ~/.ssh/config' +alias cat-hosts='cat /etc/hosts' +alias grep-hosts='cat /etc/hosts | grep' From 25c0c0cdfcd60b5ea663c8cd87af99aaa814122c Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 16 Nov 2012 10:00:21 -0200 Subject: [PATCH 25/65] correction: new nocorrect for su command --- lib/correction.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/correction.zsh b/lib/correction.zsh index fc60dcdbd..3d73b5105 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -8,3 +8,5 @@ alias gist='nocorrect gist' alias heroku='nocorrect heroku' alias ebuild='nocorrect ebuild' alias hpodder='nocorrect hpodder' +alias su='nocorrect su' + From dc293d4f81a5222a53ef9a7fb9ed303b19f8937e Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 13 Dec 2012 14:14:01 -0200 Subject: [PATCH 26/65] alias for default editor: ed --- lib/aliases.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index a61b647bb..c1fdc2cea 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -39,3 +39,6 @@ alias psg='show_processes' alias cat-ssh-config='[ -e ~/.ssh/config ] && cat ~/.ssh/config' alias cat-hosts='cat /etc/hosts' alias grep-hosts='cat /etc/hosts | grep' + +# open your DEFAULT editor +alias ed=$EDITOR From dea2b49bd0e3c69850b456941a5dd4000d802083 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 13 Dec 2012 14:16:46 -0200 Subject: [PATCH 27/65] alias for go to TextMate bundles directory: bundles --- plugins/textmate/textmate.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index 5fef90fb5..0e79c7b21 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -12,3 +12,6 @@ function tm() { } alias reload-bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" + +# Go to TextMate bundles directory +alias bundles='cd ~/Library/Application\ Support/TextMate/Bundles' From 03d199c4127db2efe94f34f5ec83c7bd67267151 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 10 Jan 2013 14:09:55 -0200 Subject: [PATCH 28/65] Added encoding_file function for ruby plugin --- plugins/ruby/ruby.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/ruby/ruby.plugin.zsh b/plugins/ruby/ruby.plugin.zsh index 38e4d7cd0..5532aa8e8 100644 --- a/plugins/ruby/ruby.plugin.zsh +++ b/plugins/ruby/ruby.plugin.zsh @@ -4,3 +4,9 @@ alias sgem='sudo gem' # Find ruby file alias rfind='find . -name "*.rb" | xargs grep -n' + +# Add first line "#encoding: UTF-8" into a file (for Ruby 1.9) +encoding_file = function() { + sed '1i#encoding: UTF-8' $1 > /tmp/new_file.tmp + mv /tmp/new_file.tmp $1 +} From 3d59bfbbe7624fbade569cc1811ccd4d2d081b2a Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 17 Jan 2013 17:24:15 -0200 Subject: [PATCH 29/65] update brew completion --- plugins/brew/_brew | 48 ++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index 1dcf0a4bf..65bfebcc7 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -13,28 +13,34 @@ _brew_installed_formulae() { 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' + 'audit:check formulae for Homebrew coding style violations.' + '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.' + 'fetch:download the source packages for the given formulae.' + 'home:visit the homepage of a formula or the brew project.' + 'info:information about a formula.' + 'install:install a formula.' + {link,ln}':link a formula.' + {list,ls}':list files in a formula or not-installed formulae.' + 'log:git commit log for a formula.' 'missing:check all installed formuale for missing dependencies.' - '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)' - 'server:start a local web app that lets you browse formulae (requires Sinatra)' - 'unlink:unlink a formula' - 'update:freshen up links' - 'upgrade:upgrade outdated formulae' - 'uses:show formulas which depend on a formula' + 'options:display install options specific to formula.' + 'outdated:list formulas for which a newer version is available.' + 'prune:remove dead links.' + {remove,rm,uninstall}':remove a formula.' + 'search:search for a formula (/regex/ or string).' + 'server:start a local web app that lets you browse formulae (requires Sinatra).' + 'tap:ensures all tapped formula are symlinked and pruned dead formulas.' + 'test:execute tests from a formula.' + 'unlink:unlink a formula.' + 'update:freshen up links.' + 'upgrade:upgrade outdated formulae.' + 'uses:show formulas which depend on a formula.' + 'versions:list previous versions of formula.' ) local expl From a1e8e30f0169652cc9f9750fc3e9240ab06da5fe Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 8 Mar 2013 14:04:02 -0300 Subject: [PATCH 30/65] added # on BOL n prompt --- themes/tinogomes.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tinogomes.zsh-theme b/themes/tinogomes.zsh-theme index 68b5e588b..df1f22c12 100644 --- a/themes/tinogomes.zsh-theme +++ b/themes/tinogomes.zsh-theme @@ -31,5 +31,5 @@ if [[ -s ~/.rvm/scripts/rvm ]] ; then fi PROMPT=' -%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT'$(git_prompt_info)$(prompt_hg_info) -%_$(prompt_char) ' +# %{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT'$(git_prompt_info)$(prompt_hg_info) +# %_$(prompt_char) ' From c71abbf319454215fd4b13440dd857c565c22500 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 20 Mar 2013 13:18:52 -0300 Subject: [PATCH 31/65] Ralio completion on Ralio plugin --- plugins/ralio/_ralio | 86 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 plugins/ralio/_ralio diff --git a/plugins/ralio/_ralio b/plugins/ralio/_ralio new file mode 100644 index 000000000..839488db7 --- /dev/null +++ b/plugins/ralio/_ralio @@ -0,0 +1,86 @@ +#compdef ralio +#autoload + +local -a _1st_arguments + +_1st_arguments=( + "backlog:Show the product backlog" + "sprint:Show the current team iteration" + "show:Show related information for an individual story, defect or task" + "open:Open a story, defect or task in a web browser" + "start:Set a task, defect or story state to in-progress and assign it to you" + "finish:Set a task, defect or story state to completed and assign it to you" + "abandon:Set a task, defect or story state to defined and clear the owner" + "block:Set a task, defect or story state to blocked" + "unblock:Set a task, defect or story state to unblocked" + "current:Show your current tasks and stories" + "point:Set the points for a story or defect" + "task:Allow you to create and delete story tasks" + "configure:Set your Rally configurations" +) + +local expl + +_arguments \ + "(-h --help)"{-h,--help}"[show help]" \ + "*:: :->subcmds" && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "ralio subcommand" _1st_arguments + return +fi + +local -a _global_options + +_global_options=( + "(-h --help)"{-h,--help}"[display help and exit]" +) + +local -a _command_options + +case "$words[1]" in + backlog) + _command_options=( + "(-a --all)"{-a,-all}"[Show all stories (instead of just the top 20)]" + "(-t --tag)"{-t,--tag}"[Show stories with tag]" + "(-p --project)"{-p,--project}"[Show backlog stories for project]" + ) + ;; + + finish) + _command_options=( + "(-c --rootcause)"{-c,--rootcause}"[Set defect's root cause]" + "(-r --resolution)"{-r,--resolution}"[Set defect's resolution]" + "(-p --pair)"{-p,--pair}"[How's pair programming with you - require pair custom field]" + ) + ;; + + sprint) + _command_options=( + "(-t --tasks)"{-t,--tasks}"[Show story tasks]" + "(-f --find)"{-f,--find}"[Find stories that matches with the term]" + "(-a --accepted)"{-a,--accepted}"[Show accepted stories]" + "(-p --project)"{-p,--project}"[Show sprint stories for project]" + ) + ;; + + start) + _command_options=( + "(-p --pair)"{-p,--pair}"[How's pair programming with you - require pair custom field]" + ) + ;; + + task) + _command_options=( + "(-n --name)"{-n,--name}"[Task's name]" + "(-t --tags)"{-t,--tags}"[List tasks with tags (separated by comma)]" + "(-p --project)"{-p,--project}"[Create/delete a task from a specific project]" + ) + ;; + + *) +esac + +_arguments \ + $_global_options \ + $_command_options From 1353ff95c39993e53f99cbd590c7849c2ba23caa Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 23 Mar 2013 01:26:17 -0300 Subject: [PATCH 32/65] bugfix restart cdpath --- lib/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index ba839a067..f2ea0944d 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -29,7 +29,7 @@ zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories -cdpath=(.) +# cdpath=(.) # use /etc/hosts and known_hosts for hostname completion [ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$( Date: Sat, 28 Jan 2012 14:51:09 -0200 Subject: [PATCH 33/65] Added alias to clear .orig files on mercurial plugin --- plugins/mercurial/mercurial.plugin.zsh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index 9aa2d167a..df47760f1 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -1,3 +1,8 @@ +function hg_current_branch() { + if [ -d .hg ]; then + echo hg:$(hg branch) + fi +} # Mercurial alias hgc='hg commit' @@ -17,8 +22,5 @@ alias hgs='hg status' # this is the 'git commit --amend' equivalent alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip' -function hg_current_branch() { - if [ -d .hg ]; then - echo hg:$(hg branch) - fi -} +# Remove all .orig files +alias hgclear='find . -name "*.orig" -delete' From d86f011ba4fcfb4a1408a1620a565666ec939f30 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:51:40 -0200 Subject: [PATCH 34/65] Added function to lock at osx plugin --- plugins/osx/osx.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 51cd7c143..cf562d1c9 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -157,3 +157,7 @@ function trash() { function vncviewer() { open vnc://$@ } + +function lock() { + open -a ScreenSaverEngine +} From 2345731652b169bbda637a8309209ba39be8b29f Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:52:36 -0200 Subject: [PATCH 35/65] Added some aliases at rails3 plugin --- plugins/rails3/rails3.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh index a2697872a..0ed3f57b7 100644 --- a/plugins/rails3/rails3.plugin.zsh +++ b/plugins/rails3/rails3.plugin.zsh @@ -24,3 +24,9 @@ alias rdr='rake db:rollback' alias -g RET='RAILS_ENV=test' alias -g REP='RAILS_ENV=production' alias -g RED='RAILS_ENV=development' + +alias rspec='_run-with-bundler rspec' +alias cuke='_run-with-bundler cucumber' + +alias routes='_run-with-bundler rake routes' +alias groutes='routes | grep' From c1b9a22ec468430bb11b96355a3d2929351e5efd Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:52:57 -0200 Subject: [PATCH 36/65] Added alias at rvm plugin --- plugins/rvm/rvm.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index cdd0a7847..bc24871f7 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -2,6 +2,7 @@ fpath=($rvm_path/scripts/zsh/Completion $fpath) alias rubies='rvm list rubies' alias gemsets='rvm gemset list' +alias rvms='rvm gemset' local ruby18='ruby-1.8.7-p371' local ruby19='ruby-1.9.3-p392' From 29ff1ac9919921460c326899689b6521e6b5c6e5 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:56:13 -0200 Subject: [PATCH 37/65] New general aliases --- lib/aliases.zsh | 8 ++++++++ lib/functions.zsh | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 2b58c4faa..fd694df16 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -24,3 +24,11 @@ alias sl=ls # often screw this up alias afind='ack-grep -il' +alias reload="source ~/.zshrc" +alias galias='alias | grep' + +# Request confirmation before attempting to remove each file, regardless of the file's permissions, or +# whether or not the standard input device is a terminal. The -i option overrides any previous -f options. +#alias rm="rm -i" + +alias psg='show_processes' diff --git a/lib/functions.zsh b/lib/functions.zsh index 63ab755cf..98342237d 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -15,3 +15,11 @@ function take() { cd $1 } +function show_processes() { + if (($# == 0)); then + ps -ef + else + echo " UID PID PPID C STIME TTY TIME CMD" + ps -ef | grep $* + fi +} From 32fa84348ef6eec85f8c40e8531abd4a2ffb44fd Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:58:33 -0200 Subject: [PATCH 38/65] bugfix to display the current cirectory as `~rvm_rvmrc_cwd` and reload the .rvmrc file for solve bug when use zsh + rvm with iTerm2 --- lib/aliases.zsh | 7 +++++++ lib/rvm.zsh | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index fd694df16..c18f14ea6 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -32,3 +32,10 @@ alias galias='alias | grep' #alias rm="rm -i" alias psg='show_processes' + +# If you are using oh-my-zsh and you see something like this error: +# pwd:4: too many arguments +# This is caused by an alias and due to the sh style sourcing of a +# script using the '.' operator instead of 'source'. +# So, uncomment below line. +# alias .='pwd' diff --git a/lib/rvm.zsh b/lib/rvm.zsh index e8744e61e..4a4e42a25 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -6,3 +6,18 @@ function rvm_prompt_info() { [[ "${rvm_prompt}x" == "x" ]] && return echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}" } + +# Bugfix: prompt displays the current directory as "~rvm_rvmrc_cwd" +# http://beginrescueend.com/integration/zsh/ +if [[ -s $HOME/.rvm/scripts/rvm ]]; then + unsetopt auto_name_dirs + + source $HOME/.rvm/scripts/rvm +fi + +# If you are using oh-my-zsh and you see something like this error: +# pwd:4: too many arguments +# This is caused by an alias and due to the sh style sourcing of a +# script using the '.' operator instead of 'source'. +# So, go to .oh-my-zsh/lib/aliases.zsh file and uncomment the alias line: +# to "." From a45aab5d485df39707815eb526d546159da53525 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 15:19:36 -0200 Subject: [PATCH 39/65] tinogomes plugin shows rvm_prompt and git_prompt or hg_prompt --- themes/tinogomes.zsh-theme | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 themes/tinogomes.zsh-theme diff --git a/themes/tinogomes.zsh-theme b/themes/tinogomes.zsh-theme new file mode 100644 index 000000000..68b5e588b --- /dev/null +++ b/themes/tinogomes.zsh-theme @@ -0,0 +1,35 @@ +# tinogomes theme: Inspired over dst theme + +# This theme shows rvm_prompt and git_prompt or hg_prompt. + +# Format: +# @: +# $ _ +# +# You can see a screenshot at +# http://tinogomes.files.wordpress.com/2012/01/screen-shot-2012-01-28-at-15-09-00.png + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[green]%})%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +function prompt_char { + if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi +} + +function prompt_hg_info { + hg branch >/dev/null 2>/dev/null && echo " %{$fg[green]%}($(hg branch))%{$reset_color%}" && return + echo "" +} + +#RVM settings +local RVM_PROMPT='' + +if [[ -s ~/.rvm/scripts/rvm ]] ; then + RVM_PROMPT='%{$fg[cyan]%}$(rvm_prompt_info)%{$reset_color%}' +fi + +PROMPT=' +%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT'$(git_prompt_info)$(prompt_hg_info) +%_$(prompt_char) ' From 44511e1aea34468fcc0b4606d777d9970ab4facb Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 15:29:48 -0200 Subject: [PATCH 40/65] Added the Faggy song on osx plugin --- plugins/osx/osx.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index cf562d1c9..95344372d 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -161,3 +161,6 @@ function vncviewer() { function lock() { open -a ScreenSaverEngine } + +# Listen the faggy song +alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy' From 63c3a3dd04af6fd54add64f2a86825d81d6c314b Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 15:30:38 -0200 Subject: [PATCH 41/65] mercurial completion --- plugins/mercurial/_mercurial | 638 +++++++++++++++++++++++++++++++++++ 1 file changed, 638 insertions(+) create mode 100644 plugins/mercurial/_mercurial diff --git a/plugins/mercurial/_mercurial b/plugins/mercurial/_mercurial new file mode 100644 index 000000000..329249b46 --- /dev/null +++ b/plugins/mercurial/_mercurial @@ -0,0 +1,638 @@ +#compdef hg +#autoload + +local -a _1st_arguments + +_1st_arguments=( + 'add:add the specified files on the next commit' + 'addremove:add all new files, delete all missing files' + {annotate,blame}':show changeset information by line for each file' + 'archive:create an unversioned archive of a repository revision' + 'backout:reverse effect of earlier changeset' + 'bisect:subdivision search of changesets' + 'bookmarks:track a line of development with movable markers' + 'branch:set or show the current branch name' + 'branches:list repository named branches' + 'bundle:create a changegroup file' + 'cat:output the current or given revision of files' + 'clone:make a copy of an existing repository' + {commit,ci}':commit the specified files or all outstanding changes' + {copy,cp}':mark files as copied for the next commit' + 'diff:diff repository (or selected files)' + 'export:dump the header and diffs for one or more changesets' + 'fetch:pull changes from a remote repository, merge new changes if needed. (FetchExtension)' + 'forget:forget the specified files on the next commit' + 'grep:search for a pattern in specified files and revisions' + 'heads:show current repository heads or show branch heads' + 'help:show help for a given topic or a help overview' + {identify,id}:'identify the working copy or specified revision' + {import,patch}':import an ordered set of patches' + {incoming,in}':show new changesets found in source' + 'init:create a new repository in the given directory' + 'locate:locate files matching specific patterns' + {log,history}':show revision history of entire repository or files' + 'manifest:output the current or given revision of the project manifest' + 'merge:merge working directory with another revision' + {outgoing,out}':show changesets not found in the destination' + 'parents:show the parents of the working directory or revision' + 'paths:show aliases for remote repositories' + 'pull:pull changes from the specified source' + 'push:push changes to the specified destination' + 'rebase:move changeset (and descendants) to a different branch (RebaseExtension)' + 'recover:roll back an interrupted transaction' + {remove,rm}':remove the specified files on the next commit' + {rename,move,mv}':rename files; equivalent of copy + remove' + 'resolve:redo merges or set/view the merge status of files' + 'revert:restore individual files or directories to an earlier state' + 'rollback:roll back the last transaction (dangerous)' + 'root:print the root (top) of the current working directory' + 'serve:start stand-alone webserver' + {showconfig,debugconfig}':show combined config settings from all hgrc files' + {status,st}':show changed files in the working directory' + {summary,sum}':summarize working directory state' + 'tag:add one or more tags for the current or given revision' + 'tags:list repository tags' + 'tip:show the tip revision' + 'transplant:transplant changesets from another branch (TransplantExtension)' + 'unbundle:apply one or more changegroup files' + {update,up,checkout,co}':update working directory or switch revisions' + 'verify:verify the integrity of the repository' + 'version:output version and copyright information' + # additional help topics + 'config:Configuration Files' + 'dates:Date Formats' + 'patterns:File Name Patterns' + 'environment:Environment Variables' + 'revisions:Specifying Single Revisions' + 'multirevs:Specifying Multiple Revisions' + 'revsets:Specifying Revision Sets' + 'diffs:Diff Formats' + 'merge-tools:Merge Tools' + 'templating:Template Usage' + 'urls:URL Paths' + 'extensions:Using additional features' + 'subrepos:Subrepositories' + 'hgweb:Configuring hgweb' + 'glossary:Glossary' +) + +local expl + +_arguments \ + '(-h --help)'{-h,--help}'[show help]' \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "hg subcommand" _1st_arguments + return +fi + +local -a _global_options + +_global_options=( + '(-R --repository REPO)'{-R,--repository}'[repository root directory or name of overlay bundle file]' + '(--cwd DIR)'--cwd'[change working directory]' + '(-y --noninteractive)'{-y,--noninteractive}'[do not prompt, assume `yes` for any required answers]' + '(-q --quiet)'{-q,--quiet}'[suppress output]' + '(-v --verbose)'{-v,--verbose}'[enable additional output]' + '(--config CONFIG [+])'--config'[set/override config option (use `section.name=value`)]' + '(--debug)'--debug'[enable debugging output]' + '(--debugger)'--debugger'[start debugger]' + '(--encoding ENCODE)'--encoding'[set the charset encoding (default: UTF-8)]' + '(--encodingmode MODE)'--encodingmode'[set the charset encoding mode (default: strict)]' + '(--traceback)'--traceback'[always print a traceback on exception]' + '(--time)'--time'[time how long the command takes]' + '(--profile)'--profile'[print command execution profile]' + '(--version)'--version'[output version information and exit]' + '(-h --help)'{-h,--help}'[display help and exit]' + "*::archieve file:_files -g '(#i)*.*'" +) + +local -a _command_options + +case "$words[1]" in + add) + _command_options=( + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + addremove) + _command_options=( + '(-s --similarity SIMILARITY)'{-s,--similarity}'[guess renamed files by similarity (0<=s<=100)]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + annotate|blame) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[annotate the specified revision]' + '(--no-follow)--no-follow[do not follow copies and renames]' + '(-a --text)'{-a,--text}'[treat all files as text]' + '(-u --user)'{-u,--user}'[list the author (long with -v)]' + '(-f --file)'{-f,--file}'[list the filename]' + '(-d --date)'{-d,--date}'[list the date (short with -q)]' + '(-n --number)'{-n,--number}'[list the revision number (default)]' + '(-c --changeset)'{-c,--changeset}'[list the changeset]' + '(-l --line-number)'{-l,--line-number}'[show line number at the first appearance]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + archive) + _command_options=( + '(--no-decode)--no-decode[do not pass files through decoders]' + '(-p --prefix PREFIX)'{-p,--prefix}'[directory prefix for files in archive]' + '(-r --rev REV)'{-r,--rev}'[revision to distribute]' + '(-t --type TYPE)'{-t,--type}'[type of distribution to create]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + backout) + _command_options=( + '(--merge)--merge[merge with old dirstate parent after backout]' + '(--parent REV)--parent[parent to choose when backing out merge]' + '(-t --tool VALUE)'{-t,--tool}'[specify merge tool]' + '(-r --rev REV)'{-r,--rev}'[revision to backout]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + ) + ;; + bisect) + _command_options=( + '(-r --reset)'{-r,--reset}'[reset bisect state]' + '(-g --good)'{-g,--good}'[mark changeset good]' + '(-b --bad)'{-b,--bad}'[mark changeset bad]' + '(-s --skip)'{-s,--skip}'[skip testing changeset]' + '(-c --command CMD)'{-c,--command}'[use command to check changeset state]' + '(-U --noupdate)'{-U,--noupdate}'[do not update to target]' + ) + ;; + bookmarks) + _command_options=( + '(-f --force)'{-f,--force}'[force]' + '(-r --rev REV)'{-r,--rev}'[revision]' + '(-d --delete)'{-d,--delete}'[delete a given bookmark]' + '(-m --rename NAME)'{-m,--rename}'[rename a given bookmark]' + ) + ;; + branch) + _command_options=( + '(-f --force)-f[set branch name even if it shadows an existing branch]' + '(-C --clean)-C[reset branch name to parent branch name]' + ) + ;; + branches) + _command_options=( + '(-a --active)'{-a,--active}'[show only branches that have unmerged heads]' + '(-c --closed)'{-c,--closed}'[show normal and closed branches]' + ) + ;; + bundle) + _command_options=( + '(-f --force)'{-f,--force}'[run even when the destination is unrelated]' + '(-r --rev REV [+])'{-r,--rev}'[a changeset intended to be added to the destination]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to bundle]' + '(--base REV [+])--base[a base changeset assumed to be available at the destination]' + '(-a --all)'{-a,--all}'[bundle all changesets in the repository]' + '(-t --type TYPE)'{-t,--type}'[bundle compression type to use (default: bzip2)]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + cat) + _command_options=( + '(-o --output FORMAT)'{-o,--output}'[print output to file with formatted name]' + '(-r --rev REV)'{-r,--rev}'[print the given revision]' + '(--decode)--decode[apply any matching decode filter]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + clone) + _command_options=( + '(-U --noupdate)'{-U,--noupdate}'[the clone will include an empty working copy (only a repository)]' + '(-u --updaterev REV)'{-u,--updaterev}'[revision, tag or branch to check out]' + '(-r --rev REV [+])'{-r,--rev}'[include the specified changeset]' + '(-b --branch BRANCH [+])'{-b,--branch}'[clone only the specified branch]' + '(--pull)--pull[use pull protocol to copy metadata]' + '(--uncompressed)--uncompressed[use uncompressed transfer (fast over LAN)]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + commit|ci) + _command_options=( + '(-A --addremove)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' + '(--close-branch)--close-branch[mark a branch as closed, hiding it from the branch list]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + ) + ;; + copy|cp) + _command_options=( + '(-A --after)'{-A,--after}'[record a copy that has already occurred]' + '(-f --force)'{-f,--force}'[forcibly copy over an existing managed file]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + diff) + _command_options=( + '(-r --rev REV [+])'{-r,--rev}'[revision]' + '(-c --change REV)'{-c,--change}'[change made by revision]' + '(-a --text)'{-a,--text}'[treat all files as text]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(--nodates)--nodates[omit dates from diff headers]' + '(-p --show-function)'{-p,--show-function}'[show which function each change is in]' + '(--reverse)--reverse[produce a diff that undoes the changes]' + '(-w --ignore-all-space)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' + '(-b --ignore-space-change)-b[ignore changes in the amount of white space]' + '(-B --ignore-blank-lines)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' + '(-U --unified NUM)'{-U,--unified}'[number of lines of context to show]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + export) + _command_options=( + '(-o --output FORMAT)'{-o,--output}'[print output to file with formatted name]' + '(--switch-parent)--switch-parent[diff against the second parent]' + '(-r --rev REV [+])'{-r,--rev}'[revisions to export]' + '(-a --text)'{-a,--text}'[treat all files as text]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(--nodates)--nodates[omit dates from diff headers]' + ) + ;; + fetch) + _command_options=( + '(-r --rev REV [+])'{-r,--rev}'[a specific revision you would like to pull]' + '(-e --edit)'{-e,--edit}'[edit commit message]' + '(--switch-parent)--switch-parent[switch parents when merging]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + forget) + _command_options=( + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + grep) + _command_options=( + '(-0 --print0)'{-0,--print0}'[end fields with NUL]' + '(--all)--all[print all revisions that match]' + '(-f --follow)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' + '(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' + '(-l --files-with-matches)'{-l,--files-with-matches}'[print only filenames and revisions that match]' + '(-n --line-number)'{-n,--line-number}'[print matching line numbers]' + '(-r --rev REV [+])'{-r,--rev}'[only search files changed within revision range]' + '(-u --user)'{-u,--user}'[list the author (long with -v)]' + '(-d --date)'{-d,--date}'[list the date (short with -q)]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + heads) + _command_options=( + '(-r --rev STARTREV)'{-r,--rev}'[show only heads which are descendants of STARTREV]' + '(-t --topo)'{-t,--topo}'[show topological heads only]' + '(-c --closed)'{-c,--closed}'[show normal and closed branch heads]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + identify|id) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[identify the specified revision]' + '(-n --num)'{-n,--num}'[show local revision number]' + '(-i --id)'{-i,--id}'[show global revision id]' + '(-b --branch)'{-b,--branch}'[show branch]' + '(-t --tags)'{-t,--tags}'[show tags]' + '(-B --bookmarks)'{-B,--bookmarks}'[show bookmarks]' + ) + ;; + import|patch) + _command_options=( + '(-p --strip NUM)'{-p,--strip}'[directory strip option for patch. This has the same meaning as the corresponding patch option (default: 1)]' + '(-b --base PATH)'{-b,--base}'[base path]' + '(-f --force)'{-f,--force}'[skip check for outstanding uncommitted changes]' + '(--no-commit)--no-commit[do not commit, just update the working directory]' + '(--exact)--exact[apply patch to the nodes from which it was generated]' + '(--import-branch)--import-branch[use any branch information in patch (implied by --exact)]' + '(-m --message TEXT)'{-m,--message}'[use text as commit message]' + '(-l --logfile FILE)'{-l,--logfile}'[read commit message from file]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + '(-s --similarity SIMILARITY)'{-s,--similarity}'[guess renamed files by similarity (0<=s<=100)]' + ) + ;; + incoming|in) + _command_options=( + '(-f --force)'{-f,--force}'[run even if remote repository is unrelated]' + '(-n --newest-first)'{-n,--newest-first}'[show newest record first]' + '(--bundle FILE)--bundle[file to store the bundles into]' + '(-r --rev REV [+])'{-r,--rev}'[a remote changeset intended to be added]' + '(-B --bookmarks)'{-B,--bookmarks}'[compare bookmarks]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to pull]' + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(-l --limit NUM)'{-l,--limit}'[limit number of changes displayed]' + '(-M --no-merges)'{-M,--no-merges}'[do not show merges]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + init) + _command_options=( + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + locate) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[search the repository as it is in REV]' + '(-0 --print0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' + '(-f --fullpath)'{-f,--fullpath}'[print complete paths from the filesystem root]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + log|history) + _command_options=( + '(-f --follow)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' + '(--follow-first)--follow-first[only follow the first parent of merge changesets]' + '(-d --date DATE)'{-d,--date}'[show revisions matching date spec]' + '(-C --copies)'{-C,--copies}'[show copied files]' + '(-k --keyword TEXT [+])'{-k,--keyword}'[do case-insensitive search for a given text]' + '(-r --rev REV [+])'{-r,--rev}'[show the specified revision or range]' + '(--removed)--removed[include revisions where files were removed]' + '(-m --only-merges)'{-m,--only-merges}'[show only merges]' + '(-u --user USER [+])'{-u,--user}'[revisions committed by user]' + '(-b --branch BRANCH [+])'{-b,--branch}'[show changesets within the given named branch]' + '(-P --prune REV [+])'{-P,--prune}'[do not display revision or any of its ancestors]' + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(-l --limit NUM)'{-l,--limit}'[limit number of changes displayed]' + '(-M --no-merges)'{-M,--no-merges}'[do not show merges]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + manifest) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[revision to display]' + ) + ;; + merge) + _command_options=( + '(-f --force)'{-f,--force}'[force a merge with outstanding changes]' + '(-t --tool VALUE)'{-t,--tool}'[specify merge tool]' + '(-r --rev REV)'{-r,--rev}'[revision to merge]' + '(-P --preview)'{-P,--preview}'[review revisions to merge (no merge is performed)]' + ) + ;; + outgoing|out) + _command_options=( + '(-f --force)'{-f,--force}'[run even when the destination is unrelated]' + '(-r --rev REV [+])'{-r,--rev}'[a changeset intended to be included in the destination]' + '(-n --newest-first)'{-n,--newest-first}'[show newest record first]' + '(-B --bookmarks)'{-B,--bookmarks}'[compare bookmarks]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to push]' + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(-l --limit NUM)'{-l,--limit}'[limit number of changes displayed]' + '(-M --no-merges)'{-M,--no-merges}'[do not show merges]' + '(--stat)--stat[output diffstat-style summary of changes]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + parents) + _command_options=( + '(-r --rev REV)'{-r,--rev}'[show parents of the specified revision]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + pull) + _command_options=( + '(-u --update)'{-u,--update}'[update to new branch head if changesets were pulled]' + '(-f --force)'{-f,--force}'[run even when remote repository is unrelated]' + '(-r --rev REV [+])'{-r,--rev}'[a remote changeset intended to be added]' + '(-B --bookmark BOOKMARK [+])'{-B,--bookmark}'[bookmark to pull]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to pull]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + push) + _command_options=( + '(-f --force)'{-f,--force}'[force push]' + '(-r --rev REV [+])'{-r,--rev}'[a changeset intended to be included in the destination]' + '(-B --bookmark BOOKMARK [+])'{-B,--bookmark}'[bookmark to push]' + '(-b --branch BRANCH [+])'{-b,--branch}'[a specific branch you would like to push]' + '(--new-branch)--new-branch[allow pushing a new branch]' + '(-e --ssh CMD)'{-e,--ssh}'[specify ssh command to use]' + '(--remotecmd CMD)--remotecmd[specify hg command to run on the remote side]' + '(--insecure)--insecure[do not verify server certificate (ignoring web.cacerts config)]' + ) + ;; + rebase) + _command_options( + '(-s --source REV)'{-s,--source}'[rebase from the specified changeset]' + '(--base REV)--base[rebase from the base of the specified changeset (up to greatest common ancestor of base and dest)]' + '(-d --dest REV)'{-d,--dest}'[rebase onto the specified changeset]' + '(--collapse)--collapse[collapse the rebased changesets]' + '(--keep)--keep[keep original changesets]' + '(--keepbranches)--keepbranches[keep original branch names]' + '(-detach)-detach[force detaching of source from its original branch]' + '(-c --continue)'{-c,--continue}'[continue an interrupted rebase]' + '(-a --abort){-a,--abort}[abort an interrupted rebase]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + remove|rm) + _command_options=( + '(-A --after)'{-A,--after}'[record delete for missing files]' + '(-f --force)'{-f,--force}'[remove (and delete) file even if added or modified]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + rename|move|mv) + _command_options=( + '(-A --after)'{-A,--after}'[record a rename that has already occurred]' + '(-f --force)'{-f,--force}'[forcibly copy over an existing managed file]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + resolve) + _command_options=( + '(-a --all)'{-a,--all}'[select all unresolved files]' + '(-l --list)'{-l,--list}'[list state of files needing merge]' + '(-m --mark)'{-m,--mark}'[mark files as resolved]' + '(-u --unmark)'{-u,--unmark}'[mark files as unresolved]' + '(-t --tool VALUE)'{-t,--tool}'[specify merge tool]' + '(-n --no-status)'{-n,--no-status}'[hide status prefix]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + ) + ;; + revert) + _command_options=( + '(-a --all)'{-a,--all}'[revert all changes when no arguments given]' + '(-d --date DATE)'{-d,--date}'[tipmost revision matching date]' + '(-r --rev REV)'{-r,--rev}'[revert to the specified revision]' + '(--no-backup)--no-backup[do not save backup copies of files]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + rollback) + _command_options=( + '(-n --dry-run)'{-n,--dry-run}'[do not perform actions, just print output]' + ) + ;; + serve) + _command_options=( + '(-A --accesslog FILE)'{-A,--accesslog}'[name of access log file to write to]' + '(-d --daemon)'{-d,--daemon}'[run server in background]' + '(--daemon-pipefds NUM)--daemon-pipefds[used internally by daemon mode]' + '(-E --errorlog FILE)'{-E,--errorlog}'[name of error log file to write to]' + '(-p --port PORT)'{-p,--port}'[port to listen on (default: 8000)]' + '(-a --address ADDR)'{-a,--address}'[address to listen on (default: all interfaces)]' + '(--prefix PREFIX)--prefix[prefix path to serve from (default: server root)]' + '(-n --name NAME)'{-n,--name}'[name to show in web pages (default: working directory)]' + '(--web-conf FILE)--web-conf[name of the hgweb config file (see "hg help hgweb")]' + '(--pid-file FILE)--pid-file[name of file to write process ID to]' + '(--stdio)--stdio[for remote clients]' + '(-t --templates TEMPLATE)'{-t,--templates}'[web templates to use]' + '(--style STYLE)--style[template style to use]' + '(-6 --ipv6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' + '(--certificate FILE)--certificate[SSL certificate file]' + ) + ;; + showconfig|debugconfig) + _command_options=( + '(-u -untrusted)'{-u,-untrusted}'[show untrusted configuration options]' + ) + ;; + status|st) + _command_options=( + '(-A --all)'{-A,--all}'[show status of all files]' + '(-m --modified)'{-m,--modified}'[show only modified files]' + '(-a --added)'{-a,--added}'[show only added files]' + '(-r --removed)'{-r,--removed}'[show only removed files]' + '(-d --deleted)'{-d,--deleted}'[show only deleted (but tracked) files]' + '(-c --clean)'{-c,--clean}'[show only files without changes]' + '(-u --unknown)'{-u,--unknown}'[show only unknown (not tracked) files]' + '(-i --ignored)'{-i,--ignored}'[show only ignored files]' + '(-n --no-status)'{-n,--no-status}'[hide status prefix]' + '(-C --copies)'{-C,--copies}'[show source of copied files]' + '(-0 --print0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' + '(--rev REV [+])--rev[show difference from revision]' + '(--change REV)--change[list the changed files of a revision]' + '(-I --include PATTERN [+])'{-I,--include}'[include names matching the given patterns]' + '(-X --exclude PATTERN [+])'{-X,--exclude}'[exclude names matching the given patterns]' + '(-S --subrepos)'{-S,--subrepos}'[recurse into subrepositories]' + ) + ;; + summary|sum) + _command_options=( + '(--remote)--remote[check for push and pull]' + ) + ;; + tag) + _command_options=( + '(-f --force)'{-f,--force}'[force tag]' + '(-l --local)'{-l,--local}'[make the tag local]' + '(-r --rev REV)'{-r,--rev}'[revision to tag]' + '(--remove)--remove[remove a tag]' + '(-e --edit)'{-e,--edit}'[edit commit message]' + '(-m --message TEXT)'{-m,--message}'[use as commit message]' + '(-d --date DATE)'{-d,--date}'[record the specified date as commit date]' + '(-u --user USER)'{-u,--user}'[record the specified user as committer]' + ) + ;; + transplant) + _command_options=( + '(-s --source REPO)'{-s,--source}'[pull patches from REPO]' + '(-b --branch BRANCH [+])'{-b,--branch}'[pull patches from branch BRANCH]' + '(-a --all)'{-a,--all}'[pull all changesets up to BRANCH]' + '(-p --prune REV [+])'{-p,--prune}'[skip over REV]' + '(-m --merge REV [+])'{-m,--merge}'[merge at REV]' + '(--log)--log[append transplant info to log message]' + '(-c --continue)'{-c,--continue}'[continue last transplant session after repair]' + '(--filter CMD)--filter[filter changesets through command]' + ) + ;; + tip) + _command_options=( + '(-p --patch)'{-p,--patch}'[show patch]' + '(-g --git)'{-g,--git}'[use git extended diff format]' + '(--style STYLE)--style[display using template map file]' + '(--template TEMPLATE)--template[display with template]' + ) + ;; + unbundle) + _command_options=( + '(-u --update)'{-u,--update}'[update to new branch head if changesets were unbundled]' + ) + ;; + update|up|checkout|co) + _command_options=( + '(-C --clean)'{-C,--clean}'[discard uncommitted changes (no backup)]' + '(-c --check)'{-c,--check}'[update across branches if no uncommitted changes]' + '(-d --date DATE)'{-d,--date}'[tipmost revision matching date]' + '(-r --rev REV)'{-r,--rev}'[revision]' + ) + ;; + *) +esac + +_arguments \ + $_global_options \ + $_command_options From 2304a332aa65edbb39936400be6966e4eb5d623b Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 3 Feb 2012 10:20:26 -0200 Subject: [PATCH 42/65] added reload bundles alias for textmate plugin --- plugins/textmate/textmate.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index 773c4f8d2..6e3f38618 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -19,3 +19,5 @@ function tm() { fi fi } + +alias reload_bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" From 2648628442851087b10cfc00bdbd04688a90a339 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 23 Feb 2012 09:01:01 -0200 Subject: [PATCH 43/65] alias to git rm for removed files --- plugins/git/git.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 6c016aa6b..4b9624d9c 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -108,3 +108,6 @@ function _git_log_prettily(){ } alias glp="_git_log_prettily" compdef _git glp=git-log + +# Remove from repo all files deleted +alias gitstrm="git st | egrep 'deleted' | sed -e 's/#//' -e 's/deleted:/git rm/' | sh" From b59d4d18d5dad01788fee97d84964227be23ee2b Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 23 Feb 2012 09:01:24 -0200 Subject: [PATCH 44/65] alias to list ssh config file --- lib/aliases.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index c18f14ea6..7ab4dc24e 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -39,3 +39,5 @@ alias psg='show_processes' # script using the '.' operator instead of 'source'. # So, uncomment below line. # alias .='pwd' + +alias ssh-list='cat ~/.ssh/config' \ No newline at end of file From 7f2974818b2d05d9819575447f89007bf6e09231 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Mon, 16 Apr 2012 10:31:29 -0300 Subject: [PATCH 45/65] Added alias for git to remote prune and GC aggressive mode --- lib/git.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git.zsh b/lib/git.zsh index c4b5b5d62..53308d9d4 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -139,3 +139,4 @@ POST_1_7_2_GIT=$(git_compare_version "1.7.2") unset -f git_compare_version +alias gitgcprune="git remote prune origin ; git gc --prune --aggressive" From 3fcad771e47e1d8ccbea1da54872eee2a706f556 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 25 Apr 2012 14:57:40 -0300 Subject: [PATCH 46/65] flipcoin at lol plugin --- plugins/lol/lol.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh index ae065c12f..52c53bbbd 100644 --- a/plugins/lol/lol.plugin.zsh +++ b/plugins/lol/lol.plugin.zsh @@ -36,3 +36,6 @@ alias nomnom='killall' alias byes='exit' alias cya='reboot' alias kthxbai='halt' + +# Flip a coin function. http://twitter.com/#!/climagic/status/195158151534882817 +flipcoin() { [[ $(( $RANDOM % 2 )) == 0 ]] && echo heads || echo tails; } From b12eecee6a77244893a27f0c255e516fa7219624 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 12 Apr 2012 10:01:56 -0300 Subject: [PATCH 47/65] New aliases for OSX - ssh-key-copy --- plugins/osx/osx.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 95344372d..28b4b5685 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -164,3 +164,5 @@ function lock() { # Listen the faggy song alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy' + +alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" \ No newline at end of file From 814f54ad430160f0a6fe7f9604ee1ef2127ca579 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 31 Aug 2012 10:31:26 -0300 Subject: [PATCH 48/65] new aliases for git pull/push --- plugins/git/git.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 4b9624d9c..cb3112987 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -110,4 +110,9 @@ alias glp="_git_log_prettily" compdef _git glp=git-log # Remove from repo all files deleted -alias gitstrm="git st | egrep 'deleted' | sed -e 's/#//' -e 's/deleted:/git rm/' | sh" +alias gitstrm='git st | egrep "deleted" | sed -e "s/#//" -e "s/deleted:/git rm/" | sh' + +alias gpush='git push' +compdef gpush=git +alias gpull='git pull' +compdef gpull=git From 83a76aaa068d458276d4594d358813d039e87bd6 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:51:40 -0200 Subject: [PATCH 49/65] Added function to lock at osx plugin --- plugins/osx/osx.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 28b4b5685..771147b9d 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -165,4 +165,4 @@ function lock() { # Listen the faggy song alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy' -alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" \ No newline at end of file +alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" From 54e998ec8574f7091b1cc822ca0de81eb28d664d Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:56:13 -0200 Subject: [PATCH 50/65] New general aliases --- lib/aliases.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 7ab4dc24e..3d84ea8d0 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -40,4 +40,4 @@ alias psg='show_processes' # So, uncomment below line. # alias .='pwd' -alias ssh-list='cat ~/.ssh/config' \ No newline at end of file +alias ssh-list='cat ~/.ssh/config' From 87b1c9e08e5f46eb31bbcb432c5253d9a9cc46d0 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 3 Oct 2012 19:10:06 -0300 Subject: [PATCH 51/65] added human format for ls aliases --- lib/aliases.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 3d84ea8d0..46b9e13f8 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -17,9 +17,9 @@ alias history='fc -l 1' # List direcory contents alias lsa='ls -lah' -#alias l='ls -la' -alias ll='ls -l' -alias la='ls -lA' +alias l='ls -lAh1' +alias ll='ls -lh' +alias la='ls -lAh' alias sl=ls # often screw this up alias afind='ack-grep -il' From ed14a674c75dbce3f7a9e89c3894efe65785a8ba Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 11 Oct 2012 07:04:38 -0300 Subject: [PATCH 52/65] moving cd aliases for directories library --- lib/aliases.zsh | 4 ---- lib/directories.zsh | 14 +++++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 46b9e13f8..97211c111 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -2,10 +2,6 @@ alias pu='pushd' alias po='popd' -# Basic directory operations -alias ...='cd ../..' -alias -- -='cd -' - # Super user alias _='sudo' alias please='sudo' diff --git a/lib/directories.zsh b/lib/directories.zsh index 1896945f4..87ee2efdc 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -4,11 +4,15 @@ setopt auto_pushd setopt pushd_ignore_dups setopt pushdminus -alias ..='cd ..' -alias cd..='cd ..' -alias cd...='cd ../..' -alias cd....='cd ../../..' -alias cd.....='cd ../../../..' +# Basic directory operations +alias ..='cd ..; ls' +alias ...='cd ../..; ls' +alias -- -='cd -' + +alias cd..='cd ..; ls' +alias cd...='cd ../..; ls' +alias cd....='cd ../../..; ls' +alias cd.....='cd ../../../..; ls' alias cd/='cd /' alias 1='cd -' From 6bb2cd0b41321ec0ca362e5ac0938f5804c9aa6b Mon Sep 17 00:00:00 2001 From: tinogomes Date: Tue, 13 Nov 2012 18:09:20 -0200 Subject: [PATCH 53/65] aliases for list/grep hosts --- lib/aliases.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 97211c111..3659812cd 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -37,3 +37,5 @@ alias psg='show_processes' # alias .='pwd' alias ssh-list='cat ~/.ssh/config' +alias lhosts='cat /etc/hosts' +alias ghosts='cat /etc/hosts | grep' From f54af1d376098a0fb6622d8727e170b82d4f0da0 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 16 Nov 2012 10:00:00 -0200 Subject: [PATCH 54/65] aliases: bugfix on ssh-list --- lib/aliases.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 3659812cd..a61b647bb 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -36,6 +36,6 @@ alias psg='show_processes' # So, uncomment below line. # alias .='pwd' -alias ssh-list='cat ~/.ssh/config' -alias lhosts='cat /etc/hosts' -alias ghosts='cat /etc/hosts | grep' +alias cat-ssh-config='[ -e ~/.ssh/config ] && cat ~/.ssh/config' +alias cat-hosts='cat /etc/hosts' +alias grep-hosts='cat /etc/hosts | grep' From 4d58b028591cebc08e5d8a4e89d005c8896b8ab8 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 13 Dec 2012 14:14:01 -0200 Subject: [PATCH 55/65] alias for default editor: ed --- lib/aliases.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index a61b647bb..c1fdc2cea 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -39,3 +39,6 @@ alias psg='show_processes' alias cat-ssh-config='[ -e ~/.ssh/config ] && cat ~/.ssh/config' alias cat-hosts='cat /etc/hosts' alias grep-hosts='cat /etc/hosts | grep' + +# open your DEFAULT editor +alias ed=$EDITOR From 3893edabf31e7a271cad1be7eb9154d6d422d8f8 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 13 Dec 2012 14:16:46 -0200 Subject: [PATCH 56/65] alias for go to TextMate bundles directory: bundles --- plugins/textmate/textmate.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index 6e3f38618..22fca48db 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -20,4 +20,7 @@ function tm() { fi } -alias reload_bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" +alias reload-bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" + +# Go to TextMate bundles directory +alias bundles='cd ~/Library/Application\ Support/TextMate/Bundles' From f8d725bad2481cd818ca374d0ae2166b9bf26740 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 10 Jan 2013 14:09:55 -0200 Subject: [PATCH 57/65] Added encoding_file function for ruby plugin --- plugins/ruby/ruby.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/ruby/ruby.plugin.zsh b/plugins/ruby/ruby.plugin.zsh index 38e4d7cd0..5532aa8e8 100644 --- a/plugins/ruby/ruby.plugin.zsh +++ b/plugins/ruby/ruby.plugin.zsh @@ -4,3 +4,9 @@ alias sgem='sudo gem' # Find ruby file alias rfind='find . -name "*.rb" | xargs grep -n' + +# Add first line "#encoding: UTF-8" into a file (for Ruby 1.9) +encoding_file = function() { + sed '1i#encoding: UTF-8' $1 > /tmp/new_file.tmp + mv /tmp/new_file.tmp $1 +} From 72d6552224fdfa4e0ecfa3e582bfacf4f3c8cb9f Mon Sep 17 00:00:00 2001 From: tinogomes Date: Thu, 17 Jan 2013 17:24:15 -0200 Subject: [PATCH 58/65] update brew completion --- plugins/brew/_brew | 49 +++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index e43ba2900..c065a8bab 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -13,29 +13,34 @@ _brew_installed_formulae() { 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' + 'audit:check formulae for Homebrew coding style violations.' + '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.' + 'fetch:download the source packages for the given formulae.' + 'home:visit the homepage of a formula or the brew project.' + 'info:information about a formula.' + 'install:install a formula.' + {link,ln}':link a formula.' + {list,ls}':list files in a formula or not-installed formulae.' + 'log:git commit log for a formula.' 'missing:check all installed formuale for missing dependencies.' - '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)' - 'server:start a local web app that lets you browse formulae (requires Sinatra)' - 'unlink:unlink a formula' - 'update:freshen up links' - 'upgrade:upgrade outdated formulae' - 'uses:show formulas which depend on a formula' - 'versions:show all available formula versions' + 'options:display install options specific to formula.' + 'outdated:list formulas for which a newer version is available.' + 'prune:remove dead links.' + {remove,rm,uninstall}':remove a formula.' + 'search:search for a formula (/regex/ or string).' + 'server:start a local web app that lets you browse formulae (requires Sinatra).' + 'tap:ensures all tapped formula are symlinked and pruned dead formulas.' + 'test:execute tests from a formula.' + 'unlink:unlink a formula.' + 'update:freshen up links.' + 'upgrade:upgrade outdated formulae.' + 'uses:show formulas which depend on a formula.' + 'versions:list previous versions of formula.' ) local expl From 133a230f66340910ff7df84c178ff5f20d1eea79 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Fri, 8 Mar 2013 14:04:02 -0300 Subject: [PATCH 59/65] added # on BOL n prompt --- themes/tinogomes.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tinogomes.zsh-theme b/themes/tinogomes.zsh-theme index 68b5e588b..df1f22c12 100644 --- a/themes/tinogomes.zsh-theme +++ b/themes/tinogomes.zsh-theme @@ -31,5 +31,5 @@ if [[ -s ~/.rvm/scripts/rvm ]] ; then fi PROMPT=' -%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT'$(git_prompt_info)$(prompt_hg_info) -%_$(prompt_char) ' +# %{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT'$(git_prompt_info)$(prompt_hg_info) +# %_$(prompt_char) ' From ce93c00bba4e85ebb6a50ab604ce95e92977891d Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 20 Mar 2013 13:18:52 -0300 Subject: [PATCH 60/65] Ralio completion on Ralio plugin --- plugins/ralio/_ralio | 86 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 plugins/ralio/_ralio diff --git a/plugins/ralio/_ralio b/plugins/ralio/_ralio new file mode 100644 index 000000000..839488db7 --- /dev/null +++ b/plugins/ralio/_ralio @@ -0,0 +1,86 @@ +#compdef ralio +#autoload + +local -a _1st_arguments + +_1st_arguments=( + "backlog:Show the product backlog" + "sprint:Show the current team iteration" + "show:Show related information for an individual story, defect or task" + "open:Open a story, defect or task in a web browser" + "start:Set a task, defect or story state to in-progress and assign it to you" + "finish:Set a task, defect or story state to completed and assign it to you" + "abandon:Set a task, defect or story state to defined and clear the owner" + "block:Set a task, defect or story state to blocked" + "unblock:Set a task, defect or story state to unblocked" + "current:Show your current tasks and stories" + "point:Set the points for a story or defect" + "task:Allow you to create and delete story tasks" + "configure:Set your Rally configurations" +) + +local expl + +_arguments \ + "(-h --help)"{-h,--help}"[show help]" \ + "*:: :->subcmds" && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "ralio subcommand" _1st_arguments + return +fi + +local -a _global_options + +_global_options=( + "(-h --help)"{-h,--help}"[display help and exit]" +) + +local -a _command_options + +case "$words[1]" in + backlog) + _command_options=( + "(-a --all)"{-a,-all}"[Show all stories (instead of just the top 20)]" + "(-t --tag)"{-t,--tag}"[Show stories with tag]" + "(-p --project)"{-p,--project}"[Show backlog stories for project]" + ) + ;; + + finish) + _command_options=( + "(-c --rootcause)"{-c,--rootcause}"[Set defect's root cause]" + "(-r --resolution)"{-r,--resolution}"[Set defect's resolution]" + "(-p --pair)"{-p,--pair}"[How's pair programming with you - require pair custom field]" + ) + ;; + + sprint) + _command_options=( + "(-t --tasks)"{-t,--tasks}"[Show story tasks]" + "(-f --find)"{-f,--find}"[Find stories that matches with the term]" + "(-a --accepted)"{-a,--accepted}"[Show accepted stories]" + "(-p --project)"{-p,--project}"[Show sprint stories for project]" + ) + ;; + + start) + _command_options=( + "(-p --pair)"{-p,--pair}"[How's pair programming with you - require pair custom field]" + ) + ;; + + task) + _command_options=( + "(-n --name)"{-n,--name}"[Task's name]" + "(-t --tags)"{-t,--tags}"[List tasks with tags (separated by comma)]" + "(-p --project)"{-p,--project}"[Create/delete a task from a specific project]" + ) + ;; + + *) +esac + +_arguments \ + $_global_options \ + $_command_options From 2e44dc0d51134fadbd8048f70deac42bb15cf719 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 23 Mar 2013 01:26:17 -0300 Subject: [PATCH 61/65] bugfix restart cdpath --- lib/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index e0cdcf626..451013b49 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -29,7 +29,7 @@ zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories -cdpath=(.) +# cdpath=(.) # use /etc/hosts and known_hosts for hostname completion [ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$( Date: Thu, 22 Aug 2013 15:09:03 -0300 Subject: [PATCH 62/65] completion for install on homebrew --- plugins/brew/_brew | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index c065a8bab..c7b582d9d 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -23,7 +23,7 @@ _1st_arguments=( 'fetch:download the source packages for the given formulae.' 'home:visit the homepage of a formula or the brew project.' 'info:information about a formula.' - 'install:install a formula.' + {install,i}':install a formula.' {link,ln}':link a formula.' {list,ls}':list files in a formula or not-installed formulae.' 'log:git commit log for a formula.' @@ -77,7 +77,7 @@ case "$words[1]" in _brew_installed_formulae _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae fi ;; - install|home|homepage|log|info|abv|uses|cat|deps|edit|options|versions) + i|install|home|homepage|log|info|abv|uses|cat|deps|edit|options|versions) _brew_all_formulae _wanted formulae expl 'all formulae' compadd -a formulae ;; remove|rm|uninstall|unlink|cleanup|link|ln) From 43dcef1b07a17954af404fd155114eef26aa2695 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Wed, 2 Oct 2013 15:55:57 -0300 Subject: [PATCH 63/65] New plugin: Explain Shell --- plugins/explainshell/explainshell.plugin.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/explainshell/explainshell.plugin.zsh diff --git a/plugins/explainshell/explainshell.plugin.zsh b/plugins/explainshell/explainshell.plugin.zsh new file mode 100644 index 000000000..df30fadce --- /dev/null +++ b/plugins/explainshell/explainshell.plugin.zsh @@ -0,0 +1,17 @@ +function explain { + # base url with first command already injected + # $ explain tar + # => http://explainshel.com/explain/tar?args= + url="http://explainshell.com/explain/$1?args=" + + # removes $1 (tar) from arguments ($@) + shift; + + # iterates over remaining args and adds builds the rest of the url + for i in "$@"; do + url=$url"$i""+" + done + + # opens url in browser + open $url +} \ No newline at end of file From 051c9ca5f862823d524e24eafd25269695cbebfe Mon Sep 17 00:00:00 2001 From: tinogomes Date: Tue, 12 Nov 2013 17:15:52 -0200 Subject: [PATCH 64/65] new function for git plugin: git_restore_file --- plugins/git/git.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 505924c64..c47a52af3 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -153,3 +153,16 @@ function work_in_progress() { # these alias commit and uncomit wip branches alias gwip='git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m "wip"' alias gunwip='git log -n 1 | grep -q -c wip && git reset HEAD~1' + +function git_restore_file() { + if [ -z $1 ]; then + echo 'filename required' + return 1 + fi + + local file=$1; shift + + git checkout $(git rev-list -n 1 HEAD -- "$file")~1 -- "$file" + + echo $file +} From c4cf7533527459615eb1fa4dd64d5e03057a5003 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Tue, 26 Nov 2013 16:13:55 -0200 Subject: [PATCH 65/65] new plugin: RSpec --- plugins/rspec/rspec.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 plugins/rspec/rspec.plugin.zsh diff --git a/plugins/rspec/rspec.plugin.zsh b/plugins/rspec/rspec.plugin.zsh new file mode 100644 index 000000000..cef6320ef --- /dev/null +++ b/plugins/rspec/rspec.plugin.zsh @@ -0,0 +1,3 @@ +function rspec_with () { + grep -l $1 spec/*/*_spec.rb | xargs rspec +}