commandline: Refactor and streamline special syntaxes
All those special syntaxes only trigger if args.length >= 2,
so first we can nest them in a new scope, which also makes
it visually more distinct.

Additionally, the third and second cases were actually inverted:
if the third case was to pass, it means the second case couldn't
have passed (because they check present/absence of an extension,
respectively), so we can swap them and use an else-if.

The result is arguably much more readable, and highlight the fact
that if the first case (stdin) is used, the second case will.
1 parent cff0336 commit deea6c2b559ac5eedb3202b2cd44a8acdc90b6a1
@Geod24 Geod24 authored on 10 Jun 2022
Mathias LANG committed on 13 Jun 2022
Showing 1 changed file
View
source/dub/commandline.d