Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why ksh?

3 views
Skip to first unread message

Rico Secada

unread,
Jul 21, 2006, 1:01:23 AM7/21/06
to
Hi

I don't want to start a religios thread and I don't want general personal opinions :-)

Why has OpenBSD developers decided to run ksh as the default shell and not for example bash or zsh?

The question is being asked because of a debate at our datacenter about the three shells and I would like to understand both the technical reason and the more general one - if posible someone knows and has the time to answer.

Best and kind regards
Rico

Han Boetes

unread,
Jul 21, 2006, 1:36:34 AM7/21/06
to
Rico Secada wrote:
> I don't want to start a religios thread and I don't want general
> personal opinions :-)

That's a nice introduction to any flamewar.

> Why has OpenBSD developers decided to run ksh as the default
> shell and not for example bash or zsh?

1) Acceptable License.
2) Correct /bin/sh implementation.

See also: http://openbsd.org/goals.html

And since you are completely free to install your favourite shell
if you want to, what's your problem with ksh?

# Han

Nick Guenther

unread,
Jul 21, 2006, 1:56:46 AM7/21/06
to
On 7/21/06, Han Boetes <h...@mijncomputer.nl> wrote:

> 1) Acceptable License.
> 2) Correct /bin/sh implementation.
>
> See also: http://openbsd.org/goals.html
>
> And since you are completely free to install your favourite shell
> if you want to, what's your problem with ksh?
>

Damien Miller

unread,
Jul 21, 2006, 2:05:24 AM7/21/06
to
On Fri, 21 Jul 2006, Han Boetes wrote:

> > Why has OpenBSD developers decided to run ksh as the default
> > shell and not for example bash or zsh?
>

> 1) Acceptable License.
> 2) Correct /bin/sh implementation.

3) *statically* linked ksh is a little over 1/2 the size of *dynamically*
linked bash.

-d

Marco Peereboom

unread,
Jul 21, 2006, 8:36:51 AM7/21/06
to
dd if=/de

hit tab at the end of that command on ksh and then on zsh. Nuff said.

Bash is the size of a house and less than 1% of its functionality is
like, functional.

Jason Wright did the whole world a favor and ported OpenBSD's ksh to
Linux. You can find it at http://www.peereboom.us/ksh_linux.html
I created a cygwin port that is hidden at:
http://www.peereboom.us/ksh_cygwin.html

Hooray for ksh!

Rico Secada wrote:
> Hi


>
> I don't want to start a religios thread and I don't want general personal opinions :-)
>

> Why has OpenBSD developers decided to run ksh as the default shell and not for example bash or zsh?
>

> The question is being asked because of a debate at our datacenter about the three shells and I would like to understand both the technical reason and the more general one - if posible someone knows and has the time to answer.
>

Paul de Weerd

unread,
Jul 21, 2006, 12:01:05 PM7/21/06
to
On Fri, Jul 21, 2006 at 03:41:07PM +0100, Pedro Tim?teo wrote:
| Speaking of ksh, is there any way to configure it to clear the screen
| with CTRL+L, as bash does?

Not again ..

http://marc.theaimsgroup.com/?l=openbsd-misc&m=114885344906668&w=2

Cheers,

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/

[demime 1.01d removed an attachment of type application/pgp-signature]

Samurai Chef

unread,
Jul 21, 2006, 12:13:22 PM7/21/06
to
like the "clear" command?

On 7/21/06, Pedro Timsteo <pati...@dti.pga.aero> wrote:
> Speaking of ksh, is there any way to configure it to clear the screen
> with CTRL+L, as bash does?
>

> Thanks.

Prabhu Gurumurthy

unread,
Jul 21, 2006, 12:15:06 PM7/21/06
to
Pedro Timsteo wrote:
> Speaking of ksh, is there any way to configure it to clear the screen
> with CTRL+L, as bash does?
>
> Thanks.
>
>

Was in the mailing list before I guess, but you can bind it (being
Ctrl-L) on your .profile or .kshrc,

bind -m '^L'=clear^M

Pedro Timóteo

unread,
Jul 21, 2006, 12:22:32 PM7/21/06
to
Paul de Weerd wrote:

> On Fri, Jul 21, 2006 at 03:41:07PM +0100, Pedro Tim?teo wrote:
> | Speaking of ksh, is there any way to configure it to clear the screen
> | with CTRL+L, as bash does?
>
Thanks, but all the solutions presented in that thread can't clear the
screen when you're typing something AND keep what you've already typed.

The last suggestion, in
http://marc.theaimsgroup.com/?l=openbsd-misc&m=114891930523651&w=2 ,
works after you've typed something (unlike the previous ones), but what
you have already typed is gone.

In bash, I often type a command, but then think "I want to have all the
xterm for this", so I press CTRL-L and then RETURN.

Pedro Timóteo

unread,
Jul 21, 2006, 12:25:31 PM7/21/06
to
Speaking of ksh, is there any way to configure it to clear the screen
with CTRL+L, as bash does?

Thanks.

Stuart Henderson

unread,
Jul 21, 2006, 12:53:32 PM7/21/06
to
On 2006/07/21 17:13, Pedro Timsteo wrote:
> In bash, I often type a command, but then think "I want to have all the
> xterm for this", so I press CTRL-L and then RETURN.

alt # (or # does nicely on a uk keyboard)
cls (or clear if you don't . /etc/ksh.kshrc in your profile)
[cursor up twice]

it's probably not as cumbersome as it might first appear...
or, use wmii and just press alt-enter.

Spruell, Darren-Perot

unread,
Jul 21, 2006, 1:29:48 PM7/21/06
to
From: owner...@openbsd.org
> > Not again ..
> >
> > http://marc.theaimsgroup.com/?l=openbsd-misc&m=114885344906668&w=2
> >
> >
> Thanks, but all the solutions presented in that thread can't
> clear the
> screen when you're typing something AND keep what you've
> already typed.

These threads grow tiresome.

If you want a shell that whistles like bash, and quacks like bash, and is
shiny like bash, then use bash. No one is forcing you to use a certain
shell. Please stop lamenting that something that is not bash is not bash.

It seems clear that the precise functionality you are after isn't
implemented in OpenBSD's ksh. So note it down as a "technical limitation" if
you want and move on with life.

DS

Han Boetes

unread,
Jul 21, 2006, 2:11:46 PM7/21/06
to
Marco Peereboom wrote:
> Jason Wright did the whole world a favor and ported OpenBSD's
> ksh to Linux. You can find it at
> http://www.peereboom.us/ksh_linux.html I created a cygwin port
> that is hidden at: http://www.peereboom.us/ksh_cygwin.html

mksh is a nice port as well. On my Linux desktop I use mksh as
/bin/sh instead of bash. All my systems are bash-free! =)

http://mirbsd.de/mksh/

# Han

smith

unread,
Jul 21, 2006, 9:13:12 PM7/21/06
to
On Fri, 21 Jul 2006 15:41:07 +0100, Pedro Timsteo wrote

> Speaking of ksh, is there any way to configure it to clear the
> screen with CTRL+L, as bash does?
>
> Thanks.

clear<enter>

Damien Miller

unread,
Jul 22, 2006, 2:55:59 AM7/22/06
to
Pedro TimC3teo wrote:
> Thanks, but all the solutions presented in that thread can't clear the
> screen when you're typing something AND keep what you've already typed.

Why don't you add support for ^L yourself then?

-d

Rogier Krieger

unread,
Jul 23, 2006, 10:55:58 AM7/23/06
to
On 7/21/06, Pedro Timsteo <pati...@dti.pga.aero> wrote:
> In bash, I often type a command, but then think "I want to have all the
> xterm for this", so I press CTRL-L and then RETURN.

How about the follwoing: press CTRL+A, prepend "clear; " to your
command line and use CTRL+E to return to where you were editing.

Cheers,

Rogier

--
If you don't know where you're going, any road will get you there.

Arnaud Bergeron

unread,
Jul 23, 2006, 11:05:51 AM7/23/06
to

There's also the point that ksh does not do multi-line commands like
bash does (not a statement of superiority, just a fact) so clearing
the screen to have it all to enter a command is pretty useless.

--
"i think we should rewrite the kernel in java since it has good
support for threads." - Ted Unangst

Jeff Quast

unread,
Jul 23, 2006, 12:13:54 PM7/23/06
to
On 7/23/06, Arnaud Bergeron <aber...@gmail.com> wrote:
> On 7/21/06, Damien Miller <d...@mindrot.org> wrote:
> > Pedro TimC3teo wrote:
> > > Thanks, but all the solutions presented in that thread can't clear the
> > > screen when you're typing something AND keep what you've already typed.
> >
> > Why don't you add support for ^L yourself then?
> >
> > -d
> >
>
> There's also the point that ksh does not do multi-line commands like
> bash does (not a statement of superiority, just a fact) so clearing
> the screen to have it all to enter a command is pretty useless.
>

sigh... does _nobody_ use vi input mode? you're one letter away in
command mode to bring your entire edit buffer into a full fledged and
very powerful text editor! Multi-line indeed!!

Really, if you're going to use emacs input mode, then you are just
asking for a kludgy, confusing, and feature-limited line editor.

Pedro Timóteo

unread,
Jul 24, 2006, 7:32:23 AM7/24/06
to
Spruell, Darren-Perot wrote:
> These threads grow tiresome.
>
> If you want a shell that whistles like bash, and quacks like bash, and is
> shiny like bash, then use bash. No one is forcing you to use a certain
> shell. Please stop lamenting that something that is not bash is not bash.
>
> It seems clear that the precise functionality you are after isn't
> implemented in OpenBSD's ksh. So note it down as a "technical limitation" if
> you want and move on with life.
>
>
Guys, I wasn't whining or complaining. I wasn't even requesting a
feature. I just asked if there was a way to do it. There isn't, so I
"move on with life", like you said.

I guess you've had so many whiners in the past, that you're
oversensitive to them. :)

Eric Furman

unread,
Jul 24, 2006, 12:32:38 PM7/24/06
to

Yes we are oversensitive about this.
This question comes up all the time.
csh used to be the default shell and thank G. O. D. it was changed.
POSIX 93 ksh with HUGE improvements was ported to OpenBSD.
It was ported to OBSD a while ago.
It kicks bash and zsh's ass all to hell.
any other opinion is just based on ignorance.
Pleaese stop being ignorant and learn.

Lastly; set -o vi
Pleeeeease learn it.
This thread is increadibly tiresome...

(BTW I alias c=clear: much cleaner than bash alternatives)
--
Eric Furman
ericf...@fastmail.net

Nick Shank

unread,
Jul 24, 2006, 2:31:05 PM7/24/06
to
Eric Furman wrote:
> On Mon, 24 Jul 2006 12:25:03 +0100, "Pedro Timsteo"
> <pati...@dti.pga.aero> said:
>
>> Spruell, Darren-Perot wrote:
>>
>>> These threads grow tiresome.
>>>
>>> If you want a shell that whistles like bash, and quacks like bash, and is
>>> shiny like bash, then use bash. No one is forcing you to use a certain
>>> shell. Please stop lamenting that something that is not bash is not bash.
>>>
>>> It seems clear that the precise functionality you are after isn't
>>> implemented in OpenBSD's ksh. So note it down as a "technical limitation" if
>>> you want and move on with life.
>>>
>>>
>>>
>> Guys, I wasn't whining or complaining. I wasn't even requesting a
>> feature. I just asked if there was a way to do it. There isn't, so I
>> "move on with life", like you said.
>>
>> I guess you've had so many whiners in the past, that you're
>> oversensitive to them. :)
>>
>
> Yes we are oversensitive about this.
> This question comes up all the time.
> csh used to be the default shell and thank G. O. D. it was changed.
> POSIX 93 ksh with HUGE improvements was ported to OpenBSD.
> It was ported to OBSD a while ago.
> It kicks bash and zsh's ass all to hell.
>

> any other opinion is just based on ignorance.
>

Really now? Hmmm... Where have I heard that before?

0 new messages