aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/task/context
diff options
context:
space:
mode:
Diffstat (limited to 'bin/task/context')
-rwxr-xr-xbin/task/context14
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/task/context b/bin/task/context
index ae78b26..aa32206 100755
--- a/bin/task/context
+++ b/bin/task/context
@@ -18,12 +18,18 @@ if [[ "$1" =~ ^e ]]; then
18 $EDITOR $LOG_FILE 18 $EDITOR $LOG_FILE
19 exit 0 19 exit 0
20elif [[ "$1" =~ ^[a-zA-Z] ]]; then 20elif [[ "$1" =~ ^[a-zA-Z] ]]; then
21 echo "$1" > ~/.task/context 21 if [ -z "$2" ]; then
22 exit 0 22 echo "$1" > ~/.task/context
23 exit 0
24 else
25 context="$1"
26 time="$2"
27 fi
28else
29 context="$(cat ~/.task/context)"
30 time="$1"
23fi 31fi
24 32
25context="$(cat ~/.task/context)"
26time="$1"
27 33
28# The unit of time display. For example: 34# The unit of time display. For example:
29# If it is 900(seconds), then the minimal symbol of 35# If it is 900(seconds), then the minimal symbol of