aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/wsl/.local/share
diff options
context:
space:
mode:
Diffstat (limited to 'wsl/.local/share')
-rw-r--r--wsl/.local/share/zsh-wsl/zsh-wsl.plugin.zsh13
1 files changed, 8 insertions, 5 deletions
diff --git a/wsl/.local/share/zsh-wsl/zsh-wsl.plugin.zsh b/wsl/.local/share/zsh-wsl/zsh-wsl.plugin.zsh
index 69a3441..70236cf 100644
--- a/wsl/.local/share/zsh-wsl/zsh-wsl.plugin.zsh
+++ b/wsl/.local/share/zsh-wsl/zsh-wsl.plugin.zsh
@@ -22,10 +22,16 @@ alias pip3.7="DISPLAY= pip3.7"
alias pip3.10="DISPLAY= pip3.10"
alias pip="DISPLAY= pip3"
-wt() {
- powershell.exe -NoProfile -c "wt $*"
+wsl_path() {
+ win_path="$(powershell.exe "(get-command $1 -ErrorAction SilentlyContinue).Source")"
+ if [ ! -z "$win_path" ]; then
+ echo "$(wslpath "$win_path" | sed 's/\s/\\\ /g' | sed 's/\\\s*$//')"
+ fi
}
+alias alacritty="$(wsl_path "alacritty")"
+alias pwsh="$(wsl_path "pwsh")"
+
wsl_cmd_proxy() {
exe="$1"
shift # past exe
@@ -55,6 +61,3 @@ wsl_cmd_proxy() {
winget() { wsl_cmd_proxy "winget.exe" "$@"; }
scoop() { wsl_cmd_proxy "scoop" "$@"; }
-alacritty() { wsl_cmd_proxy "alacritty.exe" "$@"; }
-pwsh() { alacritty --working-directory "c:\\Users\\${USER}" -e "pwsh.exe $@"; }
-