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
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