From b0879b77afc8e498ccf70f36da38844f396a663d Mon Sep 17 00:00:00 2001 From: Alan Guedes Date: Wed, 28 Jun 2023 12:31:41 +0100 Subject: [PATCH] move winpath to os_win.bash --- init.sh | 2 -- os_win.bash | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index 75ec43a5..3b958622 100644 --- a/init.sh +++ b/init.sh @@ -10,12 +10,10 @@ source "$BH_DIR/os_any.bash" case $OSTYPE in msys*) source "$BH_DIR/os_win.bash" - alias winpath='cygpath -m' ;; linux*) source "$BH_DIR/os_ubu.bash" if [[ -n $WSL_DISTRO_NAME ]]; then - alias winpath='wslpath -m' source "$BH_DIR/os_win.bash"; fi ;; diff --git a/os_win.bash b/os_win.bash index 080e91ae..e76af9c6 100644 --- a/os_win.bash +++ b/os_win.bash @@ -5,6 +5,12 @@ alias ls='ls --color=auto -I NTUSER\* -I ntuser\* -I AppData -I IntelGraphicsProfiles* -I MicrosoftEdgeBackups' BH_LIB_PS1="$BH_DIR/scripts/" +if [[ $OSTYPE == linux* && -n $WSL_DISTRO_NAME ]]; then + alias winpath='wslpath -m' +elif [[ $OSTYPE == linux* ]]; then + alias winpath='cygpath -m' +fi + function home_clean_win() { if [[ -n $WSL_DISTRO_NAME ]]; then home_clean $(wslpath $(wslvar USERPROFILE))