Why does Apple use TCSH when it's such a pain in the ass to use RegEx with grep and egrep as compared to BASH?
c-shells have been the default user shell for BSDs as long as I can remember. It's tradition, and in some ways it's easier for novice UNIX users. Apple probably figures advanced users who want bash will change their shell to it on their own.
bash (mimicking sh) is the default root shell though.
in case you dont know just how to change your default shell, open up netinfo, unlock it (with your password), and navigate to /users/<username> (when i say navigate, i mean inside netinfo, not in the finder or something else). there is a 'shell' property associated with each user in /users. simply change yours to '/bin/bash' (or /path/to/prefered/shell, like /bin/csh, /bin/zsh, or possibly something fink'd like /sw/bin/bash). save netinfo (quit if your done with it), and open a new terminal window. now you're in your new shell.
in case you dont know just how to change your default shell, open up netinfo, unlock it (with your password), and navigate to /users/<username> (when i say navigate, i mean inside netinfo, not in the finder or something else). there is a 'shell' property associated with each user in /users. simply change yours to '/bin/bash' (or /path/to/prefered/shell, like /bin/csh, /bin/zsh, or possibly something fink'd like /sw/bin/bash). save netinfo (quit if your done with it), and open a new terminal window. now you're in your new shell.
good call. then post what your favorite shells, each has a strengths. that debate predates mac/win...
fuel for the fire. I loved tcsh (or was it just csh?) best for C programming back in the day!
OK, this is slightly off-topic, but hey, this is an AppleInsider thread .
So I switched shells from the annoying tcsh to the old, familiar bash. But in either, my .*rc file has aliases which do not behave as they should. eg:
ls='ls --colour'
ll='ls -l'
nano='pico'
etc do not work. i get errors like:
ll
error: -l not found (ie: ls -l is trying to list a file called "-l").
Does anyone have aliases working properly? Was voodoo required to do so? My exact same aliases for the exact same shells work spiffy in linux; I'm curious why they don't here.
good call. then post what your favorite shells, each has a strengths. that debate predates mac/win...
fuel for the fire. I loved tcsh (or was it just csh?) best for C programming back in the day!
my current one is bash. mainly because tcsh has problems redirecting stderr (2). i prefer tcsh's tabbing to bash's, but i have to live through it in order to survive my cold stderr hell. i also seem to remember that tcsh kept the prompt shorter (when showing the cwd) even when the cwd was huge. i hear that zsh is a dreamthough, haven't really taken the time to convert my .profile, so i didn't get a really good test drive. i think i'm going to make my own shell soon, or maybe a full terminal-type program, which will keep stdout, stderr and stdin in separate sections of the window. i think that'd be kinda cool (in a g33k3 manner).
Moreover, ls --color=auto doesn't display anything in color, just white on black. This is with xterm-color selected in Preferences and ANSI color NOT disabled.
Could someone copy their .bash_profile into here? I don't have one, freestyled one and maybe that is part of the problem.
Moreover, ls --color=auto doesn't display anything in color, just white on black. This is with xterm-color selected in Preferences and ANSI color NOT disabled.
Could someone copy their .bash_profile into here? I don't have one, freestyled one and maybe that is part of the problem.
Aliases still fuxXored. Grrrr...
You'll need to download and compile the standard GNU "ls" if you want color. The version that comes with OS X doesn't include that option. I'd imagine that fink would be useful for this, although I don't use it myself.
I cut my teeth on ATT flavored Unix, so am much more accustomed to ksh, and have never gotten comfortable with csh and its variants. Recently I just switched over to zsh (didn't even know it existed until I went poking around in /bin) and it is indeed very nice. Lots of features, haven't even scratched the surface yet, though I'm not generally a real shell power-user anyway.
My extraordinarily uninteresting .zshrc file:
Code:
bindkey -v
setopt NO_BEEP AUTO_CD
export PATH=.:~/bin:$PATH
export CDPATH=.:..:$HOME
prefs=~/Library/Preferences
: ~prefs
PS1="%(2L.+.)zsh[%~] "
alias l="ls -FC"
alias more=less
alias edit=vi
Zsh actually does have fairly nice capabilities for shortening the PWD in the prompt. Not as nice as it could be, though; I used to have a little C prog that I called every time I did a "cd", and it spit out a more "intelligently" shortened PWD. May still go back to that, but for now what zsh is doing is good enough.
Heck, I'm just happy to be free of tcsh finally...
You'll need to download and compile the standard GNU "ls" if you want color. The version that comes with OS X doesn't include that option. I'd imagine that fink would be useful for this, although I don't use it myself.
here's my `.bash_profile'. it's mostly just a conversion of my .tcshrc, with some extras thrown in here and there as they came up. link (its a link, cuz my LS_COLORS fuk with the formatting on this page).
Comments
Originally posted by pyr3
Why does Apple use TCSH when it's such a pain in the ass to use RegEx with grep and egrep as compared to BASH?
c-shells have been the default user shell for BSDs as long as I can remember. It's tradition, and in some ways it's easier for novice UNIX users. Apple probably figures advanced users who want bash will change their shell to it on their own.
bash (mimicking sh) is the default root shell though.
Originally posted by thuh Freak
in case you dont know just how to change your default shell, open up netinfo, unlock it (with your password), and navigate to /users/<username> (when i say navigate, i mean inside netinfo, not in the finder or something else). there is a 'shell' property associated with each user in /users. simply change yours to '/bin/bash' (or /path/to/prefered/shell, like /bin/csh, /bin/zsh, or possibly something fink'd like /sw/bin/bash). save netinfo (quit if your done with it), and open a new terminal window. now you're in your new shell.
good call. then post what your favorite shells, each has a strengths. that debate predates mac/win...
fuel for the fire. I loved tcsh (or was it just csh?) best for C programming back in the day!
So I switched shells from the annoying tcsh to the old, familiar bash. But in either, my .*rc file has aliases which do not behave as they should. eg:
ls='ls --colour'
ll='ls -l'
nano='pico'
etc do not work. i get errors like:
ll
error: -l not found (ie: ls -l is trying to list a file called "-l").
Does anyone have aliases working properly? Was voodoo required to do so? My exact same aliases for the exact same shells work spiffy in linux; I'm curious why they don't here.
Anyone?
alias ls "ls --color=auto"
alias ll "ls -l"
alias pico "nano"
alias damn "sudo killall -9 lookupd"
alias ll="ls -l"
in .bashrc, and it works.
Originally posted by pyr3
Why does Apple use TCSH when it's such a pain in the ass to use RegEx with grep and egrep as compared to BASH?
Maybe because every shell has its advantages and disadvantages? You're free to change your shell to bash.
alias damn "sudo killall -9 lookupd"
It's amazing after all this time lookupd still gets wedged this often.
Originally posted by Eugene
It's amazing after all this time lookupd still gets wedged this often.
NeXT users were right with calling it "lockup daemon".
Originally posted by I-bent-my-wookie
good call. then post what your favorite shells, each has a strengths. that debate predates mac/win...
fuel for the fire. I loved tcsh (or was it just csh?) best for C programming back in the day!
my current one is bash. mainly because tcsh has problems redirecting stderr (2). i prefer tcsh's tabbing to bash's, but i have to live through it in order to survive my cold stderr hell. i also seem to remember that tcsh kept the prompt shorter (when showing the cwd) even when the cwd was huge. i hear that zsh is a dreamthough, haven't really taken the time to convert my .profile, so i didn't get a really good test drive. i think i'm going to make my own shell soon, or maybe a full terminal-type program, which will keep stdout, stderr and stdin in separate sections of the window. i think that'd be kinda cool (in a g33k3 manner).
Could someone copy their .bash_profile into here? I don't have one, freestyled one and maybe that is part of the problem.
Aliases still fuxXored. Grrrr...
Originally posted by 1337_5L4Xx0R
Moreover, ls --color=auto doesn't display anything in color, just white on black. This is with xterm-color selected in Preferences and ANSI color NOT disabled.
Could someone copy their .bash_profile into here? I don't have one, freestyled one and maybe that is part of the problem.
Aliases still fuxXored. Grrrr...
You'll need to download and compile the standard GNU "ls" if you want color. The version that comes with OS X doesn't include that option. I'd imagine that fink would be useful for this, although I don't use it myself.
John
c'mon, people! Help a guy out here!!
John Whitney: Ah, so!
Thanks, hombré.
My extraordinarily uninteresting .zshrc file:
bindkey -v
setopt NO_BEEP AUTO_CD
export PATH=.:~/bin:$PATH
export CDPATH=.:..:$HOME
prefs=~/Library/Preferences
: ~prefs
PS1="%(2L.+.)zsh[%~] "
alias l="ls -FC"
alias more=less
alias edit=vi
Zsh actually does have fairly nice capabilities for shortening the PWD in the prompt. Not as nice as it could be, though; I used to have a little C prog that I called every time I did a "cd", and it spit out a more "intelligently" shortened PWD. May still go back to that, but for now what zsh is doing is good enough.
Heck, I'm just happy to be free of tcsh finally...
Originally posted by John Whitney
You'll need to download and compile the standard GNU "ls" if you want color. The version that comes with OS X doesn't include that option. I'd imagine that fink would be useful for this, although I don't use it myself.
John
fink's "fileutils" package includes GNU ls.
EDITOR=pico; export EDITOR
PAGER=less; export PAGER
PS1='\\w\\$ '; export PS1
alias ls="ls -F"
alias ll="ls -al"