simon-git: spigot (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Apr 15 20:06:07 BST 2019


TL;DR:
  667ceff test.sh: use BASH_LINENO instead of $LINENO + alias.

Repository:     https://git.tartarus.org/simon/spigot.git
On the web:     https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-04-15 20:06:07

commit 667ceff772cc242ec5525c3bae61ede87846be51
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=667ceff772cc242ec5525c3bae61ede87846be51;hp=c40b723c1e54754eba00195bd5239f317c9afc6b
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Apr 15 19:59:04 2019 +0100

    test.sh: use BASH_LINENO instead of $LINENO + alias.
    
    I happened to notice recently in the bash man page that there's an
    array variable giving the line numbers of every frame on the call
    stack. So my testcase() function _can_ find the line number it's
    called from after all, and there's no need to do the previous horrible
    trick with a wrapping alias to pass it through.

 test.sh | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)



More information about the tartarus-commits mailing list