summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-10-08 11:04:31 -0600
committerTuowen Zhao <ztuowen@gmail.com>2020-10-08 11:04:31 -0600
commit1774c426de3c4845e2d606c813c37067b8cf78d7 (patch)
tree872a7bbcaa79cf0b1c19d2687090ee6eb8e205fb /lib
parent2b3d602644a13aa97391f22ecfc249b6bc58dd49 (diff)
parent27857e66d0dab0bd05790307dfe5388f3cb2c51a (diff)
downloadzsh-1774c426de3c4845e2d606c813c37067b8cf78d7.tar.gz
zsh-1774c426de3c4845e2d606c813c37067b8cf78d7.tar.bz2
zsh-1774c426de3c4845e2d606c813c37067b8cf78d7.zip
Merge remote-tracking branch 'origin/master' into master
Diffstat (limited to 'lib')
-rw-r--r--lib/functions.zsh4
-rw-r--r--lib/termsupport.zsh12
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh
index 4bc533b7a..58f0e3fb0 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -1,5 +1,7 @@
function zsh_stats() {
- fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
+ fc -l 1 \
+ | awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \
+ | grep -v "./" | sort -nr | head -n20 | column -c3 -s " " -t | nl
}
function uninstall_oh_my_zsh() {
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 682925211..8cb2389e2 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -17,17 +17,17 @@ function title {
: ${2=$1}
case "$TERM" in
- cygwin|xterm*|putty*|rxvt*|konsole*|ansi|mlterm*)
- print -Pn "\e]2;$2:q\a" # set window name
- print -Pn "\e]1;$1:q\a" # set tab name
+ cygwin|xterm*|putty*|rxvt*|konsole*|ansi|mlterm*|alacritty|st*)
+ print -Pn "\e]2;${2:q}\a" # set window name
+ print -Pn "\e]1;${1:q}\a" # set tab name
;;
screen*|tmux*)
- print -Pn "\ek$1:q\e\\" # set screen hardstatus
+ print -Pn "\ek${1:q}\e\\" # set screen hardstatus
;;
*)
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
- print -Pn "\e]2;$2:q\a" # set window name
- print -Pn "\e]1;$1:q\a" # set tab name
+ print -Pn "\e]2;${2:q}\a" # set window name
+ print -Pn "\e]1;${1:q}\a" # set tab name
else
# Try to use terminfo to set the title
# If the feature is available set title