[FIX] Only source terminal prompt file if there

I don't want to see an error message when ssh-ing to a computer which
doesn't have this file because `termite` isn't installed.
This commit is contained in:
Bruno BELANYI 2019-10-29 16:39:35 +01:00
parent d79a86e8bd
commit cbcddccb50
2 changed files with 9 additions and 7 deletions

View file

@ -6,7 +6,8 @@
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
# Export our directory to Termite for opening new terminals # Export our directory to Termite for opening new terminals
if [[ "$TERM" == xterm-termite ]] || [[ "$TERM" == xterm ]]; then if { [[ "$TERM" == xterm-termite ]] || [[ "$TERM" == xterm ]]; } &&
[ -r /etc/profile.d/vte.sh ]; then
. /etc/profile.d/vte.sh . /etc/profile.d/vte.sh
__vte_prompt_command __vte_prompt_command
fi fi

View file

@ -1,5 +1,6 @@
# Export our directory to Termite for opening new terminals # Export our directory to Termite for opening new terminals
if [[ "$TERM" == xterm-termite ]] || [[ "$TERM" == xterm ]]; then if { [[ "$TERM" == xterm-termite ]] || [[ "$TERM" == xterm ]]; } &&
[ -r /etc/profile.d/vte.sh ]; then
. /etc/profile.d/vte.sh . /etc/profile.d/vte.sh
__vte_osc7 __vte_osc7
precmd_functions+=(__vte_prompt_command) # FIXME: why isn't it set above ? precmd_functions+=(__vte_prompt_command) # FIXME: why isn't it set above ?