美文网首页
Tabby Terminal配置终端Sftp自动识别当前目录

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

作者: 刘大坝 | 来源:发表于2022-10-19 10:37 被阅读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

相关文章

网友评论

      本文标题:Tabby Terminal配置终端Sftp自动识别当前目录

      本文链接:https://www.haomeiwen.com/subject/akjezrtx.html