Skip to content
Snippets Groups Projects
Commit 344b8ee9 authored by nimrod's avatar nimrod
Browse files

Rewrote prune_prerun (prune prerun files used to time shell commands) because...

Rewrote prune_prerun (prune prerun files used to time shell commands) because grep on OpenBSD doesn't have support for null-terminated strings.
parent d769dbda
No related branches found
No related tags found
No related merge requests found
...@@ -83,7 +83,6 @@ alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking ...@@ -83,7 +83,6 @@ alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking
alias todo="vim \$HOME/Documents/TODO.yml" alias todo="vim \$HOME/Documents/TODO.yml"
alias sudo="sudo " alias sudo="sudo "
alias presentation='docker dev adarnimrod/presentation' alias presentation='docker dev adarnimrod/presentation'
alias prune_prerun='find "$HOME" -maxdepth 1 -name ".prerun.*" -print0 | grep -zv "$(pgrep -u "$(id -u)" bash)" | xargs -0r rm '
alias netdata='docker run --detach --name netdata --cap-add SYS_PTRACE --volume /proc:/host/proc:ro --volume /sys:/host/sys:ro --volume /var/run/docker.sock:/var/run/docker.sock --publish 19999:19999 firehol/netdata' alias netdata='docker run --detach --name netdata --cap-add SYS_PTRACE --volume /proc:/host/proc:ro --volume /sys:/host/sys:ro --volume /var/run/docker.sock:/var/run/docker.sock --publish 19999:19999 firehol/netdata'
alias json-tool='python3 -m json.tool' alias json-tool='python3 -m json.tool'
alias jt='json-tool' alias jt='json-tool'
...@@ -92,6 +91,14 @@ alias dd='dd status=progress' ...@@ -92,6 +91,14 @@ alias dd='dd status=progress'
alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete' alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete'
alias bell='printf \a' alias bell='printf \a'
prune_prerun () {
local shell_procs="$(pgrep -u "$(id -u)" "$(basename $SHELL)")"
for file in $HOME/.prerun.*
do
echo "file" | grep -qv "$shell_procs" || rm "$file"
done
}
bold () { bold () {
printf '\e[1m' printf '\e[1m'
echo "$@" echo "$@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment