Skip to content

Commit

Permalink
move winpath to os_win.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlivio committed Jun 28, 2023
1 parent 5d1750e commit b0879b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
6 changes: 6 additions & 0 deletions os_win.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b0879b7

Please sign in to comment.