Rename project from Lua to Lush

Binary is now 'lush', library is 'liblush.a'. Version banner shows
"Lush 0.1.0" with original Lua copyright preserved. Adds LUSH_VERSION
defines and _LUSH_VERSION global. Internal C API names, env vars, and
default paths are unchanged for upstream compatibility.
This commit is contained in:
Cormac Shannon
2026-03-22 23:54:03 +00:00
parent 51b39930ed
commit 0df1b50adf
9 changed files with 27 additions and 17 deletions

1
.gitignore vendored
View File

@@ -13,5 +13,6 @@ testes/libs/all
temp
lua
lush
compat-tests/

View File

@@ -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).

2
all
View File

@@ -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"

3
lapi.c
View File

@@ -34,7 +34,8 @@
const char lua_ident[] =
"$LuaVersion: " LUA_COPYRIGHT " $"
"$LuaAuthors: " LUA_AUTHORS " $";
"$LuaAuthors: " LUA_AUTHORS " $"
"$LushVersion: " LUSH_RELEASE " $";

6
lua.c
View File

@@ -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 */

12
lua.h
View File

@@ -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 <stddef.h>
#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"

View File

@@ -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

View File

@@ -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
**
*/

View File

@@ -1,4 +1,4 @@
#!../lua
#!../lush
-- $Id: testes/all.lua $
-- See Copyright Notice in file lua.h