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

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

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