aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/clwr.bash
blob: a12ced4cea500f24cf852a030249761737b1e2a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
# 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
}