at master 581 B view raw
1function update_cwd_osc --on-variable PWD --description 'Notify terminals when $PWD changes' 2 if status --is-command-substitution || set -q INSIDE_EMACS 3 return 4 end 5 printf \e\]7\;file://%s%s\e\\ $hostname (string escape --style=url $PWD) 6end 7 8update_cwd_osc # Run once since we might have inherited PWD from a parent shell 9 10function mark_prompt_start --on-event fish_prompt 11 echo -en "\e]133;A\e\\" 12end 13 14function foot_cmd_start --on-event fish_preexec 15 echo -en "\e]133;C\e\\" 16end 17 18function foot_cmd_end --on-event fish_postexec 19 echo -en "\e]133;D\e\\" 20end