config/shell: fixes & add jrnl aliases
This commit is contained in:
parent
311ef51c27
commit
e159696ee6
|
@ -15,5 +15,5 @@ journals:
|
|||
linewrap: 99
|
||||
tagsymbols: '@'
|
||||
template: false
|
||||
timeformat: '%Y-%m-%d %H:%M'
|
||||
timeformat: '%Y-%m-%d %a %H:%M'
|
||||
version: v2.4.5
|
||||
|
|
|
@ -19,6 +19,15 @@ rd() {
|
|||
}
|
||||
rr() { mv "$@" /tmp }
|
||||
|
||||
alias j='jrnl'
|
||||
alias jn='jrnl -to today | bat --style=plain --pager="less +G"'
|
||||
|
||||
# like "which", but shows contents if it resolves to a file
|
||||
wh() {
|
||||
res=$(which "$@")
|
||||
test -r "$res" && b --plain "$res" || echo "$res"
|
||||
}
|
||||
|
||||
alias logoff="loginctl terminate-user $USER"
|
||||
|
||||
# Some aliases
|
||||
|
@ -86,7 +95,7 @@ t() {
|
|||
|
||||
alias tw='timew'
|
||||
twsm() { timew summary $(date --date="Monday $1 week ago" -I) to tomorrow :ids ${@:2} }
|
||||
alias twtest='( TIMEWARRIORDB=/tmp/timewarriordb && mv ${TIMEWARRIORDB} /tmp/twdb && mkdir -p ${TIMEWARRIORDB}/data && :> ${TIMEWARRIORDB}/timewarrior.cfg && $SHELL )'
|
||||
alias twtest='( cp -r "$TIMEWARRIORDB" /tmp/tw-bak && TIMEWARRIORDB=/tmp/timewarriordb-test/$(date +%s) && mkdir -p "$TIMEWARRIORDB"/data && :> "$TIMEWARRIORDB"/timewarrior.cfg && $SHELL )'
|
||||
|
||||
# Quick shortcuts
|
||||
alias c='clear'
|
||||
|
|
|
@ -6,5 +6,5 @@ file "$last" | grep -v --color=never directory
|
|||
case "$(file --dereference --mime "$last")" in
|
||||
*inode/directory*) ls -l --color=auto --human-readable --group-directories-first --file-type --dereference-command-line --all --reverse "$@";;
|
||||
*binary) ;;
|
||||
*) $(test -r "$last" && echo "bat" || echo "sudo bat") --style header "$@";;
|
||||
*) $(test -f "$last" -a ! -r "$last") bat --style header "$@";;
|
||||
esac
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
# like "which", but shows contents if it resolves to a file
|
||||
res=$(which "$@")
|
||||
test -r "$res" && b --plain "$res" || echo "$res"
|
Loading…
Reference in New Issue