|
|
@ -100,6 +100,7 @@ __prompt_command() { |
|
|
|
local pwd='~' |
|
|
|
[ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} |
|
|
|
PS1+=" ${Cya}${pwd}$(__vte_osc7)${R}" |
|
|
|
#PS1+=" ${Cya}\w${R}" |
|
|
|
|
|
|
|
if hash git 2>&-; then |
|
|
|
# git command exists |
|
|
@ -141,7 +142,10 @@ __prompt_command() { |
|
|
|
|
|
|
|
|
|
|
|
__vte_osc7 () { |
|
|
|
printf "\033]7;file://%s%s\007" "${HOSTNAME:-}" "$(__vte_urlencode "${PWD}")" |
|
|
|
# HINT: special character vte to get TILIX show proper hostname and pwd |
|
|
|
# Use \[...\] around the parts of PS1 that have length 0. |
|
|
|
# https://unix.stackexchange.com/questions/28827/why-is-my-bash-prompt-getting-bugged-when-i-browse-the-history#28828 |
|
|
|
printf "\[\033]7;file://%s%s\a\]" "${HOSTNAME:-}" "$(__vte_urlencode "${PWD}")" |
|
|
|
} |
|
|
|
|
|
|
|
__vte_urlencode() ( |
|
|
|