PatrickF1 / fzf.fish

🔍🐟 Fzf plugin for Fish
MIT License
1.96k stars 78 forks source link

[Search Processes] use ps binary unaliased #298

Closed tamirzb closed 1 year ago

tamirzb commented 1 year ago

We should use the ps binary unalised because

PatrickF1 commented 1 year ago

For -ww, I don't get it. I checked out this PR and used it and don't see a difference. Also, in the docs, it says "When output is not to a terminal, an unlimited number of columns are always used." Right now, ps is not outputting to a tty, so I think -w might be irrelevant. Do you have screenshots of before and after adding -ww?

tamirzb commented 1 year ago

Yeah I thought it was a bit odd that it doesn't work for me, especially since you did add wrap to fzf's --preview-window so I figured it should work for you, but for some reason it doesn't work for me.

Basically this is what I'm getting right now: without_ww

And this is how it looks for me after my patch: with_ww

Just a guess, but maybe it has to do with the fzf version? Like maybe at some point fzf was changed to make programs running under preview think they are outputting to a tty? My fzf version is 0.42.0.

Anyway to be honest it's not a big deal for me, so if you'd rather not merge this it's also ok.

PatrickF1 commented 1 year ago

Just a guess, but maybe it has to do with the fzf version? Like maybe at some point fzf was changed to make programs running under preview think they are outputting to a tty? My fzf version is 0.42.0.

Hmm mine is also version 0.42.0. This is very odd. I surmise this is due to something specific to your setup so I'd rather not merge.

However, we can at least consider the part to force using the binary instead of the alias. Of course, there's pros and cos. Maybe some people want to be able to have the alias layer to control the binary. What's your use case for the alias and why you don't want the alias for fzf?

PatrickF1 commented 1 year ago

Bump on my question :)

tamirzb commented 1 year ago

I mean there's not much to it. I have an alias for ps that is intended to prettify the output a bit but it ends up messing a bit with this code that parses ps output. I put it in a PR mainly because I saw you are doing the same with fd so thought you might want consistency.

Anyway, against it's really no big deal. If you don't want to merge it it's completely fine, I'll figure out some workaround for my config.

PatrickF1 commented 1 year ago

I'm probably going to merge this but right now I'm focused on building empathy with my users and learning about their use cases, how they use their tools in the wild. In light of that, do you mind sharing your ps alias?