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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,5 +13,6 @@ testes/libs/all
|
|||||||
|
|
||||||
temp
|
temp
|
||||||
lua
|
lua
|
||||||
|
lush
|
||||||
|
|
||||||
compat-tests/
|
compat-tests/
|
||||||
|
|||||||
@@ -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).
|
Based on [Lua](https://www.lua.org/) by R. Ierusalimschy, L. H. de Figueiredo, W. Celes (PUC-Rio).
|
||||||
|
|
||||||
Download official Lua releases from [Lua.org](https://www.lua.org/download.html).
|
|
||||||
|
|||||||
2
all
2
all
@@ -6,7 +6,7 @@ LUA_FLAGS="-W"
|
|||||||
if [ "$(uname)" != "Linux" ]; then
|
if [ "$(uname)" != "Linux" ]; then
|
||||||
LUA_FLAGS="$LUA_FLAGS -e_port=true"
|
LUA_FLAGS="$LUA_FLAGS -e_port=true"
|
||||||
fi
|
fi
|
||||||
if { ../lua $LUA_FLAGS all.lua; } then
|
if { ../lush $LUA_FLAGS all.lua; } then
|
||||||
echo -e "\n\n final OK!!!!\n\n"
|
echo -e "\n\n final OK!!!!\n\n"
|
||||||
else
|
else
|
||||||
echo -e "\n\n >>>> BUG!!!!\n\n"
|
echo -e "\n\n >>>> BUG!!!!\n\n"
|
||||||
|
|||||||
3
lapi.c
3
lapi.c
@@ -34,7 +34,8 @@
|
|||||||
|
|
||||||
const char lua_ident[] =
|
const char lua_ident[] =
|
||||||
"$LuaVersion: " LUA_COPYRIGHT " $"
|
"$LuaVersion: " LUA_COPYRIGHT " $"
|
||||||
"$LuaAuthors: " LUA_AUTHORS " $";
|
"$LuaAuthors: " LUA_AUTHORS " $"
|
||||||
|
"$LushVersion: " LUSH_RELEASE " $";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
lua.c
6
lua.c
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.c $
|
** $Id: lua.c $
|
||||||
** Lua stand-alone interpreter
|
** Lush stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(LUA_PROGNAME)
|
#if !defined(LUA_PROGNAME)
|
||||||
#define LUA_PROGNAME "lua"
|
#define LUA_PROGNAME "lush"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LUA_INIT_VAR)
|
#if !defined(LUA_INIT_VAR)
|
||||||
@@ -834,6 +834,8 @@ static int pmain (lua_State *L) {
|
|||||||
lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
|
lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
|
||||||
}
|
}
|
||||||
luai_openlibs(L); /* open standard libraries */
|
luai_openlibs(L); /* open standard libraries */
|
||||||
|
lua_pushstring(L, LUSH_VERSION);
|
||||||
|
lua_setglobal(L, "_LUSH_VERSION");
|
||||||
createargtable(L, argv, argc, script); /* create table 'arg' */
|
createargtable(L, argv, argc, script); /* create table 'arg' */
|
||||||
lua_gc(L, LUA_GCRESTART); /* start GC... */
|
lua_gc(L, LUA_GCRESTART); /* start GC... */
|
||||||
lua_gc(L, LUA_GCGEN); /* ...in generational mode */
|
lua_gc(L, LUA_GCGEN); /* ...in generational mode */
|
||||||
|
|||||||
12
lua.h
12
lua.h
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.h $
|
** $Id: lua.h $
|
||||||
** Lua - A Scripting Language
|
** Lush - A Shell built on Lua
|
||||||
** Lua.org, PUC-Rio, Brazil (www.lua.org)
|
** Lua.org, PUC-Rio, Brazil (www.lua.org)
|
||||||
** See Copyright Notice at the end of this file
|
** See Copyright Notice at the end of this file
|
||||||
*/
|
*/
|
||||||
@@ -13,7 +13,15 @@
|
|||||||
#include <stddef.h>
|
#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"
|
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
makefile
4
makefile
@@ -98,7 +98,7 @@ RM= rm -f
|
|||||||
|
|
||||||
LIBS = -lm
|
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 \
|
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 \
|
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
|
||||||
ltm.o lundump.o lvm.o lzio.o ltests.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 \
|
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
|
lutf8lib.o loadlib.o lcorolib.o lcmd.o lbuiltin.o linit.o
|
||||||
|
|
||||||
LUA_T= lua
|
LUA_T= lush
|
||||||
LUA_O= lua.o
|
LUA_O= lua.o
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
onelua.c
6
onelua.c
@@ -3,15 +3,15 @@
|
|||||||
** Compiling just this file generates a complete Lua stand-alone
|
** Compiling just this file generates a complete Lua stand-alone
|
||||||
** program:
|
** program:
|
||||||
**
|
**
|
||||||
** $ gcc -O2 -std=c99 -o lua onelua.c -lm
|
** $ gcc -O2 -std=c99 -o lush onelua.c -lm
|
||||||
**
|
**
|
||||||
** or (for C89)
|
** 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)
|
** 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
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!../lua
|
#!../lush
|
||||||
-- $Id: testes/all.lua $
|
-- $Id: testes/all.lua $
|
||||||
-- See Copyright Notice in file lua.h
|
-- See Copyright Notice in file lua.h
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user