zsh-workers
 help / color / mirror / code / Atom feed
* ZSH
@ 2022-03-03 17:59 cesar.estrada
  0 siblings, 0 replies; 9+ messages in thread
From: cesar.estrada @ 2022-03-03 17:59 UTC (permalink / raw)
  To: zsh-workers

How to let history ignore the wrong command? How zsh can delete it 
automatically?



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

* Re: zsh
  2005-02-24 19:22 zsh Atousa Pahlevan
@ 2005-02-25 14:07 ` Peter Stephenson
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Stephenson @ 2005-02-25 14:07 UTC (permalink / raw)
  To: Atousa Pahlevan, zsh-workers

Atousa Pahlevan wrote:
> Hi,
> I am trying to find out the architecture of zsh.But I only find subsytems
> which all of them talk to each other.I haven't find any pipe & filters or
> even the other pattern for it(only a graph).Please guid me to do this.

There's no detailed documentation about the overall structure.

Start looking at loop() in init.c.  This is the main command loop (it's
also used internally).  There's a lot of initialisation before that, but
you don't need that for a first pass.

There are basically two steps to each set of commands: parse it, then
execute it.  Parsing (in parse.c) reads tokens from the lexer (in lex.c)
which in turn gets bytes from the history mechanism (in hist.c: in
non-interactive shells this is a fairly shallow layer over input.c), which
uses the input mechanism (in input.c), which either reads lines directly
from its input or, in an interactive shell, reads a line from the line
editor in the Zle directory via a call to zleread().

You'll see in loop() there are calls to hbegin and hend, which
initialise the history mechanism, and to lexinit, which initialises the
lexical analyser.  The input mechanism just passes its request on and
zleread will perform its own initialisation when it needs it.

Then the command line is read by a call to parse_event().  You can
(maybe!) trace how that works that through parse.c.  This returns a
pointer to a "struct eprog", which is a highly compacted version of the
parsed code.

This is then passed via execode() down to the code in exec.c which
executes it.  The code there roughly corresponds to the documented
grammar in the zshmisc manual page (as, indeed, does parse.c).  The core
of this is execcmd, which executes each individual command with its
arguments.  The pipeline stuff at the level above is particularly
complicated in order to get job control to work properly.  exec.c makes
a lot of use of the functions in jobs.c which records jobs and processes
mostly for interactive job control; the file signal signals.c is also
related and contains the handler function zhandler used, among other
things, for recording the fact that a child process has executed.

Every stage of the process is cluttered by lots of little details you
don't need to know in the first instance; unfortunately it's not clearly
spelled out what's essential and what isn't.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


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

* zsh
@ 2005-02-24 19:22 Atousa Pahlevan
  2005-02-25 14:07 ` zsh Peter Stephenson
  0 siblings, 1 reply; 9+ messages in thread
From: Atousa Pahlevan @ 2005-02-24 19:22 UTC (permalink / raw)
  To: zsh-workers

Hi,
I am trying to find out the architecture of zsh.But I only find subsytems
which all of them talk to each other.I haven't find any pipe & filters or
even the other pattern for it(only a graph).Please guid me to do this.

Regards,
Atousa.

Grad student of Waterloo university,
Canada, Ont.


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

* Re: zsh
  2001-12-16 17:32 zsh Andreas Feldmann
@ 2001-12-16 18:29 ` Zefram
  0 siblings, 0 replies; 9+ messages in thread
From: Zefram @ 2001-12-16 18:29 UTC (permalink / raw)
  To: Andreas Feldmann; +Cc: zsh-workers

Andreas Feldmann wrote:
>Is there a way to get the zsh to work these things out by it self?

	unsetopt HASH_CMDS

But you probably don't want to do that, because the hashing gives a
great performance improvement and is usually correct.  If you type

	rehash

each time after you make changes to the commands in the path, you still
get the benefit of hashing at the times when you're not adding and
removing commands.

-zefram


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

* zsh
@ 2001-12-16 17:32 Andreas Feldmann
  2001-12-16 18:29 ` zsh Zefram
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Feldmann @ 2001-12-16 17:32 UTC (permalink / raw)
  To: zsh-workers

Hi!
I have a question to the z shell:
When I install a new programm the completion doesn't find the new binary.
I first have to enter the name of the binary manually to get the zsh to notice that it exists.
When I delete a file or programm then the completion tells me its still there.
First when I then try to run the non-existent programm it understands that the binary isn't there anymore.
Is there a way to get the zsh to work these things out by it self?
I have installed zsh 3.1.9-dev-8 on my system.
Thanx 
Aef


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

* Re: zsh
  2000-06-06  1:02 ` zsh Bart Schaefer
@ 2000-06-06  2:16   ` Jae
  0 siblings, 0 replies; 9+ messages in thread
From: Jae @ 2000-06-06  2:16 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

On Mon, 5 Jun 2000, Bart Schaefer wrote:

> >   i liked it a lot better when my tab complete appear above my prompt,
> > not below. is there any chance it getting it changed back or perhaps
> > an option to do that??
> 
> It's been
> 
> unsetopt alwayslastprompt
> 
> for quite some years now.  That's the default in 3.0, though the opposite
> is the default for 3.1.
> 
> >   was there any reason for the change? i'm still using 3.0.7.
> 
> The default for this should not have changed (and has not, as far as I
> can tell) in any 3.0 version.  Are you sure it's not becoming set because
> of something in an /etc/zsh* file?

  doh! i never knew that was an option, and since the unset was always
the default, i never had an unsetopt in any of my .z files.

  thanks for the reply!!!
  
-Jae

  **
    The mouse said,"can i take the day off?" and the lion responded "No, for
	you will be my after lunch snack" <crunch> - Anonymous



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

* Re: zsh
  2000-06-06  0:32 zsh Jae
@ 2000-06-06  1:02 ` Bart Schaefer
  2000-06-06  2:16   ` zsh Jae
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Schaefer @ 2000-06-06  1:02 UTC (permalink / raw)
  To: Jae; +Cc: zsh-workers

On Jun 5,  8:32pm, Jae wrote:
> 
>   i liked it a lot better when my tab complete appear above my prompt,
> not below. is there any chance it getting it changed back or perhaps
> an option to do that??

It's been

unsetopt alwayslastprompt

for quite some years now.  That's the default in 3.0, though the opposite
is the default for 3.1.

>   was there any reason for the change? i'm still using 3.0.7.

The default for this should not have changed (and has not, as far as I
can tell) in any 3.0 version.  Are you sure it's not becoming set because
of something in an /etc/zsh* file?


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

* zsh
@ 2000-06-06  0:32 Jae
  2000-06-06  1:02 ` zsh Bart Schaefer
  0 siblings, 1 reply; 9+ messages in thread
From: Jae @ 2000-06-06  0:32 UTC (permalink / raw)
  To: zsh-workers

hey -

  i liked it a lot better when my tab complete appear above my prompt,
not below. is there any chance it getting it changed back or perhaps
an option to do that??

  was there any reason for the change? i'm still using 3.0.7.

  thanks!!

-Jae

  **
    The mouse said,"can i take the day off?" and the lion responded "No, for
	you will be my after lunch snack" <crunch> - Anonymous


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

* zsh
@ 2000-05-19 22:28 Meifang Lu
  0 siblings, 0 replies; 9+ messages in thread
From: Meifang Lu @ 2000-05-19 22:28 UTC (permalink / raw)
  To: 'zsh-workers@sunsite.auc.dk'

Hi there,

I am new to zsh, and I need help on a zsh's question. 
In .zshenv, what's the equivalent command as the following 
in .profile of the korn shell?
	typeset -x PS1='$PWD> '

Thanks in advance!

Meifang Lu



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

end of thread, other threads:[~2022-03-03 18:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 17:59 ZSH cesar.estrada
  -- strict thread matches above, loose matches on Subject: below --
2005-02-24 19:22 zsh Atousa Pahlevan
2005-02-25 14:07 ` zsh Peter Stephenson
2001-12-16 17:32 zsh Andreas Feldmann
2001-12-16 18:29 ` zsh Zefram
2000-06-06  0:32 zsh Jae
2000-06-06  1:02 ` zsh Bart Schaefer
2000-06-06  2:16   ` zsh Jae
2000-05-19 22:28 zsh Meifang Lu

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