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.

33 of 265 comments (clear)

  1. Re:*CSH IS DYING by jmelloy · · Score: 3, Informative

    You can get all the software updates from the command line, at least the ones that come through Software Update. The command is "softwareupdate", and needs to be run as root.

  2. Re:But unless bash... by Anonymous Coward · · Score: 1, Informative
    What are you talking about? Bash has supported Ogg Vorbis since 2002, for audible alerts and stuff (together with WAV and AIFF.) Try:

    bash$ set -o margin-bell /usr/share/sounds/bell.ogg

  3. Finally by Anonymous Coward · · Score: 1, Informative

    I know Apple is just a desktop OS, but remember that it's a powerful platform usable for literate users and not just for mom and grandpa -- myself including. I'm glad that they finally realized that. I have only one questions: was it only recently that they read Tom Christiansen's great article about csh-like shells? Seriously, it was published in 1996. Heaven't they read it before? Haven't they known about those issues which Tom points out before? I know Apple doesn't have a strong Unix background (hell, Apple doesn't even have a CLI background), still I find it somehow strange. Great news though.

  4. 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...

  5. Re:zsh and BASH? Not me... by Neon+Spiral+Injector · · Score: 3, Informative

    I think what he was saying is:

    ls /some/big/long/complicated/dir/name[enter]
    [up arrow]
    [backspace]x5
    [down arrow]
    [up arrow]

    The "/name" is still missing. This history has been edited. There is no way to get it back. I like it for when I accidently type my password on the command line, I can go back up and delete it, and it will be gone. I don't like it, when I remove a complicated command and then discover I need it again.

  6. Re:Default shell can be changed, I think by squiggleslash · · Score: 2, Informative
    One way is via Terminal's Preferences. Don't forget to include "-" as a parameter to ensure the shell thinks it's a log in shell and executes a .profile.

    Note the other poster is incorrect, chsh doesn't generally work in OS X (though it may if you switch on the BSD /etc file support.) You can, however, change people's default shells and stuff using NetInfo - NetInfo Manager in Utilities is usually a friendly way of doing this. This is also what you use if you want to change the shell that comes up in >console mode.

    --
    You are not alone. This is not normal. None of this is normal.
  7. Re:One of my biggest girpes about OS X by Anonymous Coward · · Score: 1, Informative

    bash has been bundled since 10.2. zsh has been there since the beginning, I think.

  8. It is included by Llywelyn · · Score: 2, Informative

    Yes, a version of it is.

    [ravensroost:~] raven% bash
    bash-2.05a$

    --
    Integrate Keynote and LaTeX
  9. Re:zsh and BASH? Not me... by ArmorFiend · · Score: 2, Informative

    Ah, I understand now.
    There is a way to get it back - clear your line and press return. Now when you press up-arrow the unedited line, with "name" on the end, is still there.

  10. Re:Let's get rid of sendmail too by mithras+the+prophet · · Score: 3, Informative
    Last login: Tue Aug 26 11:16:41 on ttyp3
    Welcome to Darwin!
    [hostname:~] mithras% whereis emacs
    /usr/bin/emacs
    settles that.
    --
    four nine eighteen twenty-7 thirty-nine forty-7 fiftyeight sixty-nine seventy-9 eighty-8 one-hundred-and-nine one-twenty
  11. Re:*CSH IS DYING by ZackSchil · · Score: 3, Informative
    File Edit Options Buffers Tools Help
    Welcome to GNU Emacs

    Get help C-h (Hold down CTRL and press h)
    Undo changes C-x u Exit Emacs C-x C-c
    Get a tutorial C-h t Use Info to read docs C-h i
    Ordering manuals C-h RET
    Activate menubar F10 or ESC ` or M-`
    (`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key.
    If you have no Meta key, you may instead type ESC followed by the character.)

    GNU Emacs 21.1.1 (powerpc-apple-darwin6.0)
    of 2002-07-27 on law
    Copyright (C) 2001 Free Software Foundation, Inc.

    GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details.
    Emacs is Free Software--Free as in Freedom--so you can redistribute copies
    of Emacs and modify it; type C-h C-c to see the conditions.
    Type C-h C-d for information on getting the latest version.
    I know little to nothing about traditional *nix tools, I still crack open BBEdit because that's the way I've done things, well, forever now, but when I type in emacs into the OS X command line I get this. It appears to be GNU Emacs, though a slightly outdated version. I never installed this. I'm the only user of this machine. It think it's included in OS X.
  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:zsh and BASH? Not me... by hymie3 · · Score: 3, Informative

    So you have a situation like this?:

    mkdir /usr/local/gugalwumpus-3.2
    cp /home/you/froombor.tar.gz ___________


    I'd do this: /usr/local/gugalwumpus-3.2
    cp /home/you/froombor.tar.gz !$

    The !$ means "the last part of the last command".
    Other cool "bang" commands are:
    !! - repeat the last command
    !-n - repeat the nth previous command
    !* - all of the arguments to the last command

    So, if you've ever typed "vm stuff /newdir"
    You *could* up arrow, control-A, control-D, control-F v
    or you could type "mv !*"

    Lots of nifty shortcuts. Of course, I use tcsh, so what do I know?

  14. Re:*CSH IS DYING by WzDD · · Score: 2, Informative

    sudo softwareupdate

  15. Re:zsh and BASH? Not me... by Neon+Spiral+Injector · · Score: 2, Informative

    If you edit the line and press enter the old line is preserved, and a new entry of the edited command is added to your history. But if you edit a line, and just push the down arrow key, the old history entry is saved.

    So if you want to preserve the old command press enter, if you want to save the edited line, press the down arrow.

    The only problem comes is when you want to preserve the old command and press the down arrow by mistake.

  16. 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.

  17. Re:I use tcsh as my interactive shell. by molo · · Score: 2, Informative

    Well, OSX has included bash for a long time, so people could always run their bourne scripts. Now it's just default.

    I was talking about the interactive shell. I imagine MacOS X users have been confused when they see instrucitons saying that they should type "export PATH=foo" and it doesn't work in their tcsh shell.

    -molo

    --
    Using your sig line to advertise for friends is lame.
  18. Re:Let's get rid of sendmail too by Durandal64 · · Score: 2, Informative

    No, it's on my system as well, and I never manually installed it. So feel free to shut the fuck up now.

  19. 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
  20. 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.

  21. Re:But tcsh is nice! by profet · · Score: 3, Informative

    I have my bash environment set up to do case-insensitive tab-completion

    to do this in OS X:

    pico ~/.inputrc

    add the following line:

    set completion-ignore-case on

    ctrl-o (CTRL!!!! not command!!!!)

    now restart bash....

  22. Re:*CSH IS DYING by zojas · · Score: 2, Informative
    apparently you've never actually used OS X. it ships with the terminal version of emacs, in /usr/bin. if you want a carbon gui port of it, you can get it from here.

    You can run software updates from the command line, using /usr/sbin/softwareupdate which even has a man page!

    I agree there are some issues with terminal.app, but it's nearly trivial to put on apple's X11 and get a real xterm for when you need it. most of the time, terminal.app is good enough.

  23. Re:Now, about "ps" by smack.addict · · Score: 3, Informative

    This is a BSD/Sys V difference and a pain that everyone who made the transition from Sunos 4.x to Solaris had to deal with.

  24. 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. :)

  25. Re:But tcsh is nice! by BortQ · · Score: 2, Informative
    To turn off the beep in tcsh add this to your ~/.tcshrc (or whatever) file:

    set nobeep

    --

    A Multiplayer Strategy Game for Mac OS X, Windows, and Linux
  26. Re:Now, about "ps" by RealisticWeb.com · · Score: 2, Informative

    I chuckled at that, because I had just the opposite experiance. I also use OSX, Linux, and HP-UX, and in Linux and OSX I am used to typing ps -ax. Then I picked up an HP-9000 and discovered that it didn't work... ps -ef instead. Annoying! I guess the real winner here is Linux for accounting for both.

    --
    Sigs are out of style, so I'm not going to use one...oh wait..
  27. Re:Any shell by ickoonite · · Score: 1, Informative

    Yeah, the shell is easy to change in the Terminal application. In the Terminal menu, go to Preferences, and change the 'Run this command' to /bin/bash or /bin/csh or whatever takes your fancy. If you want more shells, go get Fink, if you've not got it already, and install them from that.

    iqu :)

  28. Re:Would someone please tell me... by Foxtwo · · Score: 2, Informative

    bindkey ^R i-search-back

    --
    Never argue with an idiot. He will lower you to his level and then beat you with experience.
  29. 1 + 1 == 4 by Anonymous Coward · · Score: 1, Informative

    OS X ships with four shells, but in reality there are only two. bash and sh, what should be the Bourne shell, are identical; tsch and csh are too. FWIW.

  30. Re:Speaking of shells ... what ever happened to .. by Mawbid · · Score: 2, Informative
    xmlterm may be what you're thinking of. It's mixed up with Mozilla, which probably means it's still bloated and slow, like it was when I toyed with it for 2 hours way back (1:50 compiling it and getting it to run, 0:10 doing ls and xcat.

    I like the idea though, and I'm a bit saddened by the fact that no-one's doing much to advance the state of the CLI. I think there's plenty to be done, and not just with CLI/GUI fusion.

    --
    Fuck the system? Nah, you might catch something.
  31. Just choose tcsh or bash yourself by Offwhite98 · · Score: 3, Informative

    You can just update your account to use whatever shell you want anyway. I see both bash and tcsh on my MacOS X 10.2 install, so there should be no trouble for someone who cares enough to change shells.

    It is a moot point.

    --
    Brennan Stehling - http://brennan.offwhite.net/blog/
  32. Works great for me... by ZxCv · · Score: 2, Informative

    I'm running 10.2.6 with bash 2.05a. I put 'set completion-ignore-case on' in my .inputrc and started a new bash shell. From my home dir, I did:

    cd Code/p<tab>

    bash completed this (correctly) to:

    cd Code/Perl

    Soooo, works great for me, as advertised. Perhaps double-check your set command (I accidentally used 'completion-case-ignore' at first), and double check anything you have in .profile, .bash_profile, or .bashrc that might be conflicting.

    --

    Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
  33. Re:Any shell by afantee · · Score: 2, Informative

    Yes, OS X comes with /bin/bash /bin/csh /bin/sh /bin/tcsh /bin/zsh, so you can change your default shell to any of these by entering it in the Terminal Preferences panel. Or you can switch to a different shell from the terminal by simply entering the shell name.