Comment 2SZV Re: mksh workalike

Story

Vulnerability in Bash Shell widespread and serious

Preview

mksh workalike (Score: 2, Interesting)

by evilviper@pipedot.org on 2014-09-25 11:44 (#2SX5)

If you don't need quite all the bash-isms, mksh is a great lightweight replacement, which is almost entirely drop-in compatible:

* http://mirbsd.de/mksh

I prefer mksh primarily because bash goes horribly brain-dead when you attempt line-editing on command lines that wrap-around to the next line. Your bash session becomes practically unusable after you hit that limit (which I do, often) and it first wigs-out:

* http://i.imgur.com/Vo2BQq2.png

It doesn't hurt that the mksh binary is 3.4X smaller, starts-up faster, is more responsive, can be statically linked, and doesn't hold open 28 files, all of which matters a lot in a minimal system recovery type situation.

Re: mksh workalike (Score: 5, Informative)

by eliphas@pipedot.org on 2014-09-25 12:52 (#2SXF)

[...]because bash goes horribly brain-dead when you attempt line-editing on command lines that wrap-around to the next line. Your bash session becomes practically unusable after you hit that limit (which I do, often)[...]
Hate that too. But for you guys that happen to know/use vi (who doesn't :D) navigation with HJKL and commands, like:
3w - to go to third word from current position
dw - to delete word
c4f. - to replace all text from current position to the fourth ". dot" character (try that with other editing mode!), etc...

Put "set editing-mode vi" in /etc/inputrc (a lot of CLI programs use readline and will read that) or "set -o vi" for your current bash shell or bashrc.
VI mode on command line is a bliss, and "set -o vi" is the first thing I put on my .rc files where I first login on a new server. Bummer that some minimalistic shells like busybox's (only sh there) do not have that :(

Re: mksh workalike (Score: 2)

by seriously@pipedot.org on 2014-09-25 15:14 (#2SXM)

Oh my ... d$, yw, p, u, it all works !! that's insane (as in vi: press "ESC" and "i" to switch modes)

I never even had heard of that and I've been using it for years. I owe you a beer and probably some new hours of life expectancy too :-)

edit: ... "edit" ? is that an awesome new feature of pipedot for logged-in users?

Re: mksh workalike (Score: 2, Informative)

by evilviper@pipedot.org on 2014-09-25 22:05 (#2SY2)

FYI, editing works more like deleting your comment... It will revert any moderation your comment has gotten, and your comment will show up highlighted like it is a "new" comment in the discussion.

Re: mksh workalike (Score: 0)

by Anonymous Coward on 2014-09-26 05:34 (#2SYE)

That seems strange. Wont that disturb the discussion? What happens to replies?

Re: mksh workalike (Score: 1)

by bryan@pipedot.org on 2014-09-26 08:02 (#2SYH)

Editing a comment does the following:
  • Removes any positive moderation
  • Resets the edit time of the comment (shows up blue again)
It does not delete the comment or interfere with any of the replies.

Re: mksh workalike (Score: 0)

by Anonymous Coward on 2014-09-27 01:43 (#2SZ7)

It there a fuse? Like to stop evil people from revising history that makes them look bad later after they get caught? Does the post get an obvious "edited" (thus tainted) badge? Maybe with the original versions available if you click on that badge?

Re: mksh workalike (Score: 0)

by Anonymous Coward on 2014-09-27 01:44 (#2SZ8)

bug: posting as Anonymous Coward lets me then edit all other Anon Coward posts!

Re: mksh workalike (Score: 1)

by zafiro17@pipedot.org on 2014-09-28 09:03 (#2SZV)

Hmm. I don't know the code but suspect the fix will involve ACs being able to edit their own posts ...

Junk Status

Not marked as junk