Loading .shell/funcs +19 −0 Original line number Diff line number Diff line Loading @@ -200,3 +200,22 @@ do_update() done fi } has resize || resize() { local IFS=';' flag signal case $(get_shell) in bash) flag=-a signal=RETURN ;; zsh) flag=-A signal=EXIT ;; *) echo >&2 "Cannot resize with this shell"; return 1 ;; esac stty -echo trap 'stty echo' $signal printf '\033[18t' read -d '[' -s _ read -d 't' -s $flag params set -- "${params[@]}" [ $# -eq 3 -a $1 -eq 8 ] && shift [ $# -ne 2 ] && echo >&2 "Cannot resize" && return 1 stty rows "$1" cols "$2" echo trap '' $signal } Loading
.shell/funcs +19 −0 Original line number Diff line number Diff line Loading @@ -200,3 +200,22 @@ do_update() done fi } has resize || resize() { local IFS=';' flag signal case $(get_shell) in bash) flag=-a signal=RETURN ;; zsh) flag=-A signal=EXIT ;; *) echo >&2 "Cannot resize with this shell"; return 1 ;; esac stty -echo trap 'stty echo' $signal printf '\033[18t' read -d '[' -s _ read -d 't' -s $flag params set -- "${params[@]}" [ $# -eq 3 -a $1 -eq 8 ] && shift [ $# -ne 2 ] && echo >&2 "Cannot resize" && return 1 stty rows "$1" cols "$2" echo trap '' $signal }