From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Tue, 7 Apr 2009 01:39:44 -0400 To: 9fans@9fans.net In-Reply-To: <1239082320.2778.20.camel@katy-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [9fans] a bit OT, programming style question Topicbox-Message-UUID: d3cfc42e-ead4-11e9-9d60-3106f5b1d025 > 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. fwiw, plan 9 handles key bindings in #κ. the shell hasn't a clue. rio (or acme) handles the editing. again, the shell hasn't a clue. and autocomplete? yup. same story. hapless rc hasn't a clue. rc is proof that ignorance is bliss. - erik