emacs-libvterm icon indicating copy to clipboard operation
emacs-libvterm copied to clipboard

update fish shell directory tracking function

Open nohzafk opened this issue 1 year ago • 2 comments

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 avatar Jan 02 '24 06:01 nohzafk

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

nohzafk avatar Jan 02 '24 06:01 nohzafk

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?

Sbozzolo avatar May 20 '24 02:05 Sbozzolo