gsass1 / NTop

💻 htop-like system-monitor for Windows with Vi-keybindings.
GNU General Public License v3.0
1.23k stars 69 forks source link

:kill by name (or regexp) #14

Open netcrns opened 5 years ago

netcrns commented 5 years ago

Using :kill <ID> is a very specific action, and very helpful for sure. But I believe the ability to kill every process with a specific name would be handy for many as well. If a program runs multiple processes, it can be a bother to kill it entirely with NTop. You'd have to :search for the name and mark every process that comes up, and only then you'd be able to kill it with shift-k. Maybe you could even include regexp searching.

Let's take Firefox as an example. You'd have to :search firefox and spam n & space, then finish it off with shift-k to actually close that program. It'd be much more efficient to just use :kill firefox.

gsass1 commented 5 years ago

I guess the current kill command should be renamed to killpid or something and then kill would kill by process name.

netcrns commented 5 years ago

Wouldn't it be possible to have both functions in one command? Or is that too complicated to achieve? My guess is that you could check whether it's a PID or a process name with conditionals. Then again, I've only just started with low-level languages, so I might as well be wrong.

gsass1 commented 5 years ago

I was thinking that process names could just be numbers too.