diff --git a/.gitignore b/.gitignore index f88415a2..59bae2b5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,6 @@ testes/libs/all temp lua +lush compat-tests/ diff --git a/README.md b/README.md index 5bc0ee77..ee4ad26f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ -# Lua +# Lush -This is the repository of Lua development code, as seen by the Lua team. It contains the full history of all commits but is mirrored irregularly. For complete information about Lua, visit [Lua.org](https://www.lua.org/). +Lush is a shell built on [Lua 5.5.0](https://www.lua.org/). It extends Lua with shell-oriented features like command execution, pipelines, and built-in shell commands while maintaining full compatibility with the Lua 5.5 ecosystem. -Please **do not** send pull requests. To report issues, post a message to the [Lua mailing list](https://www.lua.org/lua-l.html). - -Download official Lua releases from [Lua.org](https://www.lua.org/download.html). +Based on [Lua](https://www.lua.org/) by R. Ierusalimschy, L. H. de Figueiredo, W. Celes (PUC-Rio). diff --git a/all b/all index 051e0106..8e98ef98 100755 --- a/all +++ b/all @@ -6,7 +6,7 @@ LUA_FLAGS="-W" if [ "$(uname)" != "Linux" ]; then LUA_FLAGS="$LUA_FLAGS -e_port=true" fi -if { ../lua $LUA_FLAGS all.lua; } then +if { ../lush $LUA_FLAGS all.lua; } then echo -e "\n\n final OK!!!!\n\n" else echo -e "\n\n >>>> BUG!!!!\n\n" diff --git a/lapi.c b/lapi.c index 27fa5247..68191e15 100644 --- a/lapi.c +++ b/lapi.c @@ -34,7 +34,8 @@ const char lua_ident[] = "$LuaVersion: " LUA_COPYRIGHT " $" - "$LuaAuthors: " LUA_AUTHORS " $"; + "$LuaAuthors: " LUA_AUTHORS " $" + "$LushVersion: " LUSH_RELEASE " $"; diff --git a/lua.c b/lua.c index 9fd50c16..68bfc290 100644 --- a/lua.c +++ b/lua.c @@ -1,6 +1,6 @@ /* ** $Id: lua.c $ -** Lua stand-alone interpreter +** Lush stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -26,7 +26,7 @@ #if !defined(LUA_PROGNAME) -#define LUA_PROGNAME "lua" +#define LUA_PROGNAME "lush" #endif #if !defined(LUA_INIT_VAR) @@ -834,6 +834,8 @@ static int pmain (lua_State *L) { lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); } luai_openlibs(L); /* open standard libraries */ + lua_pushstring(L, LUSH_VERSION); + lua_setglobal(L, "_LUSH_VERSION"); createargtable(L, argv, argc, script); /* create table 'arg' */ lua_gc(L, LUA_GCRESTART); /* start GC... */ lua_gc(L, LUA_GCGEN); /* ...in generational mode */ diff --git a/lua.h b/lua.h index 9f854fba..4ac268b4 100644 --- a/lua.h +++ b/lua.h @@ -1,6 +1,6 @@ /* ** $Id: lua.h $ -** Lua - A Scripting Language +** Lush - A Shell built on Lua ** Lua.org, PUC-Rio, Brazil (www.lua.org) ** See Copyright Notice at the end of this file */ @@ -13,7 +13,15 @@ #include -#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2025 Lua.org, PUC-Rio" +#define LUSH_VERSION_MAJOR "0" +#define LUSH_VERSION_MINOR "1" +#define LUSH_VERSION_RELEASE "0" +#define LUSH_VERSION "Lush " LUSH_VERSION_MAJOR "." LUSH_VERSION_MINOR +#define LUSH_RELEASE LUSH_VERSION "." LUSH_VERSION_RELEASE + +#define LUA_COPYRIGHT \ + LUSH_RELEASE " Copyright (C) 2025 Nik" \ + "\nBased on " LUA_RELEASE " Copyright (C) 1994-2025 Lua.org, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" diff --git a/makefile b/makefile index b5f7a505..31f6660f 100644 --- a/makefile +++ b/makefile @@ -98,7 +98,7 @@ RM= rm -f LIBS = -lm -CORE_T= liblua.a +CORE_T= liblush.a CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ ltm.o lundump.o lvm.o lzio.o ltests.o @@ -106,7 +106,7 @@ AUX_O= lauxlib.o LIB_O= lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o \ lutf8lib.o loadlib.o lcorolib.o lcmd.o lbuiltin.o linit.o -LUA_T= lua +LUA_T= lush LUA_O= lua.o diff --git a/onelua.c b/onelua.c index e7171213..74a4fb9f 100644 --- a/onelua.c +++ b/onelua.c @@ -3,15 +3,15 @@ ** Compiling just this file generates a complete Lua stand-alone ** program: ** -** $ gcc -O2 -std=c99 -o lua onelua.c -lm +** $ gcc -O2 -std=c99 -o lush onelua.c -lm ** ** or (for C89) ** -** $ gcc -O2 -std=c89 -DLUA_USE_C89 -o lua onelua.c -lm +** $ gcc -O2 -std=c89 -DLUA_USE_C89 -o lush onelua.c -lm ** ** or (for Linux) ** -** gcc -O2 -o lua -DLUA_USE_LINUX -Wl,-E onelua.c -lm -ldl +** gcc -O2 -o lush -DLUA_USE_LINUX -Wl,-E onelua.c -lm -ldl ** */ diff --git a/testes/all.lua b/testes/all.lua index a4deda85..f4837bcf 100755 --- a/testes/all.lua +++ b/testes/all.lua @@ -1,4 +1,4 @@ -#!../lua +#!../lush -- $Id: testes/all.lua $ -- See Copyright Notice in file lua.h