aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bin/task/shellrc1
-rw-r--r--zsh/zshrc5
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/task/shellrc b/bin/task/shellrc
index 0416dfa..7098ac0 100644
--- a/bin/task/shellrc
+++ b/bin/task/shellrc
@@ -4,7 +4,6 @@ tk() { task rc.context=`cat ~/.task/context` $@; }
4tkc(){ echo $1 >~/.task/context; } 4tkc(){ echo $1 >~/.task/context; }
5alias tkcc='task context' 5alias tkcc='task context'
6tkcn() { echo none >~/.task/context; } 6tkcn() { echo none >~/.task/context; }
7tkch() { echo home >~/.task/context; }
8tkcp() { echo plan >~/.task/context; } 7tkcp() { echo plan >~/.task/context; }
9[ "$shell" = zsh ] && compdef tk=task 8[ "$shell" = zsh ] && compdef tk=task
10alias tka='tk annotate' 9alias tka='tk annotate'
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
36zstyle ':completion:*' menu select 36zstyle ':completion:*' menu select
37zstyle ':completion::complete:*' gain-privileges 1 37zstyle ':completion::complete:*' gain-privileges 1
38 38
39 39# Set variable CONTEXT
40_get_context() { 40function _get_context() {
41 CONTEXT_FILE=${CONTEXT_FILE:-~/.task/context} 41 CONTEXT_FILE=${CONTEXT_FILE:-~/.task/context}
42 42
43 LAST_MODIFY_TIME=$(stat -c %y "$CONTEXT_FILE") 43 LAST_MODIFY_TIME=$(stat -c %y "$CONTEXT_FILE")
@@ -46,6 +46,7 @@ _get_context() {
46 MODIFY_TIME="$LAST_MODIFY_TIME" 46 MODIFY_TIME="$LAST_MODIFY_TIME"
47 fi 47 fi
48} 48}
49
49autoload -Uz add-zsh-hook 50autoload -Uz add-zsh-hook
50add-zsh-hook precmd precmd 51add-zsh-hook precmd precmd
51function precmd() { 52function precmd() {