Last active
September 22, 2020 02:34
-
-
Save skyline75489/b95a03f9967dbce25ac439fb19cdbd56 to your computer and use it in GitHub Desktop.
Windows Terminal OSC 7 for Git Bash
This file contains 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_osc7 () { | |
_win_path="$(cygpath -m $(pwd))" | |
printf "\033]7;file://%s/%s\033\\" "$HOSTNAME" "$_win_path" | |
} | |
[ -n "$BASH_VERSION" ] && [ -n "$WT_SESSION" ] && PROMPT_COMMAND="__wt_osc7" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, might need to append to
PROMPT_COMMAND
(if possible) or slurp it in, since there's already a default, at least in my env (I don't recall changing it) ofhistory -a
.Edit: Hmm. That's in my ~/.bashrc, so perhaps it is something I enabled years ago. Sorry.