Compare commits

..

1 commit

Author SHA1 Message Date
60a9cfcab0
jj: Adopt new default revset aliases
This commit changes the way I display my jj logs a little. We
distinguish between 3 styles now

- the 'stack()': short and to the point, only ancestor commits from the
  last non-mutable one onwards
- the 'recent()': the previously default view over ancestor commits or
  any other head nodes (i.e. any branches) that are from me,
  with a few commits leading up to them visible.
- the 'all()': the traditional 'show everything' summation for finding
  very specific commits or getting a macro-scale overview of the history

Basically, only the 'stack()' view was added - but it is now the new
default for the default command and the previous 'default' has been
renamed to 'recent()'.

This is mirrored in the shell aliases: all the `jl`, `jlo`, `jloo`
aliases use the 'recents()' view. The capital versions (`JL` and the
like) are not affected as as they keep showing the 'all()' view.
Importantly, the `j` base command uses the 'stack()' view, however.

Lastly, we extract the aliases to find `WIP:` commits and `PRIVATE:`
commits into actual jj revset aliases and call them from our shell
aliases. The functionality does not change, though we now have an
additional alias for finding specifically the latter commits with `jlfp`
('jj log find private').
2025-06-22 10:25:16 +02:00
6 changed files with 29 additions and 27 deletions

View file

@ -14,9 +14,7 @@ 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 echo "$SHELL" | grep -q zsh; then
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
fi
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
alias ta="task add"
alias tal="task log"
@ -31,25 +29,11 @@ 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" "$@"
}

View file

@ -0,0 +1,3 @@
#!/usr/bin/env sh
export TASKOPENRC="${XDG_CONFIG_HOME:-"$HOME/.config"}/task/taskopenrc"

View file

@ -1,8 +1,3 @@
#!/usr/bin/env sh
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"
[ -d "$XDG_DATA_HOME/task/notes" ] || mkdir -p "$XDG_DATA_HOME/task/notes"

View file

@ -0,0 +1,20 @@
[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]

View file

@ -10,7 +10,7 @@
# Use the command 'task show' to see all defaults and overrides
# Files
data.location=$TASK_DATA_HOME
data.location=$XDG_DATA_HOME/task
# disable case sensitivity
search.case.sensitive=no

View file

@ -4,7 +4,7 @@ name = "Marty Oehme"
[signing]
backend = "gpg"
key = "contact@martyoeh.me"
key = "73BA40D5AFAF49C9"
[git]
sign-on-push = true