Fix Terminal.app title

Defining fish_title here is too late because there will already be a
title set. Work around issue by clearing it at same time.
This commit is contained in:
Aaron Gyes 2016-10-22 10:47:46 -07:00
parent ddbf63c46f
commit dfe7813c02

View file

@ -220,6 +220,7 @@ function __fish_config_interactive -d "Initializations that should be performed
# Notify terminals when $PWD changes (issue #906) # Notify terminals when $PWD changes (issue #906)
# VTE and Terminal.app support this in practice. # VTE and Terminal.app support this in practice.
if test "0$VTE_VERSION" -ge 3405 -o "$TERM_PROGRAM" = "Apple_Terminal" if test "0$VTE_VERSION" -ge 3405 -o "$TERM_PROGRAM" = "Apple_Terminal"
echo -n \e\]0\;\a # clear existing title
function fish_title; end function fish_title; end
function __update_cwd_osc --on-variable PWD --description 'Notify capable terminals when $PWD changes' function __update_cwd_osc --on-variable PWD --description 'Notify capable terminals when $PWD changes'
status --is-command-substitution status --is-command-substitution