Seems like not all platforms support -F being passed to 'more'
<rdar://problem/81296290>
Created attachment 434584 [details] Patch
rs=me
Created attachment 434633 [details] Patch for landing
Committed r280478 (240113@main): <https://commits.webkit.org/240113@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434633 [details].
Comment on attachment 434633 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=434633&action=review > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:124 > + more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout) Not new with this patch, but what is `which` doing here?
Comment on attachment 434633 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=434633&action=review >> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:124 >> + more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout) > > Not new with this patch, but what is `which` doing here? It's coming a library, whichcraft (import on line 31), basically the cross-platform equivalent of running `/usr/bin/which more`. It's giving us the path to the `more` executable. I think it was Don Olmstead that recommended this approach for Windows when I was working on some of the git and svn stuff last year, and I've been doing it whenever we need to run shell commands on multiple platforms.
it's almost certainly useless on Unix, as "which" won't find anything that Popen can't find on its own. Not sure what good it could be doing on Windows, but maybe there is some... witchcraft there.