diff options
Diffstat (limited to 'bin/task')
| -rwxr-xr-x | bin/task/context | 14 |
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 |
| 20 | elif [[ "$1" =~ ^[a-zA-Z] ]]; then | 20 | elif [[ "$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 | ||
| 28 | else | ||
| 29 | context="$(cat ~/.task/context)" | ||
| 30 | time="$1" | ||
| 23 | fi | 31 | fi |
| 24 | 32 | ||
| 25 | context="$(cat ~/.task/context)" | ||
| 26 | time="$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 |