commands: ensure external commands are executable
commands: ensure external commands are executable

For consistency with `brew command` and the logic in `brew.sh` (both use
`which` to find/validate an external command), we need to filter files
that are not executable.

Otherwise `brew commands` and thus bash completion will offer commands
that will produce an error when attempting to use them.

Closes #44999.

Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com>

jedahan/homebrew,polishgeeks/homebrew,BrewTestBot/homebrew,haihappen/homebrew,felixonmars/homebrew,Gasol/homebrew,getgauge/homebrew,tstack/homebrew,feelpp/homebrew,influxdata/homebrew,cprecioso/homebrew,benjaminfrank/homebrew,nelstrom/homebrew,deorth/homebrew,scpeters/homebrew,vigo/homebrew,johanhammar/homebrew,razamatan/homebrew,polishgeeks/homebrew,bchatard/homebrew,decors/homebrew,ndimiduk/homebrew,vihangm/homebrew,knpwrs/homebrew,apjanke/homebrew,mactkg/homebrew,ear/homebrew,MartinDelille/homebrew,ge11232002/homebrew,max-horvath/homebrew,redpen-cc/homebrew,codeout/homebrew,cHoco/homebrew,brunchboy/homebrew,jmagnusson/homebrew,patrickmckenna/homebrew,pdxdan/homebrew,kenips/homebrew,sjackman/linuxbrew,jconley/homebrew,afb/homebrew,heinzf/homebrew,kvs/homebrew,kodabb/homebrew,ento/homebrew,mmizutani/homebrew,craig5/homebrew,arg/homebrew,tstack/homebrew,englishm/homebrew,geoff-codes/homebrew,arg/homebrew,dgageot/homebrew,hakamadare/homebrew,yumitsu/homebrew,blogabe/homebrew,dunn/homebrew,danabrand/linuxbrew,mobileoverlord/homebrew-1,ExtremeMan/homebrew,liamstask/homebrew,booi/homebrew,skatsuta/homebrew,polishgeeks/homebrew,moyogo/homebrew,windoze/homebrew,haihappen/homebrew,cHoco/homebrew,skinny-framework/homebrew,mtigas/homebrew,sjackman/linuxbrew,sjackman/linuxbrew,ear/homebrew,josa42/homebrew,SteveClement/homebrew,marcusandre/homebrew,recruit-tech/homebrew,vigo/homebrew,AlekSi/homebrew,jmagnusson/homebrew,dkotvan/homebrew,ge11232002/homebrew,kad/homebrew,jeremiahyan/homebrew,BrewTestBot/homebrew,AlekSi/homebrew,influxdb/homebrew,kashif/homebrew,apjanke/homebrew,quantumsteve/homebrew,dericed/homebrew,arnested/homebrew,miketheman/homebrew,AlekSi/homebrew,jab/homebrew,Red54/homebrew,TaylorMonacelli/homebrew,AlexejK/homebrew,kevinastone/homebrew,hanxue/homebrew,jiashuw/homebrew,danieroux/homebrew,xyproto/homebrew,sakra/homebrew,marcwebbie/homebrew,patrickmckenna/homebrew,afb/homebrew,feelpp/homebrew,felixonmars/homebrew,jamer/homebrew,muellermartin/homebrew,pcottle/homebrew,osimola/homebrew,kad/homebrew,base10/homebrew,ehamberg/homebrew,galaxy001/homebrew,Homebrew/homebrew,base10/homebrew,lvicentesanchez/homebrew,retrography/homebrew,AlexejK/homebrew,drbenmorgan/linuxbrew,marcwebbie/homebrew,ento/homebrew,gnawhleinad/homebrew,MartinDelille/homebrew,elyscape/homebrew,quantumsteve/homebrew,apjanke/homebrew,dericed/homebrew,arnested/homebrew,bitrise-io/homebrew,Gasol/homebrew,joshua-rutherford/homebrew,codeout/homebrew,petere/homebrew,ryanfb/homebrew,max-horvath/homebrew,skatsuta/homebrew,lmontrieux/homebrew,hyuni/homebrew,miketheman/homebrew,patrickmckenna/homebrew,englishm/homebrew,cosmo0920/homebrew,amjith/homebrew,Habbie/homebrew,brotbert/homebrew,tsaeger/homebrew,sakra/homebrew,optikfluffel/homebrew,codeout/homebrew,LonnyGomes/homebrew,raphaelcohn/homebrew,michaKFromParis/homebrew-sparks,haihappen/homebrew,kevinastone/homebrew,amarshall/homebrew,ybott/homebrew,dutchcoders/homebrew,kashif/homebrew,chadcatlett/homebrew,ear/homebrew,getgauge/homebrew,mobileoverlord/homebrew-1,mttrb/homebrew,pcottle/homebrew,tjschuck/homebrew,muellermartin/homebrew,ablyler/homebrew,amjith/homebrew,pdpi/homebrew,ebouaziz/linuxbrew,eighthave/homebrew,ge11232002/homebrew,sometimesfood/homebrew,scpeters/homebrew,mobileoverlord/homebrew-1,Asuranceturix/homebrew,mttrb/homebrew,Red54/homebrew,slyphon/homebrew,tsaeger/homebrew,mommel/homebrew,muellermartin/homebrew,Homebrew/linuxbrew,lmontrieux/homebrew,gicmo/homebrew,davidcelis/homebrew,felixonmars/homebrew,gawbul/homebrew,esamson/homebrew,bitrise-io/homebrew,redpen-cc/homebrew,bchatard/homebrew,chadcatlett/homebrew,zchee/homebrew,muellermartin/homebrew,windoze/homebrew,afh/homebrew,georgschoelly/homebrew,DoomHammer/linuxbrew,marcwebbie/homebrew,changzuozhen/homebrew,3van/homebrew,jab/homebrew,hongkongkiwi/homebrew,jconley/homebrew,gvangool/homebrew,optikfluffel/homebrew,vigo/homebrew,kevinastone/homebrew,Habbie/homebrew,eighthave/homebrew,okuramasafumi/homebrew,dgageot/homebrew,blogabe/homebrew,3van/homebrew,tseven/homebrew,elgertam/homebrew,frodeaa/homebrew,slyphon/homebrew,megahall/homebrew,cprecioso/homebrew,Noctem/homebrew,petere/homebrew,coldeasy/homebrew,3van/homebrew,hanxue/homebrew,mtigas/homebrew,hakamadare/homebrew,lvicentesanchez/linuxbrew,dickeyxxx/homebrew,Homebrew/homebrew,geoff-codes/homebrew,getgauge/homebrew,ablyler/homebrew,tseven/homebrew,ehamberg/homebrew,galaxy001/homebrew,frickler01/homebrew,frickler01/homebrew,Homebrew/homebrew,jsjohnst/homebrew,craig5/homebrew,windoze/homebrew,reelsense/homebrew,tjschuck/homebrew,MoSal/homebrew,dickeyxxx/homebrew,Angeldude/linuxbrew,lvicentesanchez/homebrew,davydden/linuxbrew,nandub/homebrew,zchee/homebrew,alebcay/homebrew,iostat/homebrew2,royhodgman/homebrew,treyharris/homebrew,reelsense/linuxbrew,yangj1e/homebrew,amjith/homebrew,utzig/homebrew,mtigas/homebrew,drbenmorgan/linuxbrew,mmizutani/homebrew,bigbes/homebrew,mommel/homebrew,changzuozhen/homebrew,kodabb/homebrew,xcezx/homebrew,blogabe/homebrew,ndimiduk/homebrew,dalanmiller/homebrew,zchee/homebrew,codeout/homebrew,youtux/homebrew,LinusU/homebrew,amarshall/homebrew,dickeyxxx/homebrew,jeremiahyan/homebrew,cosmo0920/homebrew,MoSal/homebrew,theeternalsw0rd/homebrew,martinklepsch/homebrew,zeha/homebrew,ExtremeMan/homebrew,DoomHammer/linuxbrew,joshfriend/homebrew,elgertam/homebrew,lmontrieux/homebrew,colindean/homebrew,scorphus/homebrew,dkotvan/homebrew,cchacin/homebrew,lvicentesanchez/homebrew,theeternalsw0rd/homebrew,josa42/homebrew,a-b/homebrew,ndimiduk/homebrew,martinklepsch/homebrew,kenips/homebrew,influxdata/homebrew,josa42/homebrew,cHoco/homebrew,LonnyGomes/homebrew,dalanmiller/homebrew,jamer/homebrew,afb/homebrew,zeha/homebrew,xcezx/homebrew,hongkongkiwi/homebrew,galaxy001/homebrew,dongcarl/homebrew,bchatard/homebrew,cscetbon/homebrew,iandennismiller/homebrew,vladshablinsky/homebrew,skinny-framework/homebrew,danabrand/linuxbrew,kenips/homebrew,moyogo/homebrew,bitrise-io/homebrew,hongkongkiwi/homebrew,michaKFromParis/homebrew-sparks,retrography/homebrew,afh/homebrew,decors/homebrew,manphiz/homebrew,TaylorMonacelli/homebrew,alebcay/homebrew,utzig/homebrew,booi/homebrew,danabrand/linuxbrew,royhodgman/homebrew,royhodgman/homebrew,frickler01/homebrew,skatsuta/homebrew,AGWA-forks/homebrew,vihangm/homebrew,jbeezley/homebrew,colindean/homebrew,mommel/homebrew,Linuxbrew/linuxbrew,dunn/homebrew,dutchcoders/homebrew,mactkg/homebrew,craig5/homebrew,gnubila-france/linuxbrew,quantumsteve/homebrew,recruit-tech/homebrew,tstack/homebrew,kvs/homebrew,scorphus/homebrew,emcrisostomo/homebrew,jiashuw/homebrew,frodeaa/homebrew,ericfischer/homebrew,cHoco/homebrew,dplarson/homebrew,jab/homebrew,davidcelis/homebrew,MartinDelille/homebrew,LinusU/homebrew,utzig/homebrew,razamatan/homebrew,dkotvan/homebrew,gicmo/homebrew,drbenmorgan/linuxbrew,zeha/homebrew,quantumsteve/homebrew,aaronwolen/homebrew,a-b/homebrew,Cutehacks/homebrew,manphiz/homebrew,filcab/homebrew,thinker0/homebrew,grepnull/homebrew,bukzor/linuxbrew,booi/homebrew,gnawhleinad/homebrew,MartinDelille/homebrew,tsaeger/homebrew,gicmo/homebrew,pcottle/homebrew,mommel/homebrew,afb/homebrew,ilovezfs/homebrew,1zaman/homebrew,lmontrieux/homebrew,esamson/homebrew,razamatan/homebrew,feelpp/homebrew,keith/homebrew,osimola/homebrew,iostat/homebrew2,Noctem/homebrew,osimola/homebrew,Red54/homebrew,adamliter/homebrew,theeternalsw0rd/homebrew,sferik/homebrew,johanhammar/homebrew,dunn/homebrew,changzuozhen/homebrew,tjschuck/homebrew,ilovezfs/homebrew,gicmo/homebrew,jmagnusson/homebrew,amjith/homebrew,arg/homebrew,feelpp/homebrew,georgschoelly/homebrew,bigbes/homebrew,kevinastone/homebrew,gnawhleinad/homebrew,gawbul/homebrew,henry0312/homebrew,getgauge/homebrew,Homebrew/homebrew,jeremiahyan/homebrew,marcusandre/homebrew,henry0312/homebrew,vihangm/homebrew,amarshall/homebrew,utzig/homebrew,kvs/homebrew,xyproto/homebrew,BrewTestBot/homebrew,TaylorMonacelli/homebrew,liamstask/homebrew,jedahan/homebrew,craig5/homebrew,dolfly/homebrew,max-horvath/homebrew,reelsense/linuxbrew,pdpi/homebrew,pdxdan/homebrew,bigbes/homebrew,yangj1e/homebrew,jbeezley/homebrew,johanhammar/homebrew,ryanfb/homebrew,iandennismiller/homebrew,pdpi/homebrew,youtux/homebrew,Noctem/homebrew,Cutehacks/homebrew,jsjohnst/homebrew,reelsense/linuxbrew,marcusandre/homebrew,ehamberg/homebrew,dericed/homebrew,emcrisostomo/homebrew,retrography/homebrew,ralic/homebrew,Habbie/homebrew,iandennismiller/homebrew,menivaitsi/homebrew,gnawhleinad/homebrew,benjaminfrank/homebrew,dickeyxxx/homebrew,aaronwolen/homebrew,totalvoidness/homebrew,sometimesfood/homebrew,menivaitsi/homebrew,keith/homebrew,okuramasafumi/homebrew,deorth/homebrew,koraktor/homebrew,Linuxbrew/linuxbrew,danieroux/homebrew,liamstask/homebrew,tutumcloud/homebrew,teslamint/homebrew,alex/homebrew,jsjohnst/homebrew,Gasol/homebrew,SuperNEMO-DBD/cadfaelbrew,Asuranceturix/homebrew,LonnyGomes/homebrew,elyscape/homebrew,gawbul/homebrew,ExtremeMan/homebrew,chadcatlett/homebrew,liamstask/homebrew,ericfischer/homebrew,heinzf/homebrew,tutumcloud/homebrew,decors/homebrew,sometimesfood/homebrew,galaxy001/homebrew,mkrapp/homebrew,drewwells/homebrew,dkotvan/homebrew,esamson/homebrew,elyscape/homebrew,tschoonj/homebrew,knpwrs/homebrew,iostat/homebrew2,influxdb/homebrew,afh/homebrew,BrewTestBot/homebrew,drewwells/homebrew,jarrettmeyer/homebrew,dplarson/homebrew,ralic/homebrew,ericfischer/homebrew,tseven/homebrew,frickler01/homebrew,davidcelis/homebrew,tstack/homebrew,moyogo/homebrew,retrography/homebrew,dgageot/homebrew,cosmo0920/homebrew,polishgeeks/homebrew,mttrb/homebrew,AGWA-forks/homebrew,hyuni/homebrew,yumitsu/homebrew,scorphus/homebrew,sometimesfood/homebrew,eighthave/homebrew,dolfly/homebrew,scpeters/homebrew,gvangool/homebrew,treyharris/homebrew,marcusandre/homebrew,jmagnusson/homebrew,Angeldude/linuxbrew,keith/homebrew,nandub/homebrew,dutchcoders/homebrew,saketkc/linuxbrew,joshfriend/homebrew,bukzor/linuxbrew,1zaman/homebrew,brunchboy/homebrew,koraktor/homebrew,dplarson/homebrew,dolfly/homebrew,TaylorMonacelli/homebrew,dalanmiller/homebrew,sferik/homebrew,SteveClement/homebrew,saketkc/linuxbrew,MoSal/homebrew,eagleflo/homebrew,martinklepsch/homebrew,filcab/homebrew,davydden/linuxbrew,pdpi/homebrew,mtigas/homebrew,aaronwolen/homebrew,AlexejK/homebrew,haihappen/homebrew,alex/homebrew,a-b/homebrew,lrascao/homebrew,joshfriend/homebrew,nandub/homebrew,xyproto/homebrew,georgschoelly/homebrew,DoomHammer/linuxbrew,decors/homebrew,brunchboy/homebrew,tsaeger/homebrew,reelsense/homebrew,ExtremeMan/homebrew,xcezx/homebrew,jbeezley/homebrew,gvangool/homebrew,thinker0/homebrew,yazuuchi/homebrew,SteveClement/homebrew,Chilledheart/homebrew,eighthave/homebrew,bukzor/linuxbrew,zeha/homebrew,LonnyGomes/homebrew,jeremiahyan/homebrew,eagleflo/homebrew,cosmo0920/homebrew,optikfluffel/homebrew,a-b/homebrew,henry0312/homebrew,zhipeng-jia/homebrew,kodabb/homebrew,ehamberg/homebrew,joshua-rutherford/homebrew,bigbes/homebrew,SteveClement/homebrew,cchacin/homebrew,yangj1e/homebrew,hyuni/homebrew,totalvoidness/homebrew,lvicentesanchez/linuxbrew,osimola/homebrew,raphaelcohn/homebrew,scpeters/homebrew,brotbert/homebrew,dalanmiller/homebrew,raphaelcohn/homebrew,moyogo/homebrew,bitrise-io/homebrew,yazuuchi/homebrew,ilovezfs/homebrew,mactkg/homebrew,jedahan/homebrew,kodabb/homebrew,koraktor/homebrew,AGWA-forks/homebrew,bukzor/linuxbrew,jsjohnst/homebrew,SuperNEMO-DBD/cadfaelbrew,Gasol/homebrew,frodeaa/homebrew,sferik/homebrew,influxdb/homebrew,dericed/homebrew,colindean/homebrew,megahall/homebrew,zhipeng-jia/homebrew,dplarson/homebrew,felixonmars/homebrew,lvicentesanchez/linuxbrew,Chilledheart/homebrew,OJFord/homebrew,cprecioso/homebrew,Cutehacks/homebrew,Linuxbrew/linuxbrew,adamliter/homebrew,OJFord/homebrew,deorth/homebrew,Noctem/homebrew,mmizutani/homebrew,frodeaa/homebrew,zhipeng-jia/homebrew,jab/homebrew,ebouaziz/linuxbrew,kashif/homebrew,jiashuw/homebrew,yangj1e/homebrew,base10/homebrew,sakra/homebrew,kashif/homebrew,megahall/homebrew,dongcarl/homebrew,gnubila-france/linuxbrew,redpen-cc/homebrew,ebouaziz/linuxbrew,vladshablinsky/homebrew,1zaman/homebrew,ericfischer/homebrew,koraktor/homebrew,petere/homebrew,sjackman/linuxbrew,tschoonj/homebrew,totalvoidness/homebrew,kad/homebrew,yazuuchi/homebrew,danabrand/linuxbrew,sakra/homebrew,tseven/homebrew,recruit-tech/homebrew,keith/homebrew,cscetbon/homebrew,blogabe/homebrew,ryanfb/homebrew,LinusU/homebrew,geoff-codes/homebrew,arnested/homebrew,influxdb/homebrew,princeofdarkness76/homebrew,MoSal/homebrew,mkrapp/homebrew,pcottle/homebrew,brunchboy/homebrew,vladshablinsky/homebrew,knpwrs/homebrew,xcezx/homebrew,ge11232002/homebrew,mttrb/homebrew,razamatan/homebrew,grepnull/homebrew,slyphon/homebrew,heinzf/homebrew,alebcay/homebrew,nelstrom/homebrew,colindean/homebrew,tschoonj/homebrew,teslamint/homebrew,bchatard/homebrew,hanxue/homebrew,iostat/homebrew2,miketheman/homebrew,lrascao/homebrew,grepnull/homebrew,ybott/homebrew,lrascao/homebrew,amarshall/homebrew,heinzf/homebrew,ralic/homebrew,cprecioso/homebrew,danieroux/homebrew,elgertam/homebrew,LinusU/homebrew,menivaitsi/homebrew,henry0312/homebrew,emcrisostomo/homebrew,OJFord/homebrew,ybott/homebrew,davydden/linuxbrew,thinker0/homebrew,englishm/homebrew,Homebrew/linuxbrew,yazuuchi/homebrew,kvs/homebrew,ndimiduk/homebrew,jamer/homebrew,joshua-rutherford/homebrew,gnubila-france/linuxbrew,changzuozhen/homebrew,jedahan/homebrew,sferik/homebrew,brotbert/homebrew,1zaman/homebrew,danieroux/homebrew,lvicentesanchez/linuxbrew,Chilledheart/homebrew,influxdata/homebrew,drewwells/homebrew,jarrettmeyer/homebrew,jamer/homebrew,okuramasafumi/homebrew,grepnull/homebrew,manphiz/homebrew,OJFord/homebrew,manphiz/homebrew,vigo/homebrew,thinker0/homebrew,ento/homebrew,nelstrom/homebrew,davidcelis/homebrew,DoomHammer/linuxbrew,reelsense/linuxbrew,SteveClement/homebrew,slyphon/homebrew,dongcarl/homebrew,geoff-codes/homebrew,Habbie/homebrew,petere/homebrew,tschoonj/homebrew,saketkc/linuxbrew,kenips/homebrew,Angeldude/linuxbrew,Cutehacks/homebrew,elgertam/homebrew,okuramasafumi/homebrew,gnubila-france/linuxbrew,ilovezfs/homebrew,dgageot/homebrew,dunn/homebrew,benjaminfrank/homebrew,ento/homebrew,filcab/homebrew,xyproto/homebrew,Homebrew/linuxbrew,mactkg/homebrew,englishm/homebrew,optikfluffel/homebrew,tutumcloud/homebrew,raphaelcohn/homebrew,AlekSi/homebrew,kad/homebrew,vihangm/homebrew,youtux/homebrew,Asuranceturix/homebrew,treyharris/homebrew,elyscape/homebrew,dolfly/homebrew,zhipeng-jia/homebrew,jconley/homebrew,coldeasy/homebrew,princeofdarkness76/homebrew,recruit-tech/homebrew,alebcay/homebrew,aaronwolen/homebrew,skatsuta/homebrew,skinny-framework/homebrew,adamliter/homebrew,teslamint/homebrew,mmizutani/homebrew,joshua-rutherford/homebrew,nelstrom/homebrew,ablyler/homebrew,jarrettmeyer/homebrew,ryanfb/homebrew,reelsense/homebrew,3van/homebrew,benjaminfrank/homebrew,alex/homebrew,windoze/homebrew,princeofdarkness76/homebrew,pdxdan/homebrew,dutchcoders/homebrew,royhodgman/homebrew,Asuranceturix/homebrew,coldeasy/homebrew,tutumcloud/homebrew,ear/homebrew,megahall/homebrew,pcottle/homebrew,reelsense/homebrew,mobileoverlord/homebrew-1,base10/homebrew,Homebrew/linuxbrew,alex/homebrew,hakamadare/homebrew,skinny-framework/homebrew,filcab/homebrew,afh/homebrew,esamson/homebrew,iandennismiller/homebrew,hongkongkiwi/homebrew,cchacin/homebrew,cchacin/homebrew,miketheman/homebrew,cscetbon/homebrew,menivaitsi/homebrew,treyharris/homebrew,arnested/homebrew,eagleflo/homebrew,adamliter/homebrew,marcwebbie/homebrew,hanxue/homebrew,pdxdan/homebrew,jbeezley/homebrew,martinklepsch/homebrew,eagleflo/homebrew,jarrettmeyer/homebrew,scorphus/homebrew,hyuni/homebrew,georgschoelly/homebrew,teslamint/homebrew,theeternalsw0rd/homebrew,yumitsu/homebrew,princeofdarkness76/homebrew,vladshablinsky/homebrew,jiashuw/homebrew,totalvoidness/homebrew,michaKFromParis/homebrew-sparks,davydden/linuxbrew,SuperNEMO-DBD/cadfaelbrew,ybott/homebrew,Red54/homebrew,saketkc/linuxbrew,SuperNEMO-DBD/cadfaelbrew,AlexejK/homebrew,influxdata/homebrew,jconley/homebrew,mkrapp/homebrew,zchee/homebrew,ebouaziz/linuxbrew,emcrisostomo/homebrew,tjschuck/homebrew,youtux/homebrew,apjanke/homebrew,coldeasy/homebrew,arg/homebrew,Linuxbrew/linuxbrew,redpen-cc/homebrew,brotbert/homebrew,drbenmorgan/linuxbrew,ablyler/homebrew,Chilledheart/homebrew,max-horvath/homebrew,Angeldude/linuxbrew,Asuranceturix/homebrew,johanhammar/homebrew,lvicentesanchez/homebrew,nandub/homebrew,AGWA-forks/homebrew,ralic/homebrew,drewwells/homebrew,hakamadare/homebrew,patrickmckenna/homebrew,gvangool/homebrew,knpwrs/homebrew,dongcarl/homebrew