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
网友评论