~cadence/bliz-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Allow arbitrary shells

Details
Message ID
<20220214174946.2595916-1-tim@clifford.lol>
DKIM signature
missing
Download raw message
Patch: +20 -2
---
Hi again! This just adds a little bit of logic to make it possible to use
shells other than fish. This is my first git send-email patch other than the
tutorial so hopefully I did it right :)

 serve/scripting.bliz  | 16 +++++++++++++++-
 src/process-bliz.fish |  6 +++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/serve/scripting.bliz b/serve/scripting.bliz
index 1745faa..6c560d0 100644
--- a/serve/scripting.bliz
+++ b/serve/scripting.bliz
@@ -28,8 +28,22 @@ Take a walk through the green grass.

=> ./palette.png Palette reference

You can also use other shells:

```
%%%bash
cat <(echo Hello from bash!) # (correct in bash, incorrect in fish)
%%%
```

```
%%%python3
print("Hello from python!")
%%%
```

## Helpful links

=> https://gemini.circumlunar.space/ Gemini home
=> https://sr.ht/~cadence/bliz Bliz project on Sourcehut
=> https://cadence.moe Cadence's homepage
\ No newline at end of file
=> https://cadence.moe Cadence's homepage
diff --git a/src/process-bliz.fish b/src/process-bliz.fish
index 5e4f761..78f1fa9 100644
--- a/src/process-bliz.fish
+++ b/src/process-bliz.fish
@@ -25,7 +25,11 @@ while read line
            set input_mode_meta (string sub -s 4 -- $line)
        else
            # eval script, then switch to text mode
            eval $script_lines\n
            if [ -z $input_mode_meta ] || [ $input_mode_meta = fish ]
                eval $script_lines\n
            else
                $input_mode_meta <(echo $script_lines\n | psub)
            end
            set input_mode text
        end
        continue
--
2.35.1
Details
Message ID
<20220220015440.0ce7fa19a4654ea9ea92b4f4@disroot.org>
In-Reply-To
<20220214174946.2595916-1-tim@clifford.lol> (view parent)
DKIM signature
pass
Download raw message
Patch applied, thank you very much for your contribution!

I edited a few things to make the syntax neater for fish, and moved
the documentation to:
gemini://cadence.moe/bliz-documentation/03-dot-bliz-scripting.bliz

and it looks like your git send-email works great :)
Reply to thread Export thread (mbox)