Skip to content

Investigate whether $PWD changes are reported to VTE terminals #1814

Closed

Description

@ridiculousfish

As mentioned in #906, the claim is that VTE terminals no longer see PWD changes.

The relevant code is in share/functions/__fish_config_interactive.fish:

if test "$VTE_VERSION" -ge 3405
    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

Activity

  1. zanchey commented on Nov 17, 2014

    @zanchey
    Member

    FWIW, it's working for me on 2.1.1-1100-g9aaf93f under gnome-terminal 3.4.1.1.

  2. strelec commented on Nov 18, 2014

    @strelec

    Gnome-terminal: 3.14.2
    Fish 3.1.1

    Not only that, I have figured out fish doesn't play well with "open terminal here" in nautilus. Speaking of this package: https://www.archlinux.org/packages/extra/i686/nautilus-open-terminal/

  3. ridiculousfish commented on Nov 18, 2014

    @ridiculousfish
    MemberAuthor

    Please open separate issues for separate issues :)

    Filed #1816 for the "Open terminal here" In Nautilus

  4. zanchey commented on Nov 20, 2014

    @zanchey
    Member

    Can I confirm that the behaviour we expect is this?

    1. Open Terminal.
    2. cd /tmp.
    3. Open a new tab.
    4. New tab's working directory is /tmp.
  5. zanchey commented on Nov 20, 2014

    @zanchey
    Member

    It also works with Gnome-terminal 3.10.2 and Gnome-terminal 3.14 on Fedora 20.

  6. zanchey commented on Nov 20, 2014

    @zanchey
    Member

    OK, there were some clues in #1816. It doesn't work if you launch fish as a custom command in GNOME Terminal. But it doesn't work if you launch bash as a custom command either.

  7. dvdbng commented on Nov 24, 2019

    @dvdbng

    For anyone looking for a workaround: The problem is that gnome-terminal won't do this if you are running fish as a custom command instead of your shell. To fix make gnome-terminal run your shell instead of custom command (in preferences -> profile -> command)
    . Then to make gnome-terminal run fish instead of your default shell, you can either make fish your shell (run chsh), or, if you are like me and you have a lot of scripts that assume your shell is bash-like, you can:

    • Run gnome-terminal with env SHELL=/usr/bin/fish gnome-terminal
    • Reset SHELL back to bash or whatever in your config.fish: set -gx SHELL /bin/bash
  8. locked as resolved and limited conversation to collaborators on Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions