From 6774669bcd9d5d34d9cb6bbfa0c7f729f489de14 Mon Sep 17 00:00:00 2001 From: andynu Date: Mon, 16 May 2011 00:10:13 -0700 Subject: [PATCH] Add zsh-theme command (with completetion) to switch between themes. --- lib/functions.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/functions.zsh b/lib/functions.zsh index 6f5d015f7..7eb363f43 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -50,3 +50,12 @@ function extract() { fi } +zsh-theme(){ + echo $ZSH/themes/$1 + source $ZSH/themes/$1 + typeset -ga chpwd_functions + typeset -ga precmd_functions + precmd_functions='' + chpwd_functions='' +} +compctl -k "(`\ls $ZSH/themes`)" zsh-theme