Compare commits
6 commits
60a9cfcab0
...
20741b3ca0
| Author | SHA1 | Date | |
|---|---|---|---|
| 20741b3ca0 | |||
| a4bbb0ed3a | |||
| d42593edfe | |||
| 21844e3a30 | |||
| ededd904b4 | |||
| 2c1ca97ab3 |
7 changed files with 40 additions and 35 deletions
|
|
@ -14,7 +14,9 @@ t() {
|
|||
# copy the `task` zsh completions over to my little alias 😉
|
||||
# FIXME: this is not very pretty and not super portable (needs ps) but
|
||||
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
|
||||
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|
||||
if echo "$SHELL" | grep -q zsh; then
|
||||
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|
||||
fi
|
||||
|
||||
alias ta="task add"
|
||||
alias tal="task log"
|
||||
|
|
@ -29,11 +31,25 @@ if exist timew; then
|
|||
else
|
||||
alias tra="task active"
|
||||
fi
|
||||
alias tdd="task end.after:today all" # done doday
|
||||
alias tdy="task end.after:yesterday all" # done yesterday-today
|
||||
alias tdd="task end.after:today all" # done doday
|
||||
alias tdy="task end.after:yesterday all" # done yesterday-today
|
||||
alias tdw="task end.after:today-1wk completed" # done this week
|
||||
|
||||
alias tad="task +ACTIVE done"
|
||||
alias tas="task +ACTIVE stop"
|
||||
|
||||
alias to="task note"
|
||||
|
||||
#---
|
||||
# Additional idea repository
|
||||
|
||||
idea() {
|
||||
if [ "$1" = "note" ]; then
|
||||
shift
|
||||
idean "$@"
|
||||
fi
|
||||
task rc.data.location="$TASK_DATA_IDEA" "$@"
|
||||
}
|
||||
idean() {
|
||||
topen --task-data "$TASK_DATA_IDEA" --notes-dir "$TASK_DATA_IDEA/notes" "$@"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
export TASKOPENRC="${XDG_CONFIG_HOME:-"$HOME/.config"}/task/taskopenrc"
|
||||
|
|
@ -1,3 +1,8 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
[ -d "$XDG_DATA_HOME/task/notes" ] || mkdir -p "$XDG_DATA_HOME/task/notes"
|
||||
|
||||
export TASK_DATA_HOME="$XDG_DATA_HOME/task"
|
||||
export TASK_DATA_IDEA="$XDG_DATA_HOME/ideas"
|
||||
|
||||
[ -d "$TASK_DATA_HOME/notes" ] || mkdir -p "$TASK_DATA_HOME/notes"
|
||||
[ -d "$TASK_DATA_IDEA/notes" ] || mkdir -p "$TASK_DATA_IDEA/notes"
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
[General]
|
||||
EDITOR = nvim
|
||||
taskbin = task
|
||||
path_ext = /usr/share/taskopen/scripts
|
||||
|
||||
[Actions]
|
||||
note_custom_ext.regex = "^Note\\.?(.*)?"
|
||||
note_custom_ext.command = "$EDITOR ${XDG_DATA_HOME:-$HOME/.local/share}/task/notes/$UUID.$LAST_MATCH"
|
||||
|
||||
notes.regex = "^Note$"
|
||||
notes.command = "$EDITOR ${XDG_DATA_HOME:-$HOME/.local/share}/task/notes/$UUID.md"
|
||||
|
||||
links.regex = "^https?://"
|
||||
links.command = "open $FILE"
|
||||
|
||||
mail.regex = "^<.*@.*>$"
|
||||
mail.command = "notmuch show mid:${FILE:1:-1}"
|
||||
|
||||
[CLI]
|
||||
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
# Use the command 'task show' to see all defaults and overrides
|
||||
|
||||
# Files
|
||||
data.location=$XDG_DATA_HOME/task
|
||||
data.location=$TASK_DATA_HOME
|
||||
|
||||
# disable case sensitivity
|
||||
search.case.sensitive=no
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ name = "Marty Oehme"
|
|||
|
||||
[signing]
|
||||
backend = "gpg"
|
||||
key = "73BA40D5AFAF49C9"
|
||||
key = "contact@martyoeh.me"
|
||||
|
||||
[git]
|
||||
sign-on-push = true
|
||||
private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')" # refuse to push WIP commits
|
||||
|
||||
[ui]
|
||||
default-command = "log"
|
||||
default-command = ["log", "-T", "builtin_log_oneline", "-r", "stack()"]
|
||||
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
|
||||
|
||||
# use delta as formatter but _only_ for diff and show
|
||||
|
|
@ -73,7 +73,7 @@ if(root,
|
|||
'''
|
||||
|
||||
[revsets]
|
||||
log = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()"
|
||||
log = "recent()"
|
||||
|
||||
[revset-aliases]
|
||||
"bases" = "dev"
|
||||
|
|
@ -81,3 +81,9 @@ log = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | tru
|
|||
"branches" = "downstream(trunk(), bookmarks()) & mine()"
|
||||
"curbranch" = "latest(branches::@- & branches)"
|
||||
"githead" = "::git_head()"
|
||||
"wip()" = "description(regex:\"^WIP:\")"
|
||||
"private()" = "description(regex:\"^PRIVATE:\")"
|
||||
"blacklist()" = "wip() | private()"
|
||||
"recent()" = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()"
|
||||
"recent(x)" = "ancestors(x, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()"
|
||||
"stack()" = "ancestors(reachable(@, mutable()), 2)"
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ alias jab="jj abandon"
|
|||
|
||||
# revset info
|
||||
alias J="jj log -r 'all()'" # mirror default command being log
|
||||
alias jl="jj log -T builtin_log_oneline"
|
||||
alias jl="jj log -T builtin_log_oneline -r 'recent()'"
|
||||
alias JL="jj log -T builtin_log_oneline -r 'all()'"
|
||||
alias jlo="jj log --summary -T builtin_log_compact_full_description"
|
||||
alias jlo="jj log --summary -T builtin_log_compact_full_description -r 'recent()'"
|
||||
alias JLO="jj log --summary -T builtin_log_compact_full_description -r 'all()'"
|
||||
alias jloo="jj log --patch"
|
||||
alias jloo="jj log --patch -r 'recent()'"
|
||||
alias JLOO="jj log --patch -r 'all()'"
|
||||
alias jol="jj op log"
|
||||
jlf() {
|
||||
|
|
@ -65,7 +65,8 @@ jlof() {
|
|||
jloof() {
|
||||
jj log --patch -r "description(substring-i:\"$*\")"
|
||||
}
|
||||
alias jlfw='jj log -r "description(regex:\"^WIP:\")"'
|
||||
alias jlfw='jj log -r "wip()"'
|
||||
alias jlfp='jj log -r "private()"'
|
||||
|
||||
# show branches (i.e. head commits) w a couple previous commits
|
||||
alias jh="jj log -r 'ancestors(heads(all()), 3)'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue