diff options
Diffstat (limited to '')
| -rw-r--r-- | .lush/init.lua | 1 | ||||
| -rw-r--r-- | .lush/scripts/example.lua | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/.lush/init.lua b/.lush/init.lua index 5446dd0..d3166d7 100644 --- a/.lush/init.lua +++ b/.lush/init.lua @@ -24,6 +24,7 @@ lush.setenv("PATH", path) -- the prompt can be customized here too -- %u is username, %h is hostname, %w is current working directory +-- %t is current time in hr:min:sec, %d is date in MM/DD/YYYY lush.setPrompt("[%u@%h: %w]") -- aliases can be defined using the alias method by passing the alias name diff --git a/.lush/scripts/example.lua b/.lush/scripts/example.lua index c60f99b..0239500 100644 --- a/.lush/scripts/example.lua +++ b/.lush/scripts/example.lua @@ -91,3 +91,8 @@ print("Value of EXAMPLE: " .. lush.getenv("EXAMPLE")) -- you can unset an environment variable with unsetenv lush.unsetenv("EXAMPLE") + +-- you can get the current terminal width(cols) and height(rows) +-- this function is very useful if you want to make certain kinds of custom prompts in your init.lua +print("Terminal Columns: " .. lush.termCols()) +print("Terminal Rows: " .. lush.termRows()) |
