Slashdot Mirror


Apple Switches tcsh for bash

gklinger writes "AppleInsider is reporting that Apple has switched from tcsh to bash in the the latest developer build (7B44) of Mac OS X 10.3 (Panther). There is speculation that the switch was made to appeal to Linux users. Experienced users get pretty religious about their shells so what remains to be seen is how diehard tcsh users will react." I don't know about appealing to Linux users in particular, but I just don't know many people who prefers tcsh these days, on any platform. It seems like everyone is using bash or zsh.

27 of 265 comments (clear)

  1. But unless bash... by computerme · · Score: 5, Funny

    also does "ogg vorbis" i predict still more complaining....

  2. It just fits with Apple's focus on usability by ArmorFiend · · Score: 4, Funny

    This move fits with Apple's focus on usability. To be usable, you have to be pronounceable, and you have to be memorable.

    bash: nice, violent, memorable name
    tcsh: the city in Belorussia?
    Its a no-brainer, really.

  3. Welcome by DevilM · · Score: 5, Funny

    I for one welcome our new bourne again overlords.

  4. Re:*CSH IS DYING by computerme · · Score: 4, Insightful

    you can do updates from the command line...

    as for emacs...

    I found this:

    http://www.porkrind.org/emacs/

    In under three seconds. Geez...

    And btw, It already is REAL unix, and not only is it the highest volume shipping version of unix on the planet, but apple did what NO other software company has been able to do in the 30+ year history of unix. The made it usable by the masses.

    Care to give them at least an ounce of credit now?

  5. this is a good thing by Dan+Ost · · Score: 5, Interesting

    I was a big fan of tcsh until I started doing serious shell scripting in
    a heterogeneous environment. Since tcsh wasn't available on all machines, all
    shell scripts were written for the bourne shell. After several months of
    using bourne shell syntax for scripts but using tcsh shell syntax on the
    command line, I finally decided that in order to preserve my sanity, I'd try
    bash on the command line. Turns out that after a day or so to get used to
    things, bash had everything I used tcsh for plus a couple of features that
    I'd never known would be so useful.

    I don't like running scripts under bash because it's so big, but as an
    environment, it's pretty decent.

    --

    *sigh* back to work...
  6. Re:One of my biggest girpes about OS X by computerme · · Score: 5, Insightful

    yes you can. Some people just like to complain. It makes them feel better or something...

  7. Couldnt anyone that really cares... by ErisCalmsme · · Score: 5, Insightful

    just install whatever shell they wanted to use anyway? Im sure anyone that has shell scripting in mind also knows how to install their own shell the correctly right?

    --
    Chaos is Divine *
  8. This is not a good thing by metamatic · · Score: 4, Interesting

    If you're writing non-trivial scripts, you would do far better to use a decent scripting language like Ruby, Perl or Python, all of which are more portable than bash, not to mention more robust and less likely to result in scripts filled with security holes.

    The bash shell is really the tool of choice for people who can only deal with one tool. For interactive use, tcsh is better, and for scripting almost anything is better.

    Basically, bash tries to be jack-of-all-trades, with all that that implies. But to FSF folks, who use emacs, "jack of all trades" is a way of life.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  9. I use tcsh as my interactive shell. by molo · · Score: 4, Insightful

    tcsh works perfectly well as an interactive shell. It has some severe problems when it comes to scripting, so I do my scripting in portable bourne shell.. but tcsh is perfectly functional as an interactive shell. I use it under linux, solaris, aix, hpux, and cygwin without issue.

    That said, I'm not surprised that apple change to a bourne-compatible shell. Bourne has been the unix standard for a long time, so changing to this makes sense. It means that all of the unix examples out there will work out of the box and not have to be translated into csh syntax. This is probably a good thing. People can still exec tcsh if they like.

    -molo

    --
    Using your sig line to advertise for friends is lame.
  10. Re:Default shell can be changed, I think by profet · · Score: 5, Informative

    from shell (or just find the double clickable icon):

    open /Applications/Utilities/NetInfo\ Manager.app

    now navigate to users->$userWhosShellYouWantToChange

    find the key named....(this is a tough one) "shell" and then just put the shell you want...bash....whatever...

  11. Re:tcsh user by Atzanteol · · Score: 4, Interesting
    And why switch when tcsh works well.
    Because there is no 'trivial' way to do this in tcsh:
    cmd 2>/dev/null
    In tcsh you need to do some kludge like:
    (cmd > /dev/tty ) >& /dev/null
    The fact that you cannot redirect stderr independently of stdout has always pissed me off about *csh. I'd rather ksh or bash anyday. Actually, I like bash for my command line, and coding in ksh...
    --
    "Ignorance more frequently begets confidence than does knowledge"

    - Charles Darwin
  12. Re:Let's get rid of sendmail too by Anonymous Coward · · Score: 4, Informative
    "I'm glad they don't install emacs. I'd be even happier if they removed sendmail as well."

    This will not happen. sendmail is written by Kirk McKusick's partner, Eric Allman, and Apple are still trying very very VERY hard to recruit Kirk to help with speed and more robust POSIX compliance. Pitching Kirk's life partner's work would not be a convincing way of showing Kirk much they want him on board.

  13. Re:Let's get rid of sendmail too by RalphBNumbers · · Score: 5, Interesting
    I'm glad they don't install emacs. I'd be even happier if they removed sendmail as well.
    They did remove sendmail as well. Or at least it's no longer the default. Panther uses Postfix by default.
    --
    "The worst tyrannies were the ones where a governance required its own logic on every embedded node." - Vernor Vinge
  14. Would someone please tell me... by cryptochrome · · Score: 4, Insightful

    What's so great about bash and/or zsh? Now that I've gotten used to tcsh I'm not sure why it should change. They all seem pretty much the same to me, except the do the same things in slightly different ways.

    If you ask me, the default shell should be whichever one with a history that loads the fastest. Many os x users only use terminal.app for the occasional foray into command-line-only commands (like me). Waiting for your shell to load are precious seconds wasted.

    --

    ---If you can't trust a nerd, who can you trust?

  15. Well I'm disappointed by goombah99 · · Score: 4, Interesting
    I'm one of those folks that prefers tcsh. I like my shell dumbed down a bit since its easier to remember how to use it. I'm a scientist so some times I'm intensively programming but other time I might go away for a year and do non-computer stuff. Its easy to forget stuff when you dont use it all the time.

    tcsh is a tad easier to work with. yes its less powerful but most of the time i dont need the power and would gladly trade for the simpler syntax and even more gladly trade uniformity for customization.

    it seem to me that making the default shell tcsh and letting power users change it to bash if they want might bave been a better alternative. also considering that all my scripts will now break under the defaults its not so good for me.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  16. Groovy! by Alex+Reynolds · · Score: 5, Funny

    For a moment there, I thought the headline read: Apple Switches THC for hash...

  17. But tcsh is nice! by babbage · · Score: 5, Interesting

    But I like working in tcsh!

    • I have my tcsh environment set up to do case-insensitive tab-completion.
      % cd ~/m<TAB>
      Music/ mail/
      % cd ~/mu<TAB>
      % cd ~/Music

      This is a wonderful feature, especially when working on a case-preserving-yet-insensitive filesystem like HFS+.

    • I also have my tcsh shell set up to use a built-in spell checker. If I try to run a command & have a typo, the shell will attempt to fix it for me:
      % greb foo ~/mail/sent-mail

      CORRECT>grep foo ~/mail/sent-mail (y|n|e|a)?

      This one doesn't always save me -- one of my common typos is to repeat the 'd' when changing directory, thus:

      % cdd ~/Desktop/

      CORRECT>dd ~/Desktop/ (y|n|e|a)?

      But it's enough of a win that I wouldn't want to go back to an interactive shell that doesn't have such a feature.

    Whenever I'm trying to do anything complex, I tend to drop into a bash subshell, but for 90% of interactive work I find that tcsh can do about everything bash can, and has a lot of interesting enhancements that AFAIK bash doesn't. Please feel free to correct me if that's not true, and bash can now do such things.

    (Also, another nice thing about being comfortable in an alternative shell, aside from being able to work productively when dropped on a machine that maybe doesn't have a wide variety of shells, is the built in security factor. It has been long observed that using an unusual keyboard or pointing device is an excellent (if mild) way to discourage people from messing around with your computer when you're away from your desk. Using an unusual command shell can have the same mild deterrance effect: it may not keep your Linux-loving neighbor from messing around in a login session you forgot to close, but it might annoy him enough to get it to get bored & go away pretty quickly :-)

    1. Re:But tcsh is nice! by babbage · · Score: 4, Informative

      Or skip the "here's how to use a text editor" steps entirely:

      % echo "set completion-ignore-case on" >> ~/.inputrc

      The file redirection operators are your friend, no matter what shell dialect you prefer. :)

  18. How diehard tcsh users will respond: by ivan256 · · Score: 4, Insightful


    bash-2.04$ chsh /bin/tcsh

    1. Re:How diehard tcsh users will respond: by gabe · · Score: 4, Informative

      gabe@jupiter:~$ chsh /bin/tcsh
      chsh: unknown user: /bin/tcsh

      Well, even if you do just 'chsh' and edit the Shell line, it still doesn't make any changes to netinfo...

      Perhaps you'll want to do this instead:

      niutil -createprop . /users/myusername shell /bin/tcsh

      --
      Gabriel Ricard
  19. Re:*CSH IS DYING by babbage · · Score: 4, Informative
    get emacs in the default install

    Come again?

    % ls -1 /usr/bin/*emacs*
    /usr/bin/emacs
    /usr/bin/emacs-21.1
    /usr/bin/emacsclient

    Funny troll, but emacs is part of the default install.

    Caveat: it's possible that emacs is part of the developer's tools rather than a base OSX installation. I don't think that matters though: if you're looking for a "real Unix", then you're going to want a C compiler and all the rest anyway, so you're going to check off the button for "install BSD subsystem" at system install time and you're going to install the developer's tools immediately after you first log in to the system. So whether Emacs was available 0 minutes or 2 minutes after the first login, I still would call that part of a complete operating system, and saying that it's not available is just trolling.

  20. How will tcsh users react? by jarran · · Score: 5, Funny
    what remains to be seen is how diehard tcsh users will react

    I imagine it will go something along the lines of...

    user@mac:~$ tcsh
    mac:~>

  21. Re:Let's get rid of sendmail too by allgood2 · · Score: 4, Informative

    Came with the system. I'm in process of setting up a brand new laptop with OS X 10.2.6, and emacs is there. I haven't even installed Developer Tools as of yet, which is where it was before. So sometime, probably in some update from 10.2.3 to 10.2.6 emacs was added to the basic OS.

  22. Now, about "ps" by The+Bum · · Score: 4, Insightful

    This is a mild gripe, but I'd like to see a version of "ps" that follows the Linux conventions for arguments. I work with three *nix operating systems: OS X, Linux, and HP-UX. The arguments are mostly the same between Linux and HP-UX, e.g. "ps -ef" for a listing of all processes. I invariably try typing that same command in OS X, only to remember, after being told that the arguments are invalid, that the equivalent command is "ps -ax". Annoying!

  23. Fun Stuff for tcsh Users by macserv · · Score: 4, Interesting

    This isn't well known, and for those who aren't hopelessly devoted to their shell, it's a good reason to use tcsh on Mac OS X. Fred Sanchez maintains a nice set of tcsh configuration files that are installed, but not loaded, by default. For more information, see the file located at:
    /usr/share/tcsh/examples/README If you're a new tcsh user, setting this up is as simple as echoing a few files into your home directory. If you've already got a tcsh configuration, it shouldn't be too hard to shift things around. When all is done, you'll have a great set of default command completions and aliases, and a cool way to organize your customizations.

  24. Those Wacky Apple Folks by juntunen · · Score: 4, Interesting

    I followed the link provided, and found the section titled "Unix-lover Heaven" rather funny. It said, "Panther will include a final X11 window server for Unix-based apps, improved NFS/UFS, FreeBSD 5 innovations as well as support for popular Linux APIs, IPv6 and other important acronyms." I'm guessing the marketing folks wrote that last bit...

  25. Re:Let's get rid of sendmail too by Suppafly · · Score: 4, Funny

    Anyway, Apple has enough problems with OS X being RAM-hungry, without enticing people to fill 80MB with a text editor.


    Agreed, using emacs for a simple text editor is like using MS Office as a simple text editor.. Except MS Office is smaller.