Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2019 14:04:48 +0000
From:      Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@freebsd.org>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Importing mksh in base
Message-ID:  <20190126140448.GA28402@v2>
In-Reply-To: <7c863100-0b5c-368e-e433-9caaf32e98d0@FreeBSD.org>
References:  <20190125165751.kpcjjncmf7j7maxd@ivaldir.net> <CALH631keUjj8qUomFY4nT2Mij9T7AWwFEGLDok=6zaaPx4T8DQ@mail.gmail.com> <CAG6CVpV5xY3KV_YVDuGBGt9Vt_xJA%2BGSX4g9zyFWcnTZvZrmpg@mail.gmail.com> <B3F3D854-847B-4731-9CEC-3E7BBDEDD8EC@vangyzen.net> <7c863100-0b5c-368e-e433-9caaf32e98d0@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 0126T1138, Matthew Seaman wrote:
> On 25/01/2019 19:10, Eric van Gyzen wrote:
> > Ditto, except only 2 years on Linux before coming to FreeBSD.  I
> > tried tcsh, since it was the default and in base, but I hated it for
> > interactive use.  Notably absent are one-line “for" loops.  On new
> > installs, after networking is up, my very first command is “pkg
> > install bash [and others]”.
> I have the opposite experience.  I use tcsh as my interactive shell,
> mostly because I've used it for a long time and my fingers remember the
> command sequences.  If I'm using bash interactively I tend to get
> frustrated by not being able to type 'foo<Esc>p' to replay the last
> command starting 'foo'.  Yes, I know about <Ctrl>r but it just isn't the
> same.
> 
> If it's for programming though, it's straight to /bin/sh -- and I will
> admit to dropping into sh to write for-loops at the command prompt.
> 
> I'd be happy enough to see the default root shell changed to mksh.  I'd
> be pretty happy to see the root shell switched to our current /bin/sh
> for that matter.  Actually, what advantages does mksh have over /bin/sh?

I don't know mksh all that well, but two obvious areas where sh(1)
could be improved for interactive use are:

1. It does support history, but it doesn't support loading it from
   disk, nor writing it on exit.  I have a half-baked patch that adds
   it, if anyone's interested.

2. The tab completion works fine for paths, but not for commands.
   So, for example if you type 'camc<tab>', it won't get completed,
   while 'vi /etc/rc.c<tab>' will work.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190126140448.GA28402>