From 207220f04ff86123efc9821340171a9b76f64f73 Mon Sep 17 00:00:00 2001 From: santi Date: Wed, 19 Oct 2011 10:21:21 -0300 Subject: [PATCH 1/6] Fabric autocompletion plugin --- plugins/fabric/fabric.plugin.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 plugins/fabric/fabric.plugin.zsh diff --git a/plugins/fabric/fabric.plugin.zsh b/plugins/fabric/fabric.plugin.zsh new file mode 100644 index 000000000..36488579e --- /dev/null +++ b/plugins/fabric/fabric.plugin.zsh @@ -0,0 +1,8 @@ +_fab_list() { + if [ ! -f fabfile.py ]; then return 0; + else + reply=(`fab --shortlist`) + fi +} + +compctl -K _fab_list fab From dabd9b89013778555b294e398e10a71fc35acbfd Mon Sep 17 00:00:00 2001 From: santi Date: Wed, 19 Oct 2011 10:31:12 -0300 Subject: [PATCH 2/6] fix ssh autocompletion to ignore port info from knonw_hosts files --- lib/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b3cc91822..99beb2699 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -32,7 +32,7 @@ zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-dir cdpath=(.) # use /etc/hosts and known_hosts for hostname completion -[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.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)~~"$( Date: Wed, 9 May 2012 17:42:16 -0700 Subject: [PATCH 3/6] adding my own theme --- themes/santiycr.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/santiycr.zsh-theme diff --git a/themes/santiycr.zsh-theme b/themes/santiycr.zsh-theme new file mode 100644 index 000000000..2f8f0818b --- /dev/null +++ b/themes/santiycr.zsh-theme @@ -0,0 +1,8 @@ +PROMPT='%{$fg_no_bold[cyan]%}%n %{$fg_no_bold[yellow]%}%3~%{$reset_color%} %{$fg_no_bold[magenta]%}• %{$reset_color%}' +RPROMPT='$(git_prompt_info) %{$reset_color%}[%*]' + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_no_bold[green]%} ✔%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_no_bold[red]%} ✗%{$reset_color%}" From f8ba76e20d523ba24eb9776890c234462837a7fc Mon Sep 17 00:00:00 2001 From: santi Date: Sat, 28 Jul 2012 16:01:34 -0700 Subject: [PATCH 4/6] adding syntax-highlighting to plugins as a submodule --- .gitmodules | 3 +++ plugins/zsh-syntax-highlighting | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 plugins/zsh-syntax-highlighting diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..0a81941f2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plugins/zsh-syntax-highlighting"] + path = plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git diff --git a/plugins/zsh-syntax-highlighting b/plugins/zsh-syntax-highlighting new file mode 160000 index 000000000..732b7d6e6 --- /dev/null +++ b/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 732b7d6e65c0349ee1d89b698bf9cd8a30c1015d From 40cfd9ccae05ccdbc192b084c69a2a653d39f450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Suarez=20Ordo=C3=B1ez?= Date: Wed, 1 Aug 2012 11:24:42 -0700 Subject: [PATCH 5/6] report machine name when SSH'd on a server --- themes/santiycr.zsh-theme | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/santiycr.zsh-theme b/themes/santiycr.zsh-theme index 2f8f0818b..e2e15f837 100644 --- a/themes/santiycr.zsh-theme +++ b/themes/santiycr.zsh-theme @@ -1,4 +1,8 @@ + PROMPT='%{$fg_no_bold[cyan]%}%n %{$fg_no_bold[yellow]%}%3~%{$reset_color%} %{$fg_no_bold[magenta]%}• %{$reset_color%}' +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then + PROMPT="%{$fg[yellow]%}%m%{$reset_color%} $PROMPT" +fi RPROMPT='$(git_prompt_info) %{$reset_color%}[%*]' # git theming From e47fbdf0ce4b29f531b22784afbd32a29764fa3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Suarez=20Ordo=C3=B1ez?= Date: Thu, 8 Nov 2012 15:04:19 -0800 Subject: [PATCH 6/6] add vi_mode info to right promopt --- themes/santiycr.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/santiycr.zsh-theme b/themes/santiycr.zsh-theme index e2e15f837..ac1887c7c 100644 --- a/themes/santiycr.zsh-theme +++ b/themes/santiycr.zsh-theme @@ -3,7 +3,7 @@ PROMPT='%{$fg_no_bold[cyan]%}%n %{$fg_no_bold[yellow]%}%3~%{$reset_color%} %{$fg if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then PROMPT="%{$fg[yellow]%}%m%{$reset_color%} $PROMPT" fi -RPROMPT='$(git_prompt_info) %{$reset_color%}[%*]' +RPROMPT='$(vi_mode_prompt_info) $(git_prompt_info) %{$reset_color%}[%*]' # git theming ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}"