#
# Copyright (C)Nintendo All rights reserved.
#
# These coded instructions, statements, and computer programs contain proprietary
# information of Nintendo and/or its licensed developers and are protected by
# national and international copyright laws. They may not be disclosed to third
# parties or copied or duplicated in any form, in whole or in part, without the
# prior written consent of Nintendo.
#
# The content herein is highly confidential and should be handled accordingly.

PATH=/bin:${PATH}

# setup fpath
if [ `dirname "${ZDOTDIR}/x"` != `dirname "${HOME}/x"` ]; then
    # loaded from siglo.cmd
    fpath=($fpath "${ZDOTDIR}")
    export ZDOTDIR=~/
    if [ -r ~/.zshrc ]; then
        . ~/.zshrc
    fi
else
    # sourced
    fpath=($fpath `dirname $0`)
fi

# run powershell scripts directly from the shell without shebang
function runpowershell(){
    program_path_win=`/bin/cygpath "${SYSTEMROOT}"`/System32/WindowsPowerShell/v1.0/powershell
    script_path=`which -p "$@[0]"`
    script_path_win=`/bin/cygpath -am -- "${script_path}" 2> /dev/null`
    ${program_path_win} -Version 2.0 -ExecutionPolicy RemoteSigned "${script_path_win}" $@[1,-1]
}
alias -s ps1=runpowershell


alias -s nca="RunOnTarget run"
alias -s kip="RunOnTarget run-kip"
