diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 9b3709172..c1fdc2cea 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' @@ -17,10 +13,32 @@ 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' +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' + +# 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' + +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 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)"$( 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 diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index c7e98654a..48a1b1da0 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -136,6 +136,14 @@ 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' + +alias gpush='git push' +compdef gpush=git +alias gpull='git pull' +compdef gpull=git + # Work In Progress (wip) # These features allow to pause a branch development and switch to another one (wip) # When you want to go back to work, just unwip it @@ -149,3 +157,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 +} 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; } 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 diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index c18aa726c..da32f82c1 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -1,3 +1,9 @@ +function hg_current_branch() { + if [ -d .hg ]; then + echo hg:$(hg branch) + fi +} + # Mercurial alias hgc='hg commit' alias hgb='hg branch' @@ -15,6 +21,8 @@ alias hgp='hg push' alias hgs='hg status' # this is the 'git commit --amend' equivalent alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip' +# Remove all .orig files +alias hgclear='find . -name "*.orig" -delete' function in_hg() { if [[ -d .hg ]] || $(hg summary > /dev/null 2>&1); then diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 608ec3789..0a41a11eb 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -158,6 +158,12 @@ function vncviewer() { open vnc://$@ } +function lock() { + open -a ScreenSaverEngine +} + +alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy" + # iTunes control function function itunes() { local opt=$1 @@ -190,4 +196,3 @@ function itunes() { esac osascript -e "tell application \"iTunes\" to $opt" } - diff --git a/plugins/rails3/_rails3 b/plugins/rails/_rails similarity index 100% rename from plugins/rails3/_rails3 rename to plugins/rails/_rails diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index dd8b174b2..3b294a145 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -1,21 +1,40 @@ -alias ss='thin --stats "/thin/stats" start' -alias sg='ruby script/generate' -alias sd='ruby script/destroy' -alias sp='ruby script/plugin' -alias sr='ruby script/runner' -alias ssp='ruby script/spec' -alias rdbm='rake db:migrate' -alias rdbtp='rake db:test:prepare' -alias migrate='rake db:migrate && rake db:test:prepare' -alias sc='ruby script/console' -alias sd='ruby script/server --debugger' +# Rails 3 aliases, backwards-compatible with Rails 2. + +function _rails_command () { + if [ -e "script/server" ]; then + ruby script/$@ + else + if [ -e "bin/rails" ]; then + bin/rails $@ + else + rails $@ + fi + fi +} + +alias -g RED='RAILS_ENV=development' +alias -g RET='RAILS_ENV=test' +alias -g REP='RAILS_ENV=production' + +alias rc='_rails_command console' +alias rd='_rails_command destroy' +alias rdb='_rails_command dbconsole' +alias rg='_rails_command generate' +alias rgm='_rails_command generate migration' +alias rp='_rails_command plugin' +alias rs='_rails_command server' +alias rsd='_rails_command server --debugger' +alias ru='_rails_command runner' + +alias rdbm='_run-with-bundler rake db:migrate' +alias rdbr='_run-with-bundler rake db:rollback' +alias rdbs='_run-with-bundler rake db:seed' +alias rlc='_run-with-bundler rake log:clear' +alias rr='_run-with-bundler rake routes' + +alias rspec='_run-with-bundler rspec' +alias cuke='_run-with-bundler cucumber' + alias devlog='tail -f log/development.log' alias testlog='tail -f log/test.log' alias prodlog='tail -f log/production.log' -alias -g RET='RAILS_ENV=test' -alias -g REP='RAILS_ENV=production' -alias -g RED='RAILS_ENV=development' - -function remote_console() { - /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" -} diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh deleted file mode 100644 index b53d18d08..000000000 --- a/plugins/rails3/rails3.plugin.zsh +++ /dev/null @@ -1,32 +0,0 @@ -# Rails 3 aliases, backwards-compatible with Rails 2. - -function _rails_command () { - if [ -e "script/server" ]; then - ruby script/$@ - else - if [ -e "bin/rails" ]; then - bin/rails $@ - else - rails $@ - fi - fi -} - -alias rc='_rails_command console' -alias rd='_rails_command destroy' -alias rdb='_rails_command dbconsole' -alias rdbm='rake db:migrate db:test:clone' -alias rg='_rails_command generate' -alias rgm='_rails_command generate migration' -alias rp='_rails_command plugin' -alias ru='_rails_command runner' -alias rs='_rails_command server' -alias rsd='_rails_command server --debugger' -alias devlog='tail -f log/development.log' -alias testlog='tail -f log/test.log' -alias prodlog='tail -f log/production.log' -alias rdm='rake db:migrate' -alias rdr='rake db:rollback' -alias -g RET='RAILS_ENV=test' -alias -g REP='RAILS_ENV=production' -alias -g RED='RAILS_ENV=development' diff --git a/plugins/rails4/rails4.plugin.zsh b/plugins/rails4/rails4.plugin.zsh deleted file mode 100644 index cb6cf816d..000000000 --- a/plugins/rails4/rails4.plugin.zsh +++ /dev/null @@ -1,32 +0,0 @@ -# Rails 4 aliases - -function _rails_command () { - if [ -e "script/server" ]; then - ruby script/$@ - elif [ -e "script/rails" ]; then - ruby script/rails $@ - else - ruby bin/rails $@ - fi -} - -alias rc='_rails_command console' -alias rd='_rails_command destroy' -alias rdb='_rails_command dbconsole' -alias rdbm='rake db:migrate db:test:clone' -alias rg='_rails_command generate' -alias rgm='_rails_command generate migration' -alias rp='_rails_command plugin' -alias ru='_rails_command runner' -alias rs='_rails_command server' -alias rsd='_rails_command server --debugger' -alias devlog='tail -f log/development.log' -alias testlog='tail -f log/test.log' -alias prodlog='tail -f log/production.log' -alias rdm='rake db:migrate' -alias rdc='rake db:create' -alias rdr='rake db:rollback' -alias rds='rake db:seed' -alias rlc='rake log:clear' -alias rn='rake notes' -alias rr='rake routes' 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 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 +} 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 +} diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 3bde154df..980140d97 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' local ruby19='ruby-1.9.3' diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh index 773c4f8d2..22fca48db 100644 --- a/plugins/textmate/textmate.plugin.zsh +++ b/plugins/textmate/textmate.plugin.zsh @@ -19,3 +19,8 @@ function tm() { fi fi } + +alias reload-bundles="osascript -e 'tell app \"TextMate\" to reload bundles'" + +# Go to TextMate bundles directory +alias bundles='cd ~/Library/Application\ Support/TextMate/Bundles' diff --git a/themes/tinogomes.zsh-theme b/themes/tinogomes.zsh-theme new file mode 100644 index 000000000..df1f22c12 --- /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) '