#35090: Running bash_completion script is slow, due to have() function ------------------------------------+--------------------------------------- Reporter: justin.lebar@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: ------------------------------------+--------------------------------------- {{{ $ time bash /opt/local/etc/bash_completion real 0m2.954s user 0m0.078s sys 0m0.037s }}} If I modify the have() function so it returns 0 (instead of running |type|) I get {{{ $ time bash /opt/local/etc/bash_completion real 0m0.245s user 0m0.059s sys 0m0.010s }}} I'm totally in favor of not loading complex completion scripts for commands that aren't installed, but that doesn't appear to be what's happening here; have() guards only very basic completion for some commands, afaict. Making opening a new terminal window 10x slower for the sake of avoiding some |complete| calls seems like a premature optimization and a bad trade- off. -- Ticket URL: <https://trac.macports.org/ticket/35090> MacPorts <http://www.macports.org/> Ports system for Mac OS