RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Jan 18, 2022 7:30 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Jan 20, 2016 3:26 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi friends,

What do you think about installing ksh as the default shell for LiteBSD?
It's more advanced in features than our current /bin/sh (ash), and it has line editing and history, and it's actually more compact. The resident set size for ash is typically 92kbytes, and 76kbytes for ksh.

--Serge


Top
 Profile  
 
PostPosted: Wed Jan 20, 2016 6:39 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
I'd be very much in favor :-)
That's the reason I ported it, so that people could have a bit more friendly shell to work with.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Wed Jan 20, 2016 7:54 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
OK, so since rev440 we have ksh installed as /bin/sh.
I also removed mksh, as it's too buggy and makes little sense compared to ksh.

Compared to old sh, now we have a history, command line editing, job control, arithmetic expressions and test expressions.


Top
 Profile  
 
PostPosted: Wed Jan 20, 2016 9:57 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Makes sense to remove mksh.
I'll also note that this is what OpenBSD did: /bin/sh is effectively a hardlink to /bin/ksh there as well

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Thu Jan 21, 2016 3:29 am 
User avatar

Joined: Fri Mar 06, 2015 9:13 pm
Posts: 37
Location: Barcelona, SP
Nice i'd like to set also PS1 :) with some different formats..... i will try because on ash i can't got it.... as far i remember.

_________________
Dennis MacAlistair Ritchie (Sep.09.1941 - Oct.12.2011)


Top
 Profile  
 
PostPosted: Thu Jan 21, 2016 4:45 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
I always add this to my .profile for ksh:
Code:
PS1='$PWD $ '

The single quotes are important here.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Thu Jan 21, 2016 9:56 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
The history in ksh is Fantastic :)
A pity we do not have it in retrobsd :(

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Jan 22, 2016 7:05 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Pito wrote:
The history in ksh is Fantastic :)
A pity we do not have it in retrobsd :(
No way. :(
It's too big to fit into 96kbytes.

With ksh, I observe occasional console freeze when running under QEMU. It could be an issue of the simulator itself, though.


Top
 Profile  
 
PostPosted: Fri Jan 22, 2016 7:29 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Interesting. I've never had an issue with ksh under qemu. What are you doing to trigger it? I'll see if I can reproduce.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Fri Jan 22, 2016 8:12 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Just press up/down arrows fast enough when browsing through a history, and it hangs.
May be it's just my local issue on Mac OS X?
I'm not sure.


Top
 Profile  
 
PostPosted: Fri Jan 22, 2016 4:13 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
FWIW, I run LiteBSD qemu on a Linux vmware image on Windows 10 (layers of virtualization!) and haven't see that happen.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission