Merge pull request #128 from MadCamel/master

Added pure perl method
This commit is contained in:
Luke Stephens (hakluke) 2020-01-10 13:58:29 +10:00 committed by GitHub
commit e3332fed29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,12 @@ Credit: @hakluke
:py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode
('utf-8')),signal.SIGTERM)
```
## The pure perl way
```perl
:!perl -e 'while(</proc/*>){open($f, "$_/cmdline"); kill 9, substr($_,6) if <$f> =~ m|^vim\x00| }'
```
## The Rustacean's way
Credit: @wodny