diff options
| author | 2024-09-08 22:13:17 -0400 | |
|---|---|---|
| committer | 2024-09-08 22:13:17 -0400 | |
| commit | 6a2689d4ea04c79f7ef1fddf369dafbfd14e64e6 (patch) | |
| tree | b1c628a72a60cb91e04e8b095c911255e359f9bd /.lush | |
| parent | added lua api functions for indexing history (diff) | |
added getenv and putenv to Lua API
fixed bug where terminal closed upon encountering Lua error
Diffstat (limited to '.lush')
| -rw-r--r-- | .lush/scripts/example.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.lush/scripts/example.lua b/.lush/scripts/example.lua index 53ee6e8..4d0b8fa 100644 --- a/.lush/scripts/example.lua +++ b/.lush/scripts/example.lua @@ -82,3 +82,9 @@ print("Most recent history: " .. lush.lastHistory()) -- you can also fetch history at a certain index in the past (1 being most recent) print("Most recent history indexed: " .. lush.getHistory(1)) + +-- you can set environment variables using putenv +lush.putenv("EXAMPLE=Lunar Shell Example") + +-- you can get an environment variable using getenv +print("Value of EXAMPLE: " .. lush.getenv("EXAMPLE")) |
