From 8d139e9e9c5ab904186cf66e4546c586ba61d180 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 13 May 2019 13:33:58 +0800 Subject: zsh: Add fix() function --- _zsh/40-functions.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/_zsh/40-functions.zsh b/_zsh/40-functions.zsh index a9d30ed..83615ae 100644 --- a/_zsh/40-functions.zsh +++ b/_zsh/40-functions.zsh @@ -141,4 +141,15 @@ randpass() { } +## Fix terminal +# Credit: https://unix.stackexchange.com/a/299922 +fix() { + reset + stty sane + tput rs1 + clear + echo -e "\033c" +} + + # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: # -- cgit v1.2.2