Closed bluz71 closed 1 year ago
will that catch all descendant processes? or just children?
Perhaps pgrep -P ...
could be a replacement for the ps
command?
(if you can confirm that does what I think it does on mac; i'm afraid i don't run a mac, so i usually rely on the freebsd man pages for these things, but that's not as good as the real thing)
macOS (at least my M1 Macbook) does not have psgrep
command. So that is not an option.
I suggest pkill -P
since that is available for both Linux and macOS. I understand that it would only kill children, not descendants; though I am not 100% sure.
Can recursion + pkill -P
work?
have you tried pgrep
(not psgrep
)
This suggests mac os should have it: https://unix.stackexchange.com/a/100759
Yes, macOS has pgrep
.
Sorry, my bad.
pgrep -P
does exist.
excellent
I've pushed up a change to make it use pgrep -P
instead https://github.com/lincheney/fzf-tab-completion/commit/745cd038fc9f7e279d95e1d2a1a9b812a7182f5b
Sorry for the delayed response, mostly due to timezones.
Many thanks @lincheney, issue is indeed fixed, code runs perfectly on GNU Linux and macOS BSD (and probably all other BSDs as well).
Excellent work, this is a great utility especially for us Bash users who don't have as nice a completion as Zsh; but this really improves my Bash workflow a lot. Thanks!
Hello @lincheney,
Sadly, the fix for #70, this commit, is not portable to macOS.
Basically this code:
GNU
ps
provides--ppid
, but macOS BSDps
does not support that option; this error message results:Would
pkill -P <<ppid>>
be an alternative? macOS/BSD and GNU Linux both supportpkill -P
.Regards.