diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-04-14 10:07:39 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-04-14 10:07:39 +0800 |
commit | bca6ed08439a6b106b21bc37634b75a9fe6ab9cb (patch) | |
tree | d9cc762b36b761c0a59d4cc62905c9dd352fe463 /bin | |
parent | 00d2bfc1d73bc9526b23d7c95c8331dbf9528dbd (diff) |
tkc -> context
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/task/context | 4 | ||||
-rw-r--r-- | bin/task/shellrc | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/bin/task/context b/bin/task/context index 06848d6..639f54a 100755 --- a/bin/task/context +++ b/bin/task/context | |||
@@ -16,6 +16,10 @@ PROC=$$ | |||
16 | 16 | ||
17 | context="$(cat ~/.task/context)" | 17 | context="$(cat ~/.task/context)" |
18 | [[ "$*" =~ '-s' ]] && SET=true && shift | 18 | [[ "$*" =~ '-s' ]] && SET=true && shift |
19 | [[ "$1" =~ ^[a-zA-Z] ]] && { | ||
20 | echo "$1" > ~/.task/context | ||
21 | exit 0 | ||
22 | } | ||
19 | time="$1" | 23 | time="$1" |
20 | 24 | ||
21 | # The unit of time display. For example: | 25 | # The unit of time display. For example: |
diff --git a/bin/task/shellrc b/bin/task/shellrc index 7098ac0..6d7f109 100644 --- a/bin/task/shellrc +++ b/bin/task/shellrc | |||
@@ -1,7 +1,6 @@ | |||
1 | # task | 1 | # task |
2 | alias c='context' | 2 | alias c='context' |
3 | tk() { task rc.context=`cat ~/.task/context` $@; } | 3 | tk() { task rc.context=`cat ~/.task/context` $@; } |
4 | tkc(){ echo $1 >~/.task/context; } | ||
5 | alias tkcc='task context' | 4 | alias tkcc='task context' |
6 | tkcn() { echo none >~/.task/context; } | 5 | tkcn() { echo none >~/.task/context; } |
7 | tkcp() { echo plan >~/.task/context; } | 6 | tkcp() { echo plan >~/.task/context; } |