From 4e433eb6bb578c864116cbcf0aa201227f80e4aa Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Fri, 15 Oct 2010 11:05:47 +0200 Subject: [PATCH 1/2] Added own theme (based on robbyrussell) --- themes/fwalch.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/fwalch.zsh-theme diff --git a/themes/fwalch.zsh-theme b/themes/fwalch.zsh-theme new file mode 100644 index 000000000..24edf55c0 --- /dev/null +++ b/themes/fwalch.zsh-theme @@ -0,0 +1,6 @@ +PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" From 60b560fc9ace116cde7e56954f386b1098751648 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Fri, 15 Oct 2010 16:50:39 +0200 Subject: [PATCH 2/2] Added gpg-agent plugin Based on ssh-agent plugin. --- plugins/gpg-agent/gpg-agent.plugin.zsh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 plugins/gpg-agent/gpg-agent.plugin.zsh diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh new file mode 100644 index 000000000..8cc71fd57 --- /dev/null +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -0,0 +1,26 @@ +# Based on ssh-agent code + +local GPG_ENV=$HOME/.gnupg/gpg-agent.env + +function start_agent { + /usr/bin/env gpg-agent --daemon --enable-ssh-support --write-env-file ${GPG_ENV} > /dev/null + chmod 600 ${GPG_ENV} + . ${GPG_ENV} > /dev/null +} + +# Source GPG agent settings, if applicable +if [ -f "${GPG_ENV}" ]; then + . ${GPG_ENV} > /dev/null + ps -ef | grep ${SSH_AGENT_PID} | grep gpg-agent > /dev/null || { + start_agent; + } +else + start_agent; +fi + +export GPG_AGENT_INFO +export SSH_AUTH_SOCK +export SSH_AGENT_PID + +GPG_TTY=$(tty) +export GPG_TTY