diff --git a/src/main.cpp b/src/main.cpp index 94f83b9..324b743 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -94,7 +94,14 @@ int main(int argc, char* argv[]) { first_run=false; // resolve shebang - if(options["bash"]) + if(options["lxsh"]) + { + shebang_is_bin = true; + parse_bash = true; + binshebang = basename(shebang); + shebang = "#!/usr/bin/env lxsh"; + } + else if(options["bash"]) { parse_bash=true; shebang = "#!/usr/bin/env bash"; diff --git a/src/options.cpp b/src/options.cpp index 6c9204c..e36b9ec 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -34,6 +34,7 @@ ztd::option_set options( { ztd::option('R', "no-resolve", false, "Don't resolve %resolve commands"), ztd::option("no-extend", false, "Don't add lxsh extension functions"), ztd::option("bash", false, "Force bash parsing"), + ztd::option("lxsh", false, "Force lxsh parsing"), ztd::option("debashify", false, "Attempt to turn a bash-specific script into a POSIX shell script"), ztd::option("remove-unused", false, "Remove unused functions and variables"), ztd::option("list-cmd", false, "List all commands invoked in the script"),