From 164648ce2bb84e4149375e9baf7155fa29b74429 Mon Sep 17 00:00:00 2001 From: Sankara Rameswaran Date: Wed, 2 Mar 2011 17:12:34 +0530 Subject: [PATCH 1/4] Custom function. Get external IP. --- custom/ip.zsh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 custom/ip.zsh diff --git a/custom/ip.zsh b/custom/ip.zsh new file mode 100644 index 000000000..20d264749 --- /dev/null +++ b/custom/ip.zsh @@ -0,0 +1,4 @@ +function whatismyip() { + echo `curl http://whatismyip.akamai.com/ -s` +} + From 74b31b8f7b36fcb15b4de0110ebbf3fa701ab10c Mon Sep 17 00:00:00 2001 From: Sankara Rameswaran Date: Wed, 2 Mar 2011 17:20:02 +0530 Subject: [PATCH 2/4] My custom theme --- themes/sankara.zsh-theme | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 themes/sankara.zsh-theme diff --git a/themes/sankara.zsh-theme b/themes/sankara.zsh-theme new file mode 100644 index 000000000..4f33a6381 --- /dev/null +++ b/themes/sankara.zsh-theme @@ -0,0 +1,13 @@ +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ +%{$fg[red]%}%(!.#.»)%{$reset_color%} ' +RPROMPT='%{$fg[red]%}«%{$reset_color%} $(git_prompt_info) %F{blue} %F{green}%D{%L:%M} %F{yellow}%D{%p}%f' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="⚡" + +export GREP_COLOR='1;35' From 667bd563a168534756a8ac892193bbaf1b82d0c5 Mon Sep 17 00:00:00 2001 From: Sankara Rameswaran Date: Thu, 3 Mar 2011 18:24:49 +0530 Subject: [PATCH 3/4] Adding a couple of more useful key bindings --- lib/key-bindings.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 7196a88ff..eefc84625 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -40,3 +40,9 @@ bindkey '^[[Z' reverse-menu-complete ## Fix weird sequence that rxvt produces #bindkey -s '^[[Z' '\t' # + +#Completion in the middle of a line +bindkey '^i' expand-or-complete-prefix +##pushes current command on command stack and gives blank line, after that line runs command stack is popped +bindkey "^t" push-line-or-edit + From ccf8bd0e8985f262cbe7e0451b9e3d469d00be21 Mon Sep 17 00:00:00 2001 From: Sankara Rameswaran Date: Mon, 14 Mar 2011 12:51:35 +0530 Subject: [PATCH 4/4] Setting cur dir max length as 40 --- themes/sankara.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/sankara.zsh-theme b/themes/sankara.zsh-theme index 4f33a6381..ba68b9710 100644 --- a/themes/sankara.zsh-theme +++ b/themes/sankara.zsh-theme @@ -1,7 +1,7 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ +PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m:%40<...<%{$reset_color%} %~ \ %{$fg[red]%}%(!.#.»)%{$reset_color%} ' RPROMPT='%{$fg[red]%}«%{$reset_color%} $(git_prompt_info) %F{blue} %F{green}%D{%L:%M} %F{yellow}%D{%p}%f'