aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-05-13 13:33:58 +0800
committerAaron LI <aly@aaronly.me>2019-05-13 13:33:58 +0800
commit8d139e9e9c5ab904186cf66e4546c586ba61d180 (patch)
tree96e167d0b48d456eff36b485fafadb63eadac214
parent88f3fbaebf4c3254ee8eac7d4fbdbb3ddc9c18fc (diff)
downloaddotfiles-8d139e9e9c5ab904186cf66e4546c586ba61d180.tar.bz2
zsh: Add fix() function
-rw-r--r--_zsh/40-functions.zsh11
1 files changed, 11 insertions, 0 deletions
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: #