summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/completion.zsh2
-rw-r--r--plugins/git/git.plugin.zsh1
-rw-r--r--templates/zshrc.zsh-template1
-rw-r--r--themes/sammy.zsh-theme6
4 files changed, 10 insertions, 0 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh
index b3cc91822..0e5d480ff 100644
--- a/lib/completion.zsh
+++ b/lib/completion.zsh
@@ -32,9 +32,11 @@ zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-dir
cdpath=(.)
# use /etc/hosts and known_hosts for hostname completion
+[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
hosts=(
+ "$_global_ssh_hosts[@]"
"$_ssh_hosts[@]"
"$_etc_hosts[@]"
`hostname`
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 183c56c1c..c1b382b2c 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -17,6 +17,7 @@ alias gca='git commit -v -a'
compdef _git gca=git-commit
alias gco='git checkout'
compdef _git gco=git-checkout
+alias gcm='git checkout master'
alias gb='git branch'
compdef _git gb=git-branch
alias gba='git branch -a'
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index 1ab40aba6..64b1ece69 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -23,6 +23,7 @@ ZSH_THEME="robbyrussell"
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
+# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
diff --git a/themes/sammy.zsh-theme b/themes/sammy.zsh-theme
new file mode 100644
index 000000000..52e6e4bb6
--- /dev/null
+++ b/themes/sammy.zsh-theme
@@ -0,0 +1,6 @@
+PROMPT='%{$fg[white]%}%c$(git_prompt_info)$ % %{$reset_color%}'
+
+ZSH_THEME_GIT_PROMPT_PREFIX="("
+ZSH_THEME_GIT_PROMPT_SUFFIX=""
+ZSH_THEME_GIT_PROMPT_DIRTY="*)"
+ZSH_THEME_GIT_PROMPT_CLEAN=")"