Browse Source

Introduce opt-in booleans for task context and bmo nagging

Alois Mahdal 7 years ago
parent
commit
39508bee86
2 changed files with 5 additions and 1 deletions
  1. 3
    0
      dotfiles/bash/head.bashrc
  2. 2
    1
      dotfiles/bash/post.bashrc

+ 3
- 0
dotfiles/bash/head.bashrc View File

2
 
2
 
3
 mkdir -p /var/tmp/bash-rv
3
 mkdir -p /var/tmp/bash-rv
4
 
4
 
5
+BASHUM_TASK_CTX=false
6
+BASHUM_BMO_NAG=false
7
+
5
 for include in \
8
 for include in \
6
   "${HOME}/.bash/colors.bashrc" \
9
   "${HOME}/.bash/colors.bashrc" \
7
   "${HOME}/.bash/defaults.bashrc" \
10
   "${HOME}/.bash/defaults.bashrc" \

+ 2
- 1
dotfiles/bash/post.bashrc View File

28
 }
28
 }
29
 
29
 
30
 __bashum__task_context() {
30
 __bashum__task_context() {
31
+    $BASHUM_TASK_CTX || return 0
31
     local ctx       # TaskWarrior context
32
     local ctx       # TaskWarrior context
32
     type -t task >/dev/null || return 1
33
     type -t task >/dev/null || return 1
33
     ctx=$(task _get rc.context)
34
     ctx=$(task _get rc.context)
127
 
128
 
128
 PROMPT_COMMAND=$(__bashum__mkpc)
129
 PROMPT_COMMAND=$(__bashum__mkpc)
129
 
130
 
130
-bmo nag
131
+$BASHUM_BMO_NAG && bmo nag