mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 08:41:43 +00:00
Cleaned up lib/ and removed trailing white space everywhere.
Conflicts: oh-my-zsh.sh
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
|
||||
if (( ${+commands[compleat]} )); then
|
||||
local prefix="${commands[compleat]:h:h}"
|
||||
local setup="${prefix}/share/compleat-1.0/compleat_setup"
|
||||
local setup="${prefix}/share/compleat-1.0/compleat_setup"
|
||||
|
||||
if [[ -f "$setup" ]]; then
|
||||
if ! bashcompinit >/dev/null 2>&1; then
|
||||
@ -15,6 +15,6 @@ if (( ${+commands[compleat]} )); then
|
||||
bashcompinit -i
|
||||
fi
|
||||
|
||||
source "$setup"
|
||||
source "$setup"
|
||||
fi
|
||||
fi
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/zsh
|
||||
#
|
||||
#
|
||||
# Make the dirstack more persistant
|
||||
#
|
||||
#
|
||||
# Add dirpersist to $plugins in ~/.zshrc to load
|
||||
#
|
||||
#
|
||||
|
||||
# $zdirstore is the file used to persist the stack
|
||||
zdirstore=~/.zdirstore
|
||||
|
@ -329,4 +329,4 @@ __git_command_successful () {
|
||||
return 0
|
||||
}
|
||||
|
||||
zstyle ':completion:*:*:git:*' user-commands flow:'description for foo'
|
||||
zstyle ':completion:*:*:git:*' user-commands flow:'description for foo'
|
||||
|
@ -1,4 +1,3 @@
|
||||
# Aliases
|
||||
alias g='git'
|
||||
compdef g=git
|
||||
alias gst='git status'
|
||||
@ -27,24 +26,12 @@ alias gcp='git cherry-pick'
|
||||
compdef _git gcp=git-cherry-pick
|
||||
alias glg='git log --stat --max-count=5'
|
||||
compdef _git glg=git-log
|
||||
|
||||
# Git and svn mix
|
||||
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
|
||||
compdef git-svn-dcommit-push=git
|
||||
|
||||
#
|
||||
# Will return the current branch name
|
||||
# Usage example: git pull origin $(current_branch)
|
||||
#
|
||||
function current_branch() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
# these aliases take advantage of the previous function
|
||||
alias ggpull='git pull origin $(current_branch)'
|
||||
alias ggpull='git pull origin $(git_current_branch)'
|
||||
compdef ggpull=git
|
||||
alias ggpush='git push origin $(current_branch)'
|
||||
alias ggpush='git push origin $(git_current_branch)'
|
||||
compdef ggpush=git
|
||||
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
|
||||
alias ggpnp='git pull origin $(git_current_branch) && git push origin $(git_current_branch)'
|
||||
compdef ggpnp=git
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#compdef port
|
||||
|
||||
local subcmds
|
||||
local subcmds
|
||||
|
||||
# we cache the list of ports
|
||||
# we shall use some cache policy to avoid problems with new ports
|
||||
@ -31,8 +31,8 @@ subcmds=(
|
||||
'file'
|
||||
'help'
|
||||
'info'
|
||||
'install'
|
||||
'installed'
|
||||
'install'
|
||||
'installed'
|
||||
'list'
|
||||
'livecheck'
|
||||
'location'
|
||||
@ -48,7 +48,7 @@ subcmds=(
|
||||
'test'
|
||||
'unarchive'
|
||||
'uninstall'
|
||||
'upgrade'
|
||||
'upgrade'
|
||||
'variants'
|
||||
'version'
|
||||
)
|
||||
|
@ -27,7 +27,7 @@ alias latest-perl='curl -s http://www.perl.org/get.html | perl -wlne '\''if (/pe
|
||||
|
||||
# Functions #################################################################
|
||||
|
||||
# newpl - creates a basic Perl script file and opens it with $EDITOR
|
||||
# newpl - creates a basic Perl script file and opens it with $EDITOR
|
||||
newpl () {
|
||||
# set $EDITOR to 'vim' if it is undefined
|
||||
[[ -z $EDITOR ]] && EDITOR=vim
|
||||
|
@ -139,4 +139,4 @@ _arguments \
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "redis-cli subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
@ -34,7 +34,7 @@ _arguments -C \
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
cmds=(
|
||||
cmds=(
|
||||
"version:show the rvm version installed in rvm_path"
|
||||
"use:setup current shell to use a specific ruby version"
|
||||
"reload:reload rvm source itself (useful after changing rvm source)"
|
||||
@ -116,7 +116,7 @@ case $state in
|
||||
if (( CURRENT == 3 )); then
|
||||
_values 'package_commands' \
|
||||
'install' \
|
||||
'uninstall'
|
||||
'uninstall'
|
||||
else
|
||||
_values 'packages' \
|
||||
'readline' \
|
||||
|
@ -15,7 +15,7 @@ function in_svn() {
|
||||
function svn_get_repo_name {
|
||||
if [ in_svn ]; then
|
||||
svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT
|
||||
|
||||
|
||||
svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//"
|
||||
fi
|
||||
}
|
||||
@ -29,9 +29,9 @@ function svn_get_rev_nr {
|
||||
function svn_dirty_choose {
|
||||
if [ in_svn ]; then
|
||||
s=$(svn status 2>/dev/null)
|
||||
if [ $s ]; then
|
||||
if [ $s ]; then
|
||||
echo $1
|
||||
else
|
||||
else
|
||||
echo $2
|
||||
fi
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#compdef vagrant
|
||||
#compdef vagrant
|
||||
#autoload
|
||||
|
||||
# vagrant zsh completion
|
||||
@ -64,7 +64,7 @@ __vagrant-box ()
|
||||
(options)
|
||||
case $line[1] in
|
||||
(repackage|remove)
|
||||
_arguments ':feature:__box_list'
|
||||
_arguments ':feature:__box_list'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@ -93,7 +93,7 @@ case $state in
|
||||
(options)
|
||||
case $line[1] in
|
||||
(help)
|
||||
_arguments ':feature:__task_list'
|
||||
_arguments ':feature:__task_list'
|
||||
;;
|
||||
|
||||
(box)
|
||||
|
Reference in New Issue
Block a user