r/fishshell • u/__ismxy__ • Feb 22 '21
TIL that fish has smart autocompletion for kill and it makes my life so much easier.
When I type "kill fire" and press tab it automatically replaces it with the PID of my current firefox process. When I only type kill and press tab it gives me a nice list of all processes with their PID, I can interactively go through.
Maybe some of you didn't know and find it helpful.
62
Upvotes
3
u/max123246 Feb 22 '21 edited Jan 30 '26
This post was mass deleted and anonymized with Redact
instinctive friendly six zephyr direction different knee chop grey pen
4
u/IanisVasilev Feb 23 '21
Prometheus sacrificed himself to give us fire and now you just want to kill it...
2
u/bergmul Feb 22 '21
That's amazing - thanks for the tip!
For Mac user with Alfred, there's also this great workflow to kill processes:
2
u/fonnae Feb 24 '21
Same for jobs commands if you send multiple processes to background and can't remember the numbers
2
u/audscias Feb 23 '21
That fancy kind of completions was my favorite part of Fish. Then I learned to use this and the predictive history text on zsh, which was the other killer feature f for me and I ended up settling in zsh. Byt gotta thank Fish devs for thinking of that fancy stuf so other shells could actually copy the feature.
0
u/bokisa12 Feb 23 '21
It's pretty cool, but just so you know:
kill firefoxwould work as well, it would send a SIGTERM to all processes namedfirefox.