Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information