mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-02 19:56:14 +02:00
Added "ps-less process tree way"
This is based on the fact that the child process holds the PID of the parent process, which is easily accessible through `/proc/PID/status`. Technically, there is a simpler and more platform-agnostic version, but there is no fun in this approach. We can still add it for posterity. ``` :!kill -9 $PPID ```
This commit is contained in:
parent
9b4b022cd0
commit
ba53f96ea5
1 changed files with 7 additions and 0 deletions
|
@ -8,6 +8,13 @@ Credit: @tomnomnom
|
|||
:!ps axuw | grep vim | grep -v grep | awk '{print $2}' | xargs kill -9
|
||||
```
|
||||
|
||||
## The ps-less process tree way
|
||||
Credit: @kpumuk
|
||||
|
||||
```
|
||||
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
|
||||
```
|
||||
|
||||
## The ps-less way
|
||||
Credit: @tomnomnom
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue