| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Recent versions of s6-portable-utils no longer include s6-test
which was deprecated in favor of eltest which supposedly has the
same interface.
I've not tested this commit very thoroughly, but my system now builds
again with recent nixpkgs commits (I think I dependended on s6-test
via the rust writer via nman).
cc @Profpatsch
|
|
|
|
|
|
|
|
|
|
|
| |
calling `execlineb -c` has unfortunate quoting issues, cause for
cornercases like arguments that contain spaces or `"` the result would
be a completely broken command line.
Instead, let’s do our own block construction in a small rust
program (for speed). I tried implementing it in bash first but even
prepending spaces to a string is a complete waste of time in that
language.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the goal of using `e` with argv is interactive execution of
block-style commands from the command line, the use of { and } for
blocks is sub-optimal, since bash (and ostensibly also fish) interpret
them as metacharacters and assign some semantics.
[ and ] on the other hand are not taken (apart from the `[`
executable, which is only relevant in command position and can always
be replaced by the `test` command). So we translate a stand-alone "["
argument to "{" and the same for "]"/"}", giving us a transparent
block syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Often times I want to execute “block-style” programs directly, but it
is rather inconvenient to type out `execlineb -c "…"` every time, plus
-c wants the argv as a single string instead of an argv.
The alternative, using the block representation with leading spaces,
is even less ergonomic.
So instead of
execlineb -c "nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello"
or even
nix-run ' -A' ' pkgs.profpatsch.e' ' /home/me/vuizvui' '' echo hello
I can now write
e nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello
and it will work as expected (provided your shell expands inside {}
blocks, which bash does but fish doesn’t for some reason).
If no argument is passed, e falls back to opening a shell prompt.
|
|
|
|
|
|
| |
rlwrap has to do magic recognition, which breaks in most cases.
We can just print a prompt before the first and after each consecutive
command. Seems to work wonderfully.
|
| |
|
|
|
|
| |
Forgot the cat after I added forstdin.
|
| |
|
|
|