don't use href when the terminal is known to print garbage on it

This commit is contained in:
romkatv 2020-03-06 11:40:59 +01:00
commit 6ccf26ff8e
2 changed files with 27 additions and 7 deletions

View file

@ -153,7 +153,11 @@ function print_prompt() {
function href() {
local url=${${1//\%/%%}//\\/\\\\}
print -r -- '%{\e]8;;'$url'\e\\%}'$url'%{\e]8;;\e\\%}'
if (( _p9k_term_has_href )); then
print -r -- '%{\e]8;;'$url'\e\\%}'$url'%{\e]8;;\e\\%}'
else
print -r -- $url
fi
}
function flowing() {