What is Nostr?
Lexu /
npub1gnq…3t2c
2024-11-18 09:13:59

Lexu on Nostr: I finally figured out how to output to current screenful and die in less. 1. Save ...

I finally figured out how to output to current screenful and die in less.

1. Save this script in $PATH

#!/bin/sh

cat | col -bx | tr -d '\0-\10\13-\37\177'
kill $(ps -o ppid -p $PPID | tail -1)

2. Add this to ~/.lesskey

Q pipe .lessout\r

3. Run lesskey

Now to figure out how to print output control characters in a visible way instead of just deleting them.

https://aa.tilde.institute/notes.txt
Author Public Key
npub1gnqqrey2wyvgwuwqh4mw73s7sypr4jre7ls764rd8fwnvfjw8mcqu53t2c