Remove unused functions for old prompts
This commit is contained in:
parent
cabd702cbe
commit
5559156c59
3 changed files with 0 additions and 33 deletions
|
@ -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'
|
|
|
@ -1,3 +0,0 @@
|
||||||
#! zsh
|
|
||||||
autoload prompt_pure_set_title
|
|
||||||
prompt_pure_set_title 'expand-prompt' '%~'
|
|
|
@ -1,3 +0,0 @@
|
||||||
#! zsh
|
|
||||||
autoload prompt_pure_set_title
|
|
||||||
prompt_pure_set_title 'ignore-escape' "$PWD:t: $2"
|
|
Loading…
Reference in a new issue