Skip to content

Conversation

@nohzafk
Copy link
Contributor

@nohzafk nohzafk commented Jan 2, 2024

for current fish version 3.6.1, the directory tracking instruction on README does not work.

set the vterm_prompt_end function to trigger whenever the current directory changes. This can be done using the --on-variable PWD hook.

This modification ensures that vterm_prompt_end is called every time the PWD variable changes, which occurs whenever user change directories.

With the above change, we don't need to call vterm_prompt_end from within fish_prompt anymore.

@nohzafk
Copy link
Contributor Author

nohzafk commented Jan 2, 2024

check for running fish in vterm also works.

if [ "$INSIDE_EMACS" = vterm ]
    function vterm_prompt_end --on-variable PWD
        vterm_printf '51;A'(whoami)'@'(hostname)':'(pwd)
    end
end

@Sbozzolo
Copy link
Collaborator

I am running fish 3.7 and the version in the README works, but I wouldn't mind updating to a cleaner version.

Is your proposed solution backward compatible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants