From 4ae36ba00e2116fd771916d265035f4eb1c6f6c5 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 13 Apr 2023 11:43:27 +0800 Subject: Update --- zsh/zshrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index a43dc2e..6a5a587 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -36,8 +36,8 @@ _comp_options+=(globdots) # With hidden files zstyle ':completion:*' menu select zstyle ':completion::complete:*' gain-privileges 1 - -_get_context() { +# Set variable CONTEXT +function _get_context() { CONTEXT_FILE=${CONTEXT_FILE:-~/.task/context} LAST_MODIFY_TIME=$(stat -c %y "$CONTEXT_FILE") @@ -46,6 +46,7 @@ _get_context() { MODIFY_TIME="$LAST_MODIFY_TIME" fi } + autoload -Uz add-zsh-hook add-zsh-hook precmd precmd function precmd() { -- cgit v1.2.3-70-g09d2