Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh bloat?



R Joseph Wright wrote:
>Zsh shows itself to be smaller than all the others, with the exception of
>ksh, and vastly smaller than bash.  Unless I am missing something, zsh
>seems quite the opposite of bloat.  With all its awesome features, how can 
>it be done?

A lot of zsh's features are not in the main executable, but are now
in separate code modules or shell functions.  Quick check on my laptop
(Red Hat):

$ du -s /opt/zsh/* /bin/ash /bin/bash /bin/tcsh /bin/ksh
342     /opt/zsh/bin
655     /opt/zsh/lib
724     /opt/zsh/man
933     /opt/zsh/share
1858    /opt/zsh/src
63      /bin/ash
313     /bin/bash
253     /bin/tcsh
160     /bin/ksh

So that's 342kB of main binary, 655kB of loadable modules, and 933kB of
shell functions.  (Wow, I didn't realise we had so many functions -- the
current tarballs are now more than twice the size of the 3.1.5 tarball.)
Depending on how you count it, zsh is the largest shell by a factor of
1.1, 3.2 or 6.2.  Of course, in any particular running instance of zsh,
most of those modules and shell functions won't be loaded.  zsh can
also reasonably be installed without any of these extras, making it a
competitively small shell, but with no great interactive features.

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author