Debian Codegraph @

memo/D1345.bashrc

raw
1 #!/bin/bash
2
3 shopt -s checkwinsize
4 function p1 {
5 echo "[$COLUMNS:$LINES] $READLINE_LINE"
6 }
7 function winch {
8 trap -- 'echo "[$COLUMNS:$LINES] $READLINE_LINE (WINCH)"' WINCH
9 }
10
11 function handle-t {
12 exec &>/dev/tty
13 p1
14 exec &>/dev/null
15 }
16 function handle-u {
17 exec &>/dev/tty
18 p1
19 }
20 function handle-h {
21 exec &>/dev/tty
22 exec &>/dev/null
23 }
24 winch
25
26 bind -x '"\C-t": handle-t'
27 bind -x '"\C-h": handle-h'
28 bind -x '"\C-y": handle-u'