From 29f7398f23719262ef8fd5abfcb7236189842824 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 21 Mar 2023 13:33:01 +0800 Subject: Move task-related aliases into bin/task/shellrc --- alias | 18 ------------------ bin/task/shellrc | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 bin/task/shellrc diff --git a/alias b/alias index 2481990..f72d343 100644 --- a/alias +++ b/alias @@ -473,24 +473,6 @@ alias cdtrash='cd ~/.local/share/Trash' trash() { mv $@ ~/.local/share/Trash; } alias ge='graph-easy --boxart' -# task -tk() { task rc.context=`cat ~/.task/context` $@; } -tkc(){ echo $1 >~/.task/context; } -tkcn() { echo none >~/.task/context; } -tkch() { echo home >~/.task/context; } -[ $shell = zsh ] && compdef tk=task -alias tka='tk annotate' -alias tkd='tk done' -alias tkD='tk delete' -alias tkm='tk modify' -alias tkn='tk next' -alias tk10='tk limit:10 \( status:completed or status:deleted \) rc.report.all.sort:end- all | tee >(sed -n 4p | cut -d" " -f5 | tee >(xargs -i echo Copied {}) | xsel -ib ) ' -tkw(){ tk $1 mod wait:${2##wait:}; } -alias tkrc='vim ~/.taskrc' -alias cdtk='cd ~/.task' -alias chtk='tig -C ~/.task status' -alias tt='taskwarrior-tui' - # pass alias chp='tig -C ~/.password-store' alias cdpass='cd ~/.password-store' diff --git a/bin/task/shellrc b/bin/task/shellrc new file mode 100644 index 0000000..6f2e5d3 --- /dev/null +++ b/bin/task/shellrc @@ -0,0 +1,17 @@ +# task +tk() { task rc.context=`cat ~/.task/context` $@; } +tkc(){ echo $1 >~/.task/context; } +tkcn() { echo none >~/.task/context; } +tkch() { echo home >~/.task/context; } +[ $shell = zsh ] && compdef tk=task +alias tka='tk annotate' +alias tkd='tk done' +alias tkD='tk delete' +alias tkm='tk modify' +alias tkn='tk next' +alias tk10='tk limit:10 \( status:completed or status:deleted \) rc.report.all.sort:end- all | tee >(sed -n 4p | cut -d" " -f5 | tee >(xargs -i echo Copied {}) | xsel -ib ) ' +tkw(){ tk $1 mod wait:${2##wait:}; } +alias tkrc='vim ~/.taskrc' +alias cdtk='cd ~/.task' +alias chtk='tig -C ~/.task status' +alias tt='taskwarrior-tui' -- cgit v1.2.3-70-g09d2