[Toybox] [PATCH] optional fatter cat(1)
Rob Landley
rob at landley.net
Sun Jan 4 10:39:25 PST 2015
On 01/04/2015 05:43 AM, Rich Felker wrote:
> On Sun, Jan 04, 2015 at 01:39:21AM -0600, Rob Landley wrote:
>>
>>
>> On 01/03/2015 10:07 PM, Rich Felker wrote:
>>> On Thu, Jan 01, 2015 at 10:41:22PM -0600, Rob Landley wrote:
>>>> On 01/01/2015 01:04 PM, dmccunney wrote:
>>>>> On Thu, Jan 1, 2015 at 1:39 AM, David Seikel <onefang at gmail.com> wrote:
>>>>>
>>>>>> I have a simple test to decide if I like an editor as a result of these
>>>>>> decades of random editor usage. If I can't sit down with the editor
>>>>>> and figure out how to do basic editing and saving in less than a
>>>>>> minute (sans documentation), then in my opinion it's a crap editor.
>>>>>> Both TECO and vi fail this test miserably, though oddly enough I have a
>>>>>> soft spot for TECO.
>>>>>
>>>>> These days, the general assumption is that you can open a file in an
>>>>> editor with "<editor> <filename>", and that once up, cursor keys can
>>>>> be used to move around in the file and that text can be added where
>>>>> desired by typing it at the cursor location and deleted with Backspace
>>>>> or Delete keys.
>>>>>
>>>>> Vi originated in the days when some of those assumptions might not be
>>>>> true. Some early terminals on Unix systems didn't *have* cursor keys
>>>>> or F-keys. The vi command set and separation between input and
>>>>> command modes was a result.
>>>>
>>>> Indeed.
>>>>
>>>> However, ubuntu's decision to only allow you to cursor around in insert
>>>> mode when you call "vim" and to _disable_ that when you call it as "vi"
>>>> (so the cursor keys instead crap B[ and such all over your text) is
>>>> insane and stupid. And the fix is to delete /etc/vim/vimrc.tiny and make
>>>> it a symlink to just "vimrc" in the same directory. And the fact you
>>>> _need_ to do that on each new ubuntu install is just one more way that
>>>> Mark Shuttleworth is trying to cram his personal preferences down
>>>> people's throats.
>>>
>>> Yes this is idiotic.
>>>
>>>> (Redirecting /bin/sh to point to dash instead of bash was still a dumber
>>>> move, though.)
>>>
>>> I fail to see how this was dumb. It made shellshock a non-issue
>>
>> When they switched to dash I _segfaulted_ the thing multiple times. It
>> was a buggy pile of crap for _years_.
>>
>> It's interesting you think shellshock was a non-issue, presumably that's
>> why it didn't make the news or anything? (I'm consistently amused that
>
> I don't think shellshock was a non-issue. I just think it was mostly a
> non-issue for systems that don't use bash as /bin/sh or their login
> shell for restricted accounts (forced command in authorized_keys
> file), and this is one reason I think it was a good move not to make
> /bin/sh be a link to bash.
>
> Yes some people write crappy scripts that depend on bash but don't use
> #!/bin/bash. I don't and I don't like paying the penalty for people
> who do this. They should fix their broken scripts, and preferably they
> should write portable shell script instead of bash. I suspect you'll
> be more agreeable to this position once more bash-specific scripts
> start depending on post-GPLv3 versions of bash... :-)
No, I'm implementing the non-crazy bash extensions people actually use
in toysh. (Toybox should eventually be able to build itself including
its own "sed" invocations and its own shell to run scripts/*.sh.) This
is why I went to the "advanced bash scripting" talk at Texas LinuxFest,
to see what tricks that speaker felt were worth knowing/using (and thus
implementing).
Coming up with a bash replacement, yay. But dash didn't even bother to
implement "source" as an alias for ".", or implement the "function"
keyword (it's basically a comment). Those were trivial bash flavoring
things that would be like 5 minutes coding, and they explicitly chose
_not_ to do that because they did not _want_ compatibility. (Stuff like
implementing path/to/{one,two,three} curly bracket support would be more
like a weekend of coding, but still: that not being there broke stuff.)
I repeat: ubuntu made a bad technical decision, gratuitously breaking
compatibility for its existing userbase for a stated reason that was
inadequate to justify the fallout, one which could easily have been
accomplished a different way without end user impact, and fairly quickly
_was_ because it didn't accomplish its stated goal but the change was
retained anyway.
Rob
More information about the Toybox
mailing list