From mboxrd@z Thu Jan 1 00:00:00 1970 From: Corey To: 9fans@9fans.net Content-Type: text/plain Date: Tue, 7 Apr 2009 01:32:00 -0400 Message-Id: <1239082320.2778.20.camel@katy-laptop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [9fans] a bit OT, programming style question Topicbox-Message-UUID: d3c91f16-ead4-11e9-9d60-3106f5b1d025 Not exactly related to Plan 9, but I don't know any other place full of people much smarter than myself who put value in the "Unix philosophy", and this idea is partially inspired by something I read about rio/rc. Would there be any merit to breaking the shell apart into a number of smaller programs? Looking at GNU bash as an example (though I know GNU is probably one of the worst places to look for "Unix style"), It is my understanding that one program handles many things, such as keyboard bindings (which I believe in turn requires bash to read in cbreak or raw or whatever and do it's own line editing), glob expansion, aliases, history, syntax parsing, command execution, job control, etc. etc. IMO this results in a more complex program than necessary. Keyboard bindings for example; why couldn't they be handled by a program that just does keyboard bindings + line editing, and writes finalized lines to the shell. This in turn could also allow bindings to be more easily customized (such as binding autocomplete to Ctrl+F instead of tab) depending on its implementation. Does this make sense? Is it more work than it's worth? Has it already been done (I know filename completion is handled by rio rather than rc for example)? Sorry if this is too off-topic for 9fans.