Tabby 终端实现 SFTP 目录跟随

### Bash
~/.bash_profile:

export PS1="$PS1\[\e]1337;CurrentDir="'$(pwd)\a\]'

### ZSH
~/.zshrc:

precmd () { echo -n "\x1b]1337;CurrentDir=$(pwd)\x07" }

### Fish
~/.config/fish/config.fish:

function __tabby_working_directory_reporting --on-event fish_prompt
    echo -en "\e]1337;CurrentDir=$PWD\x7"
end

参考地址: https://github.com/Eugeny/tabby/wiki/Shell-working-directory-reporting

posted @ 2026-03-17 14:48  LiuChengloong  阅读(69)  评论(0)    收藏  举报