1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 20:41:44 +00:00

Added or edited file headers.

This commit is contained in:
Sorin Ionescu
2012-01-31 23:37:51 -05:00
parent e1a71a84b1
commit b96bbca51c
71 changed files with 527 additions and 108 deletions

View File

@ -1,3 +1,10 @@
#
# Defines Git aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Git
alias g='git'
compdef g=git

View File

@ -1,4 +1,10 @@
# Get the latest Git completion.
#
# Gets the latest Git completion.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
completion_file="${0:h}/completions/_git"
completion_file_url='http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD'
if [[ ! -e "$completion_file" ]] && (( $+commands[git] )); then

View File

@ -1,6 +1,13 @@
#compdef git-hub
#autoload
#
# Completes git-hub.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local state remotes remote branches ret=1
_arguments -C -s -S \

View File

@ -1,6 +1,13 @@
#compdef git-info
#autoload
#
# Completes git-info.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments "1:toggle:((
on\:'enable in-prompt information for the current repository'
off\:'disable in-prompt information for the current repository'

View File

@ -1,4 +1,10 @@
# Gets the current branch.
#
# Displays the current Git branch.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local ref="$(git symbolic-ref HEAD 2> /dev/null)"
if [[ -n "$ref" ]]; then
print "${ref#refs/heads/}"

View File

@ -1,4 +1,10 @@
# Open the GitHub repository in the browser.
#
# Opens a GitHub repository in the default browser.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local remote branches branch current_branch url
remote="${1:-origin}"

View File

@ -1,3 +1,10 @@
#
# Displays Git repository information.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Gets the Git special action (am, merge, rebase, etc.).
# Borrowed from vcs_info and edited.
function _git-action() {

View File

@ -1,4 +1,10 @@
# Gets the repository root.
#
# Displays the Git repository root.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local root="$(git rev-parse --show-toplevel 2> /dev/null)"
if [[ -n "$root" ]]; then
print "$root"

View File

@ -1,5 +1,11 @@
# Hub by defunkt
# https://github.com/defunkt/hub
#
# Adds GitHub knowledge to the Git command.
#
# Authors:
# Chris Wanstrath <chris@wanstrath.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
if (( $+commands[hub] )); then
function git() {
hub "$@"

View File

@ -1,9 +1,9 @@
# ------------------------------------------------------------------------------
# FILE: git.plugin.zsh
# DESCRIPTION: oh-my-zsh plugin file.
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com>
# VERSION: 1.0.0
# ------------------------------------------------------------------------------
#
# Provides Git aliases and functions.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source plugin files.
source "${0:h}/alias.zsh"

View File

@ -1,4 +1,9 @@
# The default styles.
#
# Defines Git information display styles.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# %s - Special action name (am, merge, rebase).
zstyle ':omz:plugin:git:prompt' action 'action:%s'