Browse Source

tilix awareness2

master
pvincent 4 years ago
parent
commit
a92744ad45
  1. 9
      bash.bashrc

9
bash.bashrc

@ -145,7 +145,14 @@ __vte_osc7 () {
# 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_INFO="${HOSTNAME:-}"
if [[ $container == 'lxc' ]];then
VTE_INFO="${container_hostname}.$(hostname)"
fi
printf "\[\033]7;file://%s%s\a\]" "${VTE_INFO}" "$(__vte_urlencode "${PWD}")"
}
__vte_urlencode() (

Loading…
Cancel
Save