zsh: bad option, bash works

Patrick O'Callaghan pocallaghan at gmail.com
Mon Dec 19 12:27:18 UTC 2011


On Mon, 2011-12-19 at 18:04 +0800, Zind wrote:
> Maybe I don't have a deep understanding about the built-in commands
> from
> the beginning.
> Can I explain it this way?
> The built-in commands are usually more closely relataed to the OS,
> more
> underlying than seperate programms, like bindkey, cd, ulimit etc.
> So they have to be built-in, they have to be implemented within the
> shell.

[Please, don't top-post; see the list Guidelines]

That's not really it. The builtins are built in either because they're
part of the Shell programming language or because they affect the
Shell's own environment, e.g. its current directory. If cd were a
separate program it would execute as a process, change its *own*
directory, then terminate, leaving the Shell exactly where it was.

As to knowing that 'type' is a builtin, you could just ask it about
itself:

type type

poc



More information about the users mailing list