zsh-users
 help / Atom feed
* Observe what profiles are loaded?
@ 2019-09-06 15:46 Peng Yu
  2019-09-06 17:49 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Peng Yu @ 2019-09-06 15:46 UTC (permalink / raw)
  To: zsh-users

Hi,

It describes what files are loaded by zsh. But I like to monitor the
progress in action. Is there a way to print the file whenever a file
is loaded? Thanks.

http://zsh.sourceforge.net/Doc/Release/Files.html

-- 
Regards,
Peng

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

* Re: Observe what profiles are loaded?
  2019-09-06 15:46 Observe what profiles are loaded? Peng Yu
@ 2019-09-06 17:49 ` Bart Schaefer
  2019-09-06 18:14   ` Andreas Kusalananda Kähäri
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2019-09-06 17:49 UTC (permalink / raw)
  To: Peng Yu; +Cc: zsh-users

On Fri, Sep 6, 2019 at 8:47 AM Peng Yu <pengyu.ut@gmail.com> wrote:
>
> It describes what files are loaded by zsh. But I like to monitor the
> progress in action. Is there a way to print the file whenever a file
> is loaded? Thanks.

In ~/.zshenv, add

setopt SOURCE_TRACE

This will miss /etc/zshenv but report everything else.  This is a
fairly recent option, older versions do not have it.

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

* Re: Observe what profiles are loaded?
  2019-09-06 17:49 ` Bart Schaefer
@ 2019-09-06 18:14   ` Andreas Kusalananda Kähäri
  2019-09-06 18:45     ` Peng Yu
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Kusalananda Kähäri @ 2019-09-06 18:14 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Peng Yu, zsh-users

On Fri, Sep 06, 2019 at 10:49:23AM -0700, Bart Schaefer wrote:
> On Fri, Sep 6, 2019 at 8:47 AM Peng Yu <pengyu.ut@gmail.com> wrote:
> >
> > It describes what files are loaded by zsh. But I like to monitor the
> > progress in action. Is there a way to print the file whenever a file
> > is loaded? Thanks.
> 
> In ~/.zshenv, add
> 
> setopt SOURCE_TRACE
> 
> This will miss /etc/zshenv but report everything else.  This is a
> fairly recent option, older versions do not have it.

Starting the shell with

    zsh -o SOURCE_TRACE

should cover /etc/zshenv

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

* Re: Observe what profiles are loaded?
  2019-09-06 18:14   ` Andreas Kusalananda Kähäri
@ 2019-09-06 18:45     ` Peng Yu
  2019-09-06 20:29       ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Peng Yu @ 2019-09-06 18:45 UTC (permalink / raw)
  To: Bart Schaefer, Peng Yu, zsh-users

I don't follow the documentation of `-o`. Could you please explain
what it means?

       Options may be specified by name using the -o option.  -o acts  like  a
       single-letter  option, but takes a following string as the option name.

On 9/6/19, Andreas Kusalananda Kähäri <andreas.kahari@abc.se> wrote:
> On Fri, Sep 06, 2019 at 10:49:23AM -0700, Bart Schaefer wrote:
>> On Fri, Sep 6, 2019 at 8:47 AM Peng Yu <pengyu.ut@gmail.com> wrote:
>> >
>> > It describes what files are loaded by zsh. But I like to monitor the
>> > progress in action. Is there a way to print the file whenever a file
>> > is loaded? Thanks.
>>
>> In ~/.zshenv, add
>>
>> setopt SOURCE_TRACE
>>
>> This will miss /etc/zshenv but report everything else.  This is a
>> fairly recent option, older versions do not have it.
>
> Starting the shell with
>
>     zsh -o SOURCE_TRACE
>
> should cover /etc/zshenv
>


-- 
Regards,
Peng

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

* Re: Observe what profiles are loaded?
  2019-09-06 18:45     ` Peng Yu
@ 2019-09-06 20:29       ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2019-09-06 20:29 UTC (permalink / raw)
  To: Peng Yu; +Cc: zsh-users

On Fri, Sep 6, 2019 at 11:45 AM Peng Yu <pengyu.ut@gmail.com> wrote:
>
> I don't follow the documentation of `-o`. Could you please explain
> what it means?

If you read "man zshoptions" you'll see that every option has a long
name (e.g., AUTO_CD or SOURCE_TRACE or XTRACE etc.), and a subset of
options also have a "single letter option" (prefixed by a hyphen).
The long name is for use with "setopt" and the single letter is for
use either with the builtin "set" command or as startup options to the
"zsh" invocation itself.  In the event that you want to pass to "zsh"
an option that does not have a "single letter" variation, you can use
"zsh -o name" where "name" is the long name of the option; in the
current example: "zsh -o SOURCE_TRACE".

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 15:46 Observe what profiles are loaded? Peng Yu
2019-09-06 17:49 ` Bart Schaefer
2019-09-06 18:14   ` Andreas Kusalananda Kähäri
2019-09-06 18:45     ` Peng Yu
2019-09-06 20:29       ` Bart Schaefer

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox