first commit
This commit is contained in:
commit
0610f4aeab
130 changed files with 9897 additions and 0 deletions
14
fn/-z4h-set-term-title
Normal file
14
fn/-z4h-set-term-title
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
emulate -L zsh -o no_prompt_bang -o prompt_subst -o prompt_percent
|
||||
|
||||
local title=$1
|
||||
shift
|
||||
print -Prnv title -- $title
|
||||
printf -v title '\e]0;%s\a' "${(V)title}"
|
||||
|
||||
if [[ -t 1 ]]; then
|
||||
print -rn -- $title
|
||||
elif [[ -v _z4h_tty_fd ]]; then
|
||||
print -rnu $_z4h_tty_fd -- $title
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue