diff --git a/dot_bashrc.d/executable_09.functions.tmpl b/dot_bashrc.d/executable_09.functions.tmpl index 961e24b..8cfcdfc 100755 --- a/dot_bashrc.d/executable_09.functions.tmpl +++ b/dot_bashrc.d/executable_09.functions.tmpl @@ -113,7 +113,7 @@ list-ssh-keys() { done } -{{- if (eq .chezmoi.os "linux") }} +{{- if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "linuxmint") (eq .chezmoi.osRelease.id "ubuntu")) }} # Show version of a Debian package debversion() { local pkgname="${1:?packagename required}" @@ -127,6 +127,13 @@ deblist() { } {{- end }} +# Run 'top' with list of processes matching name. +topof() { + local name=${1:?name required} + local pidlist="$(pidof $name | sed 's/ /,/g')" + top -p $pidlist +} + # Docker helpers # Update docker-compose containers # https://stackoverflow.com/questions/49316462/how-to-update-existing-images-with-docker-compose @@ -138,5 +145,4 @@ dcupdate() { # TODO: logfile } - PATH=$PATH:$HOME/bin