Remove unused functions for old prompts

This commit is contained in:
Danielle McLean 2023-11-19 16:42:26 +11:00
parent cabd702cbe
commit 5559156c59
Signed by: 00dani
GPG key ID: 52C059C3B22A753E
3 changed files with 0 additions and 33 deletions

View file

@ -1,27 +0,0 @@
#! zsh
# copied from https://github.com/sindresorhus/pure/blob/43aafe0b4dc05174c57ee623c03c64400e832ece/pure.zsh#L56
setopt localoptions noshwordsplit
# Emacs terminal does not support settings the title.
(( ${+EMACS} || ${+INSIDE_EMACS} )) && return
case $TTY in
# Don't set title over serial console.
/dev/ttyS[0-9]*) return;;
esac
# Show hostname if connected via SSH.
local hostname=
if [[ -n $prompt_pure_state[username] ]]; then
# Expand in-place in case ignore-escape is used.
hostname="${(%):-(%m) }"
fi
local -a opts
case $1 in
expand-prompt) opts=(-P);;
ignore-escape) opts=(-r);;
esac
# Set title atomically in one print statement so that it works when XTRACE is enabled.
print -n $opts $'\e]0;'${hostname}${2}$'\a'

View file

@ -1,3 +0,0 @@
#! zsh
autoload prompt_pure_set_title
prompt_pure_set_title 'expand-prompt' '%~'

View file

@ -1,3 +0,0 @@
#! zsh
autoload prompt_pure_set_title
prompt_pure_set_title 'ignore-escape' "$PWD:t: $2"