bf4937270a4a2a6dd6d4f11ddb3fd55fa4d43025

Author
Z.Shang <shangzhanlin@gmail.com>
Committer
Z.Shang <shangzhanlin@gmail.com>
Date

Message

Merge branch 'master' of https://github.com/Z-Shang/oh-my-zsh

Diff

 1diff --git a/lib/misc.zsh b/lib/misc.zsh
 2index f45c1075790d0103a0291255ac232fbecee3cf14..b30822b509f7755bd351e6c52d38447df7026ef2 100644
 3--- a/lib/misc.zsh
 4+++ b/lib/misc.zsh
 5@@ -23,7 +23,6 @@ env_default 'LESS' '-R'
 6 
 7 ## super user alias
 8 alias _='sudo'
 9-alias please='sudo'
10 
11 ## more intelligent acking for ubuntu users
12 if which ack-grep &> /dev/null; then
13diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
14index 45a706173c7b3ff5125eba9f77aadc5afe9019dd..2251bae2e71d6513333d2d4936ada8ad01b8403d 100644
15--- a/plugins/git/git.plugin.zsh
16+++ b/plugins/git/git.plugin.zsh
17@@ -155,10 +155,10 @@ compdef _git ggu=git-checkout
18 alias ggpur='ggu'
19 compdef _git ggpur=git-checkout
20 
21-alias ggpull='git pull origin $(git_current_branch)'
22+alias ggpull='git pull origin "$(git_current_branch)"'
23 compdef _git ggpull=git-checkout
24 
25-alias ggpush='git push origin $(git_current_branch)'
26+alias ggpush='git push origin "$(git_current_branch)"'
27 compdef _git ggpush=git-checkout
28 
29 alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
30diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
31index 1cc5630e1428d52638b7d18a1d87c01de3f3da75..0a204309e303886af9e831be40406a9c46acb2d7 100644
32--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
33+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
34@@ -21,6 +21,16 @@ function _add_identities() {
35 		return
36 	fi
37 
38+	# add default keys if no identities were set up via zstyle
39+	# this is to mimic the call to ssh-add with no identities
40+	if [[ ${#identities} -eq 0 ]]; then
41+		# key list found on `ssh-add` man page's DESCRIPTION section
42+		for id in id_rsa id_dsa id_ecdsa id_ed25519 identity; do
43+			# check if file exists
44+			[[ -f "$HOME/.ssh/$id" ]] && identities+=$id
45+		done
46+	fi
47+
48 	# get list of loaded identities' signatures
49 	for line in ${(f)"$(ssh-add -l)"}; do loaded+=${${(z)line}[2]}; done
50 
51@@ -36,7 +46,7 @@ function _add_identities() {
52 		[[ ${loaded[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id"
53 	done
54 
55-	if [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded}
56+	[[ -n "$not_loaded" ]] && ssh-add ${^not_loaded}
57 }
58 
59 # Get the filename to store/lookup the environment from
60diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
61index 7cd2a873bc7ef56f2e20e6736690750026f2f0f6..abd2c88127bee5d6e9816d3046ff48f624e876e8 100644
62--- a/templates/zshrc.zsh-template
63+++ b/templates/zshrc.zsh-template
64@@ -62,9 +62,7 @@ ZSH_THEME="robbyrussell"
65 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
66 # Example format: plugins=(rails git textmate ruby lighthouse)
67 # Add wisely, as too many plugins slow down shell startup.
68-plugins=(
69-  git
70-)
71+plugins=(git)
72 
73 source $ZSH/oh-my-zsh.sh
74