Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

[ Create a new account ]

To Z Or Not To Z

Posted by Hemos on Sun Mar 18, 2001 04:47 AM
from the that-is-the-question dept.
Blasphemous Preist writes "For all of you looking for a good religious war over shells, IBM has just posted the following article on zsh. It's very informative and comes from a strong Linux and Z-shell proponent. If you're in to hack around with something other than bash zsh may be z answer."
This discussion has been archived. No new comments can be posted.
To Z Or Not To Z | Log In/Create an Account | Top | 148 comments (Spill at 50!) | Index Only | Search Discussion
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2
  • "Csh Programming Considered Harmful" by Anonymous Coward (Score:1) Sunday March 18 2001, @04:12AM
  • Bah by Anonymous Coward (Score:2) Sunday March 18 2001, @12:04AM
  • Re:Zsh advocacy by Anonymous Coward (Score:2) Sunday March 18 2001, @03:24PM
  • Re:tcsh forever!! by Dom2 (Score:1) Sunday March 18 2001, @05:24AM
  • Re:Top 10 reasons for usung Z-Shell by Dom2 (Score:1) Sunday March 18 2001, @05:27AM
  • Re:PSH - because perl is a "real" language by Dom2 (Score:1) Sunday March 18 2001, @05:30AM
  • Re:Shells in a Nutshell by Wansu (Score:2) Sunday March 18 2001, @06:20AM
  • many irix users dont use the shell by pixel fairy (Score:1) Sunday March 18 2001, @03:07AM
  • Re:Shells in a Nutshell by Ian Bicking (Score:2) Sunday March 18 2001, @10:57AM
  • Re:PSH - because perl is a "real" language by Ian Bicking (Score:2) Sunday March 18 2001, @11:04AM
  • Re:tcsh owns you all, really by pod (Score:1) Sunday March 18 2001, @08:23PM
  • Re:tcsh owns you all, really by Chainsaw (Score:1) Sunday March 18 2001, @12:32AM
  • Re:yuck by Tet (Score:2) Monday March 19 2001, @02:09AM
  • Re:Most "normal" people? by spitzak (Score:2) Monday March 19 2001, @12:23PM
  • Re:tcsh owns you all, really by spitzak (Score:2) Monday March 19 2001, @12:33PM
  • Re:tcsh owns you all, really by spitzak (Score:2) Monday March 19 2001, @12:41PM
  • Re:There's a debate like this for NT users: by spitzak (Score:2) Monday March 19 2001, @01:37PM
  • Re:tab completion... by spitzak (Score:2) Monday March 19 2001, @01:41PM
  • Re:tcsh owns you all, really by spitzak (Score:2) Tuesday March 20 2001, @12:20PM
  • Re:tcsh owns you all, really by spitzak (Score:2) Tuesday March 20 2001, @12:23PM
  • Re:Most "normal" people? by spitzak (Score:2) Tuesday March 20 2001, @12:37PM
  • Shells vs. telnet by yendor (Score:1) Sunday March 18 2001, @11:50PM
  • Re:Shells in a Nutshell by Ed Avis (Score:2) Sunday March 18 2001, @01:09AM
  • Re:tcsh owns you all, really by Ed Avis (Score:2) Sunday March 18 2001, @01:18AM
  • Re:Two things that alone is enough to use zsh by "Zow" (Score:2) Sunday March 18 2001, @05:08AM
  • Bash and case-insensitive completion by Cato (Score:2) Sunday March 18 2001, @05:24AM
  • Learn shell-independence by Cato (Score:2) Sunday March 18 2001, @05:35AM
  • Re:tcsh owns you all, really by Cato (Score:2) Sunday March 18 2001, @05:38AM
  • Re:Hi by PD (Score:2) Sunday March 18 2001, @12:37AM
  • Re:Tcsh sucks by malaba (Score:1) Sunday March 18 2001, @12:08AM
  • Re:What the? by Syberghost (Score:2) Sunday March 18 2001, @03:56AM
  • Re:Shells in a Nutshell by Admiral Burrito (Score:2) Sunday March 18 2001, @04:40PM
  • Re:Two things that alone is enough to use zsh by Admiral Burrito (Score:2) Sunday March 18 2001, @05:05PM
  • Re:Two things that alone is enough to use zsh by Admiral Burrito (Score:2) Monday March 19 2001, @11:47AM
  • all your shell belong to unix by emptybody (Score:1) Sunday March 18 2001, @04:46AM
  • Re:Shells in a Nutshell by image (Score:2) Sunday March 18 2001, @04:07AM
  • Re:tcsh owns you all, really by mutende (Score:1) Sunday March 18 2001, @03:37AM
  • Re:You Post this at 2:47AM... by Pope (Score:1) Sunday March 18 2001, @05:38AM
  • Re:Two things that alone is enough to use zsh by slams (Score:1) Sunday March 18 2001, @08:09AM
  • Re:Bash and case-insensitive completion by GlobalEcho (Score:1) Sunday March 18 2001, @08:26AM
  • Re:Learn shell-independence by PigleT (Score:1) Monday March 19 2001, @07:14AM
  • Re:z's by MochaMan (Score:1) Sunday March 18 2001, @09:48AM
  • Re:z's - Now whose English needs fixing? by MochaMan (Score:1) Sunday March 18 2001, @09:52AM
  • by segmentation fault (30564) on Sunday March 18 2001, @01:24AM (#356448)
    1.

    ~myhome% hash -d lbin=/usr/local/bin
    ~myhome% cd ~lbin
    ~lbin% pwd
    /usr/local/bin

    2.

    /% gzip **/*.dvi

    gives the same result as

    /% find -name "*.dvi" -exec gzip {} \;
  • Re:What the? by bdowne01 (Score:1) Sunday March 18 2001, @05:28AM
  • Re:tcsh owns you all, really by ianezz (Score:1) Sunday March 18 2001, @01:47AM
  • Re:tcsh owns you all, really by ianezz (Score:1) Sunday March 18 2001, @11:20PM
  • Re:Shells in a Nutshell by Znork (Score:1) Sunday March 18 2001, @04:14AM
  • by Znork (31774) on Sunday March 18 2001, @01:42AM (#356453)
    Of course, one of the main advantages of zsh is that it is rather compatible with both major shell tracks. You dont really have to 'learn' it, wether you're from the *csh or *sh track, because it will understand you fairly well either way.

    Another feature that is nice is automatic sanity mode, which pretty much nullifies those times you have to stty this or that just because some vendor still hasnt gotten it right. Commandline editing and arrow keys work, whatever platform you're logging in from.

    Just check the comp.sys.shells faq :). Which shell has the most features? Not that you'd ever use them all...

    zsh is good if you have a HP/IBM/Sun workstation and you need a shell that will just work FOR you, and you dont have the time to spend to configure the various shells into something resembling a sane environment. It's the ultimate commandline environment.

    For obvious reasons it isnt good for scripts that are to be deployed over various platforms, but then ksh is pretty much the least common denominator there. Altho considering the various vendor bugs in that you could probably just spend the time to install perl or bash across the platforms so you get a scripting language with the same bugs on all machines.
  • color prompt on Windows 2000 CMD window by piyo (Score:1) Monday March 19 2001, @11:26PM
  • Why I love ZSH. by Wazm (Score:1) Sunday March 18 2001, @08:30AM
  • Re:Two things that alone is enough to use zsh by Phong (Score:1) Sunday March 18 2001, @10:05AM
  • Re:tcsh owns you all, really by Phong (Score:1) Sunday March 18 2001, @10:20AM
  • Re:tcsh owns you all, really by Phong (Score:1) Sunday March 18 2001, @10:39AM
  • Re:z's by Phong (Score:1) Sunday March 18 2001, @07:47PM
  • Zsh advocacy (Score:5)

    by oops (41598) on Sunday March 18 2001, @03:22AM (#356460) Homepage
    I'm constantly surprised that Zsh doesn't receive more attention. I guess the major headache is the lack of accessible documentation which addresses the advantages.

    I use it as my default shell everywhere I work, on both NT and Unix. Here's some of the features that I love:

    Programmable Completion
    You can define completion for different commands in different ways. eg.
    ping/telnet completes with the list of machines on my network
    man completes with my man pages
    kill completes with job numbers

    java completes with all my available Java classes (I have to provide a Perl utility to help with this (classfind [demon.co.uk]) though)

    Recursive and intelligent wildcarding
    ls **/* completes through directories, subdirectories and the like. I never really have to use find anymore
    ls **/*(ah-5) finds files accessed within the last 5 hours
    ls **/*(L0) finds files of zero length
    ls **/*(@) finds symbolic links
    etc.

    Jerry Peek has quizzed the Zsh mailing lists for info so he can write about it in the next Unix Power Tools. Hopefully Zsh's profile will be raised somewhat.

  • Re:Learn shell-independence by adamspiers (Score:1) Sunday March 18 2001, @03:51PM
  • Re:Two things that alone is enough to use zsh by adamspiers (Score:1) Sunday March 18 2001, @04:04PM
  • Re:But does it have a restricted mode? by adamspiers (Score:1) Sunday March 18 2001, @04:08PM
  • by adamspiers (45617) <adam.spiers@net> on Sunday March 18 2001, @03:36PM (#356464) Homepage
    As one of the zsh developers (although admittedly one of the less active ones), I'm happy that zsh is getting the attention it deserves, although it would have been better timed to coincide with the imminent release of the 4.0 series.

    Rather surprisingly, everyone seems to have missed the biggest advantages zsh has over the other shells. Please guys, go out and try the latest development version! The amount of work spent on the 3.1.x development series over the last few years has been monumental. We're now at 4.0.1-pre-2, and its feature set is so far ahead of 3.0.x (let alone bash/tcsh) it's not even funny.

    For example, the article raves about programmable completion. Quite right too - I feel like crying every time I watch someone struggle without it (although as my cow-orkers well know, I'm a bit weird like that :-)

    BUT! The article didn't mention that beginning in version 3.1.6, the completion system underwent a complete rewrite, and now has sophisticated out-of-the-box completions for over 400 commands. Typing a Perl one-liner and you get stuck after perl - because you can't remember which option letters to use? Hit TAB and you get a list of all of them plus explanations. Want to quickly browse the structures of some of your MySQL tables? Type mysqlshow , hit TAB, and you get a list of your databases to complete from. Choose one, hit TAB again, and you get a list of the tables within that database. Want to scp an awkwardly-named file from a remote machine? Type a few letters of it, hit TAB and zsh will connect to the remote machine, get a file list, and use it to complete the file so you don't have to type it.

    If you want to know more, have a look at

    http://adamspiers.org/computing/zsh/

    Things have moved on a bit since I wrote it, but it should hopefully give you a taster.

    The article also mentioned prompts ... Well, if you're into eye candy, there's also a prompt theming system which I confess to writing :-) ObScreenshot:

    http://adamspiers.org/computing/zsh/files/prompt s/

  • Re:yuck by lamour (Score:1) Sunday March 18 2001, @06:40AM
  • Tcsh by Hard_Code (Score:2) Monday March 19 2001, @04:17AM
  • by kune (63504) on Sunday March 18 2001, @04:41AM (#356467)
    10) precmd() calls commands before displaying the prompt
    9) user binding of keys for command line editing
    8) .zlogout
    7) ignores duplicates in the history list
    6) best prompt:
    spider:src/linux/include/linux *
    (cuts longer directory names)
    5) compatible with Bourne Shell, works as expected
    4) best completion
    3) make |& less feeds stdout and and stdin into less, shorter than make 2>&1 | less
    2) Z-Shell has the best vi emulation
    1) more exclusive than vim ;-)

    I recommend the stable version 3.0.8, zsh in distributions are often from the 3.1 branch. This version breaks my skeleton files and some things (vi binding) doesn't work as I'm used too.
  • Re:Ugh...not again. by LinuxParanoid (Score:2) Sunday March 18 2001, @01:54AM
  • Re:What the? by LinuxParanoid (Score:2) Sunday March 18 2001, @02:04AM
  • Re:Top 10 reasons for usung Z-Shell by normiep (Score:1) Sunday March 18 2001, @04:00PM
  • Tektronix (was Re:Shells in a Nutshell) by locoluis (Score:1) Monday March 19 2001, @01:18PM
  • Moredate padent ap... by locoluis (Score:1) Monday March 19 2001, @01:30PM
  • Re:tcsh owns you all, really by Baki (Score:2) Sunday March 18 2001, @12:06AM
  • by PhatKat (78180) on Sunday March 18 2001, @12:13AM (#356474) Homepage
    and you're asking whether "To Z Or Not To Z"?!

    The answer is, of course, "Not To Z." It's St. Patrick's Day! Have another guinness. You have all Sunday afternoon to Z.
  • Re:yuck by anothy (Score:2) Sunday March 18 2001, @06:46AM
  • Re:Shells in a Nutshell by AntiBasic (Score:2) Sunday March 18 2001, @09:19AM
  • Re:Command lines FOREVER by T-Punkt (Score:1) Sunday March 18 2001, @08:28AM
  • Re:Changing default shell by crucini (Score:1) Monday March 19 2001, @08:57PM
  • Changing default shell by crucini (Score:2) Sunday March 18 2001, @09:35AM
  • Re:CLI hard to learn? by FunkyChild (Score:2) Sunday March 18 2001, @01:39AM
  • Re:tcsh owns you all, really by Stephen Samuel (Score:2) Sunday March 18 2001, @12:59AM
  • tab completion... by phlake (Score:1) Sunday March 18 2001, @06:48AM
  • Re:tab completion... by phlake (Score:1) Monday March 19 2001, @06:20AM
  • Re:Fish by The_Messenger (Score:1) Sunday March 18 2001, @09:47PM
  • Most "normal" people? by The_Messenger (Score:1) Sunday March 18 2001, @09:59PM
  • Re:Bah by The_Messenger (Score:1) Sunday March 18 2001, @10:09PM
  • by The_Messenger (110966) on Sunday March 18 2001, @12:54AM (#356487) Homepage Journal
    Most developers and users of Linux come into contact with a UNIX shell sooner or later. This is typically in the form of the Bash shell, or sometimes the C shell, or Tcsh, or the Korn shell(the default on IBM's AIX operating system).
    For the newbies, here's The_Messenger's Shells in a Nutshell:

    All dominant shells are either Bourne shells or C shells. Bourne shells are descendants of the original sh, written by S.R. Bourne. The Bourne shell was a great scripting language (which resembles Modula-2), but was not well-suited for interactive use. The C Shell csh), written by Bill Joy, attempted to remedy this by providing such novel features as job control and was much nicer for the interactive user, but its C-like scripting language in the original implemenation was clumsy and buggy.

    The KornShell (ksh), created by David Korn at AT&T, is the best of both worlds. It's a Bourne shell with tons of new scripting features, plus all of the C shell's interactive advantages. The KornShell is now the standard UNIX shell; you'll find it on all real (read: certified) UNIX systems, including Solaris. AIX, HP-UX, IRIX, SCO, et cetera.

    Tcsh, the Tenex C shell, is a suped-up version of the Berkely C shell. I like to think of it as what the KornShell would have been if it were csh-based. This shell is not "standard" but is found on most UNIX systems regardless.

    If you have to learn one shell, learn Korn. Why a Bourne shell? Because there are simply some times when you can't use a C-shell -- when editting the standard system scripts, for instance. Most of these scripts are written in the UNIX-vendor's sh implementation, which is different than Korn, but much closer to Korn than Tcsh. Why use Korn instead of just plain-old sh? Because sh is dreadful for interactive use!!

    Now we come to bash. Bash is the GNU implementation of a Bourne shell, and is comparable to tcsh in its feature-set. Bash is the standard shell on GNU/Linux systems, as well as the shell which the GNU/Linux system scripts are written in, which is convenient.

    However, many GNU/Linux newbies are under the impression that bash is the standard UNIX shell, which is NOT the case. There are endless differences; RTFM. The two good reasons to make your sysadmin install bash anyway are these: awesome command-line completion and the best EMACS command-line editor available!

    C shells are by no means dead, however. FreeBSD, being loyal to its BSD roots, still uses a C shell as its default. (Although once again the system scripts are still in sh. ;-) Until FreeBSD 4.1, the default shell was the Berkely csh; in 4.1 and later, they use tcsh.

    OpenBSD's standard shell is pdksh, a freeware clone of ksh. Personally, I find this shell obselete, because the real ksh is now (finally!) freely available from AT&T, and the pdksh is not KSH93-complaint.

    So there are five shells you have an excuse for knowing: sh, csh, ksh, tcsh, and bash. (Gesundheit!)

    The topic of this article is the Z shell, to which I say; Bah, humbug! While learning another shell might be a good way to spend a quiet weekend, the benefits are questionable. It's one which you'll never be guaranteed to have on a UNIX, GNU/Linux, or BSD system. You should only bother to learn a new shell if you're switching UNIX/Unixes or your current shell is missing features.

    --

  • Re:tcsh owns you all, really by Richy_T (Score:2) Monday March 19 2001, @12:35PM
  • zsh and joe by wahern (Score:1) Sunday March 18 2001, @07:49AM
  • Re:tcsh owns you all, really by david_ncl (Score:1) Sunday March 18 2001, @12:31AM
  • Re:tcsh owns you all, really by pjrc (Score:2) Sunday March 18 2001, @12:11AM
  • Re:Zsh advocacy by wfaulk (Score:1) Monday March 19 2001, @03:51PM
  • Re:tcsh forever!! by wfaulk (Score:1) Monday March 19 2001, @03:59PM
  • Re:Learn shell-independence by wfaulk (Score:1) Monday March 19 2001, @04:02PM
  • Re:Changing default shell by wfaulk (Score:1) Monday March 19 2001, @04:04PM
  • Re:yuck by wfaulk (Score:1) Monday March 19 2001, @08:21PM
  • What the? by enneff (Score:1) Sunday March 18 2001, @12:12AM
  • Re:What the? by enneff (Score:1) Sunday March 18 2001, @12:49AM
  • Re:What the? by enneff (Score:1) Sunday March 18 2001, @02:14AM
  • Re:You Post this at 2:47AM... by Lozzer (Score:1) Sunday March 18 2001, @01:32PM
  • Re:Why I love ZSH. by Frank T. Lofaro Jr. (Score:1) Sunday March 18 2001, @12:56PM
  • k-rad hax0r ware... by fact (Score:1) Sunday March 18 2001, @01:12AM
  • PSH - because perl is a "real" language by Ars-Fartsica (Score:2) Sunday March 18 2001, @05:20AM
  • My default shell by Valar (Score:1) Sunday March 18 2001, @08:31AM
  • Nevermind [was Re:You Post this at 2:47AM...] by gnugnugnu (Score:1) Monday March 19 2001, @11:20AM
  • Same as bash or tcsh??? by fist (Score:1) Sunday March 18 2001, @05:52AM
  • Re:What the? by Anal Surprise (Score:2) Sunday March 18 2001, @12:28AM
  • Developerworks isn't IBM, exactly by firewort (Score:2) Sunday March 18 2001, @04:47PM
  • Re:tcsh owns you all, really by fatphil (Score:1) Sunday March 18 2001, @04:20AM
  • Re:Two things that alone is enough to use zsh by nazgul@somewhere.com (Score:1) Sunday March 18 2001, @05:22AM
  • Re:Hi by Bungie (Score:1) Sunday March 18 2001, @01:40AM
  • tcsh forever!! by ZanshinWedge (Score:2) Sunday March 18 2001, @03:24AM
  • Re:tcsh forever!! by ZanshinWedge (Score:2) Sunday March 18 2001, @08:59AM
  • yuck by rpeppe (Score:1) Sunday March 18 2001, @04:20AM
  • Re:yuck by rpeppe (Score:1) Monday March 19 2001, @09:09AM
  • Re:yuck by rpeppe (Score:1) Tuesday March 20 2001, @08:49AM
  • Uber-cool? Multiple redirection is decades old by BinaryGrl (Score:1) Sunday March 18 2001, @07:32PM
  • Re:tcsh owns you all, really by groomed (Score:1) Sunday March 18 2001, @06:14AM
  • Re:Bah by dobes (Score:1) Monday March 19 2001, @09:28AM
  • Re:tcsh owns you all, really by satanami69 (Score:1) Sunday March 18 2001, @03:45AM
  • There's a debate like this for NT users: by AFCArchvile (Score:1) Sunday March 18 2001, @04:48AM
  • Re:What the? by DaneelGiskard (Score:1) Sunday March 18 2001, @02:39AM
  • command shell. by saintlupus (Score:1) Sunday March 18 2001, @09:26AM
  • Re:Ugh...not again. by Elendur (Score:1) Sunday March 18 2001, @04:11PM
  • Without a shell? by einhverfr (Score:1) Sunday March 18 2001, @01:10AM
  • Re:Bah by vb.warrior (Score:1) Sunday March 18 2001, @12:48AM
  • Command lines FOREVER by _N0EL (Score:1) Sunday March 18 2001, @02:37AM
  • Main screen turn on. by _N0EL (Score:1) Sunday March 18 2001, @02:49AM
  • Re:tab completion... by raju1kabir (Score:1) Sunday March 18 2001, @03:09PM
  • Re:Drinking beer makes you smarter by zealousness (Score:1) Sunday March 18 2001, @03:07AM
  • z is pronounced zed... by kurisudes (Score:1) Sunday March 18 2001, @09:49PM
  • Oh, dear... by magus_melchior (Score:1) Sunday March 18 2001, @12:13AM
  • Re:Top 10 reasons for usung Z-Shell by flynn_nrg (Score:1) Sunday March 18 2001, @06:17AM
  • Re:tcsh owns you all, really by Soft (Score:1) Sunday March 18 2001, @01:52AM
  • Re:Zsh advocacy by adadun (Score:1) Sunday March 18 2001, @01:08PM
  • Re:tcsh owns you all, really by tricobalt (Score:1) Sunday March 18 2001, @07:58AM
  • z's by crispybrown (Score:1) Sunday March 18 2001, @01:09AM
  • tcsh owns you all, really by Bob Dobbz (Score:1) Sunday March 18 2001, @12:00AM
  • Re:Tcsh sucks by Bob Dobbz (Score:1) Sunday March 18 2001, @12:06AM
  • But does it have a restricted mode? by Kunta Kinte (Score:1) Sunday March 18 2001, @06:29AM
  • Re:Two things that alone is enough to use zsh by janpod66 (Score:1) Sunday March 18 2001, @09:24PM
  • Re:Two things that alone is enough to use zsh by janpod66 (Score:1) Sunday March 18 2001, @09:25PM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Sunday March 18 2001, @12:27AM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Sunday March 18 2001, @12:52AM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Sunday March 18 2001, @01:02AM
  • Re:Ugh...not again. by Henry the Orange (Score:1) Sunday March 18 2001, @01:11AM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Sunday March 18 2001, @03:26AM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Sunday March 18 2001, @03:48AM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Monday March 19 2001, @04:46PM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Monday March 19 2001, @07:49PM
  • Re:tcsh owns you all, really by Henry the Orange (Score:1) Monday March 19 2001, @09:08PM
  • Re:Most "normal" people? by Henry the Orange (Score:1) Monday March 19 2001, @09:21PM
(1) | 2