From 54d167e9dd2c125534ab74b976e2e791eeaa54b9 Mon Sep 17 00:00:00 2001 From: Red_M <1468433+Red-M@users.noreply.github.com> Date: Fri, 10 Jan 2020 21:22:12 +1000 Subject: [PATCH] Add "The chaotic neutral python wizard's way" Because everything you've ever written in python can be one line :) --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index d2dfe82..75e1309 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,14 @@ Credit: @hakluke ('utf-8')),signal.SIGTERM) ``` +## The chaotic neutral python wizard's way +Credit: @Red-M + +```python +:py3 __import__('os').kill(int(__import__('subprocess').check_output(["pidof","vim"]).decode +('utf-8')),__import__('signal').SIGTERM) +``` + ## The pure perl way ```perl :!perl -e 'while(){open($f, "$_/cmdline"); kill 9, substr($_,6) if <$f> =~ m|^vim\x00| }'