]> git.ipfire.org Git - thirdparty/man-pages.git/commit
scripts/bash_aliases: srcfix
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 9 May 2021 21:39:26 +0000 (23:39 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 9 May 2021 23:33:51 +0000 (11:33 +1200)
commit34afcb0daddba9412f471e928dd2d1392a3de308
tree38c8a5c47a222132f4834143caf0fb966498490e
parent94bf02f41b28c2dd5251d9bcc9368da2ec542f84
scripts/bash_aliases: srcfix

I clarified the code about two things:

- Checking how many arguments are being passed.
    Here, some functions didn't reject extra arguments when they
    weren't being used.  Fix that.
    I also changed the code to use $#, which is more explicit.
    And use arithmetic expressions, which better indicate that
    we're dealing with numbers.

- Remove unneeded options from sort.
Reported-by: Stefan Puiu <stefan.puiu@gmail.com>
    After Stefan asked about why am I using 'sort -V',
    I noticed that I really don't need '-V', and it may confuse
    people trying to understand the script, so even though I
    slightly prefer the output of 'sort -V', in this case, it's
    better to use the simpler 'sort' (yet I need 'sort', to
    maintain consistency in the results (find is quite random)).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
scripts/bash_aliases