浏览代码

Check if TaskWarrior is present

Alois Mahdal 9 年前
父节点
当前提交
b1a4ea3e9f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      dotfiles/bash/post.bashrc

+ 1
- 0
dotfiles/bash/post.bashrc 查看文件

29
 
29
 
30
 __bashum__task_context() {
30
 __bashum__task_context() {
31
     local ctx       # TaskWarrior context
31
     local ctx       # TaskWarrior context
32
+    type -t task >/dev/null || return 1
32
     ctx=$(task _get rc.context)
33
     ctx=$(task _get rc.context)
33
     test -n "$ctx" || return
34
     test -n "$ctx" || return
34
     echo -n "|$ctx"
35
     echo -n "|$ctx"