Skip to content

Commit

Permalink
Enable PWD reporting for iTerm2
Browse files Browse the repository at this point in the history
  • Loading branch information
gpanders authored and faho committed Aug 14, 2023
1 parent d47b2a7 commit 69ef51f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Expand Up @@ -54,6 +54,7 @@ Other improvements
- An integer overflow in `string repeat` leading to a near-infinite loop has been fixed (:issue:`9899`).
- `string shorten` behaves better in the presence of non-printable characters, including fixing an integer overflow that shortened strings more than intended. (:issue:`9854`)
- `string pad` no longer allows non-printable characters as padding. (:issue:`9854`)
- PWD reporting via OSC 7 is now enabled by default for iTerm2.

For distributors
----------------
Expand Down
3 changes: 2 additions & 1 deletion share/functions/__fish_config_interactive.fish
Expand Up @@ -267,14 +267,15 @@ end" >$__fish_config_dir/config.fish
end

# Notify terminals when $PWD changes (issue #906).
# VTE based terminals, Terminal.app, iTerm.app (TODO), foot, and kitty support this.
# VTE based terminals, Terminal.app, iTerm.app, foot, and kitty support this.
if not set -q FISH_UNIT_TESTS_RUNNING
and begin
string match -q -- 'foot*' $TERM
or string match -q -- 'xterm-kitty*' $TERM
or test 0"$VTE_VERSION" -ge 3405
or test "$TERM_PROGRAM" = Apple_Terminal && test (string match -r '\d+' 0"$TERM_PROGRAM_VERSION") -ge 309
or test "$TERM_PROGRAM" = WezTerm
or test "$TERM_PROGRAM" = iTerm.app
end
function __update_cwd_osc --on-variable PWD --description 'Notify capable terminals when $PWD changes'
if status --is-command-substitution || set -q INSIDE_EMACS
Expand Down

0 comments on commit 69ef51f

Please sign in to comment.