* zstat
@ 2022-05-03 14:25 zzapper
2022-05-03 14:54 ` zstat Bart Schaefer
0 siblings, 1 reply; 13+ messages in thread
From: zzapper @ 2022-05-03 14:25 UTC (permalink / raw)
To: Zsh-Users List
Hi
I have zstat on my system (mint) & works just fine.
> zstat daily.log
But I don't remember how/if I installed or configured it.
I don't have it if I run
> zsh -f
e.g. I don't have this zmodload -F zsh/stat in my .zsh* configs
Q1) Can you help
Q2) How do you find out where you might have configured an zsh add-on etc
zzapper
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-03 14:25 zstat zzapper
@ 2022-05-03 14:54 ` Bart Schaefer
2022-05-03 15:11 ` zstat zzapper
0 siblings, 1 reply; 13+ messages in thread
From: Bart Schaefer @ 2022-05-03 14:54 UTC (permalink / raw)
To: zzapper; +Cc: Zsh-Users List
On Tue, May 3, 2022 at 7:25 AM zzapper <zsh@rayninfo.co.uk> wrote:
>
> I have zstat on my system (mint) & works just fine.
>
> I don't have it if I run
>
> > zsh -f
>
> e.g. I don't have this zmodload -F zsh/stat in my .zsh* configs
And presumably you also don't have zmodload without the -F.
> Q1) Can you help
That remains to be seen.
> Q2) How do you find out where you might have configured an zsh add-on etc
Place this in your .zshenv:
function zmodload() { builtin zmodload "$@" }
functions -T zmodload
This should print a trace each time zmodload is run. (If it doesn't,
check that you haven't changed $ZDOTDIR)
Then run
zsh -o sourcetrace
which traces one line for every file read with the "source" or "."
commands. Between the two you should be able to see exactly where
zsh/stat is coming from.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-03 14:54 ` zstat Bart Schaefer
@ 2022-05-03 15:11 ` zzapper
2022-05-03 15:57 ` zstat Peter Stephenson
0 siblings, 1 reply; 13+ messages in thread
From: zzapper @ 2022-05-03 15:11 UTC (permalink / raw)
To: Bart Schaefer; +Cc: Zsh-Users List
On 03/05/2022 15:54, Bart Schaefer wrote:
> On Tue, May 3, 2022 at 7:25 AM zzapper <zsh@rayninfo.co.uk> wrote:
>
> Place this in your .zshenv:
>
> function zmodload() { builtin zmodload "$@" }
> functions -T zmodload
>
> This should print a trace each time zmodload is run. (If it doesn't,
> check that you haven't changed $ZDOTDIR)
>
> Then run
>
> zsh -o sourcetrace
>
> which traces one line for every file read with the "source" or "."
> commands. Between the two you should be able to see exactly where
> zsh/stat is coming from.
Bart
function zmodload() { builtin zmodload "$@" }
functions -T zmodload
I guess the following generically loads anything in zsh/files ?
+zmodload:0> zmodload -F zsh/files b:zf_chown b:zf_mv b:zf_rm
zzapper
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-03 15:11 ` zstat zzapper
@ 2022-05-03 15:57 ` Peter Stephenson
2022-05-03 16:34 ` zstat zzapper
0 siblings, 1 reply; 13+ messages in thread
From: Peter Stephenson @ 2022-05-03 15:57 UTC (permalink / raw)
To: Zsh-Users List
> On 03 May 2022 at 16:11 zzapper <zsh@rayninfo.co.uk> wrote:
> function zmodload() { builtin zmodload "$@" }
> functions -T zmodload
>
> I guess the following generically loads anything in zsh/files ?
>
> +zmodload:0> zmodload -F zsh/files b:zf_chown b:zf_mv b:zf_rm
No, if you consult the manual page you'll see that's exactly what
it doesn't do.
-F is for features, so you're explicitly loading just those three
builtins, zf_chown, zf_mv, zf_rm from zsh/files, and nothing else.
pws
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-03 15:57 ` zstat Peter Stephenson
@ 2022-05-03 16:34 ` zzapper
2022-05-04 0:36 ` zstat Bart Schaefer
0 siblings, 1 reply; 13+ messages in thread
From: zzapper @ 2022-05-03 16:34 UTC (permalink / raw)
To: zsh-users
On 03/05/2022 16:57, Peter Stephenson wrote:
>> On 03 May 2022 at 16:11 zzapper <zsh@rayninfo.co.uk> wrote:
>> function zmodload() { builtin zmodload "$@" }
>> functions -T zmodload
>>
>> I guess the following generically loads anything in zsh/files ?
>>
>> +zmodload:0> zmodload -F zsh/files b:zf_chown b:zf_mv b:zf_rm
> No, if you consult the manual page you'll see that's exactly what
> it doesn't do.
>
> -F is for features, so you're explicitly loading just those three
> builtins, zf_chown, zf_mv, zf_rm from zsh/files, and nothing else.
>
> pws
>
then bart's other suggestion reveals:-
> zsh -o sourcetrace
+/home/david/.zshenv:1> <sourcetrace>
+/home/david/.zshrc:1> <sourcetrace>
+/home/david/.zcompdump:1> <sourcetrace>
+/home/david/key-bindings.zsh:1> <sourcetrace>
+/usr/local/bin/plugin/z/zsh-z.plugin.zsh:1> <sourcetrace>
+/usr/local/bin/plugin/alias-tips/alias-tips.plugin.zsh:1> <sourcetrace>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-03 16:34 ` zstat zzapper
@ 2022-05-04 0:36 ` Bart Schaefer
2022-05-04 6:43 ` zstat zzapper
0 siblings, 1 reply; 13+ messages in thread
From: Bart Schaefer @ 2022-05-04 0:36 UTC (permalink / raw)
To: zzapper; +Cc: Zsh Users
On Tue, May 3, 2022 at 9:34 AM zzapper <zsh@rayninfo.co.uk> wrote:
>
> > zsh -o sourcetrace
> +/home/david/.zshenv:1> <sourcetrace>
> +/home/david/.zshrc:1> <sourcetrace>
> +/home/david/.zcompdump:1> <sourcetrace>
> +/home/david/key-bindings.zsh:1> <sourcetrace>
> +/usr/local/bin/plugin/z/zsh-z.plugin.zsh:1> <sourcetrace>
> +/usr/local/bin/plugin/alias-tips/alias-tips.plugin.zsh:1> <sourcetrace>
What do you get from
zsh -ic 'whence -v zstat'
??
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 0:36 ` zstat Bart Schaefer
@ 2022-05-04 6:43 ` zzapper
2022-05-04 7:18 ` zstat Bart Schaefer
0 siblings, 1 reply; 13+ messages in thread
From: zzapper @ 2022-05-04 6:43 UTC (permalink / raw)
To: Bart Schaefer; +Cc: Zsh Users
On 04/05/2022 01:36, Bart Schaefer wrote:
> On Tue, May 3, 2022 at 9:34 AM zzapper <zsh@rayninfo.co.uk> wrote:
>> > zsh -o sourcetrace
>> +/home/david/.zshenv:1> <sourcetrace>
>> +/home/david/.zshrc:1> <sourcetrace>
>> +/home/david/.zcompdump:1> <sourcetrace>
>> +/home/david/key-bindings.zsh:1> <sourcetrace>
>> +/usr/local/bin/plugin/z/zsh-z.plugin.zsh:1> <sourcetrace>
>> +/usr/local/bin/plugin/alias-tips/alias-tips.plugin.zsh:1> <sourcetrace>
> What do you get from
>
> zsh -ic 'whence -v zstat'
>
> ??
> zsh -ic 'whence -v zstat'
> zstat is a shell builtin
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 6:43 ` zstat zzapper
@ 2022-05-04 7:18 ` Bart Schaefer
2022-05-04 9:31 ` zstat david rayner
0 siblings, 1 reply; 13+ messages in thread
From: Bart Schaefer @ 2022-05-04 7:18 UTC (permalink / raw)
To: zzapper; +Cc: Zsh Users
On Tue, May 3, 2022 at 11:43 PM zzapper <zsh@rayninfo.co.uk> wrote:
>
> > zsh -ic 'whence -v zstat'
> > zstat is a shell builtin
Hm. Well, if making zmodload a function didn't uncover it, then it's
time to bring out the big guns:
disable zmodload
(in ~/.zshenv) and look for the errors.
If zstat still shows up after that, it's either being loaded from
/etc/zshenv, or zsh has been compiled with zstat as an autoloadable
builtin, both of which seem unlikely since you said it's not there for
"zsh -f".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 7:18 ` zstat Bart Schaefer
@ 2022-05-04 9:31 ` david rayner
2022-05-04 9:49 ` zstat Roman Perepelitsa
0 siblings, 1 reply; 13+ messages in thread
From: david rayner @ 2022-05-04 9:31 UTC (permalink / raw)
To: zsh-users
On 04/05/2022 08:18, Bart Schaefer wrote:
> On Tue, May 3, 2022 at 11:43 PM zzapper <zsh@rayninfo.co.uk> wrote:
>>> zsh -ic 'whence -v zstat'
>>> zstat is a shell builtin
> Hm. Well, if making zmodload a function didn't uncover it, then it's
> time to bring out the big guns:
>
> disable zmodload
>
> (in ~/.zshenv) and look for the errors.
>
> If zstat still shows up after that, it's either being loaded from
> /etc/zshenv, or zsh has been compiled with zstat as an autoloadable
> builtin, both of which seem unlikely since you said it's not there for
> "zsh -f".
>
# OK I have now 'deleted' my .zshrc (kept a copy of course)
# I get the following 'odd' behaviour
If I start a new gnome terminal I have zstat
mint-HP-600B% zstat
zstat: no files given
# but if i reload zsh
mint-HP-600B% zsh
mint-HP-600B% zstat
zsh: command not found: zstat
So this has falsified my testing as I have always launched a new terminal
# confused.com
zzapper
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 9:31 ` zstat david rayner
@ 2022-05-04 9:49 ` Roman Perepelitsa
2022-05-04 12:09 ` zstat david rayner
0 siblings, 1 reply; 13+ messages in thread
From: Roman Perepelitsa @ 2022-05-04 9:49 UTC (permalink / raw)
To: david rayner; +Cc: Zsh Users
> # OK I have now 'deleted' my .zshrc (kept a copy of course)
>
> # I get the following 'odd' behaviour
>
> If I start a new gnome terminal I have zstat
>
> mint-HP-600B% zstat
>
> zstat: no files given
>
>
> # but if i reload zsh
>
> mint-HP-600B% zsh
> mint-HP-600B% zstat
>
> zsh: command not found: zstat
Which terminal are you using?
There are several terminals out there that inject extra initialization
code into the shell that they spawn. This initialization code usually
runs between global and user zshenv and is meant to enable tighter
integration between the terminal and the shell. In practice all such
code has side effects and can leak or break things. The terminals I'm
aware of that do this are Kitty, Integrated Visual Studio Terminal,
Integrated IntelliJ Terminal, Warp, and Fig. When you manually run
`zsh` in a terminal of this kind, the new shell won't run the extra
initialization code.
Roman.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 9:49 ` zstat Roman Perepelitsa
@ 2022-05-04 12:09 ` david rayner
2022-05-04 12:26 ` zstat zzapper
0 siblings, 1 reply; 13+ messages in thread
From: david rayner @ 2022-05-04 12:09 UTC (permalink / raw)
To: Roman Perepelitsa; +Cc: Zsh Users
On 04/05/2022 10:49, Roman Perepelitsa wrote:
>> # OK I have now 'deleted' my .zshrc (kept a copy of course)
>>
>> # I get the following 'odd' behaviour
>>
>> If I start a new gnome terminal I have zstat
>>
>> mint-HP-600B% zstat
>>
>> zstat: no files given
>>
>>
>> # but if i reload zsh
>>
>> mint-HP-600B% zsh
>> mint-HP-600B% zstat
>>
>> zsh: command not found: zstat
> Which terminal are you using?
>
> There are several terminals out there that inject extra initialization
> code into the shell that they spawn. This initialization code usually
> runs between global and user zshenv and is meant to enable tighter
> integration between the terminal and the shell. In practice all such
> code has side effects and can leak or break things. The terminals I'm
> aware of that do this are Kitty, Integrated Visual Studio Terminal,
> Integrated IntelliJ Terminal, Warp, and Fig. When you manually run
> `zsh` in a terminal of this kind, the new shell won't run the extra
> initialization code.
>
> Roman.
Just the standard Mint 'Gnome Terminal' I guess I used chsh -s zsh to
make zsh default
zzapper
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 12:09 ` zstat david rayner
@ 2022-05-04 12:26 ` zzapper
2022-05-04 13:21 ` zstat Peter Stephenson
0 siblings, 1 reply; 13+ messages in thread
From: zzapper @ 2022-05-04 12:26 UTC (permalink / raw)
To: zsh-users
>> Roman.
>
> Just the standard Mint 'Gnome Terminal' I guess I used chsh -s zsh to
> make zsh default
>
> zzapper
>
>
# the following gives me zstat
autoload -U compinit && compinit -i
~ > zsh -f
~ > zstat
zsh: command not found: zstat
~ > autoload -U compinit && compinit -i
~ > zstat
zstat: no files given
zzapper
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zstat
2022-05-04 12:26 ` zstat zzapper
@ 2022-05-04 13:21 ` Peter Stephenson
0 siblings, 0 replies; 13+ messages in thread
From: Peter Stephenson @ 2022-05-04 13:21 UTC (permalink / raw)
To: zsh-users
> On 04 May 2022 at 13:26 zzapper <zsh@rayninfo.co.uk> wrote:
> # the following gives me zstat
>
> autoload -U compinit && compinit -i
Looks like that's probably from compaudit. There are lots
of other completions that appear to load zstat for their
own use, too. The thing in compaudit could probably run
in a subshell, at the expense of some complexity passing
back names, but I don't know how worth while that is.
pws
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-05-04 13:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 14:25 zstat zzapper
2022-05-03 14:54 ` zstat Bart Schaefer
2022-05-03 15:11 ` zstat zzapper
2022-05-03 15:57 ` zstat Peter Stephenson
2022-05-03 16:34 ` zstat zzapper
2022-05-04 0:36 ` zstat Bart Schaefer
2022-05-04 6:43 ` zstat zzapper
2022-05-04 7:18 ` zstat Bart Schaefer
2022-05-04 9:31 ` zstat david rayner
2022-05-04 9:49 ` zstat Roman Perepelitsa
2022-05-04 12:09 ` zstat david rayner
2022-05-04 12:26 ` zstat zzapper
2022-05-04 13:21 ` zstat Peter Stephenson
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).