Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill all #21

Open
alextes opened this issue Mar 9, 2017 · 9 comments
Open

Kill all #21

alextes opened this issue Mar 9, 2017 · 9 comments
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted

Comments

@alextes
Copy link

alextes commented Mar 9, 2017

Issuehunt badges

I currently have to run fkill about 5 times when I search for python. It would be nice if I could somehow request either:

Kill all exact matches
Kill all visible, suggested processes on my screen

Do others have a need for this? (:thumbsup:)
Maintainers interested in a PR?

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

@sindresorhus
Copy link
Owner

When running fkill python it should definitely kill all the processes matching exactly. The interactive interface however is fuzzy searched, so I think it would be surprising if it killed all exact matches. Instead we could maybe add a shortcut command, like press Option while killing a process, to kill all other with the same name? Happy to consider other options.

// @coffeedoughnuts

@alextes
Copy link
Author

alextes commented Mar 9, 2017

It does. I was talking about interactive mode. Should've clarified this.

After thinking about this more, I believe that you're precisely right.

  1. Either you know what you're looking for exactly and want to kill it or you don't and want to search.

fkill covers the first use case entirely. If you search, however, it is still very likely that whatever it is you were looking for, you want to kill all of it. Now intuitively, I feel you would expect fkill-cli to kill the selected option, not all processes by that exact name. So the default I'd say is perfect as-is.

That leaves: how could one signal to kill all processes by the same selected name. If I'm searching for a process to kill and more than one result of the same process come up, in most cases I can dream up I'd like to kill all of them. I can think of few scenarios where you'd only want to kill one of them. Your suggestion of a adding a modifier key is the best UI design with which I can come up. Maybe turning it into a checkbox list on Space (<- that took me a while 😅 ) is also worth considering.

Here's the kicker, since fkill supports kill all by cli argument, I don't think we should do this. I lost my common use-case to functionality that is already there. The use-case I propose in this comment will happen, but how often? I like to air on the side of simplicity. I say no implementing this until this issue has some votes. I'd be happy to PR the functionality myself at that point. What say you guys?

@sindresorhus
Copy link
Owner

Yes. Let's keep it open for a while and see what others think.

@pirate
Copy link

pirate commented Mar 14, 2017

I've had a personal fish version of this command for years that works quite similarly, with progressive narrowing of options using fuzzy-searching of the whole command string with args.
It has an all option, might be useful as inspiration:

screen shot 2017-03-14 at 1 33 44 am

It also supports the cli option --all to indiscriminately kill all fuzzy-matches:
screen shot 2017-03-14 at 1 35 19 am

@igauravsehrawat
Copy link

pkill "python" or pkill "process_name" is an excellent built-in command on *nix. May be this command can be interfaced with fkill. Just a thought.

Thanks

@IssueHuntBot
Copy link

@IssueHunt has funded $40.00 to this issue. See it on IssueHunt

@stroncium
Copy link
Contributor

@sindresorhus What exactly do we want to do here? Use pkill inside fkill for part of the cases?

@alextes
Copy link
Author

alextes commented Mar 11, 2019

@stroncium I would say let's start with figuring out what the value is for the user here. That should be both simpler and more valuable than working backwards from how pkill works. After all, it seems fkill process_name works like that already.

I wanted to make some suggestions but the more I think about it the less I can imagine how this could be helpful 😅 . Indeed pressing option, showing a warning we're about to kill everything by that name, and maybe how many processes that is sounds the most helpful to me.

However, I'd much prefer for someone that finds this issue to explain what they'd like fkill-cli to do. Like I mentioned two years ago I lost my use-case when Sindre explained fkill can already kill by process name i.e. fkill python.

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@nerdkid93
Copy link

I personally would find it useful to be able to filter (in interactive mode) the list of running processes, and then kill all remaining processes listed by either name or port. e.g. I frequently use node with debug mode, so I usually end up running fkill, then typing :9 to show my node programs. Hitting a special key or even going through each one and marking it as a program to kill would be fantastic.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted
Projects
None yet
Development

No branches or pull requests

7 participants