aboutsummaryrefslogblamecommitdiff
path: root/bash/bashrc.d/clwr.bash
blob: 455484d97b833872183b04397b649b77a66242aa (plain) (tree)
1
2
3
4
5
6
7
8







                                                                               
# Clear screen, accept line, write to all args, loop; use this as e.g. an input
# tmux window for a minimal IRC client like ii(1). Uses read -e to allow
# newlines.
clwr() {
    while { clear && IFS= read -er line ; } ; do
        printf '%s\n' "$line"
    done
}