dotfiles/.local/bin/scripts/rewrite

4 lines
178 B
Plaintext
Raw Normal View History

2021-12-02 22:31:48 +00:00
#!/bin/sh
# Pipe a command into this and each output line will rewrite the previous one
2022-01-15 21:01:18 +00:00
sed --unbuffered '2,$s|^|\\e[1A\\e[K|' | cut -c-$(tput cols) | xargs -d '\n' -L 1 echo -e