intermediate enables the switchable synthesis of quinoline and indole from amides and alkynes through C–H activation using Cp*Co(III). The keys to this strategy are (1) introducing a Lewis acid to greatly accelerate the dehydrative cyclization, which can outcompete dehydrogenative cyclization, and (2) tuning the directing group to facilitate the dehydrogenative cyclization and inhibit dehydrative cyclization