Re: [9fans] Rc port.
Fixed, thanks. > On Jan 28, 2019, at 12:22 PM, arn...@skeeve.com wrote: > > Federico Benavento wrote: > >> Hola, >> >> I just uploaded a standalone unix (only tested on macOS/Linux) port with >> edit, history and completion support to GitHub. >> I have been using it as my primary shell for months on macOS and it???s >> seems to be working pretty well. >> >> https://github.com/benavento/rc >> >> Have fun. >> ???- >> Federico G. Benavento >> benave...@gmail.com > > On Ubuntu 18.04, doing make, I get errors on several files. See attached. > > Thanks, > > Arnold > —- Federico G. Benavento benave...@gmail.com
Re: [9fans] Rc port.
Federico Benavento wrote: > Hola, > > I just uploaded a standalone unix (only tested on macOS/Linux) port with > edit, history and completion support to GitHub. > I have been using it as my primary shell for months on macOS and it???s seems > to be working pretty well. > > https://github.com/benavento/rc > > Have fun. > ???- > Federico G. Benavento > benave...@gmail.com On Ubuntu 18.04, doing make, I get errors on several files. See attached. Thanks, Arnold ERRS Description: Binary data
Re: [9fans] Rc port.
On Wed, Jan 23, 2019, at 9:59 PM, Federico Benavento wrote: > I’ve been able to survive quite well on a regular Mac terminal with it. I remember thinking regular rc was tolerable on a Mac terminal thanks to the terminal copy/pasting with normal keybindings, but this would be better. I've been trying 9pm a little bit; found Windows command window handles command history. It doesn't handle completion though. 9pm rc is a bit broken anyway. There doesn't seem to be a way to make an executable script, and rc crashes on startup if it would inherit functions. I just thought about trying to build es or your rc in MinGW, but I'm lazy and have AcmeSAC.
Re: [9fans] Rc port.
correct. Doug's original proposal was very nonlinear. Ken's genius was finding an implementable and useful subset.- erikOn Jan 25, 2019 07:13, Stuart Morrow wrote:I take back the stuff where a directory can be a command - it interacts weird with $path:you’d do `..’ thinking it’s the same as `cd ..’, except it’s actually `cd /bin/..’. > is there a buildable version of es any longer? I just found http://wryun.github.io/es-shell/ I’ve never actually used es, this or any other version; this is the first I’ve heard youcouldn’t just use the original. Hey, does anybody know if Tom Duff really invented process substitution? ( <{} )There’s a comment in ‘A Retrospective’ (1978, I think - it’s in the 1978 BSTJ edition`UNIX Time-Sharing System’; I have a tenth-anniversary reprint called ‘UNIX SystemReadings And Applications’) by Dennis Ritchie about how a syntax for non-linearpipelines has already been proposed. /dev/fd wouldn’t have existed yet, so doesanybody know what he’s referring to here? Whoever it was, I bet it was Doug. -Morrow
Re: [9fans] Rc port.
I take back the stuff where a directory can be a command - it interacts weird with $path: you’d do `..’ thinking it’s the same as `cd ..’, except it’s actually `cd /bin/..’. > is there a buildable version of es any longer? I just found http://wryun.github.io/es-shell/ I’ve never actually used es, this or any other version; this is the first I’ve heard you couldn’t just use the original. Hey, does anybody know if Tom Duff really invented process substitution? ( <{} ) There’s a comment in ‘A Retrospective’ (1978, I think - it’s in the 1978 BSTJ edition `UNIX Time-Sharing System’; I have a tenth-anniversary reprint called ‘UNIX System Readings And Applications’) by Dennis Ritchie about how a syntax for non-linear pipelines has already been proposed. /dev/fd wouldn’t have existed yet, so does anybody know what he’s referring to here? Whoever it was, I bet it was Doug. -Morrow
Re: [9fans] Rc port.
> I just wanted the shell, not the whole thing You should post it to suckless. I recall a thread years ago discussing what the ‘official’ shell of the suckless project ought to be. Rc went completely unmentioned for at least about half of the thread, although they can’t possibly have been unaware of it... They either want to avoid p9p as a dependency, or else can’t live without the usual interactive features of Linux shells. Now they have no excuse. As long as we’re discussing Linux stuff in shells, I think the new shell mpsh[1] has a neat way to set prompt, neat because the mechanism can also be used to do those variables like OLDPWD that /bin/bash has built-in knowledge of. (I wonder what the security implications might be.) [1] https://www.cca.org/mpsh/docs-05.html -Morrow
Re: [9fans] Rc port.
okay, in that case, would you be in a position to add-in the excellent enhancements you made to your copy to the "rc" in plan9port? On 2019-01-24 10:02 PM, Federico Benavento wrote: Oh, maybe it wasn’t so obvious, but this copy has edit, history and completion which can be customized by defining a fn complete{} function. On Jan 24, 2019, at 1:25 PM, Federico Benavento wrote: I just wanted the shell, not the whole thing, it’s a port, because I started from the copy in /sys/src/cmd/, I didn’t want to use es either. On Jan 24, 2019, at 12:01 AM, Mayuresh Kathe wrote: On 2019-01-24 03:09 AM, Federico Benavento wrote: Hola, I just uploaded a standalone unix (only tested on macOS/Linux) port with edit, history and completion support to GitHub. I have been using it as my primary shell for months on macOS and it’s seems to be working pretty well. not undermining your efforts, but isn't a port of "rc" a part of plan9ports?
Re: [9fans] Rc port.
is there a buildable version of es any longer? es is interesting, and worth a look but I think it failed to justify it's extra-user visible layers.I wrote a shell similar to rc before Byron's almost-clone. mirroring Duff's comments about sh, beating rc is not easy. the bar is really high.- erik
Re: [9fans] Rc port.
Oh, maybe it wasn’t so obvious, but this copy has edit, history and completion which can be customized by defining a fn complete{} function. > On Jan 24, 2019, at 1:25 PM, Federico Benavento wrote: > > I just wanted the shell, not the whole thing, it’s a port, because I started > from the copy in /sys/src/cmd/, > I didn’t want to use es either. > >> On Jan 24, 2019, at 12:01 AM, Mayuresh Kathe wrote: >> >> On 2019-01-24 03:09 AM, Federico Benavento wrote: >>> Hola, >>> I just uploaded a standalone unix (only tested on macOS/Linux) port >>> with edit, history and completion support to GitHub. >>> I have been using it as my primary shell for months on macOS and it’s >>> seems to be working pretty well. >> >> not undermining your efforts, but isn't a port of "rc" a part of plan9ports? >> >> ~mayuresh >> > > —- > Federico G. Benavento > benave...@gmail.com > > > > —- Federico G. Benavento benave...@gmail.com
Re: [9fans] Rc port.
I just wanted the shell, not the whole thing, it’s a port, because I started from the copy in /sys/src/cmd/, I didn’t want to use es either. > On Jan 24, 2019, at 12:01 AM, Mayuresh Kathe wrote: > > On 2019-01-24 03:09 AM, Federico Benavento wrote: >> Hola, >> I just uploaded a standalone unix (only tested on macOS/Linux) port >> with edit, history and completion support to GitHub. >> I have been using it as my primary shell for months on macOS and it’s >> seems to be working pretty well. > > not undermining your efforts, but isn't a port of "rc" a part of plan9ports? > > ~mayuresh > —- Federico G. Benavento benave...@gmail.com
Re: [9fans] Rc port.
Here, this is what I have. fn setprompt { # delete old function fn $ps1 PWD=`{pwd} ps1='['^$sysname^':'^`{basename $PWD}^']%' prompt=($ps1^' ' ' ') fn $ps1 { if(! ~ $#* 0) $* } # macOS Terminal Title printf '\033]7;%s\007' file://^`{hostname}^$PWD } fn cd { builtin cd $* && setprompt } > On Jan 23, 2019, at 7:32 PM, Federico Benavento wrote: > > Yes, you can, I think I even set the title of the terminal window when I cd. > I’m not at home now, i’ll post my rcrc once I get a chance. > >> On 23 Jan 2019, at 19:11, Calvin Morrison wrote: >> >> feature i would ove: something equiv to a PS1 line so i know what >> folder i'm in. Can I do that with $prompt? —- Federico G. Benavento benave...@gmail.com
Re: [9fans] Rc port.
> feature i would ove: something equiv to a PS1 line so i know what > folder i'm in. Can I do that with $prompt? IIRC, with es you can get persistent history, and control your prompts with arbitrarily complex logic, all without building stuff into /bin/es. You can do it with es code in esmain or your user profile (Again, IIRC.) I might have imagined that, but I'm even more sure you can set it up so that if a first refers to a directory, then it's the same as cd that directory. So a prompt could be /place; and you can click and resend the whole thing and the result is it goes to /place for you (then does the stuff after the semicolon). Finally, I'm most sure of all that if the above is correct then you can also make it so that /place { is the prompt and it executes the actual command only if the /place is successful. You'd have to finish off all your commands with a }, though... -Morrow
Re: [9fans] Rc port.
On 2019-01-24 03:09 AM, Federico Benavento wrote: Hola, I just uploaded a standalone unix (only tested on macOS/Linux) port with edit, history and completion support to GitHub. I have been using it as my primary shell for months on macOS and it’s seems to be working pretty well. not undermining your efforts, but isn't a port of "rc" a part of plan9ports? ~mayuresh
Re: [9fans] Rc port.
Yes, you can, I think I even set the title of the terminal window when I cd. I’m not at home now, i’ll post my rcrc once I get a chance. > On 23 Jan 2019, at 19:11, Calvin Morrison wrote: > > feature i would ove: something equiv to a PS1 line so i know what > folder i'm in. Can I do that with $prompt?
Re: [9fans] Rc port.
On Thu, 24 Jan 2019 at 09:00, Federico Benavento wrote: > > I’ve been able to survive quite well on a regular Mac terminal with it. > Thanks for trying it. > feature i would ove: something equiv to a PS1 line so i know what folder i'm in. Can I do that with $prompt? Calvin.
Re: [9fans] Rc port.
I’ve been able to survive quite well on a regular Mac terminal with it. Thanks for trying it. > On Jan 23, 2019, at 6:57 PM, Calvin Morrison wrote: > > On Thu, 24 Jan 2019 at 08:41, Federico Benavento wrote: >> >> Hola, >> >> I just uploaded a standalone unix (only tested on macOS/Linux) port with >> edit, history and completion support to GitHub. >> I have been using it as my primary shell for months on macOS and it’s seems >> to be working pretty well. > > rc is a great shell. It's interface just isn't optimal with a fake TTY > like we use on linux. I think the merits of the shell outweigh that. > I've been using rlwrapper for a while which gives me command history > and thats nice, but completion will be cool too! > > btw could'nt get it to compile without adding > > diff --git a/unix.c b/unix.c > index 5c89243..1f88f69 100644 > --- a/unix.c > +++ b/unix.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > #include > #include > —- Federico G. Benavento benave...@gmail.com
Re: [9fans] Rc port.
On Thu, 24 Jan 2019 at 08:41, Federico Benavento wrote: > > Hola, > > I just uploaded a standalone unix (only tested on macOS/Linux) port with > edit, history and completion support to GitHub. > I have been using it as my primary shell for months on macOS and it’s seems > to be working pretty well. rc is a great shell. It's interface just isn't optimal with a fake TTY like we use on linux. I think the merits of the shell outweigh that. I've been using rlwrapper for a while which gives me command history and thats nice, but completion will be cool too! btw could'nt get it to compile without adding diff --git a/unix.c b/unix.c index 5c89243..1f88f69 100644 --- a/unix.c +++ b/unix.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include
[9fans] Rc port.
Hola, I just uploaded a standalone unix (only tested on macOS/Linux) port with edit, history and completion support to GitHub. I have been using it as my primary shell for months on macOS and it’s seems to be working pretty well. https://github.com/benavento/rc Have fun. —- Federico G. Benavento benave...@gmail.com