Last active
July 14, 2025 02:45
-
-
Save skyline75489/d655aede4c729eff178a1c0bfd10f622 to your computer and use it in GitHub Desktop.
Revisions
-
skyline75489 revised this gist
Dec 17, 2020 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ __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 -
skyline75489 revised this gist
Sep 22, 2020 . 1 changed file with 1 addition and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,6 @@ __wt_osc7 () { _win_path=$(wslpath -m $(pwd)) printf "\033]7;file://%s/%s\033\\" "$HOSTNAME" "$_win_path" } [ -n "$BASH_VERSION" ] && [ -n "$WT_SESSION" ] && PROMPT_COMMAND="__wt_osc7" -
skyline75489 revised this gist
Sep 21, 2020 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,11 @@ __wt_osc7 () { # Windows Path if [[ "$(pwd)" =~ ^/mnt/* ]]; then _win_path=$(echo "$(pwd)" | sed -e "s/\/mnt\\/\([a-zA-Z]*\)\(.*\)/\1:\2/g") printf "\033]7;file://%s/%s\033\\" "$HOSTNAME" "$_win_path" else # Linux Path printf "\033]7;file://%s/\\\\\\\\wsl$\\%s%s\033\\" "$HOSTNAME" "$WSL_DISTRO_NAME" "$(pwd)" fi } -
skyline75489 revised this gist
Sep 20, 2020 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,11 @@ DIST="Ubuntu" __wt_osc7 () { # Windows Path if [[ "$(pwd)" =~ ^/mnt/* ]]; then _win_path=$(echo "$(pwd)" | sed -e "s/\/mnt\\/\([a-zA-Z]*\)\(.*\)/\1:\2/g") printf "\033]7;file://%s/%s\033\\" "$HOSTNAME" "$_win_path" else # Linux Path printf "\033]7;file://%s/\\\\\\\\wsl$\\%s%s\033\\" "$HOSTNAME" "$DIST" "$(pwd)" fi } -
skyline75489 revised this gist
Sep 18, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ DIST="Ubuntu" __wt_osc7 () { # Windows Path if [[ "$(pwd)" =~ ^/mnt/* ]]; then # Change "/mnt/c/path" to "c:\path" _win_path=$(echo "$(pwd)" | sed -e "s/\/mnt\\/\([a-zA-Z]*\)\/\(.*\)/\1:\/\2/g") printf "\033]7;file://%s\033\\" "$_win_path" else -
skyline75489 revised this gist
Sep 18, 2020 . No changes.There are no files selected for viewing
-
skyline75489 revised this gist
Sep 18, 2020 . 1 changed file with 4 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ DIST="Ubuntu" __wt_osc7 () { # Windows Path if [[ "$(pwd)" =~ ^/mnt/* ]]; then # Change "/mnt/c/x" to "C:\x" _win_path=$(echo "$(pwd)" | sed -e "s/\/mnt\\/\([a-zA-Z]*\)\/\(.*\)/\1:\/\2/g") printf "\033]7;file://%s\033\\" "$_win_path" else @@ -11,11 +12,5 @@ __vte_osc7 () { fi } [ -n "$BASH_VERSION" ] && [ -n "$WT_SESSION" ] && PROMPT_COMMAND="__wt_osc7" [ -n "$ZSH_VERSION" ] && [ -n "$WT_SESSION" ] && precmd_functions+=(__wt_osc7) -
skyline75489 renamed this gist
Sep 18, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
skyline75489 revised this gist
Sep 18, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,8 @@ __vte_osc7 () { case "$TERM" in xterm*|vte*) [ -n "$BASH_VERSION" ] && [ -n "$WT_SESSION" ] && PROMPT_COMMAND="__vte_osc7" [ -n "$ZSH_VERSION" ] && [ -n "$WT_SESSION" ] && precmd_functions+=(__vte_osc7) ;; esac -
skyline75489 revised this gist
Sep 18, 2020 . 1 changed file with 4 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,17 +11,11 @@ __vte_osc7 () { fi } case "$TERM" in xterm*|vte*) [ -n "$BASH_VERSION" ] && PROMPT_COMMAND="__vte_osc7" [ -n "$ZSH_VERSION" ] && precmd_functions+=(__vte_osc7) ;; esac true -
skyline75489 created this gist
Sep 18, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ DIST="Ubuntu" __vte_osc7 () { # Windows Path if [[ "$(pwd)" =~ ^/mnt/* ]]; then _win_path=$(echo "$(pwd)" | sed -e "s/\/mnt\\/\([a-zA-Z]*\)\/\(.*\)/\1:\/\2/g") printf "\033]7;file://%s\033\\" "$_win_path" else # Linux Path printf "\033]7;file://\\\\\\\\wsl$\\%s%s\033\\" "$DIST" "$(pwd)" fi } __vte_prompt_command() { local pwd='~' [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} pwd="${pwd//[[:cntrl:]]}" printf "\033]0;\\\\wsl$\%s%s\033\\" "$DIST" "${pwd}" __vte_osc7 } case "$TERM" in xterm*|vte*) [ -n "$BASH_VERSION" ] && PROMPT_COMMAND="__vte_prompt_command" [ -n "$ZSH_VERSION" ] && precmd_functions+=(__vte_osc7) ;; esac