detect_terminal() was spawning up to 17 'which' subprocesses sequentially on every startup. Replace with std::env::split_paths + is_file() check. Eliminates 200-500ms of fork+exec overhead on cold cache.
detect_terminal() was spawning up to 17 'which' subprocesses sequentially on every startup. Replace with std::env::split_paths + is_file() check. Eliminates 200-500ms of fork+exec overhead on cold cache.