From 918d5595bdfc69bb2c6b90d77c8af882b9cb230c Mon Sep 17 00:00:00 2001 From: David Adam Date: Thu, 20 Nov 2014 14:45:07 +0800 Subject: [PATCH] __fish_config_interactive: send CWD via escapes in Apple Terminal Closes #68. --- share/functions/__fish_config_interactive.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index b33cc8947..2ace0248d 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -189,10 +189,10 @@ function __fish_config_interactive -d "Initializations that should be performed # Notify vte-based terminals when $PWD changes (issue #906) - if test "$VTE_VERSION" -ge 3405 + if test "$VTE_VERSION" -ge 3405 -o "$TERM_PROGRAM" = "Apple_Terminal" function __update_vte_cwd --on-variable PWD --description 'Notify VTE of change to $PWD' status --is-command-substitution; and return - printf '\033]7;file://%s\a' (pwd | __fish_urlencode) + printf '\033]7;file://%s%s\a' (hostname) (pwd | __fish_urlencode) end end