bat + new zsh functions
This commit is contained in:
4
zsh/.local/share/zsh/functions/bh
Normal file
4
zsh/.local/share/zsh/functions/bh
Normal file
@@ -0,0 +1,4 @@
|
||||
# Wrap common commands or use a generic 'bh' (bat-help) function
|
||||
bh() {
|
||||
"$@" --help 2>&1 | bat -pl help
|
||||
}
|
||||
7
zsh/.local/share/zsh/functions/zkbat
Normal file
7
zsh/.local/share/zsh/functions/zkbat
Normal file
@@ -0,0 +1,7 @@
|
||||
# A simple wrapper around `zk list` to select & view a note
|
||||
zkbat() {
|
||||
filename=$(zk list "$@" --interactive -f jsonl | jq -r .absPath )
|
||||
bat $filename
|
||||
echo $filename >&2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user