zsh-users
 help / color / mirror / code / Atom feed
* "(anon)" is not a useful pointer
@ 2017-12-11 20:13 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2017-12-11 20:13 UTC (permalink / raw)
  To: zsh-users

Another minor issue.

Consider:

[[[
% cat > foo
f() { 
  () {    
     : *(syntaxerror)
  }
}
% source foo
% f
(anon):1: unknown file attribute: y
zsh: exit 1
]]]

To a user, that "(anon)" isn't terribly helpful; it gives no clue as to
the location of the error.  Perhaps the name of the containing named
function could be prefixed to the error message, e.g.,

f: (anon):1: unknown file attribute: y

?

Cheers,

Daniel

P.S. "(anon):1" isn't helpful to the developer of f if f contains more
than one anonymous function (either nested, f() { () { () { : } } }, or
siblings, f() { () {:}; () {:}; }).  Ideas about that welcome. :)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-11 20:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 20:13 "(anon)" is not a useful pointer Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).