Tabby Terminal配置终端Sftp自动识别当前目录

2022-10-19  本文已影响0人  刘大坝

Tabby Terminal配置终端Sftp自动识别当前目录

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

Bash:

编辑~/.bash_profile:

vim ~/.bash_profile

末尾追加如下内容:

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

使之立即生效:

source ~/.bash_profile

ZSH:

编辑 ~/.zshrc:

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

ZSH:

编辑~/.config/fish/config.fish:

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

猜你喜欢

热点阅读