Skip to content

Commit dd2ffe2

Browse files
committed
nl: _ is a valid character in names
1 parent 396cedd commit dd2ffe2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

main/stdlib.ijs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ NB.- if empty use: 0 1 2 3.
341341
NB.- mp: optional matching pattern. If mp contains '*', list names
342342
NB.- containing mp, otherwise list names starting mp. If mp
343343
NB.- contains '~', list names that do not match.
344-
NB.- if mp contains '_', list names with the locale name
344+
NB.- if mp starts with '_', list names with the locale name
345345
NB.-
346346
NB.- e.g. 'f' nl 3 - list verbs that begin with 'f'
347347
NB.- '*com nl '' - list names containing 'com'
@@ -360,8 +360,9 @@ end.
360360
if. 0 e. #nms do. return. end.
361361

362362
if. #t=. x -. ' ' do.
363-
'n s l'=. '~*_' e. t
364-
t=. t -. '~*_'
363+
'n s'=. '~*' e. t
364+
l=. '_' = {.t
365+
t=. }.^:l t -. '~*'
365366
b=. t&E. &> nms
366367
if. s do. b=. +./"1 b
367368
else. b=. {."1 b end.

0 commit comments

Comments
 (0)