diff options
| author | 2024-09-04 09:04:00 -0400 | |
|---|---|---|
| committer | 2024-09-04 09:04:00 -0400 | |
| commit | eea119487cfbaa5ca693aa1d8ac162d0238bf31e (patch) | |
| tree | c3476115be1e96bf0093d36ff09a134b7ae98e63 /.lush/scripts/example.lua | |
| parent | added missing lua registrations (diff) | |
added exists function to lua api
Diffstat (limited to '.lush/scripts/example.lua')
| -rw-r--r-- | .lush/scripts/example.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.lush/scripts/example.lua b/.lush/scripts/example.lua index 8da0435..04cb516 100644 --- a/.lush/scripts/example.lua +++ b/.lush/scripts/example.lua @@ -44,3 +44,8 @@ print(cwd) lush.cd("~/.lush/scripts") lush.exec('cat "example.lua" | grep "hello" | sort | uniq') lush.cd(cwd) + +-- exists allows you to check if a file or directory exists +if lush.exists("~/.lush/scripts/example.lua") then + print("example.lua exists") +end |
