aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar Tim Cuthbertson <tim@gfxmonk.net>2013-08-24 18:52:00 +1000
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-09-04 20:30:42 +0200
commit74e27a0a82d5f074590f825e1e7e8277392efed4 (patch)
tree83f946bd8110c1e2bdd8a7c95acc4e85bdf1214b /share
parent04c0ac9ee838bd455d620aa71c5c6642ba973e75 (diff)
Notify vte-based terminals of $PWD change (#906)
Diffstat (limited to 'share')
-rw-r--r--share/functions/__fish_config_interactive.fish9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish
index ab1a6837..458e10d5 100644
--- a/share/functions/__fish_config_interactive.fish
+++ b/share/functions/__fish_config_interactive.fish
@@ -213,6 +213,15 @@ function __fish_config_interactive -d "Initializations that should be performed
commandline -f repaint
end
+
+ # Notify vte-based terminals when $PWD changes (issue #906)
+ if begin set -q VTE_VERSION; and test $VTE_VERSION -ge 3405; end
+ 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)
+ end
+ end
+
# The first time a command is not found, look for command-not-found
# This is not cheap so we try to avoid doing it during startup
function fish_command_not_found_setup --on-event fish_command_not_found