Fix code blocks in spartan wiki page
This commit is contained in:
parent
c8bd06589e
commit
cb3ea33d9e
17
spartan.md
17
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)
|
||||
|
|
Loading…
Reference in New Issue