Re: [dev] [st] terminal as a pipe reader

From: syg <syg_AT_pedantic.software>
Date: Fri, 22 Aug 2025 18:49:16 +1000

Hi,

> $ cmd1 | st -e 'vipe' | cmd2

You could make a script that saves stdin in a temp file, starts st with
vim and the file name, then once st returns, output the temp file in
stdout and delete it.

The following does exactly what you want:

```
#!/usr/bin/sh

FILE="$(mktemp)"
cat > "$FILE"

st -e vim "$FILE"

cat "$FILE"
rm "$FILE"
```

- syg
Received on Fri Aug 22 2025 - 10:49:16 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 22 2025 - 10:48:09 CEST