chore: ZSH MacOS

This commit is contained in:
Afonso Franco 2023-12-10 21:22:07 +00:00
parent 9a42d0e71a
commit 0c33e2571e
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
15 changed files with 593 additions and 54 deletions

21
.config/zsh/qol.zsh Normal file
View file

@ -0,0 +1,21 @@
# ~/.config/zsh/qol.zsh
bindkey '^H' backward-kill-path-component
bindkey '^[[3;5~' kill-word
backup() {
cp $1 $1.bak
}
restore() {
mv $1 $(echo $1 | sed 's/\.bak//')
}
capture() {
sudo dtrace -p "$1" -qn '
syscall::write*:entry
/pid == $target && arg0 == 1/ {
printf("%s", copyinstr(arg1, arg2));
}
'
}