func (nash *Shell) ExecuteFile(path string) error {
	return nash.interp.ExecFile(path)
}
ExecuteFile executes the given file.
Deprecated: Use ExecFile instead.
package nash
import (
	"bytes"
	"fmt"
	"io"
	"github.com/madlambda/nash/ast"
	shell "github.com/madlambda/nash/internal/sh"
	"github.com/madlambda/nash/sh"
)
type (
	Shell struct {
		interp *shell.Shell
	}
)
func newShell(nashpath string, nashroot string, abort bool) (*Shell, error) {
	var (
		nash Shell
		err  error
	)
	if abort {
		nash.interp, err = shell.NewAbortShell(nashpath, nashroot)
	} else {
		nash.interp, err = shell.NewShell(nashpath, nashroot)
	}
	if err != nil {
		return nil, err
	}
	return &nash, nil
}
func New(nashpath string, nashroot string) (*Shell, error) {
	return newShell(nashpath, nashroot, false)
}
func NewAbort(nashpath string, nashroot string) (*Shell, error) {
	return newShell(nashpath, nashroot, true)
}
func (nash *Shell) SetDebug(b bool) {
	nash.interp.SetDebug(b)
}
func (nash *Shell) SetInteractive(b bool) {
	nash.interp.SetInteractive(b)
}
func (nash *Shell) NashPath() string {
	return nash.interp.NashPath()
}
func (nash *Shell) Environ() shell.Env {
	return nash.interp.Environ()
}
func (nash *Shell) GetFn(name string) (sh.FnDef, error) {
	fnObj, err := nash.interp.GetFn(name)
	if err != nil {
		return nil, err
	}
	return fnObj.Fn(), nil
}
func (nash *Shell) Prompt() string {
	value, ok := nash.interp.Getenv("PROMPT")
	if ok {
		return value.String()
	}
	return "<no prompt> "
}
func (nash *Shell) SetNashdPath(path string) {
	nash.interp.SetNashdPath(path)
}
func (nash *Shell) Exec(path, content string) error {
	return nash.interp.Exec(path, content)
}
func (nash *Shell) ExecOutput(path, content string) ([]byte, error) {
	oldstdout := nash.Stdout()
	defer nash.SetStdout(oldstdout)
	var output bytes.Buffer
	nash.SetStdout(&output)
	err := nash.interp.Exec(path, content)
	return output.Bytes(), err
}
func (nash *Shell) ExecuteString(path, content string) error {
	return nash.interp.Exec(path, content)
}
func (nash *Shell) ExecFile(path string, args ...string) error {
	if len(args) > 0 {
		err := nash.ExecuteString("setting args", `var ARGS = `+args2Nash(args))
		if err != nil {
			return fmt.Errorf("Failed to set nash arguments: %s", err.Error())
		}
	}
	return nash.interp.ExecFile(path)
}