zsh-users
 help / color / mirror / code / Atom feed
* how to list recursively sourced files in a zsh script?
@ 2017-01-07  0:02 Timothee Cour
  2017-01-07 16:55 ` Frank Terbeck
  0 siblings, 1 reply; 2+ messages in thread
From: Timothee Cour @ 2017-01-07  0:02 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

how to list recursively sourced files in a zsh script?
ideally showing file and line at which it's sourced and what is the file
being sourced

eg:

```
foo.sh:
echo BEGIN1
source foo2.sh
echo END1

foo2.sh:
echo BEGIN2
source foo3.sh
echo END2

set magic_option_to_list_sourced_files
source foo.sh
BEGIN1
source: ./foo2.sh from foo.sh:2
BEGIN2
source: ./foo3.sh from foo2.sh:2
END2
END1
```

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to list recursively sourced files in a zsh script?
  2017-01-07  0:02 how to list recursively sourced files in a zsh script? Timothee Cour
@ 2017-01-07 16:55 ` Frank Terbeck
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Terbeck @ 2017-01-07 16:55 UTC (permalink / raw)
  To: Timothee Cour; +Cc: zsh-users

Hi!

Timothee Cour wrote:
> how to list recursively sourced files in a zsh script?
> ideally showing file and line at which it's sourced and what is the file
> being sourced

I think you're looking for the sourcetrace option.


Regards, Frank
-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-07 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07  0:02 how to list recursively sourced files in a zsh script? Timothee Cour
2017-01-07 16:55 ` Frank Terbeck

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).