Last active
December 18, 2022 08:44
-
-
Save skyline75489/d655aede4c729eff178a1c0bfd10f622 to your computer and use it in GitHub Desktop.
Windows Terminal OSC 9;9 for Bash & Zsh in WSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__wt_osc9_9 () { | |
_win_path=$(wslpath -m $(pwd)) | |
printf "\033]9;9;%s\033\\" "$_win_path" | |
} | |
[ -n "$BASH_VERSION" ] && [ -n "$WT_SESSION" ] && PROMPT_COMMAND="__wt_osc9_9" | |
[ -n "$ZSH_VERSION" ] && [ -n "$WT_SESSION" ] && precmd_functions+=(__wt_osc9_9) | |
true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works!
One line for who's using ZSH: