mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
fish: pwd reporting
This commit is contained in:
@ -80,12 +80,22 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
|
|||||||
echo -en "\e]133;D;$status\a"
|
echo -en "\e]133;D;$status\a"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Report pwd. This is actually built-in to fish but only for terminals
|
||||||
|
# that match an allowlist and that isn't us.
|
||||||
|
function __update_cwd_osc --on-variable PWD -d 'Notify capable terminals when $PWD changes'
|
||||||
|
if status --is-command-substitution || set -q INSIDE_EMACS
|
||||||
|
return
|
||||||
|
end
|
||||||
|
printf \e\]7\;file://%s%s\a $hostname (string escape --style=url $PWD)
|
||||||
|
end
|
||||||
|
|
||||||
# Enable fish to handle reflow because Ghostty clears the prompt on resize.
|
# Enable fish to handle reflow because Ghostty clears the prompt on resize.
|
||||||
set --global fish_handle_reflow 1
|
set --global fish_handle_reflow 1
|
||||||
|
|
||||||
# Initial calls for first prompt
|
# Initial calls for first prompt
|
||||||
__ghostty_set_cursor_beam
|
__ghostty_set_cursor_beam
|
||||||
__ghostty_mark_prompt_start
|
__ghostty_mark_prompt_start
|
||||||
|
__update_cwd_osc
|
||||||
end
|
end
|
||||||
|
|
||||||
ghostty_exit
|
ghostty_exit
|
||||||
|
Reference in New Issue
Block a user