diff --git a/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh b/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh index 53dfb4e5c4..f84c27a6e2 100755 --- a/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh +++ b/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh @@ -1,4 +1,13 @@ -#!/bin/bash -l +#!/bin/sh export MPVBUNDLE="true" + +# set the right args for the user specified standard shell +# to load the expected profiles and configs +args="-c" +case "$SHELL" in + *bash) args="-l $args";; + *zsh) args="-l -i $args";; +esac + cd "$(dirname "$0")" -$SHELL -c "./mpv --player-operation-mode=pseudo-gui" +$SHELL $args "./mpv --player-operation-mode=pseudo-gui"