Deutsch English Français Italiano |
<v4bl16$1ieto$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Malcolm McLean <malcolm.arthur.mclean@gmail.com> Newsgroups: comp.lang.c Subject: Re: Running an editor from ANSI C Date: Wed, 12 Jun 2024 09:08:05 +0100 Organization: A noiseless patient Spider Lines: 61 Message-ID: <v4bl16$1ieto$1@dont-email.me> References: <v3pge7$uf2i$1@dont-email.me> <v3r2pl$16mtl$1@dont-email.me> <v3r7v8$1b57j$1@dont-email.me> <v3rek5$1c4i5$1@dont-email.me> <v3rrtm$1e6g8$1@dont-email.me> <v3ru84$1eafb$1@dont-email.me> <87o78dzw1a.fsf@nosuchdomain.example.com> <v3tkmb$1o860$3@dont-email.me> <v3uk0l$20s0s$2@dont-email.me> <v3uoeo$21g4g$5@dont-email.me> <v3v6jt$23q0b$2@dont-email.me> <v3vk3m$265uv$1@dont-email.me> <v44itr$3jn4i$1@dont-email.me> <v46o75$dnnu$1@dont-email.me> <v46qj9$e4lf$1@dont-email.me> <v46uha$fj5k$1@dont-email.me> <v47c92$hv04$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 12 Jun 2024 10:08:07 +0200 (CEST) Injection-Info: dont-email.me; posting-host="949b13f2b13f22ff92a4cfa4b2c0ba6d"; logging-data="1653688"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wFbMvOO7nBzoieuGhUWRbtG1v8u6mF5w=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:8Y2foN8s5gdMziVvr2TUl7SV+1I= In-Reply-To: <v47c92$hv04$1@dont-email.me> Content-Language: en-GB Bytes: 4032 On 10/06/2024 18:14, Richard Harnden wrote: > On 10/06/2024 14:19, Malcolm McLean wrote: >> >> Well that's a way of doing it. But it's pretty inconvenient. The shell >> lets you edit a FileSystem, XML file in place. Then of course I've got >> to test bbx_filesystem.c very rigorously because it must work, it's >> the heart of BabyXFS. So by writing the shell, I flush out any >> problems with it. >> >> And of course now the fun part of the project comes in. I add >> MiniBasic to the shell, so you can run basic programs from it. >> > > I'd expect to run ksh commands from within ksh, bash commands from > within bash, etc. > > I wouldn't expect a filesystem to be part of the shell at all. > > On 10/06/2024 18:14, Richard Harnden wrote: > On 10/06/2024 14:19, Malcolm McLean wrote: >> >> Well that's a way of doing it. But it's pretty inconvenient. The shell >> lets you edit a FileSystem, XML file in place. Then of course I've got >> to test bbx_filesystem.c very rigorously because it must work, it's >> the heart of BabyXFS. So by writing the shell, I flush out any >> problems with it. >> >> And of course now the fun part of the project comes in. I add >> MiniBasic to the shell, so you can run basic programs from it. >> > > I'd expect to run ksh commands from within ksh, bash commands from > within bash, etc. > > I wouldn't expect a filesystem to be part of the shell at all. > > You'd expect to have a FileSystem file, and to type in at your ksh orz zsh, cd "myfilesysyem.xml" and for ksh to mount it. But of course ksh can't do that, because it doesn't recognise that format. So you have to switch to the Baby X shell. And so your $ ksh promt is replaced by BBX$ prompt, to remind you that you are now in the Baby X shell and have a limited set of commands, though of course you have cd, ls, cp, mv, rm, edit invokes the text editor, and, though it doesn't do anything useful yet, bb runs the MiniBasic interpreter. And of course you also need "import" and "export" to transfer files int he FileSystem XML file to and from the host. And I've just written an ls which runs on a host computer, and that will become the ls command. Currently it just prints out a list of files in the current directory. The when that is done, the next challenge is to add a grep as an external command, not built into the shell like the other commands. -- Check out my hobby project. http://malcolmmclean.github.io/babyxrc