Bug #1434

[PATCH] sh(1): Implement $LINENO built-in variable

Added by Anonymous over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Salute.

Regarding sh(1):

LINENO
Set by the shell to a decimal number representing the current sequential
line number (numbered starting with 1) within a script or function before it
executes each command. If the user unsets or resets LINENO , the variable may
lose its special meaning for the life of the shell.

I attach a patch, obtained from FreeBSD, that implements $LINENO.
I'm running a system with the patch applied, but I need to test it more.

Unless no one objects, I'll push it in 161 hours and 48 minutes.

Cheers,
Stathis

PS. I'll also obtain the "Fix checking if a variable name is LINENO." patch as
well (SVN Revision 179387). But first thing first.

0001-sh-1-Expand-LINENO-to-the-current-line-number.patch Magnifier (4.31 KB) Anonymous, 07/21/2009 12:03 PM

History

#1 Updated by Anonymous over 5 years ago

I am doing some build{world,kernel} tests and tomorrow, I will commit it at some
point.

Cheers,
Stathis

#2 Updated by Anonymous over 5 years ago

> I am doing some build{world,kernel} tests and tomorrow, I will commit it at
> some point.

The 2 patches are here:
http://gitweb.dragonflybsd.org/~beket/dragonfly.git

I will squash them into one when I'll push it (today later).
Any objections ?

Cheers,
Stathis

#3 Updated by Anonymous over 5 years ago

Fixed with e0752c76c1342a6344370454653ac6704f8777ca .

Also available in: Atom PDF