Skip to content

Commit

Permalink
Remove support for ancient zsh versions
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiX committed Sep 16, 2024
1 parent 6d74826 commit 4700123
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
20 changes: 0 additions & 20 deletions zsh/funcs/prompt_tobias1_setup
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,6 @@ prompt_tobias1_setup () {
PS2="%F{$pc[cont]}%_%F{$pc[contchar]}>%f "

SPROMPT="zsh:%B%F{$pc[error]} "%R" -> "%r" [ynae]?%f%b "

# fixup older zsh versions
autoload -Uz is-at-least
if ! is-at-least 4.3.9
then
autoload -Uz colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]
then
colors
fi

for elm in PS1 RPS1 PS2 SPROMPT
do
# I would like to replace %F{somecolor} with %{$fg[somecolor]%},
# but that is to complicated, so make a very simple, color-less
# prompt...
eval "$elm=\${(S)$elm//\\%F{*}/}"
eval "$elm=\${$elm//\\%B/}"
done
fi
}

prompt_tobias1_setup "$@"
Expand Down
10 changes: 3 additions & 7 deletions zsh/rc.quotemagic
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Magic URL quoting

autoload -Uz is-at-least
# if you now paste a url it will be magically quoted!
# but it only works on 4.2.0 and later.
if is-at-least 4.2; then
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
zstyle -e :urlglobber url-other-schema '[[ $words[1] == scp ]] && reply=("*") || reply=(http https ftp)'
fi
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
zstyle -e :urlglobber url-other-schema '[[ $words[1] == scp ]] && reply=("*") || reply=(http https ftp)'

# vim: set ts=4 sw=4:

0 comments on commit 4700123

Please sign in to comment.