execline-in-execline

2018-06-06 Thread Profpatsch
e parse at the first encounted `execline` is a lie, since blocks have to be handled correctly: ``` foreground { execline echo foo } echo bar => foreground " execlineb" " -l" " echo" " foo" "" echo bar ``` If I think about it, maybe there doesn’t ha

Re: execline-in-execline

2018-06-07 Thread Profpatsch
Laurent Bercot writes: > Remember that once an execlineb script has been parsed, it's just a > command line, no more, no less. So your example script can just be > written as: > > #!execline > define url example.com > s6-tcpclient $url 80 > foreground { fdmove 1 7 echo -en "..." } > fdmove 0 6

execline globbing

2018-07-24 Thread Profpatsch
When I have a glob like: elglob -0 fs somedir/* if { test -n $fs } ln -t otherdir $fs the test will fail if there’s more than one file in `somedir`. Is there a way to put a split variable into one variable again? It feels kind of clumsy to use elglob, especially because of the default verbatim i

Re: execline globbing

2018-07-24 Thread Profpatsch
Laurent Bercot writes: > Your next door "echo" command will do just that (or s6-echo > if you risk having dashes and want reliable behaviour in all cases). That brings me to another question: is there a collection of more execline utilities somewhere? I suspect the standard GNU coreutils are

execline: returning something from ifthenelse blocks

2018-07-24 Thread Profpatsch
I have the following logic: If file in variable f is a symlink, resolve it and use the result as link target. Otherwise, use the result as link target directly. So I’d like to have an ifthenelse and return the same envvar from both branches. But this is the best I can do: ifte { backtick res {

execline, s6-portable-utils: print a file to stdout

2018-07-24 Thread Profpatsch
Sorry for my spam of mails, I want to separate my questions by topic so they will be searchable. I haven’t found a way to print a file to stdout with either execline nor s6-portable-utils. The `s6-cat` utility only echoes stuff that is already coming from stdin, and unlike the shell, execline does

Re: execline, s6-portable-utils: print a file to stdout

2018-07-26 Thread Profpatsch
Laurent Bercot writes: >>I haven’t found a way to print a file to stdout with either >>execline nor s6-portable-utils. The `s6-cat` utility only >>echoes stuff that is already coming from stdin, >>and unlike the shell, execline doesn’t have `<`. > > https://skarnet.org/software/execline/redirf

Naming of execlineb

2018-07-27 Thread Profpatsch
Why is the main binary named `execlineb` and not `execline`? What does the `b`-suffix stand for? -- Written with Emacs (mu4e) on NixOS. Q: Why is this email five sentences or less? A: http://five.sentenc.es/ May take up to five days to read your message. If it’s urgent, call me.

Re: Question about enable-absolute-paths option

2018-09-08 Thread Profpatsch
Laurent Bercot writes: > I totally understand your predicament, but I unfortunately have no > good solution for you, except "educate your peers". I have a good technical solution for you: For the Nix package manager we have packaged (most) skaware software. You can easily install Nix on a De

s6-cp and s6-mv

2018-09-21 Thread Profpatsch
Probably a dumb question, but is there a reason there is no `cp` and no `mv` in `s6-portable-utils`? What’s the recommended way of copying and moving files? -- Written with Emacs (mu4e) on NixOS. Q: Why is this email five sentences or less? A: http://five.sentenc.es/ May take up to five days to

Re: s6-cp and s6-mv

2018-09-27 Thread Profpatsch
Laurent Bercot writes: >>Probably a dumb question, but is there a reason there is no >>`cp` and no `mv` in `s6-portable-utils`? > > Because reimplementing a full POSIX utility suite isn't a goal. > There are already a lot of those you can choose from (coreutils, > busybox, toybox, sbase+ubase,

Re: [announce] utmps-0.2.0.0

2019-01-12 Thread Profpatsch
Laurent Bercot writes: > utmps-0.0.2.0 is out. > > It features an important bugfix in utmps-wtmpd, as well as a new > feature in utmps-utmpd (members of the utmp group can now write to > the utmp file, as opposed to only root). Thanks. Updated in nixpkgs https://github.com/NixOS/nixpkgs/pull/

sdnotify-wrapper docs clarification

2019-02-01 Thread Profpatsch
rring to the `-f` option or the daemon? In the first case, “do not use >this< option” is less ambiguous. (This is out of my own ignorance and probably clear to somebody that is more into the subject matter) Profpatsch -- Written with Emacs (mu4e) on NixOS. Q: Why is this email five se

Re: sdnotify-wrapper docs clarification

2019-02-06 Thread Profpatsch
Brett Neumeier writes: > On Fri, Feb 1, 2019 at 8:30 AM Profpatsch wrote: > >> > -f: do not doublefork. Use if the daemon waits for children it does >> > not know it has (for instance, superservers do this). When in doubt, >> > do not use that

[PATCH] Doc expand fdmove intuition

2021-02-14 Thread Profpatsch
I had quite big problems getting an intuition for fdmove, and the way aranea phrased it (by effect) makes a lot of sense to me. --- doc/fdmove.html | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/fdmove.html b/doc/fdmove.html index 39bdb2b..b9a0e46 100644 --- a/doc/fdmove.html +++ b/

Re: [PATCH] Doc expand fdmove intuition

2021-05-20 Thread Profpatsch
Ping, did this email go through to the list? Profpatsch writes: > I had quite big problems getting an intuition for fdmove, and the way > aranea phrased it (by effect) makes a lot of sense to me. > --- > doc/fdmove.html | 6 ++ > 1 file changed, 6 insertions(+) >

Re: [PATCH] Doc expand fdmove intuition

2021-05-27 Thread Profpatsch
Laurent Bercot writes: > It did, and I didn't apply the change as suggested, but wrote > something similar. Look at the Notes section of > https://skarnet.org/software/execline/fdmove.html thanks, missed that