From cb3ea33d9e5235e202278356e2d9250e87ec0835 Mon Sep 17 00:00:00 2001 From: hedy Date: Tue, 29 Mar 2022 13:04:50 +0800 Subject: [PATCH] Fix code blocks in spartan wiki page --- spartan.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/spartan.md b/spartan.md index 0276e58..7bb0137 100644 --- a/spartan.md +++ b/spartan.md @@ -67,27 +67,22 @@ preventing someone else from overwriting your files, with their scripts! you can also check for the user's input. for example, you your `index.gmi` you can have a input prompt: -```gmi -=: echo.sh send some input -``` + + =: echo.sh send some input then in `echo.sh`: -```sh -#!/usr/bin/env sh + #!/usr/bin/env sh -printf "2 application/octet-stream\r\n" -cat /dev/stdin -``` + printf "2 application/octet-stream\r\n" + cat /dev/stdin try visiting your spartan page, enter some input on that link line and see the result! alternatively you could send input directly in gelim: -```sh -gelim spartan://username.tilde.cafe/echo.sh -Ii 'hello!' -``` + gelim spartan://username.tilde.cafe/echo.sh -Ii 'hello!' (note: `-I` is so gelim quits immediately after displaying output, `-i` is for sending the input)