config/shell/functions: add killm

This commit is contained in:
xeruf 2022-01-15 22:03:56 +01:00
parent 0b499bc5a8
commit 4d3cb42629
1 changed files with 5 additions and 0 deletions

View File

@ -281,6 +281,11 @@ alias updateUtils="updateDeps build.gradle.kts '"'"com.github.Xerus2000.util", "
# Kill all shell background processes # Kill all shell background processes
alias killbg='kill ${${(v)jobstates##*:*:}%=*}' alias killbg='kill ${${(v)jobstates##*:*:}%=*}'
# Kill all processes that match
killm() {
ps ax | grep "$1" | grep -v grep | sed 's/\([^ ]\) .*/\1/' | xargs kill --verbose "${@:2}"
}
# Kil all Java processes except IDEA # Kil all Java processes except IDEA
# Pass "-9" to force-kill and "-q" to not output what has been killed # Pass "-9" to force-kill and "-q" to not output what has been killed
killJava() { killJava() {