Live data from Hacker News

FreeBSD switches the default root shell from csh to sh

cgit.freebsd.org

91–100 of 154 posts

Re: FreeBSD switches the default root shell from csh to sh

#91

A die-hard tcsh user myself, I mourn the end of an era, but has anyone done serious scripting in the C shell? I jokingly call it a sin in the eyes of the LORD, but seriously, it really, really sucks compared to even just the POSIX shell. It's probably time for me to finally give into Bash or zsh or something equally modern. Might be nice to get access to all of those shell completion hooks some tools have—not because…

Ready to use simple ZSH setup for the rescue:

https://vermaden.wordpress.com/2021/09/19/ghost-in-the-shell...

> has anyone done serious scripting in the C shell?

I recall SAP created used CSH/TCSH for its scripts but I am not sure they still do it.

Re: FreeBSD switches the default root shell from csh to sh

#92

Why not just go to Bash or ZSH?

The ZSH shell would be actually great choice for shell in the FreeBSD Base System because it uses the MIT license.

As BASH uses the GPL3 license it does not have the chance of being included in the FreeBSD Base System because the FreeBSD project currently tries to remove all GPL3 licensed software from its base.

Details here:

https://wiki.freebsd.org/GPLinBase

Re: FreeBSD switches the default root shell from csh to sh

#93

Earlier quoted context omitted.

That says a thing or too about habits. Was he pissed or was it just a light comment ? I'd be sad to see an educated person refuse interesting new tricks (readline causes no regression or loss right ?)

It's delicate. The noob me chased after new tricks with much more enthusiasm than the current me. Over time, priorities change, and now I just want to get stuff done and for tools to get out of the way. I'd appreciate new tricks that bring quite a lot of benefit to my workflow, but the little tricks I'd rather let fly past me. If the tools such as base environment changes way too often, I'd be annoyed as well - not b…

It is one of the saddest self-realizations in my old age that I am no longer excited about learning/perfecting my tools.

But as you say, tools must get out of the way...

Re: FreeBSD switches the default root shell from csh to sh

#94
post #3

In the recent history sh(1) has gain the missing features for it to become a usable interractive shell: - command completion - ... Too much bloat for my tastes.

I assumed this was sarcasm and I am surprised to read all the serious replies.

Re: FreeBSD switches the default root shell from csh to sh

#95
post #11

We once upgraded a major research department from csh to tcsh (while also migrating most users to bash). A senior leader complained that when they hit the up arrow, the last command they typed showed up. I explained how to disable readline

That says a thing or too about habits. Was he pissed or was it just a light comment ? I'd be sad to see an educated person refuse interesting new tricks (readline causes no regression or loss right ?)

As always, there's an xkcd on this

https://xkcd.com/1172/

Re: FreeBSD switches the default root shell from csh to sh

#97
post #3

In the recent history sh(1) has gain the missing features for it to become a usable interractive shell: - command completion - ... Too much bloat for my tastes.

Can install dash from ports collection. Should work fine as scripting shell in place of this one.

I would avoid this for root.

Re: FreeBSD switches the default root shell from csh to sh

#98
post #83

Earlier quoted context omitted.

Apple switched to zsh because newer versions of bash are licensed under GPLv3.

I know what the reason is. I don't care. I use GPLv3 and have no interest in an OS that doesn't. You can run bash on windows or compile it yourself on any platform. microsoft even distributes it with windows.

Not strictly correct. It's provided by whatever WSL distro you download, and that download comes from the distro as opposed to Microsoft.

Re: FreeBSD switches the default root shell from csh to sh

#100
post #67
post #9

Earlier quoted context omitted.

Doesn’t command completion cause a disk scan? Which can be a problem if the system is failing in some way and you’re trying to recover.

Maybe in sh type shells. In csh/tcsh commands are hashed, so command completion is in memory. Thus the need for rehash. There is a new setting in tcsh to allow for automatic rehash, but I have it disabled.

hash -r in bash. No idea if there's a setting, I'm too used to doing the rehash as required to've noticed if there was.
Post reply on HN