zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: bug (feature?) in zsh
Date: Mon, 17 Jan 2005 23:11:39 +0000	[thread overview]
Message-ID: <1050117231139.ZM30531@candle.brasslantern.com> (raw)
In-Reply-To: <D3F8D088-68A0-11D9-8A70-000393768D2C@mcgillsociety.org>

On Jan 17, 10:59am, William H. Magill wrote:
} Subject: Re: bug (feature?) in zsh
}
} On 16 Jan, 2005, at 01:33, Bart Schaefer wrote:
} 
} > The completion system (including compctl) uses the command hash table 
} 
} The use of a hash table for command execution/completion was 
} implemented with csh -- many, many years ago. Those shells which have 
} descended from csh (tcsh, zsh) behave in this same fashion. It is the 
} expected behavior.

This would almost be correct, except that zsh can't really be said to
have "descended" from csh.  It was written entirely independently and
was always meant to be more like ksh than csh; Paul Falstad borrowed
some csh features that he liked, is all.

Furthermore, it's possible to turn off zsh's use of the hash table if
all you're doing is command execution -- but completion forces the hash
table to be filled and uses it exclusively.
 
} This difference was mainly because the "csh" was intended as an 
} "interactive" shell, and therefore included features (like command 
} completion) which made usage on what at the time were the standard 
} input devices -- 110 baud ttys -- much easier on the operator.

Several years passed after csh's first deployment before completion
was added.

} In the beginning there was only Bell Labs and it was called "sh."
} [...]  Meanwhile BSD created csh to run on top of sh.

"Run on top of"??  Csh is and always has been written directly in C,
not as some kind of front on sh.

} All Unix variants and Linux variants boot into some form of "sh."
} Today, I believe all variants of Unix and Linux run "new sh" for
} process 0, which in turn spawns init.

This is news to me, and to the authors of "hp-ux 11i internals" as well
(which I happen to have sitting here because the publisher sent me an
unsolicited copy hoping I'd review it on Amazon).  The boot loader loads
the kernel, and the kernel spawns init directly, not by going through
sh. (This doesn't mean the kernel doesn't also spawn shells.)

} That this is not in the FAQ is not really surprising. Interesting, but 
} not surprising.

What I meant "isn't yet in the FAQ" is the difference between completion
and execution with regard to the hash table behavior.


  reply	other threads:[~2005-01-18  8:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-16  4:16 Toshiro
2005-01-16  6:33 ` Bart Schaefer
     [not found]   ` <1105860898.14494.0.camel@amethyst.cql.com>
2005-01-16 19:30     ` Toshiro
2005-01-17 15:59   ` William H. Magill
2005-01-17 23:11     ` Bart Schaefer [this message]
2005-01-18 10:29     ` Stephane Chazelas
2005-01-19  9:35       ` Seth Kurtzberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1050117231139.ZM30531@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).